commitment 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/commitment.gemspec +2 -1
- data/lib/commitment.rb +1 -1
- data/lib/commitment/generators/install_generator.rb +5 -0
- data/lib/commitment/generators/templates/.fasterer.yml +4 -0
- data/lib/commitment/generators/templates/.hound.yml +3 -1
- data/lib/commitment/railtie.rb +1 -0
- data/lib/commitment/tasks/code_coverage.rake +1 -1
- data/lib/commitment/tasks/fasterer.rake +12 -0
- data/lib/commitment/version.rb +1 -1
- metadata +20 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 93765b752157e2ed468104c3b4ad52c1977b3597024b683816f556b1cb5f8cf4
|
4
|
+
data.tar.gz: 196d3af84519f0a390c7c7734a2f0507e19590652cfa50376f22d6c882be7d03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90e4bbe522a8edd409fc83463408a7082dee48f3768908499d636de5dd86fa8c561e15803cd08cf4ebed91745716193bf58f6237ab81bfd5eb1b4e5e032f0783
|
7
|
+
data.tar.gz: e53aff9df13079f9e8a764675c7735f1db6f0a26592956846666d529b92403400e02c4a71cf5fbdf8d852b23b9192803fdf2e04d79fe4e9dbd0c4bce6f1f784e
|
data/commitment.gemspec
CHANGED
@@ -25,8 +25,9 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency "rubocop"
|
26
26
|
spec.add_dependency "railties"
|
27
27
|
spec.add_dependency "brakeman"
|
28
|
-
spec.add_dependency "
|
28
|
+
spec.add_dependency "scss_lint"
|
29
29
|
spec.add_dependency "simplecov"
|
30
30
|
spec.add_dependency "jshintrb"
|
31
31
|
spec.add_dependency "codeclimate-test-reporter"
|
32
|
+
spec.add_dependency "fasterer"
|
32
33
|
end
|
data/lib/commitment.rb
CHANGED
@@ -14,7 +14,7 @@ module Commitment
|
|
14
14
|
attr_reader :jshint_exclude_pattern
|
15
15
|
attr_reader :jshint_options
|
16
16
|
attr_reader :scss_lint_config
|
17
|
-
|
17
|
+
attr_accessor :percentage_coverage_goal
|
18
18
|
attr_reader :code_coverage_last_run_pathname
|
19
19
|
|
20
20
|
def initialize
|
@@ -14,6 +14,10 @@ module Commitment
|
|
14
14
|
template('.scss_lint.yml', '.scss_lint.yml')
|
15
15
|
end
|
16
16
|
|
17
|
+
def create_fasterer
|
18
|
+
template('.fasterer.yml', '.fasterer.yml')
|
19
|
+
end
|
20
|
+
|
17
21
|
def create_coverage_helper
|
18
22
|
# Putting this file in the root directory of the project
|
19
23
|
template('coverage_helper.rb', "#{test_framework}/coverage_helper.rb")
|
@@ -28,6 +32,7 @@ task(
|
|
28
32
|
default: [
|
29
33
|
'commitment:rubocop',
|
30
34
|
'commitment:jshint',
|
35
|
+
'commitment:fasterer',
|
31
36
|
'commitment:scss_lint',
|
32
37
|
'commitment:configure_test_for_code_coverage',
|
33
38
|
'#{test_framework}',
|
data/lib/commitment/railtie.rb
CHANGED
@@ -6,7 +6,7 @@ namespace :commitment do
|
|
6
6
|
$stdout.puts "Checking commitment:code_coverage"
|
7
7
|
coverage_percentage = Commitment.config.code_coverage_last_run_results.fetch('result').fetch('covered_percent').to_i
|
8
8
|
if Commitment.config.percentage_coverage_goal > coverage_percentage
|
9
|
-
abort("Code Coverage Goal Not Met:\n\t#{
|
9
|
+
abort("Code Coverage Goal Not Met:\n\t#{Commitment.config.percentage_coverage_goal}%\tExpected\n\t#{coverage_percentage}%\tActual")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :commitment do
|
2
|
+
desc "Check for code that can go faster"
|
3
|
+
task :fasterer do
|
4
|
+
require 'fasterer/file_traverser'
|
5
|
+
file_traverser = Fasterer::FileTraverser.new(nil)
|
6
|
+
file_traverser.traverse
|
7
|
+
if file_traverser.offenses_found?
|
8
|
+
$stderr.puts "You can make the code go faster, see above. You can add exceptions in .fasterer.yml"
|
9
|
+
abort
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/commitment/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commitment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: scss_lint
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: fasterer
|
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'
|
139
153
|
description: Provides a mechanism for monitoring your enduring commitment.
|
140
154
|
email:
|
141
155
|
- jeremy.n.friesen@gmail.com
|
@@ -157,6 +171,7 @@ files:
|
|
157
171
|
- commitment.gemspec
|
158
172
|
- lib/commitment.rb
|
159
173
|
- lib/commitment/generators/install_generator.rb
|
174
|
+
- lib/commitment/generators/templates/.fasterer.yml
|
160
175
|
- lib/commitment/generators/templates/.hound.yml
|
161
176
|
- lib/commitment/generators/templates/.jshintrc
|
162
177
|
- lib/commitment/generators/templates/.scss_lint.yml
|
@@ -164,6 +179,7 @@ files:
|
|
164
179
|
- lib/commitment/railtie.rb
|
165
180
|
- lib/commitment/tasks/brakeman.rake
|
166
181
|
- lib/commitment/tasks/code_coverage.rake
|
182
|
+
- lib/commitment/tasks/fasterer.rake
|
167
183
|
- lib/commitment/tasks/jshint.rake
|
168
184
|
- lib/commitment/tasks/rubocop.rake
|
169
185
|
- lib/commitment/tasks/scss_lint.rake
|
@@ -187,8 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
203
|
- !ruby/object:Gem::Version
|
188
204
|
version: '0'
|
189
205
|
requirements: []
|
190
|
-
|
191
|
-
rubygems_version: 2.4.7
|
206
|
+
rubygems_version: 3.0.1
|
192
207
|
signing_key:
|
193
208
|
specification_version: 4
|
194
209
|
summary: Provides a mechanism for monitoring your enduring commitment.
|