ruby2ruby 2.0.7 → 2.0.8

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: 9d6a4ff1d7f84562a2721483c03a910d5f07bf9c
4
- data.tar.gz: adcb9034137fa7ccf623b6a78a4acbc5e7904a3e
3
+ metadata.gz: c27b4b75cbb39ce6970c2b8dfdeea6ed2adbe560
4
+ data.tar.gz: 738c1c7d64391ef4eef6a6845045f25bb6509d62
5
5
  SHA512:
6
- metadata.gz: a67c1295e150cdeeb32adae504e17fa9abfbbeaf09f5a07586ad8ef2401224955d14f0bff25927617e9106e3b8f851b1ca822d650580a7db6d57864cd19c14a0
7
- data.tar.gz: 9a1c8c80ceb85c87dcde08f3c0a265ff3f297a0d057d46096c7071f815e457ff824e8a3eff5b5081a323330b57ddefadca977cce29a5e9f4fb33b3efd15984bf
6
+ metadata.gz: 151e03beb0722a93e4df11ccc0bb19b936350e4246cc1a53f382302b6a07642cc24a9e5a8c8f3fb658c859eea1735d9d702be9cd247908c5966c537aa6cebf0b
7
+ data.tar.gz: 7a804ef6a6386e82ceb3b137a7b4a85fc959e7cc570b4e70adfefc37d72abc16ee5c4b829dc947416e107dcb48282f0fce17a22f10c398a47e36564b35092c00
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �NcB|PnjpJT����LJw���=���y��@=m�^
2
- }�YK�0 +ܲQ�$� �P�I���x?`L�/m��Q�����給�nPǮ=|��,+>p�ݓ"�&|3:���qR?P�/>J��+(�/mx;|#�B+��/�l8�?�ϹD���%A�OMu7�y!���7?y���mST䧧&� 6� �2؏!p��L��XmQVo����_ .J��M R�G�EgwS���!d��{��
1
+ ��u�Yz���a�WnO��؀��Wš�"o�!��|!�Wb��׌��:�5����ٛ<#UO�ϻړ��rq{;�cʚ��j�?�ya?^�7��mRu �X�1B����r�
2
+ ߄3zm��m Z��������=���0[��h|�]�:�rpW��2���Фm�rFSibE����4}!�O��J�+��������c+<�Y�����J5�ړG�V��r°Y-/�ߺkT>��&5�)q���`�
data/.autotest CHANGED
@@ -1,9 +1,12 @@
1
1
  # -*- ruby -*-
2
2
 
3
3
  require 'autotest/restart'
4
+ require 'autotest/isolate'
4
5
 
5
6
  Autotest.add_hook :initialize do |at|
6
7
  at.order = :random
8
+
9
+ at.libs << ':../../minitest/dev/lib'
7
10
  at.testlib = "minitest/autorun"
8
11
 
9
12
  at.extra_files << "../../sexp_processor/dev/lib/pt_testcase.rb"
@@ -1,3 +1,9 @@
1
+ === 2.0.8 / 2014-03-24
2
+
3
+ * 1 bug fix:
4
+
5
+ * 2.0/2.1: Fixed support for **kwsplat. (troessner)
6
+
1
7
  === 2.0.7 / 2013-12-13
2
8
 
3
9
  * 4 minor enhancements:
data/Rakefile CHANGED
@@ -13,8 +13,6 @@ Hoe.plugin :isolate
13
13
  Hoe.spec 'ruby2ruby' do
14
14
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
15
15
 
16
- self.rubyforge_name = 'seattlerb'
17
-
18
16
  dependency "sexp_processor", "~> 4.0"
19
17
  dependency "ruby_parser", "~> 3.1"
20
18
  end
@@ -29,7 +29,7 @@ end
29
29
  # Generate ruby code from a sexp.
30
30
 
31
31
  class Ruby2Ruby < SexpProcessor
32
- VERSION = "2.0.7" # :nodoc:
32
+ VERSION = "2.0.8" # :nodoc:
33
33
 
34
34
  # cutoff for one-liners
35
35
  LINE_LENGTH = 78
@@ -582,6 +582,10 @@ class Ruby2Ruby < SexpProcessor
582
582
  exp.shift.to_s
583
583
  end
584
584
 
585
+ def process_kwsplat(exp)
586
+ "**#{process exp.shift}"
587
+ end
588
+
585
589
  def process_lasgn(exp) # :nodoc:
586
590
  s = "#{exp.shift}"
587
591
  s += " = #{process exp.shift}" unless exp.empty?
@@ -19,7 +19,7 @@ class R2RTestCase < ParseTreeTestCase
19
19
  def self.generate_test klass, node, data, input_name, output_name
20
20
  output_name = data.has_key?('Ruby2Ruby') ? 'Ruby2Ruby' : 'Ruby'
21
21
 
22
- return if node.to_s =~ /19$/
22
+ return if node.to_s =~ /(str_question|not|bang).*(19|20|21)$/
23
23
 
24
24
  klass.class_eval <<-EOM
25
25
  def test_#{node}
@@ -167,6 +167,12 @@ class TestRuby2Ruby < R2RTestCase
167
167
  util_compare s(:lit, /blah\/blah/), '/blah\/blah/', /blah\/blah/
168
168
  end
169
169
 
170
+ def test_call_kwsplat
171
+ inn = s(:call, nil, :test_splat, s(:kwsplat, s(:call, nil, :testing)))
172
+ out = "test_splat(**testing)"
173
+ util_compare inn, out
174
+ end
175
+
170
176
  def test_call_self_index
171
177
  util_compare s(:call, nil, :[], s(:lit, 42)), "self[42]"
172
178
  end
@@ -222,6 +228,12 @@ class TestRuby2Ruby < R2RTestCase
222
228
  util_compare inn, out
223
229
  end
224
230
 
231
+ def test_defn_kwsplat
232
+ inn = s(:defn, :test, s(:args, :"**testing"))
233
+ out = "def test(**testing)\n # do nothing\nend"
234
+ util_compare inn, out
235
+ end
236
+
225
237
  def test_masgn_block_arg
226
238
  inn = s(:iter,
227
239
  s(:call,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2013-12-14 00:00:00.000000000 Z
32
+ date: 2014-03-25 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -65,14 +65,14 @@ dependencies:
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '5.2'
68
+ version: '5.3'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '5.2'
75
+ version: '5.3'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: rdoc
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -93,14 +93,14 @@ dependencies:
93
93
  requirements:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '3.7'
96
+ version: '3.9'
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: '3.7'
103
+ version: '3.9'
104
104
  description: |-
105
105
  ruby2ruby provides a means of generating pure ruby code easily from
106
106
  RubyParser compatible Sexps. This makes making dynamic language
@@ -116,6 +116,7 @@ extra_rdoc_files:
116
116
  - README.txt
117
117
  files:
118
118
  - .autotest
119
+ - .gemtest
119
120
  - History.txt
120
121
  - Manifest.txt
121
122
  - README.txt
@@ -123,7 +124,6 @@ files:
123
124
  - bin/r2r_show
124
125
  - lib/ruby2ruby.rb
125
126
  - test/test_ruby2ruby.rb
126
- - .gemtest
127
127
  homepage: https://github.com/seattlerb/ruby2ruby
128
128
  licenses:
129
129
  - MIT
@@ -145,8 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubyforge_project: seattlerb
149
- rubygems_version: 2.1.10
148
+ rubyforge_project: ruby2ruby
149
+ rubygems_version: 2.2.1
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: ruby2ruby provides a means of generating pure ruby code easily from RubyParser
metadata.gz.sig CHANGED
Binary file