ruby2ruby 2.1.2 → 2.1.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: ed2fd0985443c2c27de6dd7b1ddefbb4f71d9fd7
4
- data.tar.gz: 926d7ea36dfcb126007432e02490df7fc86dc337
3
+ metadata.gz: 74c87f0ca74e11a422495c56f40bac470ab3379f
4
+ data.tar.gz: 29e705948c7770c3722eab456247992042752495
5
5
  SHA512:
6
- metadata.gz: d73f40ce56cbf43cb6a7fd553bd9f3a6541d22c3fed9facbc7f56803723789b11eb7590c6fa41b3715b7b87d5b74d62e17f0e3dc8c48f2fdfe13d7f95239c554
7
- data.tar.gz: 6ac57061f3ab7df39efada4abee9129a100ab891eb81a2d633606a09b07d2568b7de8eef578349986dffef67e00baad9e5a3dfc8f6e2584151dd7c56b99031e8
6
+ metadata.gz: 5e9540e531c0456eb52033bba31c56f5d9a5a1e317839e566e1385620205494a8f18499d40e762b65976c5feca0f3f08949d7092cfb6d06d2cc929f8015638e6
7
+ data.tar.gz: ddb3bd03f2ed3495ec701530f791aca28099cbb07773355477cf1d8b5fa638e33b7c26dde8cf9d2fbde59ef1595e6c608d35c2d58f6b6861760908528fe805d0
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/.autotest CHANGED
@@ -4,8 +4,6 @@ require 'autotest/restart'
4
4
  require 'autotest/isolate'
5
5
 
6
6
  Autotest.add_hook :initialize do |at|
7
- at.order = :random
8
-
9
7
  at.libs << ':../../minitest/dev/lib'
10
8
  at.testlib = "minitest/autorun"
11
9
 
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 2.1.3 / 2014-09-26
2
+
3
+ * 1 bug fix:
4
+
5
+ * Fixed handling of kwargs. (joenas)
6
+
1
7
  === 2.1.2 / 2014-08-28
2
8
 
3
9
  * 1 bug fix:
data/README.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  = ruby2ruby
2
2
 
3
3
  home :: https://github.com/seattlerb/ruby2ruby
4
- rdoc :: http://seattlerb.rubyforge.org/ruby2ruby
4
+ rdoc :: http://docs.seattlerb.org/ruby2ruby
5
5
 
6
6
  == DESCRIPTION:
7
7
 
data/Rakefile CHANGED
@@ -13,6 +13,8 @@ Hoe.plugin :isolate
13
13
  Hoe.spec 'ruby2ruby' do
14
14
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
15
15
 
16
+ license "MIT"
17
+
16
18
  dependency "sexp_processor", "~> 4.0"
17
19
  dependency "ruby_parser", "~> 3.1"
18
20
  end
@@ -83,4 +85,8 @@ task :debug => :isolate do
83
85
  puts process(ruby, file)
84
86
  end
85
87
 
88
+ task :bugs do
89
+ sh "for f in bug*.rb ; do #{Gem.ruby} -S rake debug F=$f && rm $f ; done"
90
+ end
91
+
86
92
  # vim: syntax=ruby
data/lib/ruby2ruby.rb CHANGED
@@ -31,7 +31,7 @@ end
31
31
  # Generate ruby code from a sexp.
32
32
 
33
33
  class Ruby2Ruby < SexpProcessor
34
- VERSION = "2.1.2" # :nodoc:
34
+ VERSION = "2.1.3" # :nodoc:
35
35
 
36
36
  # cutoff for one-liners
37
37
  LINE_LENGTH = 78
@@ -108,6 +108,9 @@ class Ruby2Ruby < SexpProcessor
108
108
  args << process(arg)
109
109
  when :masgn then
110
110
  args << process(arg)
111
+ when :kwarg then
112
+ _, k, v = arg
113
+ args << "#{k}: #{process v}"
111
114
  else
112
115
  raise "unknown arg type #{arg.first.inspect}"
113
116
  end
@@ -173,6 +173,27 @@ class TestRuby2Ruby < R2RTestCase
173
173
  util_compare inn, out
174
174
  end
175
175
 
176
+ def test_defn_kwargs
177
+ inn = s(:defn, :initialize,
178
+ s(:args, :arg, s(:kwarg, :keyword, s(:nil)), :"**args"),
179
+ s(:nil))
180
+ out = "def initialize(arg, keyword: nil, **args)\n # do nothing\nend"
181
+
182
+ util_compare inn, out
183
+ end
184
+
185
+ def test_defn_kwargs2
186
+ inn = s(:defn, :initialize,
187
+ s(:args, :arg,
188
+ s(:kwarg, :kw1, s(:nil)),
189
+ s(:kwarg, :kw2, s(:nil)),
190
+ :"**args"),
191
+ s(:nil))
192
+ out = "def initialize(arg, kw1: nil, kw2: nil, **args)\n # do nothing\nend"
193
+
194
+ util_compare inn, out
195
+ end
196
+
176
197
  def test_call_self_index
177
198
  util_compare s(:call, nil, :[], s(:lit, 42)), "self[42]"
178
199
  end
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.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTEzMDkxNjIzMDQxMloXDTE0MDkxNjIzMDQxMlowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
16
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -22,14 +22,14 @@ cert_chain:
22
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
24
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQCFZ7JTzoy1gcG4d8A6dmOJy7ygtO5MFpRIz8HuKCF5566nOvpy7aHhDDzFmQuu
26
- FX3zDU6ghx5cQIueDhf2SGOncyBmmJRRYawm3wI0o1MeN6LZJ/3cRaOTjSFy6+S6
27
- zqDmHBp8fVA2TGJtO0BLNkbGVrBJjh0UPmSoGzWlRhEVnYC33TpDAbNA+u39UrQI
28
- ynwhNN7YbnmSR7+JU2cUjBFv2iPBO+TGuWC+9L2zn3NHjuc6tnmSYipA9y8Hv+As
29
- Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
- xx3n58i0lQkBE1EpKE0lFu/y
25
+ AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
26
+ FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
27
+ hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
28
+ zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
29
+ xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
30
+ VpzF30vNaJK6ZT7xlIsIlwmH
31
31
  -----END CERTIFICATE-----
32
- date: 2014-08-28 00:00:00.000000000 Z
32
+ date: 2014-09-27 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -93,14 +93,14 @@ dependencies:
93
93
  requirements:
94
94
  - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '3.12'
96
+ version: '3.13'
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.12'
103
+ version: '3.13'
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
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.2.1
149
+ rubygems_version: 2.4.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