dietrb 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/dietrb +1 -2
- data/dietrb.gemspec +3 -1
- data/lib/irb/ext/macruby.rb +7 -3
- data/lib/irb.rb +10 -1
- data/spec/irb_spec.rb +10 -0
- data/spec/spec_helper.rb +2 -0
- metadata +3 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/dietrb
CHANGED
data/dietrb.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dietrb}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Eloy Duran"]
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"lib/irb/ext/macruby.rb",
|
30
30
|
"lib/irb/source.rb",
|
31
31
|
"spec/context_spec.rb",
|
32
|
+
"spec/irb_spec.rb",
|
32
33
|
"spec/source_spec.rb",
|
33
34
|
"spec/spec_helper.rb"
|
34
35
|
]
|
@@ -40,6 +41,7 @@ Gem::Specification.new do |s|
|
|
40
41
|
s.summary = %q{IRB on a diet, for MacRuby / Ruby 1.9}
|
41
42
|
s.test_files = [
|
42
43
|
"spec/context_spec.rb",
|
44
|
+
"spec/irb_spec.rb",
|
43
45
|
"spec/source_spec.rb",
|
44
46
|
"spec/spec_helper.rb"
|
45
47
|
]
|
data/lib/irb/ext/macruby.rb
CHANGED
@@ -5,11 +5,15 @@ module IRB
|
|
5
5
|
alias_method :_run, :run
|
6
6
|
|
7
7
|
def run
|
8
|
-
|
8
|
+
if NSApplication.sharedApplication.running?
|
9
9
|
_run
|
10
|
-
|
10
|
+
else
|
11
|
+
Thread.new do
|
12
|
+
_run
|
13
|
+
NSApplication.sharedApplication.terminate(self)
|
14
|
+
end
|
15
|
+
NSApplication.sharedApplication.run
|
11
16
|
end
|
12
|
-
NSApplication.sharedApplication.run
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/irb.rb
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
require 'irb/context'
|
2
2
|
require 'irb/source'
|
3
3
|
|
4
|
-
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "macruby"
|
4
|
+
if !ENV['SPECCING'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == "macruby"
|
5
5
|
require 'irb/ext/macruby'
|
6
|
+
end
|
7
|
+
|
8
|
+
module Kernel
|
9
|
+
# Creates a new IRB::Context with the given +object+ and runs it.
|
10
|
+
def IRB(object)
|
11
|
+
IRB::Context.new(object).run
|
12
|
+
end
|
13
|
+
|
14
|
+
private :IRB
|
6
15
|
end
|
data/spec/irb_spec.rb
ADDED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dietrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- lib/irb/ext/macruby.rb
|
34
34
|
- lib/irb/source.rb
|
35
35
|
- spec/context_spec.rb
|
36
|
+
- spec/irb_spec.rb
|
36
37
|
- spec/source_spec.rb
|
37
38
|
- spec/spec_helper.rb
|
38
39
|
has_rdoc: true
|
@@ -65,5 +66,6 @@ specification_version: 3
|
|
65
66
|
summary: IRB on a diet, for MacRuby / Ruby 1.9
|
66
67
|
test_files:
|
67
68
|
- spec/context_spec.rb
|
69
|
+
- spec/irb_spec.rb
|
68
70
|
- spec/source_spec.rb
|
69
71
|
- spec/spec_helper.rb
|