fasterer 0.3.0 → 0.3.1

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
2
  SHA1:
3
- metadata.gz: 9bd16fef20d165a6c0bd45c9c360234396612eb2
4
- data.tar.gz: 2c4befcae361090c9bceed13cbc2e293bd2c311f
3
+ metadata.gz: ab37d8cc76a406119068194b853aadcc2a7b0de7
4
+ data.tar.gz: 84fdbcf5c461d49a07438b41abbe1ffad9e16999
5
5
  SHA512:
6
- metadata.gz: 70a2638a04aebaab8dcecc7d27e28767a5c03b1193edd06acad819f89a83e12d7c1a367902e4c75eda2965be640755a7544fc9932144a569da3b18fcad822304
7
- data.tar.gz: 8f502d31f594eeff788d51c56008fae99bbe951489682428720a87328beac04cf2ea42b5c94e5644042451b4cbe29608f88ff2cada39aae3f5afff808a8ed321
6
+ metadata.gz: a1b3937b1aee5f08d2f48080407307aa960990147b1d48fb6976882fc47703330efbe1509786a6e9a4d1b7ee3577cf8fa50c4669374376e688a386ceb97fe0ad
7
+ data.tar.gz: 0c54541f6b2cf02a3146e65b4376f85c53262cc1b6a8ed0a30dcf9c2447ddef0ec3ac0421e2fe6111c2e9d8da22ba1c2b37a73b5431a5a244eea5590f83ce16d
data/.fasterer.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  speedups:
2
- parallel_assignment: false
3
2
  rescue_vs_respond_to: true
4
3
  module_eval: true
5
4
  shuffle_first_vs_sample: true
data/README.md CHANGED
@@ -61,7 +61,6 @@ Example:
61
61
 
62
62
  ```yaml
63
63
  speedups:
64
- parallel_assignment: false
65
64
  rescue_vs_respond_to: true
66
65
  module_eval: true
67
66
  shuffle_first_vs_sample: true
@@ -52,8 +52,6 @@ module Fasterer
52
52
  scan_method_definitions(element)
53
53
  when :call, :iter
54
54
  scan_method_calls(element)
55
- when :masgn
56
- scan_parallel_assignment(element)
57
55
  when :for
58
56
  scan_for_loop(element)
59
57
  when :resbody
@@ -77,10 +75,6 @@ module Fasterer
77
75
  end
78
76
  end
79
77
 
80
- def scan_parallel_assignment(element)
81
- errors.push(Fasterer::Offense.new(:parallel_assignment, element.line))
82
- end
83
-
84
78
  def scan_for_loop(element)
85
79
  errors.push(Fasterer::Offense.new(:for_loop_vs_each, element.line))
86
80
  end
@@ -16,9 +16,6 @@ module Fasterer
16
16
  end
17
17
 
18
18
  EXPLANATIONS = {
19
- parallel_assignment:
20
- 'Parallel assignment is slower than sequential assignment',
21
-
22
19
  rescue_vs_respond_to:
23
20
  'Don\'t rescue NoMethodError, rather check with respond_to?',
24
21
 
@@ -1,3 +1,3 @@
1
1
  module Fasterer
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan
@@ -145,7 +145,6 @@ files:
145
145
  - lib/fasterer/scanners/rescue_call_scanner.rb
146
146
  - lib/fasterer/token.rb
147
147
  - lib/fasterer/version.rb
148
- - spec/lib/fasterer/analyzer/01_parallel_assignment_spec.rb
149
148
  - spec/lib/fasterer/analyzer/02_rescue_vs_respond_to_spec.rb
150
149
  - spec/lib/fasterer/analyzer/03_module_eval_spec.rb
151
150
  - spec/lib/fasterer/analyzer/06_shuffle_first_vs_sample_spec.rb
@@ -173,7 +172,6 @@ files:
173
172
  - spec/lib/fasterer/method_definition_spec.rb
174
173
  - spec/lib/fasterer/rescue_call_spec.rb
175
174
  - spec/spec_helper.rb
176
- - spec/support/analyzer/01_parallel_assignment.rb
177
175
  - spec/support/analyzer/02_rescue_vs_respond_to.rb
178
176
  - spec/support/analyzer/03_module_eval.rb
179
177
  - spec/support/analyzer/06_shuffle_first_vs_sample.rb
@@ -252,7 +250,6 @@ signing_key:
252
250
  specification_version: 4
253
251
  summary: Run Ruby more than fast. Fasterer
254
252
  test_files:
255
- - spec/lib/fasterer/analyzer/01_parallel_assignment_spec.rb
256
253
  - spec/lib/fasterer/analyzer/02_rescue_vs_respond_to_spec.rb
257
254
  - spec/lib/fasterer/analyzer/03_module_eval_spec.rb
258
255
  - spec/lib/fasterer/analyzer/06_shuffle_first_vs_sample_spec.rb
@@ -280,7 +277,6 @@ test_files:
280
277
  - spec/lib/fasterer/method_definition_spec.rb
281
278
  - spec/lib/fasterer/rescue_call_spec.rb
282
279
  - spec/spec_helper.rb
283
- - spec/support/analyzer/01_parallel_assignment.rb
284
280
  - spec/support/analyzer/02_rescue_vs_respond_to.rb
285
281
  - spec/support/analyzer/03_module_eval.rb
286
282
  - spec/support/analyzer/06_shuffle_first_vs_sample.rb
@@ -1,11 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Fasterer::Analyzer do
4
- let(:test_file_path) { RSpec.root.join('support', 'analyzer', '01_parallel_assignment.rb') }
5
-
6
- it 'should detect parallel assignment 2 times' do
7
- analyzer = Fasterer::Analyzer.new(test_file_path)
8
- analyzer.scan
9
- expect(analyzer.errors[:parallel_assignment].count).to eq(2)
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- a, b = 1, 2
2
-
3
- class User
4
- ROLES = ['mortal', 'admin', 'superadmin']
5
-
6
- def initialize(first_name, last_name)
7
- @first_name, @last_name = first_name, last_name
8
- @full_name = [@first_name, @last_name].join(' ')
9
- end
10
- end