ruby2ruby 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 1.2.4 / 2009-08-14
2
+
3
+ * 2 bug fixes:
4
+
5
+ * Fixed all doco to use ruby_praser
6
+ * Fixed bin/r2r_show to use ruby_parser. oops
7
+
1
8
  === 1.2.3 / 2009-06-23
2
9
 
3
10
  * 4 minor enhancements:
data/README.txt CHANGED
@@ -6,20 +6,43 @@
6
6
  == DESCRIPTION:
7
7
 
8
8
  ruby2ruby provides a means of generating pure ruby code easily from
9
- ParseTree's Sexps. This makes making dynamic language processors much
10
- easier in ruby than ever before.
9
+ RubyParser compatible Sexps. This makes making dynamic language
10
+ processors in ruby easier than ever!
11
11
 
12
12
  == FEATURES/PROBLEMS:
13
13
 
14
- * Clean, simple SexpProcessor generates ruby code from ParseTree's output.
14
+ * Clean, simple SexpProcessor generates ruby code from RubyParser compatible sexps.
15
15
 
16
16
  == SYNOPSYS:
17
17
 
18
- RubyToRuby.translate(MyClass, :mymethod) # => "def mymethod..."
18
+ require 'rubygems'
19
+ require 'ruby2ruby'
20
+ require 'ruby_parser'
21
+ require 'pp'
22
+
23
+ ruby = "def a\n puts 'A'\nend\n\ndef b\n a\nend"
24
+ parser = RubyParser.new
25
+ ruby2ruby = Ruby2Ruby.new
26
+ sexp = parser.process(ruby)
27
+
28
+ pp sexp
29
+
30
+ p ruby2ruby.process(sexp)
31
+
32
+ ## outputs:
33
+
34
+ s(:block,
35
+ s(:defn,
36
+ :a,
37
+ s(:args),
38
+ s(:scope, s(:block, s(:call, nil, :puts, s(:arglist, s(:str, "A")))))),
39
+ s(:defn, :b, s(:args), s(:scope, s(:block, s(:call, nil, :a, s(:arglist))))))
40
+ "def a\n puts(\"A\")\nend\ndef b\n a\nend\n"
19
41
 
20
42
  == REQUIREMENTS:
21
43
 
22
- + ParseTree
44
+ + sexp_processor
45
+ + ruby_parser
23
46
 
24
47
  == INSTALL:
25
48
 
@@ -29,7 +52,7 @@ easier in ruby than ever before.
29
52
 
30
53
  (The MIT License)
31
54
 
32
- Copyright (c) 2006-2007 Ryan Davis
55
+ Copyright (c) Ryan Davis, Seattle.rb
33
56
 
34
57
  Permission is hereby granted, free of charge, to any person obtaining
35
58
  a copy of this software and associated documentation files (the
data/bin/r2r_show CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'ruby2ruby'
5
- require 'parse_tree'
5
+ require 'ruby_parser'
6
6
 
7
7
  $h ||= false
8
8
  $s ||= false
@@ -18,13 +18,13 @@ end
18
18
 
19
19
  ARGV.push "-" if ARGV.empty?
20
20
 
21
- parse_tree = ParseTree.new
22
- ruby2ruby = Ruby2Ruby.new
21
+ parser = RubyParser.new
22
+ ruby2ruby = Ruby2Ruby.new
23
23
 
24
24
  ARGV.each do |file|
25
25
  ruby = file == "-" ? $stdin.read : File.read(file)
26
26
 
27
- sexp = parse_tree.process(ruby, nil, file)
27
+ sexp = parser.process(ruby, file)
28
28
 
29
29
  p sexp if $s
30
30
 
data/lib/ruby2ruby.rb CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'sexp_processor'
5
5
 
6
6
  class Ruby2Ruby < SexpProcessor
7
- VERSION = '1.2.3'
7
+ VERSION = '1.2.4'
8
8
  LINE_LENGTH = 78
9
9
 
10
10
  ##
metadata CHANGED
@@ -1,36 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
- ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
16
- AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
- JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
- b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
19
- taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
20
- oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
21
- GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
- qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
- gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
26
- vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
27
- w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
28
- l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
29
- n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
30
- FBHgymkyj/AOSqKRIpXPhjC6
31
- -----END CERTIFICATE-----
10
+ cert_chain: []
32
11
 
33
- date: 2009-06-23 00:00:00 -07:00
12
+ date: 2009-08-14 00:00:00 -07:00
34
13
  default_executable:
35
14
  dependencies:
36
15
  - !ruby/object:Gem::Dependency
@@ -71,12 +50,12 @@ dependencies:
71
50
  requirements:
72
51
  - - ">="
73
52
  - !ruby/object:Gem::Version
74
- version: 2.3.0
53
+ version: 2.3.3
75
54
  version:
76
55
  description: |-
77
56
  ruby2ruby provides a means of generating pure ruby code easily from
78
- ParseTree's Sexps. This makes making dynamic language processors much
79
- easier in ruby than ever before.
57
+ RubyParser compatible Sexps. This makes making dynamic language
58
+ processors in ruby easier than ever!
80
59
  email:
81
60
  - ryand-ruby@zenspider.com
82
61
  executables:
@@ -121,9 +100,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
100
  requirements: []
122
101
 
123
102
  rubyforge_project: seattlerb
124
- rubygems_version: 1.3.4
103
+ rubygems_version: 1.3.5
125
104
  signing_key:
126
105
  specification_version: 3
127
- summary: ruby2ruby provides a means of generating pure ruby code easily from ParseTree's Sexps
106
+ summary: ruby2ruby provides a means of generating pure ruby code easily from RubyParser compatible Sexps
128
107
  test_files:
129
108
  - test/test_ruby2ruby.rb
data.tar.gz.sig DELETED
@@ -1 +0,0 @@
1
- zm)�e��BQ��ʸc�I����f�o�I�}�e�,�<1����(L���70�R�U��_�*l`�?�:���΅�ț|T,8��5��h�3 4��)�������۶4�s̕��Υ�B�{'1˥aL�7d u��w׆Xzð� x�巒b��Df�9�QuoJ��"���Wh��ȥ��a \�� :�n�����$L��W��i���gCxP���7�<�>�dI}��p�E��r���C�4RW��0�O�h�
metadata.gz.sig DELETED
Binary file