Skip to content

Commit

Permalink
Fixes #1862 - removes css-fixme
Browse files Browse the repository at this point in the history
  • Loading branch information
zoepage authored and Mike Taylor committed Nov 13, 2017
1 parent 8968ed9 commit 42cfdc2
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 183 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ webcompat/static/js/diagnose.js
webcompat/static/js/issues.js
webcompat/static/js/issue-list.js
webcompat/static/js/user-activity.js
webcompat/static/js/cssfixme.js
webcompat/static/js/templates.js
webcompat/**/*.min.js
webcompat/**/*.min.css
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ install:
- firefox --version
# lint python
- pep8 --ignore=E402 webcompat/ tests/ config/secrets.py.example
- npm run module
- python run.py -t &

before_script:
Expand Down
2 changes: 0 additions & 2 deletions docs/dev-env-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ We use [Grunt](http://gruntjs.com/) as a task runner to perform certain things (
git clone https://github.com/<username>/webcompat.com.git #replace your github username
# change to directory
cd webcompat.com
# check out submodules
npm run module
# initializing project
npm run setup
```
Expand Down
1 change: 0 additions & 1 deletion git_modules/css-fixme
Submodule css-fixme deleted from ab14e4
8 changes: 0 additions & 8 deletions grunt-tasks/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ module.exports = function(grunt) {
"<%= jsPath %>/lib/user-activity.js"
],
dest: "<%= jsPath %>/user-activity.js"
},
cssFixmeLibs: {
src: [
"git_modules/css-fixme/js/css-browserside.js",
"git_modules/css-fixme/js/css-fixme.js",
"<%= jsPath %>/lib/css-fixme-ui.js"
],
dest: "<%= jsPath %>/cssfixme.js"
}
});
};
4 changes: 0 additions & 4 deletions grunt-tasks/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ module.exports = function(grunt) {
contributors: {
src: "<%= jsPath %>/lib/contributors.js",
dest: "<%= jsPath %>/contributors.min.js"
},
cssFixmeLibs: {
src: "<%= concat.cssFixmeLibs.dest %>",
dest: "<%= jsPath %>/cssfixme.min.js"
}
});
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"stylelint-config-standard": "^16.0.0"
},
"scripts": {
"setup": "npm run module && npm run virtualenv && npm install && npm run config",
"setup": "npm run virtualenv && npm install && npm run config",
"watch": "grunt watch",
"build": "grunt",
"jst": "grunt jst",
Expand All @@ -62,7 +62,6 @@
"fix": "npm run lint:fix:JS",
"lint:fix:JS": "eslint --fix ./Gruntfile.js ./tests ./grunt-tasks ./webcompat/static/js/lib",
"imagemin": "grunt imagemin",
"module": "git submodule init && git submodule update",
"prestart": "npm run build",
"start": "source env/bin/activate || . env/bin/activate && python run.py",
"start:test": "npm run build && source env/bin/activate || . env/bin/activate && python run.py -t",
Expand Down
1 change: 0 additions & 1 deletion tests/test_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def test_titles(self):
('/', defaultTitle),
('/about', 'About'),
('/contributors', 'Contributors'),
('/tools/cssfixme', 'CSS Fix Me'),
('/issues/' + issueNum, 'Issue #' + issueNum),
('/issues', 'Issues'),
('issues/new', 'New Issue'),
Expand Down
13 changes: 1 addition & 12 deletions tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,13 @@ def test_csp_report_uri_bad_content_type(self):
def test_tools_cssfixme(self):
'''Test that the /tools/cssfixme route gets 200.'''
rv = self.app.get('/tools/cssfixme')
self.assertEqual(rv.status_code, 200)
self.assertEqual(rv.status_code, 410)

def test_rate_limit(self):
'''Rate Limit URI sends 410 Gone.'''
rv = self.app.get('/rate_limit')
self.assertEqual(rv.status_code, 410)

def test_tools_cssfixme_with_URL(self):
'''Test that the /tools/cssfixme route gets 200 with ?url query.'''
url = '/tools/cssfixme?url=https://webcompat.com/css/webcompat.min.css'
rv = self.app.get(url)
self.assertEqual(rv.status_code, 200)

def test_tools_cssfixme_with_nonsense_URL(self):
'''Test that the /tools/cssfixme route gets 200 with bad ?url query.'''
rv = self.app.get('/tools/cssfixme?url=foobar')
self.assertEqual(rv.status_code, 200)

def test_missing_parameters_for_new_issue(self):
'''Sends 400 to POST on /issues/new with missing parameters.'''
rv = self.app.post('/issues/new', data=dict(url='foo'))
Expand Down
43 changes: 0 additions & 43 deletions webcompat/static/css/development/components/cssfixme.css

This file was deleted.

1 change: 0 additions & 1 deletion webcompat/static/css/development/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
@import "components/dropdown-header";
@import "components/search-issue";
@import "components/search-form";
@import "components/cssfixme";
@import "components/threesteps";
@import "components/link";
@import "components/github-link";
Expand Down
51 changes: 0 additions & 51 deletions webcompat/static/js/lib/css-fixme-ui.js

This file was deleted.

50 changes: 0 additions & 50 deletions webcompat/templates/cssfixme.html

This file was deleted.

9 changes: 6 additions & 3 deletions webcompat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def show_rate_limit():
– Blade Runner
This resource doesn't exist anymore."""
return (msg, 410, {"content-type": "text/plain; charset=utf-8"})
return (msg, 410, {'content-type': 'text/plain; charset=utf-8'})


if app.config['LOCALHOST']:
Expand Down Expand Up @@ -330,8 +330,11 @@ def contributors():

@app.route('/tools/cssfixme')
def cssfixme():
"""Route for CSS Fix me tool."""
return render_template('cssfixme.html')
msg = """
This resource doesn't exist anymore.
See https://github.com/webcompat/css-fixme/
for more details."""
return (msg, 410, {'content-type': 'text/plain; charset=utf-8'})


@app.route('/csp-report', methods=['POST'])
Expand Down

0 comments on commit 42cfdc2

Please sign in to comment.