zapata 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +28 -0
- data/README.md +1 -1
- data/lib/zapata/primitive/send.rb +7 -1
- data/lib/zapata/version.rb +1 -1
- data/spec/definition_spec.rb +5 -5
- data/spec/support/rails_test_app/spec/models/test_definition_spec.rb +1 -1
- data/spec/support/rails_test_app/spec/models/test_send_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dd1b5857d18aac211f47c7342a77c826a908312
|
4
|
+
data.tar.gz: e5bd778968c9aaac07c136d466ff96f877eb51ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63446e18f98bf66c48719195faebcb4b6c2532be0405203bc60e8015554a8e4edc2fb6ba24e4f829b8ca3b5c810f4ec685fb38259bade4d43191ef0f63754ca7
|
7
|
+
data.tar.gz: 923427bdc886b1a4b4fd58de831a18d59b2ee04e64539cfdeca44aa68fb875dd66e495fcd6e97ef26aa25036d53dfb483cd47f03b8f9782d75eebe70a3054e75
|
data/CONTRIBUTING.md
CHANGED
@@ -1,5 +1,33 @@
|
|
1
|
+
## Collaboration :heart:
|
2
|
+
|
3
|
+
It is encouraged by somehow managing to bring a cake to your house. I promise,
|
4
|
+
I will really try.
|
5
|
+
|
6
|
+
This is a great project to understand language architecture in general. A
|
7
|
+
project to let your free and expressionistic side shine through by leaving meta
|
8
|
+
hacks and rainbows everywhere.
|
9
|
+
|
10
|
+
Thank you to everyone who do. I strongly believe that this can make the
|
11
|
+
developer job less robotic and more creative.
|
12
|
+
|
1
13
|
1. [Fork it](https://github.com/Nedomas/zapata/fork)
|
2
14
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
3
15
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
4
16
|
4. Push to the branch (`git push origin my-new-feature`)
|
5
17
|
5. Create a new Pull Request
|
18
|
+
|
19
|
+
To install, run:
|
20
|
+
```sh
|
21
|
+
git clone https://github.com/Nedomas/zapata
|
22
|
+
cd zapata
|
23
|
+
bundle exec rake install
|
24
|
+
```
|
25
|
+
|
26
|
+
For specs:
|
27
|
+
|
28
|
+
1. ``cd spec/support/rails_test_app && bundle update``
|
29
|
+
2. ``cd ../../..``
|
30
|
+
3. Run:
|
31
|
+
```sh
|
32
|
+
bundle exec rspec --pattern "spec/*_spec.rb"
|
33
|
+
```
|
data/README.md
CHANGED
@@ -32,7 +32,13 @@ 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
|
-
|
35
|
+
missing_name = if node.receiver
|
36
|
+
Unparser.unparse(code)
|
37
|
+
else
|
38
|
+
node.name
|
39
|
+
end
|
40
|
+
|
41
|
+
Missing.new(missing_name).to_raw
|
36
42
|
end
|
37
43
|
end
|
38
44
|
end
|
data/lib/zapata/version.rb
CHANGED
data/spec/definition_spec.rb
CHANGED
@@ -29,11 +29,11 @@ describe Zapata::Revolutionist do
|
|
29
29
|
# })
|
30
30
|
# end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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 "fall_meth.first"')).to eq('Missing "fall_meth.first"')
|
35
|
+
})
|
36
|
+
end
|
37
37
|
|
38
38
|
it '#resursive_method' do
|
39
39
|
has_block('#recursive_method', %Q{
|
@@ -22,7 +22,7 @@ describe TestDefinition do
|
|
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 "first"')).to eq('Missing "first"')
|
25
|
+
expect(test_definition.call_method_result_in_optional_args('Missing "fall_meth.first"')).to eq('Missing "fall_meth.first"')
|
26
26
|
end
|
27
27
|
|
28
28
|
it '#recursive_method' do
|
@@ -18,7 +18,7 @@ describe TestSend do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
it '#method_with_calculated_value' do
|
21
|
-
expect(test_send.method_with_calculated_value('Missing "+"')).to eq('Missing "+"')
|
21
|
+
expect(test_send.method_with_calculated_value('Missing "1 + 3"')).to eq('Missing "1 + 3"')
|
22
22
|
end
|
23
23
|
|
24
24
|
it '#to_another_object' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domas Bitvinskas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|