maximus 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +66 -0
- data/Rakefile +2 -0
- data/bin/maximus +15 -0
- data/lib/maximus.rb +25 -0
- data/lib/maximus/cli.rb +106 -0
- data/lib/maximus/config/.jshintignore +2 -0
- data/lib/maximus/config/jshint.json +9 -0
- data/lib/maximus/config/phantomas.json +4 -0
- data/lib/maximus/config/phantomas_urls.yaml +1 -0
- data/lib/maximus/config/rubocop.yml +1007 -0
- data/lib/maximus/config/scsslint.yml +58 -0
- data/lib/maximus/config/stylestats.json +30 -0
- data/lib/maximus/config/wraith.yaml +56 -0
- data/lib/maximus/config/wraith/casper.js +20 -0
- data/lib/maximus/config/wraith/nojs.js +85 -0
- data/lib/maximus/config/wraith/snap.js +85 -0
- data/lib/maximus/constants.rb +3 -0
- data/lib/maximus/git_control.rb +255 -0
- data/lib/maximus/helper.rb +137 -0
- data/lib/maximus/lint.rb +201 -0
- data/lib/maximus/lints/brakeman.rb +61 -0
- data/lib/maximus/lints/jshint.rb +20 -0
- data/lib/maximus/lints/railsbp.rb +51 -0
- data/lib/maximus/lints/rubocop.rb +18 -0
- data/lib/maximus/lints/scsslint.rb +17 -0
- data/lib/maximus/rake_tasks.rb +13 -0
- data/lib/maximus/reporter/git-lines.sh +57 -0
- data/lib/maximus/reporter/jshint.js +28 -0
- data/lib/maximus/reporter/rubocop.rb +49 -0
- data/lib/maximus/statistic.rb +65 -0
- data/lib/maximus/statistics/phantomas.rb +32 -0
- data/lib/maximus/statistics/stylestats.rb +111 -0
- data/lib/maximus/statistics/wraith.rb +88 -0
- data/lib/maximus/tasks/be.rake +35 -0
- data/lib/maximus/tasks/fe.rake +30 -0
- data/lib/maximus/tasks/maximus.rake +39 -0
- data/lib/maximus/tasks/statistic.rake +26 -0
- data/lib/maximus/version.rb +3 -0
- data/maximus.gemspec +32 -0
- data/roadmap.md +17 -0
- metadata +243 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
desc "Run some sweet lint scripts for the back-end"
|
2
|
+
namespace :maximus do
|
3
|
+
namespace :be do
|
4
|
+
|
5
|
+
desc "Run rubocop"
|
6
|
+
task :rubocop, :path do |t, args|
|
7
|
+
Maximus::Rubocop.new({ path: args[:path] }).result
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "Run rails_best_practices"
|
11
|
+
task :railsbp, :path do |t, args|
|
12
|
+
Maximus::Railsbp.new({ path: args[:path] }).result
|
13
|
+
end
|
14
|
+
# alias by full name
|
15
|
+
task :rails_best_practices => :railsbp
|
16
|
+
|
17
|
+
desc "Run brakeman"
|
18
|
+
task :brakeman, :path do |t, args|
|
19
|
+
Maximus::Brakeman.new({ path: args[:path] }).result
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "Execute all back-end tasks"
|
23
|
+
task :all do
|
24
|
+
Rake::Task['maximus:be:rubocop'].invoke
|
25
|
+
if defined?(Rails)
|
26
|
+
Rake::Task['maximus:be:railsbp'].invoke
|
27
|
+
Rake::Task['maximus:be:brakeman'].invoke
|
28
|
+
end
|
29
|
+
end
|
30
|
+
# alias by extension
|
31
|
+
task :rb => :all
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
desc "Run some sweet lint scripts for the front-end"
|
2
|
+
namespace :maximus do
|
3
|
+
|
4
|
+
namespace :fe do
|
5
|
+
|
6
|
+
desc "Run scss-lint"
|
7
|
+
task :scsslint, :path do |t, args|
|
8
|
+
Maximus::Scsslint.new({ path: args[:path] }).result
|
9
|
+
end
|
10
|
+
# alias by extension
|
11
|
+
task :scss, [:path] => :scsslint
|
12
|
+
|
13
|
+
desc "Run jshint (node required)"
|
14
|
+
task :jshint, :path do |t, args|
|
15
|
+
Maximus::Jshint.new({ path: args[:path] }).result
|
16
|
+
end
|
17
|
+
# alias by extension
|
18
|
+
task :js, [:path] => :jshint
|
19
|
+
|
20
|
+
desc "Execute all front-end tasks"
|
21
|
+
task :all => [:scsslint, :jshint]
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Execute all front-end tasks"
|
26
|
+
task :fe do
|
27
|
+
Rake::Task['maximus:fe:all'].invoke
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
desc "Run all lint tasks for front-end, back-end, statistics, and a bonus compare"
|
2
|
+
namespace :maximus do
|
3
|
+
|
4
|
+
desc "Execute all front-end tasks"
|
5
|
+
task :fe do
|
6
|
+
Rake::Task['maximus:fe:all'].invoke
|
7
|
+
end
|
8
|
+
# alias by longer name
|
9
|
+
task :front => :fe
|
10
|
+
|
11
|
+
desc "Execute all back-end tasks"
|
12
|
+
task :be do
|
13
|
+
Rake::Task['maximus:be:all'].invoke
|
14
|
+
end
|
15
|
+
# alias by longer name
|
16
|
+
task :back => :be
|
17
|
+
|
18
|
+
desc "Execute all statistics tasks"
|
19
|
+
task :statistic do
|
20
|
+
Rake::Task['maximus:statistic:all'].invoke
|
21
|
+
end
|
22
|
+
# alias abbreviation
|
23
|
+
task :stat => :statistic
|
24
|
+
|
25
|
+
desc "Display lint data from the last commit alone"
|
26
|
+
task :compare, :commit do |t, args|
|
27
|
+
args.with_defaults(commit: 'working')
|
28
|
+
Maximus::GitControl.new({ commit: args[:commit] }).lints_and_stats(true)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Execute all front-end, back-end and statistic tasks"
|
34
|
+
task :maximus do
|
35
|
+
Rake::Task['maximus:fe:all'].invoke
|
36
|
+
Rake::Task['maximus:be:all'].invoke
|
37
|
+
Rake::Task['maximus:statistic:all'].invoke
|
38
|
+
Rake::Task['maximus:compare'].invoke
|
39
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
desc "Run some sweet statistic scripts for the front-end"
|
2
|
+
namespace :maximus do
|
3
|
+
|
4
|
+
namespace :statistic do
|
5
|
+
|
6
|
+
desc "Run stylestats (node required)"
|
7
|
+
task :stylestats, :path do |t, args|
|
8
|
+
Maximus::Stylestats.new({ path:args[:path] }).result
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Run phantomas (node and phantomjs required)"
|
12
|
+
task :phantomas, :path do |t, args|
|
13
|
+
Maximus::Phantomas.new({ path:args[:path] }).result
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Run Wraith (phantomjs required)"
|
17
|
+
task :wraith, :path do |t, args|
|
18
|
+
Maximus::Wraith.new({ path:args[:path] }).result
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Execute all statistics tasks"
|
22
|
+
task :all => [:stylestats, :wraith, :phantomas]
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/maximus.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'maximus/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "maximus"
|
8
|
+
spec.version = Maximus::VERSION
|
9
|
+
spec.authors = ["Tim Shedor"]
|
10
|
+
spec.email = ["tshedor@gmail.com"]
|
11
|
+
spec.summary = %q{Run tests and save them to the Colosseum}
|
12
|
+
spec.description = %q{Supports scss-lint, jshint, rubocop, brakeman and rails_best_practices. Statistics include phantomas, stylestats and wraith}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "git"
|
22
|
+
spec.add_runtime_dependency "scss-lint"
|
23
|
+
spec.add_runtime_dependency "rainbow"
|
24
|
+
spec.add_runtime_dependency "rubocop"
|
25
|
+
spec.add_runtime_dependency "rails_best_practices"
|
26
|
+
spec.add_runtime_dependency "brakeman"
|
27
|
+
spec.add_runtime_dependency "wraith"
|
28
|
+
spec.add_runtime_dependency "activesupport"
|
29
|
+
spec.add_runtime_dependency "thor"
|
30
|
+
spec.add_runtime_dependency "rake"
|
31
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
32
|
+
end
|
data/roadmap.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Roadmap
|
2
|
+
|
3
|
+
* Check for a maximus.yml config file (for base_url, config_url, etc.)
|
4
|
+
* Check for custom lint or stat hooks in a lib/maximus folder
|
5
|
+
* Use PhantomJS 2.0 with webfont support
|
6
|
+
* Install task
|
7
|
+
* Resolve/review TODOs
|
8
|
+
* Tests and specs
|
9
|
+
* Load config globally when starting, or something similar - calling is_dev happens too often
|
10
|
+
* Convert ruby-git to rugged (MAYBE - rugged requires libgit2)
|
11
|
+
* Add SCSS specificity graph
|
12
|
+
* Add HAML lint (maybe)
|
13
|
+
* Add CSS lint (maybe)
|
14
|
+
* Add JSLint (maybe)
|
15
|
+
* Add W3 validator (maybe)
|
16
|
+
* Write tests
|
17
|
+
* Regex path names on phantomas and wraith to defend against injection and bad characters
|
metadata
ADDED
@@ -0,0 +1,243 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: maximus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tim Shedor
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: git
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: scss-lint
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rainbow
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails_best_practices
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: brakeman
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: wraith
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: activesupport
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: thor
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: bundler
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.6'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.6'
|
167
|
+
description: Supports scss-lint, jshint, rubocop, brakeman and rails_best_practices.
|
168
|
+
Statistics include phantomas, stylestats and wraith
|
169
|
+
email:
|
170
|
+
- tshedor@gmail.com
|
171
|
+
executables:
|
172
|
+
- maximus
|
173
|
+
extensions: []
|
174
|
+
extra_rdoc_files: []
|
175
|
+
files:
|
176
|
+
- .gitignore
|
177
|
+
- Gemfile
|
178
|
+
- LICENSE.txt
|
179
|
+
- README.md
|
180
|
+
- Rakefile
|
181
|
+
- bin/maximus
|
182
|
+
- lib/maximus.rb
|
183
|
+
- lib/maximus/cli.rb
|
184
|
+
- lib/maximus/config/.jshintignore
|
185
|
+
- lib/maximus/config/jshint.json
|
186
|
+
- lib/maximus/config/phantomas.json
|
187
|
+
- lib/maximus/config/phantomas_urls.yaml
|
188
|
+
- lib/maximus/config/rubocop.yml
|
189
|
+
- lib/maximus/config/scsslint.yml
|
190
|
+
- lib/maximus/config/stylestats.json
|
191
|
+
- lib/maximus/config/wraith.yaml
|
192
|
+
- lib/maximus/config/wraith/casper.js
|
193
|
+
- lib/maximus/config/wraith/nojs.js
|
194
|
+
- lib/maximus/config/wraith/snap.js
|
195
|
+
- lib/maximus/constants.rb
|
196
|
+
- lib/maximus/git_control.rb
|
197
|
+
- lib/maximus/helper.rb
|
198
|
+
- lib/maximus/lint.rb
|
199
|
+
- lib/maximus/lints/brakeman.rb
|
200
|
+
- lib/maximus/lints/jshint.rb
|
201
|
+
- lib/maximus/lints/railsbp.rb
|
202
|
+
- lib/maximus/lints/rubocop.rb
|
203
|
+
- lib/maximus/lints/scsslint.rb
|
204
|
+
- lib/maximus/rake_tasks.rb
|
205
|
+
- lib/maximus/reporter/git-lines.sh
|
206
|
+
- lib/maximus/reporter/jshint.js
|
207
|
+
- lib/maximus/reporter/rubocop.rb
|
208
|
+
- lib/maximus/statistic.rb
|
209
|
+
- lib/maximus/statistics/phantomas.rb
|
210
|
+
- lib/maximus/statistics/stylestats.rb
|
211
|
+
- lib/maximus/statistics/wraith.rb
|
212
|
+
- lib/maximus/tasks/be.rake
|
213
|
+
- lib/maximus/tasks/fe.rake
|
214
|
+
- lib/maximus/tasks/maximus.rake
|
215
|
+
- lib/maximus/tasks/statistic.rake
|
216
|
+
- lib/maximus/version.rb
|
217
|
+
- maximus.gemspec
|
218
|
+
- roadmap.md
|
219
|
+
homepage: ''
|
220
|
+
licenses:
|
221
|
+
- MIT
|
222
|
+
metadata: {}
|
223
|
+
post_install_message:
|
224
|
+
rdoc_options: []
|
225
|
+
require_paths:
|
226
|
+
- lib
|
227
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
228
|
+
requirements:
|
229
|
+
- - '>='
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: '0'
|
232
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - '>='
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
requirements: []
|
238
|
+
rubyforge_project:
|
239
|
+
rubygems_version: 2.0.14
|
240
|
+
signing_key:
|
241
|
+
specification_version: 4
|
242
|
+
summary: Run tests and save them to the Colosseum
|
243
|
+
test_files: []
|