Skip to content

Commit

Permalink
Revert "Precommit - Fix linty things"
Browse files Browse the repository at this point in the history
  • Loading branch information
castrapel committed Aug 22, 2018
1 parent e21693c commit 1b77dfa
Show file tree
Hide file tree
Showing 45 changed files with 206 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .bowerrc
@@ -1,3 +1,3 @@
{
"directory": "bower_components"
"directory": "bower_components"
}
28 changes: 14 additions & 14 deletions .jshintrc
@@ -1,29 +1,29 @@
{
"bitwise": true,
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"esnext": true,
"globals": {
"_": false,
"angular": false,
"d3": false,
"moment": false,
"self": false,
"toaster": false
},
"immed": true,
"indent": 2,
"latedef": false,
"newcap": false,
"noarg": true,
"node": true,
"quotmark": "single",
"regexp": true,
"smarttabs": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"undef": true,
"unused": true
"smarttabs": true,
"globals": {
"angular": false,
"moment": false,
"toaster": false,
"d3": false,
"self": false,
"_": false
}
}
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Expand Up @@ -4,12 +4,6 @@
- id: trailing-whitespace
- id: flake8
- id: check-merge-conflict
- id: pretty-format-json
- id: check-ast
- id: check-case-conflict
- id: check-yaml
- id: autopep8-wrapper

- repo: git://github.com/pre-commit/mirrors-jshint
sha: v2.9.5
hooks:
Expand Down
76 changes: 38 additions & 38 deletions bower.json
@@ -1,56 +1,56 @@
{
"name": "lemur",
"repository": {
"type": "git",
"url": "git://github.com/netflix/lemur.git"
},
"private": true,
"dependencies": {
"jquery": "~2.2.0",
"angular-wizard": "~0.4.0",
"angular": "1.4.9",
"angular-animate": "~1.4.9",
"json3": "~3.3",
"es5-shim": "~4.5.0",
"bootstrap": "~3.3.6",
"angular-bootstrap": "~1.1.1",
"angular-chart.js": "~0.8.8",
"angular-clipboard": "~1.3.0",
"angular-file-saver": "~1.0.1",
"angular-animate": "~1.4.9",
"restangular": "~1.5.1",
"ng-table": "~0.8.3",
"moment": "~2.11.1",
"angular-loading-bar": "~0.8.0",
"angular-moment": "~0.10.3",
"angular-sanitize": "~1.5.0",
"angular-smart-table": "2.1.8",
"angular-strap": ">= 2.2.2",
"angular-translate": "^2.9.0",
"angular-ui-router": "~0.2.15",
"angular-ui-select": "~0.17.1",
"angular-ui-switch": "~0.1.0",
"angular-underscore": "^0.5.0",
"angular-wizard": "~0.4.0",
"moment-range": "~2.1.0",
"angular-clipboard": "~1.3.0",
"angularjs-toaster": "~1.0.0",
"bootstrap": "~3.3.6",
"angular-chart.js": "~0.8.8",
"ngletteravatar": "~4.0.0",
"bootswatch": "~3.3.6",
"d3": "^3.5.17",
"es5-shim": "~4.5.0",
"font-awesome": "~4.5.0",
"fontawesome": "~4.5.0",
"jquery": "~2.2.0",
"json3": "~3.3",
"lodash": "~4.0.1",
"moment": "~2.11.1",
"moment-range": "~2.1.0",
"ng-table": "~0.8.3",
"ngletteravatar": "~4.0.0",
"restangular": "~1.5.1",
"satellizer": "~0.13.4",
"underscore": "~1.8.3"
"angular-ui-router": "~0.2.15",
"font-awesome": "~4.5.0",
"lodash": "~4.0.1",
"underscore": "~1.8.3",
"angular-smart-table": "2.1.8",
"angular-strap": ">= 2.2.2",
"angular-underscore": "^0.5.0",
"angular-translate": "^2.9.0",
"angular-ui-switch": "~0.1.0",
"angular-sanitize": "~1.5.0",
"angular-file-saver": "~1.0.1",
"angular-ui-select": "~0.17.1",
"d3": "^3.5.17"
},
"resolutions": {
"moment": ">=2.8.0 <2.11.0",
"lodash": ">=1.3.0 <2.5.0",
"angular": "1.4.9"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"name": "lemur",
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/netflix/lemur.git"
},
"resolutions": {
"angular": "1.4.9",
"lodash": ">=1.3.0 <2.5.0",
"moment": ">=2.8.0 <2.11.0"
}
]
}
2 changes: 1 addition & 1 deletion docs/administration.rst
Expand Up @@ -313,7 +313,7 @@ LDAP support requires the pyldap python library, which also depends on the follo
To configure the use of an LDAP server, a number of settings need to be configured in `lemur.conf.py`.

Here is an example LDAP configuration stanza you can add to your config. Adjust to suit your environment of course.

.. code-block:: python
LDAP_AUTH = True
Expand Down
16 changes: 8 additions & 8 deletions docs/conf.py
Expand Up @@ -203,21 +203,21 @@ def __getattr__(cls, name):
# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
# 'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'lemur.tex', u'Lemur Documentation',
('index', 'lemur.tex', u'Lemur Documentation',
u'Kevin Glisson', 'manual'),
]

Expand Down Expand Up @@ -261,7 +261,7 @@ def __getattr__(cls, name):
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Lemur', u'Lemur Documentation',
('index', 'Lemur', u'Lemur Documentation',
u'Kevin Glisson', 'Lemur', 'SSL Certificate Management',
'Miscellaneous'),
]
Expand Down
12 changes: 6 additions & 6 deletions docs/production/index.rst
Expand Up @@ -217,23 +217,23 @@ An example apache config::
# HSTS (mod_headers is required) (15768000 seconds = 6 months)
Header always set Strict-Transport-Security "max-age=15768000"
...

# Set the lemur DocumentRoot to static/dist
DocumentRoot /www/lemur/lemur/static/dist

# Uncomment to force http 1.0 connections to proxy
# SetEnv force-proxy-request-1.0 1

#Don't keep proxy connections alive
SetEnv proxy-nokeepalive 1

# Only need to do reverse proxy
ProxyRequests Off

# Proxy requests to the api to the lemur service (and sanitize redirects from it)
ProxyPass "/api" "http://127.0.0.1:8000/api"
ProxyPassReverse "/api" "http://127.0.0.1:8000/api"

</VirtualHost>

Also included in the configurations above are several best practices when it comes to deploying TLS. Things like enabling
Expand Down
14 changes: 7 additions & 7 deletions gulp/build.js
Expand Up @@ -240,25 +240,25 @@ gulp.task('addUrlContextPath',['addUrlContextPath:revreplace'], function(){
.pipe(gulpif(urlContextPathExists, replace('angular/', argv.urlContextPath + '/angular/')))
.pipe(gulp.dest(function(file){
return file.base;
}));
});
}))
})
});

gulp.task('addUrlContextPath:revision', function(){
return gulp.src(['lemur/static/dist/**/*.css','lemur/static/dist/**/*.js'])
.pipe(rev())
.pipe(gulp.dest('lemur/static/dist'))
.pipe(rev.manifest())
.pipe(gulp.dest('lemur/static/dist'));
});
.pipe(gulp.dest('lemur/static/dist'))
})

gulp.task('addUrlContextPath:revreplace', ['addUrlContextPath:revision'], function(){
var manifest = gulp.src('lemur/static/dist/rev-manifest.json');
var manifest = gulp.src("lemur/static/dist/rev-manifest.json");
var urlContextPathExists = argv.urlContextPath ? true : false;
return gulp.src('lemur/static/dist/index.html')
return gulp.src( "lemur/static/dist/index.html")
.pipe(gulpif(urlContextPathExists, revReplace({prefix: argv.urlContextPath + '/', manifest: manifest}, revReplace({manifest: manifest}))))
.pipe(gulp.dest('lemur/static/dist'));
});
})


gulp.task('build', ['build:ngviews', 'build:inject', 'build:images', 'build:fonts', 'build:html', 'build:extras']);
Expand Down
4 changes: 1 addition & 3 deletions gulp/karma.conf.js
@@ -1,12 +1,10 @@
'use strict';
// Contents of: config/karma.conf.js

module.exports = function (config) {
config.set({
basePath : '../',

// Fix for "JASMINE is not supported anymore" warning
frameworks : ['jasmine'],
frameworks : ["jasmine"],

files : [
'app/lib/angular/angular.js',
Expand Down
2 changes: 1 addition & 1 deletion gulp/server.js
Expand Up @@ -3,7 +3,7 @@
var gulp = require('gulp');

var browserSync = require('browser-sync');
require('http-proxy');
var httpProxy = require('http-proxy');

/* This configuration allow you to configure browser sync to proxy your backend */
/*
Expand Down
1 change: 0 additions & 1 deletion lemur/auth/ldap.py
Expand Up @@ -18,7 +18,6 @@ class LdapPrincipal():
"""
Provides methods for authenticating against an LDAP server.
"""

def __init__(self, args):
self._ldap_validate_conf()
# setup ldap config
Expand Down
10 changes: 4 additions & 6 deletions lemur/auth/views.py
Expand Up @@ -211,7 +211,6 @@ class Login(Resource):
on your uses cases but. It is important to not that there is currently no build in method to revoke a users token \
and force re-authentication.
"""

def __init__(self):
self.reqparse = reqparse.RequestParser()
super(Login, self).__init__()
Expand Down Expand Up @@ -283,10 +282,10 @@ def post(self):
metrics.send('login', 'counter', 1, metric_tags={'status': SUCCESS_METRIC_STATUS})
return dict(token=create_token(user))
except Exception as e:
current_app.logger.error("ldap error: {0}".format(e))
ldap_message = 'ldap error: %s' % e
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
return dict(message=ldap_message), 403
current_app.logger.error("ldap error: {0}".format(e))
ldap_message = 'ldap error: %s' % e
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
return dict(message=ldap_message), 403

# if not valid user - no certificates for you
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
Expand All @@ -303,7 +302,6 @@ class Ping(Resource):
provider uses for its callbacks.
2. Add or change the Lemur AngularJS Configuration to point to your new provider
"""

def __init__(self):
self.reqparse = reqparse.RequestParser()
super(Ping, self).__init__()
Expand Down
1 change: 0 additions & 1 deletion lemur/authorities/views.py
Expand Up @@ -25,7 +25,6 @@

class AuthoritiesList(AuthenticatedResource):
""" Defines the 'authorities' endpoint """

def __init__(self):
self.reqparse = reqparse.RequestParser()
super(AuthoritiesList, self).__init__()
Expand Down
2 changes: 0 additions & 2 deletions lemur/common/fields.py
Expand Up @@ -25,7 +25,6 @@ class Hex(Field):
"""
A hex formatted string.
"""

def _serialize(self, value, attr, obj):
if value:
value = hex(int(value))[2:].upper()
Expand Down Expand Up @@ -318,7 +317,6 @@ class SubjectAlternativeNameExtension(Field):
:param kwargs: The same keyword arguments that :class:`Field` receives.
"""

def _serialize(self, value, attr, obj):
general_names = []
name_type = None
Expand Down
1 change: 0 additions & 1 deletion lemur/defaults/views.py
Expand Up @@ -19,7 +19,6 @@

class LemurDefaults(AuthenticatedResource):
""" Defines the 'defaults' endpoint """

def __init__(self):
super(LemurDefaults)

Expand Down
3 changes: 0 additions & 3 deletions lemur/destinations/views.py
Expand Up @@ -24,7 +24,6 @@

class DestinationsList(AuthenticatedResource):
""" Defines the 'destinations' endpoint """

def __init__(self):
self.reqparse = reqparse.RequestParser()
super(DestinationsList, self).__init__()
Expand Down Expand Up @@ -336,7 +335,6 @@ def delete(self, destination_id):

class CertificateDestinations(AuthenticatedResource):
""" Defines the 'certificate/<int:certificate_id/destinations'' endpoint """

def __init__(self):
super(CertificateDestinations, self).__init__()

Expand Down Expand Up @@ -409,7 +407,6 @@ def get(self, certificate_id):

class DestinationsStats(AuthenticatedResource):
""" Defines the 'certificates' stats endpoint """

def __init__(self):
self.reqparse = reqparse.RequestParser()
super(DestinationsStats, self).__init__()
Expand Down

0 comments on commit 1b77dfa

Please sign in to comment.