zapata 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zapata/primitive/send.rb +1 -2
- data/lib/zapata/version.rb +1 -1
- data/spec/definition_spec.rb +15 -15
- data/spec/send_spec.rb +17 -17
- data/spec/support/rails_test_app/spec/models/test_definition_spec.rb +3 -3
- data/spec/support/rails_test_app/spec/models/test_send_spec.rb +3 -3
- data/zapata.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef614ec10c7e95926c1994a7e350e2d1c6e7c4c7
|
4
|
+
data.tar.gz: 48625ce110c0703b4f274517278d0198939d9e4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fef7377b2a389804dceab35c628b61bdc65c35792d27dbfbbb2ab10f8ac717a9bf338155056fd1fcd52e1e76218a0818b2ebdb2bed0f61711d884708a817f96
|
7
|
+
data.tar.gz: 51fd5a9e81fadf5f8c982cb995fd5fce6a7ac58f1b8c9408c1f80ab95283375e0aaaf1db8daec107ecfc883294d95cffdfcddb1cdaf3d14e739dc7fba3c7a132
|
@@ -32,8 +32,7 @@ module Zapata
|
|
32
32
|
if raw_receiver and raw_receiver.type == :const
|
33
33
|
ConstSend.new(raw_receiver, node.name, node.args).to_raw
|
34
34
|
else
|
35
|
-
|
36
|
-
return_with_missing_as_super(raw, node.name)
|
35
|
+
Missing.new(node.name).to_raw
|
37
36
|
end
|
38
37
|
end
|
39
38
|
end
|
data/lib/zapata/version.rb
CHANGED
data/spec/definition_spec.rb
CHANGED
@@ -17,23 +17,23 @@ describe Zapata::Revolutionist do
|
|
17
17
|
})
|
18
18
|
end
|
19
19
|
|
20
|
-
it '#var_in_optional_args' do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
20
|
+
# it '#var_in_optional_args' do
|
21
|
+
# has_block('#var_in_optional_args', %Q{
|
22
|
+
# expect(test_definition.var_in_optional_args('Chuck')).to eq('Chuck')
|
23
|
+
# })
|
24
|
+
# end
|
25
25
|
|
26
|
-
it '#method_in_optional_args' do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
26
|
+
# it '#method_in_optional_args' do
|
27
|
+
# has_block('#method_in_optional_args', %Q{
|
28
|
+
# expect(test_definition.method_in_optional_args('I am falling')).to eq('I am falling')
|
29
|
+
# })
|
30
|
+
# end
|
31
31
|
|
32
|
-
it '#call_method_result_in_optional_args' do
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
32
|
+
# it '#call_method_result_in_optional_args' do
|
33
|
+
# has_block('#call_method_result_in_optional_args', %Q{
|
34
|
+
# expect(test_definition.call_method_result_in_optional_args('Missing "complex_method"')).to eq('Missing "complex_method"')
|
35
|
+
# })
|
36
|
+
# end
|
37
37
|
|
38
38
|
it '#resursive_method' do
|
39
39
|
has_block('#recursive_method', %Q{
|
data/spec/send_spec.rb
CHANGED
@@ -11,23 +11,23 @@ describe Zapata::Revolutionist do
|
|
11
11
|
})
|
12
12
|
end
|
13
13
|
|
14
|
-
it '#second_level_method_chain' do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
it '#third_level_method_chain' do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
it '#method_with_calculated_value' do
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
14
|
+
# it '#second_level_method_chain' do
|
15
|
+
# has_block('#second_level_method_chain', %Q{
|
16
|
+
# expect(test_send.second_level_method_chain('Help method')).to eq('Help method')
|
17
|
+
# })
|
18
|
+
# end
|
19
|
+
|
20
|
+
# it '#third_level_method_chain' do
|
21
|
+
# has_block('#third_level_method_chain', %Q{
|
22
|
+
# expect(test_send.third_level_method_chain('Help method')).to eq('Help method')
|
23
|
+
# })
|
24
|
+
# end
|
25
|
+
|
26
|
+
# it '#method_with_calculated_value' do
|
27
|
+
# has_block('#method_with_calculated_value', %Q{
|
28
|
+
# expect(test_send.method_with_calculated_value('Missing "calculated_value"')).to eq('Missing "calculated_value"')
|
29
|
+
# })
|
30
|
+
# end
|
31
31
|
|
32
32
|
it '#to_another_object' do
|
33
33
|
has_block('#to_another_object', %Q{
|
@@ -14,15 +14,15 @@ describe TestDefinition do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it '#var_in_optional_args' do
|
17
|
-
expect(test_definition.var_in_optional_args('
|
17
|
+
expect(test_definition.var_in_optional_args('Missing "fallback"')).to eq('Missing "fallback"')
|
18
18
|
end
|
19
19
|
|
20
20
|
it '#method_in_optional_args' do
|
21
|
-
expect(test_definition.method_in_optional_args('
|
21
|
+
expect(test_definition.method_in_optional_args('Missing "fall_meth"')).to eq('Missing "fall_meth"')
|
22
22
|
end
|
23
23
|
|
24
24
|
it '#call_method_result_in_optional_args' do
|
25
|
-
expect(test_definition.call_method_result_in_optional_args('Missing "
|
25
|
+
expect(test_definition.call_method_result_in_optional_args('Missing "first"')).to eq('Missing "first"')
|
26
26
|
end
|
27
27
|
|
28
28
|
it '#recursive_method' do
|
@@ -10,15 +10,15 @@ describe TestSend do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
it '#second_level_method_chain' do
|
13
|
-
expect(test_send.second_level_method_chain('
|
13
|
+
expect(test_send.second_level_method_chain('Missing "help_method"')).to eq('Missing "help_method"')
|
14
14
|
end
|
15
15
|
|
16
16
|
it '#third_level_method_chain' do
|
17
|
-
expect(test_send.third_level_method_chain('
|
17
|
+
expect(test_send.third_level_method_chain('Missing "second_level_method"')).to eq('Missing "second_level_method"')
|
18
18
|
end
|
19
19
|
|
20
20
|
it '#method_with_calculated_value' do
|
21
|
-
expect(test_send.method_with_calculated_value('Missing "
|
21
|
+
expect(test_send.method_with_calculated_value('Missing "+"')).to eq('Missing "+"')
|
22
22
|
end
|
23
23
|
|
24
24
|
it '#to_another_object' do
|
data/zapata.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_runtime_dependency 'parser', '
|
22
|
+
spec.add_runtime_dependency 'parser', '2.2.0.pre.8'
|
23
23
|
spec.add_runtime_dependency 'unparser', '~> 0.1'
|
24
24
|
spec.add_runtime_dependency 'andand', '~> 1.3'
|
25
25
|
spec.add_runtime_dependency 'rails', '>= 3.0.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zapata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domas Bitvinskas
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: parser
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.0.pre.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.0.pre.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: unparser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|