RUIC 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/ruic.rb +19 -17
- data/lib/ruic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d86081f88d5330f6058d8dd28f8630b0cc3208
|
4
|
+
data.tar.gz: d2ab8c9a69380ba4ac88fd1dead6a81398f54a97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1658a0ec1704137957310153f62e3a253c5ecd6e0fc11bbee931cff0502054a5696f2b0f4e7ed4a51fef93583964acbee620abf3367fba51656b120fe78651
|
7
|
+
data.tar.gz: 5e28125ea41704334453ed1a9e651c243b5e2e0b42c09d7c7c57a78237468f7ce4a6dfdbfe14779fef1c13e8228b43b17f63aaafcaed58ece9820ec66990f1b1
|
data/README.md
CHANGED
@@ -219,12 +219,15 @@ _In decreasing priority…_
|
|
219
219
|
|
220
220
|
# History
|
221
221
|
|
222
|
+
## v0.2.3 - 2014-Nov-7
|
223
|
+
* Cleaner mechanism for creating a truly blank binding
|
224
|
+
|
222
225
|
## v0.2.2 - 2014-Nov-7
|
223
226
|
* REPL shows version number when it starts
|
224
227
|
|
225
228
|
## v0.2.1 - 2014-Nov-7
|
226
229
|
* REPL mode after script maintains binding of script (all local variables remain available)
|
227
|
-
* Customized `.irbrc` files will not cause warnings
|
230
|
+
* Customized `.irbrc` files will not cause warnings
|
228
231
|
|
229
232
|
## v0.2.0 - 2014-Nov-7
|
230
233
|
* Add Presentation#save_as
|
data/lib/ruic.rb
CHANGED
@@ -14,25 +14,23 @@ require_relative 'ruic/presentation'
|
|
14
14
|
|
15
15
|
class RUIC
|
16
16
|
DEFAULTMETADATA = 'C:/Program Files (x86)/NVIDIA Corporation/UI Composer 8.0/res/DataModelMetadata/en-us/MetaData.xml'
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
@env = @ruic.instance_eval{ binding }
|
28
|
-
@env.eval(@script,@opts[:script])
|
17
|
+
|
18
|
+
def self.run(opts={})
|
19
|
+
opts = opts
|
20
|
+
ruic = nil
|
21
|
+
if opts[:script]
|
22
|
+
script = File.read(opts[:script],encoding:'utf-8')
|
23
|
+
Dir.chdir(File.dirname(opts[:script])) do
|
24
|
+
ruic = self.new
|
25
|
+
ruic.uia(opts[:uia]) if opts[:uia]
|
26
|
+
ruic.env.eval(script,opts[:script])
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
32
|
-
if
|
33
|
-
|
34
|
-
Dir.chdir( File.dirname(
|
35
|
-
|
30
|
+
if opts[:repl]
|
31
|
+
location = (ruic && ruic.app && ruic.app.respond_to?(:file) && ruic.app.file) || opts[:uia] || opts[:script] || '.'
|
32
|
+
Dir.chdir( File.dirname(location) ) do
|
33
|
+
ruic ||= self.new.tap{ |r| r.uia(opts[:uia]) if opts[:uia] }
|
36
34
|
require 'ripl/irb'
|
37
35
|
require 'ripl/multi_line'
|
38
36
|
require 'ripl/multi_line/live_error.rb'
|
@@ -41,7 +39,7 @@ class RUIC
|
|
41
39
|
Ripl.config.merge! prompt:"\n", result_prompt:'#=> ', multi_line_prompt:' ', irb_verbose:false
|
42
40
|
ARGV.clear # So that RIPL doesn't try to interpret the options
|
43
41
|
puts "(RUIC v#{RUIC::VERSION} interactive session; 'quit' or ctrl-d to end)"
|
44
|
-
Ripl.start binding:
|
42
|
+
Ripl.start binding:ruic.env
|
45
43
|
end
|
46
44
|
end
|
47
45
|
end
|
@@ -61,6 +59,10 @@ class RUIC
|
|
61
59
|
@apps[name] = UIC.App(meta,path)
|
62
60
|
end
|
63
61
|
|
62
|
+
def env
|
63
|
+
@env ||= binding
|
64
|
+
end
|
65
|
+
|
64
66
|
module SelfInspecting
|
65
67
|
def inspect
|
66
68
|
to_s
|
data/lib/ruic/version.rb
CHANGED