reek 4.2.2 → 4.2.3

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: 93d227647bdd04f5b74ccad9819eaff0ad473b3d
4
- data.tar.gz: 905fc70ac55c9f99cc1f32ba44f25751412da886
3
+ metadata.gz: febd828ee14c493e88c62e3676181d9aed38cda2
4
+ data.tar.gz: a7d7d7a5dc1e964a21466b4c94d5e1c7ad5a1550
5
5
  SHA512:
6
- metadata.gz: b68f9230abb65587e9a033523d16d984fd7ac3db788787c9ee5773a3e1861ee45a20641a00422684f8b0e2fa6628f2ae49a2693fed483392563c6a8c36c61fa8
7
- data.tar.gz: db596ffe6508034c25d03954ca6b56237cbdfe23098471560dfaf8fc147826f87ee8683149c1271bc416913dd48073f4a431c058f1532f6a3cc0051b9ff9510f
6
+ metadata.gz: f43c2262139ad0bfc26ed4fdc200480b4cdc228f7480ea65d62df34ec01339ce0feb9c1187c4be6a00be6199602ac638c44ae1fcffe3aaa1bcd31a4994243564
7
+ data.tar.gz: d6e90ce2c090073d73e9abe81fd95a430a56dc6aa07490e064383669a4e9bf7fc1be36393f545a83659f751ba1445705ccc5c0d607e6962456f1dc11c04a7617
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 4.2.3 (2016-08-05)
4
+
5
+ * (soutaro) Add SexpExtensions::CSendNode for safe navigation operator
6
+
3
7
  ## 4.2.2 (2016-08-02)
4
8
 
5
9
  * (soutaro) Use bundler to load libs during test
@@ -53,6 +53,7 @@ module Reek
53
53
  end
54
54
 
55
55
  Op_AsgnNode = SendNode
56
+ CSendNode = SendNode
56
57
  end
57
58
  end
58
59
  end
data/lib/reek/version.rb CHANGED
@@ -7,6 +7,6 @@ module Reek
7
7
  # @public
8
8
  module Version
9
9
  # @public
10
- STRING = '4.2.2'.freeze
10
+ STRING = '4.2.3'.freeze
11
11
  end
12
12
  end
@@ -124,6 +124,26 @@ RSpec.describe Reek::AST::SexpExtensions::DefNode do
124
124
  end
125
125
  end
126
126
 
127
+ RSpec.describe Reek::AST::SexpExtensions::CSendNode do
128
+ let(:node) { Reek::Source::SourceCode.from('1&.foo(true)').syntax_tree }
129
+
130
+ it 'has a class including SendNode' do
131
+ expect(node.class.included_modules).to include(Reek::AST::SexpExtensions::SendNode)
132
+ end
133
+
134
+ it 'has a receiver' do
135
+ expect(node.receiver).to eq(sexp(:int, 1))
136
+ end
137
+
138
+ it 'has a name' do
139
+ expect(node.name).to eq(:foo)
140
+ end
141
+
142
+ it 'has arguments' do
143
+ expect(node.args).to eq([sexp(:true)])
144
+ end
145
+ end
146
+
127
147
  RSpec.describe Reek::AST::SexpExtensions::DefsNode do
128
148
  context 'with no parameters' do
129
149
  let(:node) { sexp(:defs, sexp(:lvar, :obj), :hello, sexp(:args)) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.2
4
+ version: 4.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rutherford
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-08-02 00:00:00.000000000 Z
14
+ date: 2016-08-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: codeclimate-engine-rb