fasterer 0.3.2 → 0.4.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
2
  SHA1:
3
- metadata.gz: 752e5f067f70c26feee7edb2aa5a156e01b711b7
4
- data.tar.gz: 1d963440f1e04eb2587cefd23f5a7db195526d3a
3
+ metadata.gz: f566f36ee7fb7d1d046cda80bf9307790ca0932c
4
+ data.tar.gz: 2f99588c491fbde3c240ce4074f91e602e3d5b1a
5
5
  SHA512:
6
- metadata.gz: ddf223b9b31f2cbb26febba4ba285bdd5bfcef9acb72c9d40038052d487f851799e466cde7efd68bc39e772a8b06ec032d9e89d45df5ac99a4ef4314ce41d527
7
- data.tar.gz: 0743f87aa9babaf9d9e171469bcd9117bc55f41ba65a97c65d4d05d4cf27378632920f1cbc48d7f97c5cff913a65e580e9adf0f31c3823367c96c20dcc5fd02f
6
+ metadata.gz: 0ab309586ed54f00a20b4020b04a917a336a5ba5a882d2cdca5a6a62cca991a282b9def9a1a1baf090f49e28b264cff0b3d4db446c922b2c3b2ad4f0bf8de53e
7
+ data.tar.gz: b762b4c8c7dc625d4e3d2149136aedd0f2829b2865a29f842cbde1438f846c214790d519273aa5b26118ef029fc6e468a05c4f8fc4b9dce7f57ef40853b1a33b
data/.travis.yml CHANGED
@@ -1,9 +1,15 @@
1
1
  language: ruby
2
+ before_install:
3
+ # Travis bundler versions are quite out of date and can cause install errors
4
+ # see: https://github.com/rubygems/rubygems/issues/1419
5
+ - gem update bundler
2
6
  rvm:
3
7
  - 1.9.3
4
8
  - 2.0.0
5
9
  - 2.1.7
6
10
  - 2.2.3
11
+ - 2.3.0
12
+ - 2.4.0
7
13
  env:
8
14
  global:
9
15
  secure: MBTxmpWCjrsNKPlOoFwJUMHze3GPMz8YCXQFQG3zJBh3WGNQnz4z91ra/1P/DClyVCxHGSFCOswxCNe4kJ2zAnPyQLqGSinXy9uDpqZQUEdaRoQbPnh4/bguZNSJ429gtTpMdDSNOgQ+Hra2EFnWwHA+rLF6ImksMsu3XGKGxGE=
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0
4
+ - Better error message on each_key
5
+ - Update Ruby Parser to ~> 3.9
6
+ - Support Ruby 2.3
data/README.md CHANGED
@@ -30,22 +30,21 @@ fasterer
30
30
 
31
31
  ## Example output
32
32
 
33
- ```shell
34
-
33
+ ```
35
34
  app/models/post.rb
36
- Array#select.first is slower than Array#detect. Occured at lines: 57, 61.
35
+ Array#select.first is slower than Array#detect. Occurred at lines: 57, 61.
37
36
 
38
37
  db/seeds/cities.rb
39
- Hash#keys.each is slower than Hash#each_key. Occured at lines: 15, 33.
38
+ Hash#keys.each is slower than Hash#each_key. Occurred at lines: 15, 33.
40
39
 
41
40
  test/options_test.rb
42
- Hash#merge! with one argument is slower than Hash#[]. Occured at lines: 84.
41
+ Hash#merge! with one argument is slower than Hash#[]. Occurred at lines: 84.
43
42
 
44
43
  test/module_test.rb
45
- Don't rescue NoMethodError, rather check with respond_to?. Occured at lines: 272.
44
+ Don't rescue NoMethodError, rather check with respond_to?. Occurred at lines: 272.
46
45
 
47
46
  spec/cache/mem_cache_store_spec.rb
48
- Use tr instead of gsub when grepping plain strings. Occured at lines: 161.
47
+ Use tr instead of gsub when grepping plain strings. Occurred at lines: 161.
49
48
  ```
50
49
  ## Configuration
51
50
 
data/fasterer.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'colorize', '~> 0.7'
22
- spec.add_dependency 'ruby_parser', '~> 3.7'
22
+ spec.add_dependency 'ruby_parser', '~> 3.9'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.6'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -47,7 +47,7 @@ module Fasterer
47
47
  'Hash#fetch with second argument is slower than Hash#fetch with block',
48
48
 
49
49
  keys_each_vs_each_key:
50
- 'Hash#keys.each is slower than Hash#each_key',
50
+ 'Hash#keys.each is slower than Hash#each_key. N.B. Hash#each_key cannot be used if the hash is modified during the each block',
51
51
 
52
52
  hash_merge_bang_vs_hash_brackets:
53
53
  'Hash#merge! with one argument is slower than Hash#[]',
@@ -1,3 +1,3 @@
1
1
  module Fasterer
2
- VERSION = '0.3.2'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -16,7 +16,7 @@ describe Fasterer::RescueCall do
16
16
  let(:file_name) { 'plain_rescue.rb' }
17
17
 
18
18
  it 'should detect constant' do
19
- expect(rescue_call.rescue_classes).to eq([])
19
+ expect(rescue_call.rescue_classes).to eq(Sexp.new())
20
20
  end
21
21
  end
22
22
 
@@ -24,7 +24,7 @@ describe Fasterer::RescueCall do
24
24
  let(:file_name) { 'rescue_with_class.rb' }
25
25
 
26
26
  it 'should detect integer' do
27
- expect(rescue_call.rescue_classes).to eq([:NoMethodError])
27
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError))
28
28
  end
29
29
  end
30
30
 
@@ -32,7 +32,7 @@ describe Fasterer::RescueCall do
32
32
  let(:file_name) { 'rescue_with_class_and_variable.rb' }
33
33
 
34
34
  it 'should detect string' do
35
- expect(rescue_call.rescue_classes).to eq([:NoMethodError])
35
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError))
36
36
  end
37
37
  end
38
38
 
@@ -40,7 +40,7 @@ describe Fasterer::RescueCall do
40
40
  let(:file_name) { 'rescue_with_variable.rb' }
41
41
 
42
42
  it 'should detect variable' do
43
- expect(rescue_call.rescue_classes).to eq([])
43
+ expect(rescue_call.rescue_classes).to eq(Sexp.new())
44
44
  end
45
45
  end
46
46
 
@@ -48,7 +48,7 @@ describe Fasterer::RescueCall do
48
48
  let(:file_name) { 'rescue_with_multiple_classes.rb' }
49
49
 
50
50
  it 'should detect method' do
51
- expect(rescue_call.rescue_classes).to eq([:NoMethodError, :StandardError])
51
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError, :StandardError))
52
52
  end
53
53
  end
54
54
 
@@ -56,7 +56,7 @@ describe Fasterer::RescueCall do
56
56
  let(:file_name) { 'rescue_with_multiple_classes_and_variable.rb' }
57
57
 
58
58
  it 'should detect method' do
59
- expect(rescue_call.rescue_classes).to eq([:NoMethodError, :StandardError])
59
+ expect(rescue_call.rescue_classes).to eq(Sexp.new(:NoMethodError, :StandardError))
60
60
  end
61
61
  end
62
62
  end
data/spec/spec_helper.rb CHANGED
@@ -11,11 +11,6 @@ require 'pry'
11
11
 
12
12
  Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f }
13
13
 
14
- if ENV['TRAVIS']
15
- require 'codeclimate-test-reporter'
16
- CodeClimate::TestReporter.start
17
- end
18
-
19
14
  def RSpec.root
20
15
  @root_path = Pathname.new(File.dirname(__FILE__))
21
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2018-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.7'
33
+ version: '3.9'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.7'
40
+ version: '3.9'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +121,7 @@ files:
121
121
  - ".rspec"
122
122
  - ".rubocop.yml"
123
123
  - ".travis.yml"
124
+ - CHANGELOG.md
124
125
  - Gemfile
125
126
  - LICENSE.txt
126
127
  - README.md
@@ -245,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
246
  version: '0'
246
247
  requirements: []
247
248
  rubyforge_project:
248
- rubygems_version: 2.5.1
249
+ rubygems_version: 2.4.5.1
249
250
  signing_key:
250
251
  specification_version: 4
251
252
  summary: Run Ruby more than fast. Fasterer