red 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +21 -0
- data/PostInstall.txt +1 -1
- data/bin/red +9 -2
- data/lib/red/executable.rb +6 -0
- data/lib/red/version.rb +1 -1
- data/website/index.html +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== 3.1.1 2008-08-06
|
2
|
+
|
3
|
+
* 1 major enhancement:
|
4
|
+
* Added -s option to allow conversion of Ruby strings from the command line
|
5
|
+
|
6
|
+
* 1 bug fix:
|
7
|
+
* Rescued the error thrown when using an unknown option flag.
|
8
|
+
|
1
9
|
== 3.1.0 2008-08-06
|
2
10
|
|
3
11
|
* 1 major enhancement:
|
@@ -7,3 +15,16 @@
|
|
7
15
|
|
8
16
|
* 1 major enhancement:
|
9
17
|
* Initial Rubyforge release
|
18
|
+
|
19
|
+
== 2.0.0 2008-07-13
|
20
|
+
|
21
|
+
* 1 major enhancement:
|
22
|
+
* Version 2 stable
|
23
|
+
|
24
|
+
* 1 bug fix:
|
25
|
+
* Removed buggy whitespace
|
26
|
+
|
27
|
+
== 1.0.0 2008-07-04
|
28
|
+
|
29
|
+
* 1 major enhancement:
|
30
|
+
* Stable working prototype
|
data/PostInstall.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
For more information on red, see http://
|
2
|
+
For more information on red, see http://github.com/jessesielaff/red/wikis
|
data/bin/red
CHANGED
@@ -31,14 +31,21 @@ Options are:
|
|
31
31
|
opts.separator ""
|
32
32
|
opts.on("-h", "--help", "Show this help message.") { puts opts; exit }
|
33
33
|
opts.on("-r", "--rails", "Adds Red plugin to ./vendor/plugins") { build_red_plugin_for_rails }
|
34
|
-
opts.
|
34
|
+
opts.on("-s", "--string=RUBY_STRING", "Translate a single string to JavaScript") { |string| direct_translate(string) }
|
35
|
+
begin
|
36
|
+
opts.parse!(ARGV)
|
37
|
+
rescue OptionParser::InvalidOption => e
|
38
|
+
puts "You used an #{e.message}."
|
39
|
+
puts "Use red -h for help."
|
40
|
+
exit
|
41
|
+
end
|
35
42
|
end
|
36
43
|
|
37
44
|
if filename = ARGV[0]
|
38
45
|
self.compile_red_to_js(filename)
|
39
46
|
else
|
40
47
|
puts <<-USAGE
|
41
|
-
Usage: red
|
48
|
+
Usage: red [filename] [options]
|
42
49
|
|
43
50
|
Use red -h for help.
|
44
51
|
USAGE
|
data/lib/red/executable.rb
CHANGED
@@ -19,6 +19,12 @@ module Red
|
|
19
19
|
exit
|
20
20
|
end
|
21
21
|
|
22
|
+
def direct_translate(string)
|
23
|
+
js_output = hush_warnings { string.string_to_node }.compile_node
|
24
|
+
print_js(js_output, 'test')
|
25
|
+
exit
|
26
|
+
end
|
27
|
+
|
22
28
|
def hush_warnings
|
23
29
|
$stderr = File.open('spew', 'w')
|
24
30
|
output = yield
|
data/lib/red/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>foo</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/red"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/red" class="numbers">3.1.
|
36
|
+
<a href="http://rubyforge.org/projects/red" class="numbers">3.1.1</a>
|
37
37
|
</div>
|
38
38
|
<h1>&#x2192; ‘foo’</h1>
|
39
39
|
<h2>What</h2>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Sielaff
|
@@ -83,7 +83,7 @@ has_rdoc: true
|
|
83
83
|
homepage: http://red-js.rubyforge.org
|
84
84
|
post_install_message: |
|
85
85
|
|
86
|
-
For more information on red, see http://
|
86
|
+
For more information on red, see http://github.com/jessesielaff/red/wikis
|
87
87
|
|
88
88
|
rdoc_options:
|
89
89
|
- --main
|