multirb 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -44,10 +44,14 @@ Currently specifies jruby, 1.8.7, 1.9.2, 1.9.3, and 2.0.0 as 'all versions'; 1.8
44
44
 
45
45
  ## Versions
46
46
 
47
- 0.0.3 (forthcoming):
47
+ 0.0.4 (forthcoming):
48
48
  * rbenv support
49
49
 
50
- 0.0.2 (CURRENT GEM RELEASE):
50
+ 0.0.3 (CURRENT GEM RELEASE):
51
+ * acts nicely when using Ctrl+D to exit rather than raising a needless error
52
+ * uses Ruby 2.0.0-rc2 as a default
53
+
54
+ 0.0.2:
51
55
  * Uses threads to speed up results (thanks to Ismael Abreu for initial implementation)
52
56
  * Improved 'tempfile' usage to prevent errors on JRuby
53
57
 
@@ -10,6 +10,12 @@ include Multirb
10
10
 
11
11
  loop do
12
12
  lines = read_lines
13
+
14
+ unless lines
15
+ puts
16
+ exit
17
+ end
18
+
13
19
  file = create_and_save_code(lines)
14
20
 
15
21
  versions = determine_versions(lines, ARGV)
@@ -22,7 +28,7 @@ loop do
22
28
  end
23
29
 
24
30
  threads.zip(versions).each do |thread, version|
25
- puts " #{version} => #{thread.join[:output]}"
31
+ puts " #{version.rjust(versions.max.length)} => #{thread.join[:output]}"
26
32
  end
27
33
 
28
34
  file.unlink
@@ -5,14 +5,15 @@ require 'readline'
5
5
  require 'tempfile'
6
6
 
7
7
  module Multirb
8
- ALL_VERSIONS = %w{jruby 1.8.7 1.9.2 1.9.3 2.0.0}
9
- DEFAULT_VERSIONS = %w{1.8.7 1.9.3 2.0.0}
8
+ ALL_VERSIONS = %w{jruby 1.8.7 1.9.2 1.9.3 2.0.0-rc2}
9
+ DEFAULT_VERSIONS = %w{1.8.7 1.9.3 2.0.0-rc2}
10
10
 
11
11
  def read_lines
12
12
  lines = []
13
13
  begin
14
14
  print "\e[0m"
15
15
  line = Readline::readline("> ")
16
+ return nil if line.nil?
16
17
  Readline::HISTORY << line
17
18
  line.chomp!
18
19
  lines << line
@@ -1,3 +1,3 @@
1
1
  module Multirb
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multirb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-02 00:00:00.000000000 Z
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Run Ruby code over multiple implementations/versions using RVM from a
15
15
  IRB-esque prompt