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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eb7aa212973bec790a845f434af0f55606992a12
4
- data.tar.gz: c0ddd21e79216eee0b7802f4e449a271008dca6c
2
+ SHA256:
3
+ metadata.gz: 93765b752157e2ed468104c3b4ad52c1977b3597024b683816f556b1cb5f8cf4
4
+ data.tar.gz: 196d3af84519f0a390c7c7734a2f0507e19590652cfa50376f22d6c882be7d03
5
5
  SHA512:
6
- metadata.gz: 981608f09461512f636f793278c4b8e5e1f7c699b76ec3980cc4c02297badf451f29f60a560eafd4aea015f56a00d3c6e5d7b7f5def43e51ea8f72c87ce8c8c2
7
- data.tar.gz: 8528187b375bb9b0c8c72b79c9312e5720d1539af087d739cd41699787115cff5228f471ccaa2264eacd1067cf3277312178ffa473da1f0d26e26193f05d1c41
6
+ metadata.gz: 90e4bbe522a8edd409fc83463408a7082dee48f3768908499d636de5dd86fa8c561e15803cd08cf4ebed91745716193bf58f6237ab81bfd5eb1b4e5e032f0783
7
+ data.tar.gz: e53aff9df13079f9e8a764675c7735f1db6f0a26592956846666d529b92403400e02c4a71cf5fbdf8d852b23b9192803fdf2e04d79fe4e9dbd0c4bce6f1f784e
@@ -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 "scss-lint"
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
@@ -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
- attr_reader :percentage_coverage_goal
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}',
@@ -0,0 +1,4 @@
1
+ speedups:
2
+ each_with_index_vs_while: false
3
+ exclude_paths:
4
+ - 'vendor/**/*.rb'
@@ -18,7 +18,9 @@ AllCops:
18
18
  - 'vendor/**/*'
19
19
  - 'tmp/**/*'
20
20
  - 'bin/**/*'
21
- RunRailsCops: true
21
+
22
+ Rails:
23
+ Enabled: true
22
24
 
23
25
  LineLength:
24
26
  Description: 'Limit lines to 140 characters.'
@@ -7,6 +7,7 @@ module Commitment
7
7
  load 'commitment/tasks/jshint.rake'
8
8
  load 'commitment/tasks/scss_lint.rake'
9
9
  load 'commitment/tasks/code_coverage.rake'
10
+ load 'commitment/tasks/fasterer.rake'
10
11
  end
11
12
 
12
13
  generators do
@@ -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#{coverage_percentage}%\tExpected\n\t#{Commitment.config.percentage_coverage_goal}%\tActual")
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
@@ -1,3 +1,3 @@
1
1
  module Commitment
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.4
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: 2015-08-10 00:00:00.000000000 Z
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: scss-lint
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
- rubyforge_project:
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.