ruboto 0.11.0 → 0.12.0.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/Gemfile.lock +1 -1
  2. data/README.md +7 -5
  3. data/Rakefile +3 -4
  4. data/assets/rakelib/ruboto.rake +138 -87
  5. data/assets/samples/sample_broadcast_receiver.rb +1 -1
  6. data/assets/src/InheritingActivity.java +0 -6
  7. data/assets/src/RubotoActivity.java +4 -1
  8. data/assets/src/RubotoBroadcastReceiver.java +2 -11
  9. data/assets/src/RubotoService.java +6 -52
  10. data/assets/src/org/ruboto/EntryPointActivity.java +276 -36
  11. data/assets/src/org/ruboto/JRubyAdapter.java +5 -152
  12. data/assets/src/org/ruboto/Script.java +1 -1
  13. data/assets/src/org/ruboto/ScriptLoader.java +26 -44
  14. data/assets/src/org/ruboto/test/InstrumentationTestRunner.java +4 -21
  15. data/bin/ruboto +0 -6
  16. data/lib/ruboto/commands/base.rb +58 -48
  17. data/lib/ruboto/sdk_locations.rb +23 -0
  18. data/lib/ruboto/sdk_versions.rb +1 -19
  19. data/lib/ruboto/util/build.rb +32 -32
  20. data/lib/ruboto/util/setup.rb +240 -0
  21. data/lib/ruboto/util/update.rb +12 -25
  22. data/lib/ruboto/util/verify.rb +7 -4
  23. data/lib/ruboto/util/xml_element.rb +62 -76
  24. data/lib/ruboto/version.rb +1 -1
  25. data/test/activity/image_button_activity_test.rb +2 -2
  26. data/test/activity/image_button_and_button_activity_test.rb +2 -2
  27. data/test/activity/json_activity.rb +1 -1
  28. data/test/activity/navigation_activity.rb +12 -12
  29. data/test/activity/navigation_activity_test.rb +7 -7
  30. data/test/activity/option_menu_activity.rb +0 -1
  31. data/test/activity/option_menu_activity_test.rb +2 -2
  32. data/test/activity/stack_activity_test.rb +10 -20
  33. data/test/app_test_methods.rb +0 -4
  34. data/test/broadcast_receiver_test.rb +16 -6
  35. data/test/minimal_app_test.rb +4 -12
  36. data/test/rake_test.rb +37 -23
  37. data/test/ruboto_gen_test.rb +12 -15
  38. data/test/sqldroid_test.rb +3 -6
  39. data/test/test_helper.rb +2 -0
  40. data/test/update_test_methods.rb +9 -9
  41. metadata +7 -11
@@ -1,11 +1,13 @@
1
1
  require 'ruboto/version'
2
2
  require 'ruboto/core_ext/rexml'
3
+ require 'ruboto/sdk_locations'
3
4
 
4
5
  module Ruboto
5
6
  module Util
6
7
  module Update
7
8
  include Build
8
9
  include Ruboto::SdkVersions
10
+ include Ruboto::SdkLocations
9
11
 
10
12
  ###########################################################################
11
13
  #
@@ -426,11 +428,6 @@ module Ruboto
426
428
  # TODO(uwe): Remove when we stop supporting jruby-jars 1.7.0
427
429
  excluded_core_packages = %w(**/*Darwin* **/*Solaris* **/*windows* **/*Windows* META-INF com/headius com/kenai/constantine com/kenai/jffi com/martiansoftware jline jni jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/ffi/Struct$* jnr/ffi/types jnr/posix/MacOS* jnr/posix/OpenBSD* org/apache org/bouncycastle org/fusesource org/jruby/ant org/jruby/cext org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi/io org/jruby/ext/ffi/jffi org/jruby/ext/openssl org/jruby/javasupport/bsf)
428
430
  # ODOT
429
- elsif Gem::Version.new(jruby_core_version) >= Gem::Version.new('1.6.0')
430
- # TODO(uwe): Remove when we stop supporting jruby-jars 1.6.x
431
- print 'Retaining com.kenai.constantine and removing jnr for JRuby 1.6.x...'
432
- excluded_core_packages = %w(META-INF cext com/kenai/jffi com/martiansoftware ext java jline jni jnr jnr/constants/platform/darwin jnr/constants/platform/fake jnr/constants/platform/freebsd jnr/constants/platform/openbsd jnr/constants/platform/sunos jnr/constants/platform/windows jnr/ffi/annotations jnr/ffi/byref jnr/ffi/provider jnr/ffi/util jnr/netdb jnr/ffi/posix/util org/apache org/jruby/ant org/jruby/compiler/ir org/jruby/compiler/util org/jruby/demo org/jruby/embed/bsf org/jruby/embed/jsr223 org/jruby/embed/osgi org/jruby/ext/ffi org/jruby/javasupport/bsf org/jruby/runtime/invokedynamic)
433
- # ODOT
434
431
  else
435
432
  raise "Unsupported JRuby version: #{jruby_core_version.inspect}."
436
433
  end
@@ -466,11 +463,11 @@ module Ruboto
466
463
  #end
467
464
 
468
465
  # Add our proxy class factory
469
- android_jar = Dir["#{Ruboto::SdkVersions::ANDROID_HOME}/platforms/*/android.jar"][0]
466
+ android_jar = Dir["#{ANDROID_HOME}/platforms/*/android.jar"][0]
470
467
  unless android_jar
471
468
  puts
472
469
  puts '*' * 80
473
- puts " Could not find any Android platforms in #{Ruboto::SdkVersions::ANDROID_HOME}/platforms."
470
+ puts " Could not find any Android platforms in #{ANDROID_HOME}/platforms."
474
471
  puts ' At least one Android Platform SDK must be installed to compile the Ruboto classes.'
475
472
  puts ' Please install an Android Platform SDK using the "android" package manager.'
476
473
  puts '*' * 80
@@ -514,17 +511,13 @@ module Ruboto
514
511
  jruby_stdlib_version = Gem::Version.new($1)
515
512
 
516
513
  if included_stdlibs
514
+ lib_dirs = %w(1.8 1.9 2.0 shared)
517
515
 
518
- # TODO(uwe): Simplify when we stop supporting JRuby < 1.7.0
519
- if jruby_stdlib_version < Gem::Version.new('1.7.0.preview1')
520
- lib_dirs = %w(1.8 1.9 site_ruby/1.8 site_ruby/1.9 site_ruby/shared)
521
- else
522
- lib_dirs = %w(1.8 1.9 shared)
523
- end
524
- # ODOT
516
+ # FIXME(uwe): Remove when we stop testing JRuby < 1.7.4.dev
517
+ lib_dirs.delete('2.0') if jruby_stdlib_version < Gem::Version.new('1.7.4.dev')
518
+ # EMXIF
525
519
 
526
520
  print 'excluded...'
527
-
528
521
  lib_dirs.each do |ld|
529
522
  Dir.chdir "new/jruby.home/lib/ruby/#{ld}" do
530
523
  libs = Dir['*'].map{|d|d.sub /\.(rb|jar)$/, ''}.uniq
@@ -542,16 +535,10 @@ module Ruboto
542
535
  end
543
536
 
544
537
  if excluded_stdlibs.any?
545
-
546
- # TODO(uwe): Simplify when we stop supporting JRuby < 1.7.0
547
- if jruby_stdlib_version < Gem::Version.new('1.7.0.preview1')
548
- lib_dirs = %w(1.8 1.9 site_ruby/1.8 site_ruby/1.9 site_ruby/shared)
549
- else
550
- lib_dirs = %w(1.8 1.9 shared)
551
- end
552
- # ODOT
553
-
554
- lib_dirs.each do |ld|
538
+ %w(1.8 1.9 2.0 shared).each do |ld|
539
+ # FIXME(uwe): Remove when we stop testing JRuby < 1.7.4.dev
540
+ next if ld == '2.0' && jruby_stdlib_version < Gem::Version.new('1.7.4.dev')
541
+ # EMXIF
555
542
  excluded_stdlibs.each do |d|
556
543
  dir = "new/jruby.home/lib/ruby/#{ld}/#{d}"
557
544
  FileUtils.rm_rf dir if File.exists? dir
@@ -17,7 +17,10 @@ module Ruboto
17
17
  end
18
18
 
19
19
  def save_manifest
20
- File.open("AndroidManifest.xml", 'w') {|f| REXML::Formatters::OrderedAttributes.new(4).write(verify_manifest.document, f)}
20
+ File.open('AndroidManifest.xml', 'w') do |f|
21
+ REXML::Formatters::OrderedAttributes.new(4).write(verify_manifest.document, f)
22
+ f.puts
23
+ end
21
24
  end
22
25
 
23
26
  def verify_test_manifest
@@ -27,7 +30,7 @@ module Ruboto
27
30
  end
28
31
 
29
32
  def save_test_manifest
30
- File.open("test/AndroidManifest.xml", 'w') {|f| verify_test_manifest.document.write(f, 4)}
33
+ File.open('test/AndroidManifest.xml', 'w') {|f| verify_test_manifest.document.write(f, 4)}
31
34
  end
32
35
 
33
36
  def verify_package
@@ -42,7 +45,7 @@ module Ruboto
42
45
 
43
46
  def verify_sdk_versions
44
47
  verify_manifest
45
- @uses_sdk ||= @manifest.elements["uses-sdk"]
48
+ @uses_sdk ||= @manifest.elements['uses-sdk']
46
49
  abort "you must specify your sdk level in the manifest (e.g., <uses-sdk android:minSdkVersion='3' android:targetSdkVersion='8' />)" unless @uses_sdk
47
50
  @uses_sdk
48
51
  end
@@ -82,7 +85,7 @@ module Ruboto
82
85
  end
83
86
 
84
87
  def save_ruboto_config
85
- File.open("ruboto.yml", 'w') {|f| YAML.dump verify_ruboto_config}
88
+ File.open('ruboto.yml', 'w') {|f| f << YAML.dump(verify_ruboto_config)}
86
89
  end
87
90
 
88
91
  end
@@ -19,17 +19,17 @@ module Ruboto
19
19
  end
20
20
 
21
21
  def name
22
- self["name"]
22
+ self['name']
23
23
  end
24
24
 
25
25
  def attribute(name)
26
- self["values"][name]
26
+ self['values'][name]
27
27
  end
28
28
 
29
29
  def add_element(name, attributes)
30
30
  new_element = XMLElement.new
31
- new_element["name"] = name
32
- new_element["values"] = attributes
31
+ new_element['name'] = name
32
+ new_element['values'] = attributes
33
33
 
34
34
  self[name] = [] unless self[name]
35
35
  self[name] << new_element
@@ -44,61 +44,61 @@ module Ruboto
44
44
  def find_class_or_interface(klass, a_type)
45
45
  abort "ERROR: Can't parse package from #{klass}" unless klass.match(/([a-z.]+)\.([A-Z][A-Za-z.]+)/)
46
46
 
47
- package = self["package"].find{|i| i.attribute("name") == $1}
47
+ package = self['package'].find{|i| i.attribute('name') == $1}
48
48
  abort "ERROR: Can't find package #{$1}" unless package
49
- if a_type == "either"
50
- package["class"].find{|i| i.attribute("name") == $2} or package["interface"].find{|i| i.attribute("name") == $2}
49
+ if a_type == 'either'
50
+ package['class'].find{|i| i.attribute('name') == $2} or package['interface'].find{|i| i.attribute('name') == $2}
51
51
  else
52
- package[a_type].find{|i| i.attribute("name") == $2}
52
+ package[a_type].find{|i| i.attribute('name') == $2}
53
53
  end
54
54
  end
55
55
 
56
56
  def find_class(package_and_class)
57
- find_class_or_interface(package_and_class, "class")
57
+ find_class_or_interface(package_and_class, 'class')
58
58
  end
59
59
 
60
60
  def find_interface(package_and_interface)
61
- find_class_or_interface(package_and_interface, "interface")
61
+ find_class_or_interface(package_and_interface, 'interface')
62
62
  end
63
63
 
64
- def all_methods(method_base="all", method_include="", method_exclude="", implements="")
64
+ def all_methods(method_base='all', method_include='', method_exclude='', implements='')
65
65
  # get all the methogs
66
66
  all_methods = get_elements('method').select{|m| m.attribute('static') != 'true'}
67
67
 
68
68
  # establish the base set of methods
69
69
  working_methods = case method_base.to_s
70
- when "all" then
70
+ when 'all' then
71
71
  all_methods
72
- when "none" then
72
+ when 'none' then
73
73
  []
74
- when "abstract" then
75
- all_methods.select{|i| i.attribute("abstract") == "true"}
76
- when "on" then
77
- all_methods.select{|i| i.attribute("name").match(/^on[A-Z]/)}
74
+ when 'abstract' then
75
+ all_methods.select{|i| i.attribute('abstract') == 'true'}
76
+ when 'on' then
77
+ all_methods.select{|i| i.attribute('name').match(/^on[A-Z]/)}
78
78
  end
79
79
 
80
80
  # make sure to include requested methods
81
- include_methods = method_include.split(",") if method_include.is_a?(String)
82
- all_methods.each{|i| working_methods << i if include_methods.include?(i.attribute("name"))}
81
+ include_methods = method_include.split(',') if method_include.is_a?(String)
82
+ all_methods.each{|i| working_methods << i if include_methods.include?(i.attribute('name'))}
83
83
 
84
84
  # make sure to exclude rejected methods
85
- exclude_methods = method_exclude.split(",") if method_exclude.is_a?(String)
86
- working_methods = working_methods.select{|i| not exclude_methods.include?(i.attribute("name"))}
85
+ exclude_methods = method_exclude.split(',') if method_exclude.is_a?(String)
86
+ working_methods = working_methods.select{|i| not exclude_methods.include?(i.attribute('name'))}
87
87
 
88
88
  # remove methods marked final
89
- working_methods = working_methods.select{|i| (not i.attribute("final")) or i.attribute("final") == "false"}
89
+ working_methods = working_methods.select{|i| (not i.attribute('final')) or i.attribute('final') == 'false'}
90
90
 
91
91
  # get additional methods from parent
92
- if name =="class" and attribute("extends")
93
- parent = root.find_class(attribute("extends"))
92
+ if name =='class' and attribute('extends')
93
+ parent = root.find_class(attribute('extends'))
94
94
  parent_methods = parent.all_methods(method_base, method_include, method_exclude)
95
95
  working_signatures = working_methods.map(&:method_signature)
96
96
  working_methods += parent_methods.select{|i| not working_signatures.include?(i.method_signature)}
97
97
  end
98
98
 
99
99
  # get additional methods from interfaces
100
- if name =="class" and implements != ""
101
- implements.split(",").each do |i|
100
+ if name =='class' and implements != ''
101
+ implements.split(',').each do |i|
102
102
  interface = root.find_interface(i)
103
103
  abort("Unkown interface: #{i}") unless interface
104
104
  working_signatures = working_methods.map(&:method_signature)
@@ -110,100 +110,86 @@ module Ruboto
110
110
  end
111
111
 
112
112
  def parameters
113
- get_elements("parameter").map {|p| [p.attribute("name"), p.attribute("type").gsub("&lt;", "<").gsub("&gt;", ">")]}
113
+ get_elements('parameter').map {|p| [p.attribute('name'), p.attribute('type').gsub('&lt;', '<').gsub('&gt;', '>')]}
114
114
  end
115
115
 
116
116
  def method_signature
117
- "#{attribute("name")}(#{parameters.map{|i| i[1]}.join(',')})"
117
+ "#{attribute('name')}(#{parameters.map{|i| i[1]}.join(',')})"
118
118
  end
119
119
 
120
120
  def constant_string
121
- "CB_" + attribute("name").gsub(/[A-Z]/) {|i| "_#{i}"}.upcase.gsub(/^ON_/, "")
121
+ 'CB_' + attribute('name').gsub(/[A-Z]/) {|i| "_#{i}"}.upcase.gsub(/^ON_/, '')
122
122
  end
123
123
 
124
124
  def super_string
125
- if attribute("api_added") and
126
- attribute("api_added").to_i > verify_min_sdk.to_i and
127
- attribute("api_added").to_i <= verify_target_sdk.to_i
125
+ if attribute('api_added') and
126
+ attribute('api_added').to_i > verify_min_sdk.to_i and
127
+ attribute('api_added').to_i <= verify_target_sdk.to_i
128
128
  nil
129
- elsif attribute("abstract") == "true"
129
+ elsif attribute('abstract') == 'true'
130
130
  nil
131
- elsif name == "method"
132
- "super.#{attribute("name")}(#{parameters.map{|i| i[0]}.join(", ")});"
133
- elsif name == "constructor"
134
- "super(#{parameters.map{|i| i[0]}.join(", ")});"
131
+ elsif name == 'method'
132
+ "super.#{attribute('name')}(#{parameters.map{|i| i[0]}.join(', ')});"
133
+ elsif name == 'constructor'
134
+ "super(#{parameters.map{|i| i[0]}.join(', ')});"
135
135
  end
136
136
  end
137
137
 
138
138
  def default_return
139
- return nil unless attribute("return")
140
- case attribute("return")
141
- when "boolean" then "return false;"
142
- when "int" then "return 0;"
143
- when "void" then nil
144
- else "return null;"
139
+ return nil unless attribute('return')
140
+ case attribute('return')
141
+ when 'boolean' then 'return false;'
142
+ when 'int' then 'return 0;'
143
+ when 'void' then nil
144
+ else
145
+ 'return null;'
145
146
  end
146
147
  end
147
148
 
148
149
  def super_return
149
150
  rv = super_string
150
- return "{#{rv} return;}" unless attribute("return")
151
+ return "{#{rv} return;}" unless attribute('return')
151
152
  rv ? "return #{rv}" : default_return
152
153
  end
153
154
 
154
155
  def ruby_call(camelize = false)
155
156
  params = parameters
156
- args = ""
157
+ args = ''
157
158
  if params.size > 1
158
- args = ", new Object[]{" + params.map{|i| i[0]}.join(", ") + "}"
159
+ args = ', new Object[]{' + params.map { |i| i[0] }.join(', ') + '}'
159
160
  elsif params.size > 0
160
- args = ", " + params.map{|i| i[0]}.join(", ")
161
+ args = ', ' + params.map { |i| i[0] }.join(', ')
161
162
  end
162
163
 
163
- return_cast = ""
164
- convert_return = ""
165
- if attribute("return") && attribute("return") != "void"
166
- if (attribute("return").include?(".") or attribute("return") == "int[]")
167
- return_class = attribute("return")
168
- elsif attribute("return") == 'int'
169
- return_int = true
164
+ return_cast = ''
165
+ convert_return = ''
166
+ if attribute('return') && attribute('return') != 'void'
167
+ if attribute('return').include?('.') || attribute('return') == 'int[]'
168
+ return_class = attribute('return')
169
+ elsif attribute('return') == 'int'
170
170
  return_class = 'Integer'
171
171
  else
172
- return_class = attribute("return").capitalize
172
+ return_class = attribute('return').capitalize
173
173
  end
174
- return_cast = "return (#{return_class.gsub("&lt;", "<").gsub("&gt;", ">")}) " if return_class
174
+ return_cast = "return (#{return_class.gsub('&lt;', '<').gsub('&gt;', '>')}) " if return_class
175
175
  convert_return = "#{return_class.sub(/<.*>$/, '')}.class, "
176
176
  end
177
177
 
178
- method_name = camelize ? attribute("name") : snake_case_attribute
179
- global_args = params.map{|i| "$arg_#{i[0]}"}.join(", ")
180
- ["// FIXME(uwe): Simplify when we stop support for RubotoCore 0.4.7"] +
181
- if_else(
182
- "JRubyAdapter.isJRubyPreOneSeven()",
183
- params.map{|i| "JRubyAdapter.put(\"$arg_#{i[0]}\", #{i[0]});"} +
184
- [
185
- 'JRubyAdapter.put("$ruby_instance", scriptInfo.getRubyInstance());',
186
- "#{return_cast}#{'((Number)' if return_int}JRubyAdapter.runScriptlet(\"$ruby_instance.#{method_name}(#{global_args})\")#{').intValue()' if return_int};",
187
- ],
188
- if_else(
189
- "JRubyAdapter.isJRubyOneSeven()",
190
- ["#{return_cast}JRubyAdapter.runRubyMethod(#{convert_return}scriptInfo.getRubyInstance(), \"#{method_name}\"#{args});"],
191
- ['throw new RuntimeException("Unknown JRuby version: " + JRubyAdapter.get("JRUBY_VERSION"));']
192
- )
193
- )
178
+ method_name = camelize ? attribute('name') : snake_case_attribute
179
+ ["#{return_cast}JRubyAdapter.runRubyMethod(#{convert_return}scriptInfo.getRubyInstance(), \"#{method_name}\"#{args});"]
194
180
  end
195
181
 
196
182
  def snake_case_attribute
197
- attribute("name").gsub(/[A-Z]/) { |i| "_#{i}" }.downcase
183
+ attribute('name').gsub(/[A-Z]/) { |i| "_#{i}" }.downcase
198
184
  end
199
185
 
200
186
  def method_definition(class_name)
201
187
  method_call(
202
- (attribute("return") ? attribute("return") : "void"),
203
- attribute("name"), parameters,
188
+ (attribute('return') ? attribute('return') : 'void'),
189
+ attribute('name'), parameters,
204
190
  get_elements('exception').map { |m| m.attribute('type') },
205
191
  ["if (ScriptLoader.isCalledFromJRuby()) #{super_return}",
206
- if_else("!JRubyAdapter.isInitialized()",
192
+ if_else('!JRubyAdapter.isInitialized()',
207
193
  [%Q{Log.i("Method called before JRuby runtime was initialized: #{class_name}##{attribute('name')}");},
208
194
  super_return]),
209
195
  'String rubyClassName = scriptInfo.getRubyClassName();',
@@ -1,4 +1,4 @@
1
1
  module Ruboto
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.0.rc.0'
3
3
  UPDATE_VERSION_LIMIT = '0.7.0'
4
4
  end
@@ -11,7 +11,7 @@ setup do |activity|
11
11
  end
12
12
 
13
13
  test('button changes text') do |activity|
14
- assert_equal "What hath Matz wrought?", @text_view.text
14
+ assert_equal 'What hath Matz wrought?', @text_view.text
15
15
  activity.findViewById(43).performClick
16
- assert_equal "What hath Matz wrought!", @text_view.text
16
+ assert_equal 'What hath Matz wrought!', @text_view.text
17
17
  end
@@ -11,13 +11,13 @@ setup do |activity|
11
11
  end
12
12
 
13
13
  test('button changes text') do |activity|
14
- assert_equal "What hath Matz wrought?", @text_view.text
14
+ assert_equal 'What hath Matz wrought?', @text_view.text
15
15
  activity.find_view_by_id(44).perform_click
16
16
  assert_equal 'Button pressed', @text_view.text
17
17
  end
18
18
 
19
19
  test('image button changes text') do |activity|
20
- assert_equal "What hath Matz wrought?", @text_view.text
20
+ assert_equal 'What hath Matz wrought?', @text_view.text
21
21
  activity.find_view_by_id(43).perform_click
22
22
  assert_equal 'Image button pressed', @text_view.text
23
23
  end
@@ -12,7 +12,7 @@ class JsonActivity
12
12
  linear_layout :orientation => LinearLayout::VERTICAL, :gravity => android.view.Gravity::CENTER do
13
13
  text_view :id => 42, :text => with_large_stack { JSON.load('["foo"]')[0] },
14
14
  :text_size => 48.0, :gravity => android.view.Gravity::CENTER
15
- text_view :id => 43, :text => with_large_stack { JSON.dump(['foo']) },
15
+ text_view :id => 43, :text => with_large_stack { JSON.dump(%w(foo)) },
16
16
  :text_size => 48.0, :gravity => android.view.Gravity::CENTER
17
17
  text_view :id => 44, :text => with_large_stack { 'foo'.to_json },
18
18
  :text_size => 48.0, :gravity => android.view.Gravity::CENTER
@@ -34,18 +34,18 @@ class NavigationActivity
34
34
  def java_backed_by_ruby_class
35
35
  i = android.content.Intent.new
36
36
  i.setClassName($package_name, 'org.ruboto.RubotoActivity')
37
- configBundle = android.os.Bundle.new
38
- configBundle.put_string('ClassName', 'NavigationTargetActivity')
39
- i.putExtra('Ruboto Config', configBundle)
37
+ config_bundle = android.os.Bundle.new
38
+ config_bundle.put_string('ClassName', 'NavigationTargetActivity')
39
+ i.putExtra('Ruboto Config', config_bundle)
40
40
  startActivity(i)
41
41
  end
42
42
 
43
43
  def java_backed_by_script_name
44
44
  i = android.content.Intent.new
45
45
  i.setClassName($package_name, 'org.ruboto.RubotoActivity')
46
- configBundle = android.os.Bundle.new
47
- configBundle.put_string('Script', 'navigation_target_activity.rb')
48
- i.putExtra('Ruboto Config', configBundle)
46
+ config_bundle = android.os.Bundle.new
47
+ config_bundle.put_string('Script', 'navigation_target_activity.rb')
48
+ i.putExtra('Ruboto Config', config_bundle)
49
49
  startActivity(i)
50
50
  end
51
51
 
@@ -80,18 +80,18 @@ class NavigationActivity
80
80
  def start_infile_activity
81
81
  i = android.content.Intent.new
82
82
  i.setClassName($package_name, 'org.ruboto.RubotoActivity')
83
- configBundle = android.os.Bundle.new
84
- configBundle.put_string('ClassName', 'InfileActivity')
85
- i.putExtra('Ruboto Config', configBundle)
83
+ config_bundle = android.os.Bundle.new
84
+ config_bundle.put_string('ClassName', 'InfileActivity')
85
+ i.putExtra('Ruboto Config', config_bundle)
86
86
  startActivity(i)
87
87
  end
88
88
 
89
89
  def start_ruby_file_activity
90
90
  i = android.content.Intent.new
91
91
  i.setClassName($package_name, 'org.ruboto.RubotoActivity')
92
- configBundle = android.os.Bundle.new
93
- configBundle.put_string('ClassName', 'RubyFileActivity')
94
- i.putExtra('Ruboto Config', configBundle)
92
+ config_bundle = android.os.Bundle.new
93
+ config_bundle.put_string('ClassName', 'RubyFileActivity')
94
+ i.putExtra('Ruboto Config', config_bundle)
95
95
  startActivity(i)
96
96
  end
97
97