red 3.1.0 → 3.1.1

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.
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://groups.google.com/group/ruby-red-js
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.parse!(ARGV)
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 <filename>
48
+ Usage: red [filename] [options]
42
49
 
43
50
  Use red -h for help.
44
51
  USAGE
@@ -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
@@ -2,7 +2,7 @@ module Red
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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.0</a>
36
+ <a href="http://rubyforge.org/projects/red" class="numbers">3.1.1</a>
37
37
  </div>
38
38
  <h1>&amp;#x2192; &#8216;foo&#8217;</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.0
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://groups.google.com/group/ruby-red-js
86
+ For more information on red, see http://github.com/jessesielaff/red/wikis
87
87
 
88
88
  rdoc_options:
89
89
  - --main