ruboto 0.16.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/{RELEASE_CANDICATE_DOC → RELEASE_CANDICATE_DOC.md} +17 -10
- data/RELEASE_DOC.md +105 -0
- data/Rakefile +14 -16
- data/assets/rakelib/ruboto.rake +2 -2
- data/assets/samples/sample_activity.rb +5 -2
- data/assets/src/org/ruboto/SplashActivity.java +1 -0
- data/assets/src/ruboto/activity.rb +1 -1
- data/assets/src/ruboto/widget.rb +12 -2
- data/lib/ruboto/util/emulator.rb +1 -1
- data/lib/ruboto/version.rb +1 -1
- data/test/activity/dialog_fragment_activity.rb +1 -1
- data/test/activity/image_button_activity.rb +4 -2
- data/test/activity/image_button_and_button_activity.rb +4 -3
- data/test/activity/margins_activity.rb +1 -1
- data/test/activity/navigation_activity.rb +17 -14
- data/test/activity/navigation_target_activity.rb +2 -1
- data/test/activity/option_menu_activity.rb +1 -1
- data/test/activity/ruby_file_activity.rb +2 -1
- data/test/activity/spinner_activity.rb +8 -7
- data/test/activity/view_constants_activity.rb +3 -2
- data/test/ruboto_gen_test.rb +5 -13
- data/test/service_test.rb +4 -2
- metadata +14 -14
- data/RELEASE_DOC +0 -125
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00cab987d3fcf1b915f97630b2e2199fff2cc215
|
4
|
+
data.tar.gz: a1a0c57fe7ba04e52c4b39868212553f220321f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb9071d664bfd5517e03e01f281e291d1b13fbdeda5dcf8ca1c1dde64acbe924dff69e4afeea168b01079e38e6ca00af8c46213cdb66d72d68a7f5bf0d2e0eb8
|
7
|
+
data.tar.gz: e31c4dc89f7a6d82b19ff82111cd31b1c4870233c40b4f37f1b15e61b852f0e78d60eacf32ed66e587c6b603732b8d8786584b0fe1fbcc6bda7f124a27b998fe
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruboto (0.
|
4
|
+
ruboto (1.0.0)
|
5
5
|
main (>= 4.7.2)
|
6
6
|
rake
|
7
7
|
rubyzip (>= 1.0.0)
|
@@ -18,8 +18,8 @@ GEM
|
|
18
18
|
fattr (>= 2.2.0)
|
19
19
|
map (>= 5.1.0)
|
20
20
|
map (6.5.1)
|
21
|
-
rake (10.1.
|
22
|
-
rubyzip (1.
|
21
|
+
rake (10.1.1)
|
22
|
+
rubyzip (1.1.0)
|
23
23
|
|
24
24
|
PLATFORMS
|
25
25
|
java
|
@@ -1,16 +1,23 @@
|
|
1
|
-
Subject: [ANN] Ruboto 0.
|
1
|
+
Subject: [ANN] Ruboto 1.0.0 release candidate
|
2
2
|
|
3
3
|
Hi all!
|
4
4
|
|
5
|
-
The Ruboto 0.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
The Ruboto 1.0.0 release candidate is now available.
|
6
|
+
|
7
|
+
The main motivation for the 1.0 release is to announce that Ruboto is
|
8
|
+
ready for general consumption!
|
9
|
+
|
10
|
+
* All important parts of the Android API are available.
|
11
|
+
* The API has stabilised.
|
12
|
+
* Performance is reasonable. (Best case startup 4 seconds or less).
|
13
|
+
* Home page/Wiki/Tutorials and other docs are of high enough quality that
|
14
|
+
new developers have a low threshold to get going, and more advanced
|
15
|
+
developers can find how to do more advanced apps.
|
16
|
+
|
17
|
+
Notable features this release is RubyGems support for the "dalvik"
|
18
|
+
platform and support for using Android utility projects. This means you
|
19
|
+
can release gems for dalvik only and consume in-house or third-party
|
20
|
+
utility projects.
|
14
21
|
|
15
22
|
As always we need your help and feedback to ensure the quality of the release. Please install the release candidate using
|
16
23
|
|
data/RELEASE_DOC.md
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
Subject: [ANN] Ruboto 1.0.0 released!
|
2
|
+
|
3
|
+
The Ruboto team is pleased to announce the release of Ruboto 1.0.0.
|
4
|
+
|
5
|
+
Ruboto (JRuby on Android) is a platform for developing full stand-alone
|
6
|
+
apps for Android using the Ruby language and libraries. It includes
|
7
|
+
support libraries and generators for creating projects, classes, tests,
|
8
|
+
and more. The complete APIs of Android, Java, and Ruby are available to
|
9
|
+
you using the Ruby language.
|
10
|
+
|
11
|
+
New in version 1.0.0:
|
12
|
+
|
13
|
+
The main motivation for the 1.0 release is to announce that Ruboto is
|
14
|
+
ready for general consumption!
|
15
|
+
|
16
|
+
* All important parts of the Android API are available.
|
17
|
+
* The API has stabilised.
|
18
|
+
* Performance is reasonable. (Best case startup 4 seconds or less).
|
19
|
+
* Home page/Wiki/Tutorials and other docs are of high enough quality that
|
20
|
+
new developers have a low threshold to get going, and more advanced
|
21
|
+
developers can find how to do more advanced apps.
|
22
|
+
|
23
|
+
Notable features this release is RubyGems support for the "dalvik"
|
24
|
+
platform and support for using Android utility projects. This means you
|
25
|
+
can release gems for dalvik only and consume in-house or third-party
|
26
|
+
utility projects.
|
27
|
+
|
28
|
+
Features:
|
29
|
+
|
30
|
+
* Issue #75 Faster startup
|
31
|
+
* Issue #392 Establish a specialized RubyGems platform for JRuby on
|
32
|
+
Android
|
33
|
+
* Issue #524 Use "ruboto emulator" to setup HAXM
|
34
|
+
* Issue #530 Shift all layout parameters into :layout = {} and remove the
|
35
|
+
need for "=" in setting instance variables
|
36
|
+
* Issue #544 Add support for using utility projects
|
37
|
+
|
38
|
+
Bugfixes:
|
39
|
+
|
40
|
+
* Issue #431 Error running Ruboto test suites
|
41
|
+
* Issue #483 The Tutorial: adding a startup splash builds but crashes
|
42
|
+
starting in the emulator
|
43
|
+
* Issue #534 ruboto emulator -t does not show emulator window though it
|
44
|
+
says Emulator started OK
|
45
|
+
* Issue #542 please install the jdbcsqlite3 adapter
|
46
|
+
|
47
|
+
Support:
|
48
|
+
|
49
|
+
* Issue #520 ruboto setup - "Android SDK command adb : Not found"
|
50
|
+
* Issue #539 "rake install start" returns "rake aborted! No such file or
|
51
|
+
directory - adb"
|
52
|
+
|
53
|
+
Documentation:
|
54
|
+
|
55
|
+
* Issue #506 Add barcode scanning example
|
56
|
+
* Issue #528 Fix formatting errors in the RELEASE_DOC
|
57
|
+
* Issue #535 Mac kernel freezes when ruboto emulator start under MacOS
|
58
|
+
10.9 with Virtualbox 4.3.x installed.
|
59
|
+
|
60
|
+
Pull requests:
|
61
|
+
|
62
|
+
* Issue #527 Add weight to widget.rb
|
63
|
+
* Issue #536 Update emulator.rb (Fix no emulator window shows in MacOS
|
64
|
+
10.9 with Virtualbox 4.3, when $DISPLAY variable is empty)
|
65
|
+
|
66
|
+
You can find a complete list of issues here:
|
67
|
+
|
68
|
+
* https://github.com/ruboto/ruboto/issues?state=closed&milestone=17
|
69
|
+
|
70
|
+
|
71
|
+
Installation:
|
72
|
+
|
73
|
+
To use Ruboto, you need to install a Ruby implementation. Then do
|
74
|
+
(possibly as root/administrator)
|
75
|
+
|
76
|
+
gem install ruboto
|
77
|
+
ruboto setup
|
78
|
+
|
79
|
+
To create a project do
|
80
|
+
|
81
|
+
ruboto gen app --package <your.package.name>
|
82
|
+
cd <project directory>
|
83
|
+
ruboto setup
|
84
|
+
|
85
|
+
To run an emulator for your project
|
86
|
+
|
87
|
+
cd <project directory>
|
88
|
+
ruboto emulator
|
89
|
+
|
90
|
+
To run your project
|
91
|
+
|
92
|
+
cd <project directory>
|
93
|
+
rake install start
|
94
|
+
|
95
|
+
You can find an introductory tutorial at
|
96
|
+
https://github.com/ruboto/ruboto/wiki
|
97
|
+
|
98
|
+
If you have any problems or questions, come see us at http://ruboto.org/
|
99
|
+
|
100
|
+
Enjoy!
|
101
|
+
|
102
|
+
|
103
|
+
--
|
104
|
+
The Ruboto Team
|
105
|
+
http://ruboto.org/
|
data/Rakefile
CHANGED
@@ -25,8 +25,8 @@ README_FILE = 'README.md'
|
|
25
25
|
BLOG_DIR = "#{File.dirname PROJECT_DIR}/ruboto.github.com/_posts"
|
26
26
|
RELEASE_BLOG = "#{BLOG_DIR}/#{Date.today}-Ruboto-#{Ruboto::VERSION}-release-doc.md"
|
27
27
|
RELEASE_BLOG_GLOB = "#{BLOG_DIR}/*-Ruboto-#{Ruboto::VERSION}-release-doc.md"
|
28
|
-
RELEASE_CANDIDATE_DOC = 'RELEASE_CANDICATE_DOC'
|
29
|
-
RELEASE_DOC = 'RELEASE_DOC'
|
28
|
+
RELEASE_CANDIDATE_DOC = 'RELEASE_CANDICATE_DOC.md'
|
29
|
+
RELEASE_DOC = 'RELEASE_DOC.md'
|
30
30
|
|
31
31
|
CLEAN.include('ruboto-*.gem', 'tmp')
|
32
32
|
|
@@ -228,11 +228,11 @@ New in version #{milestone_name}:
|
|
228
228
|
|
229
229
|
#{milestone_description}
|
230
230
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
231
|
+
#{(categories.keys & grouped_issues.keys).map do |cat|
|
232
|
+
"#{cat}:\n
|
233
|
+
#{grouped_issues[cat].map { |i| %Q{* Issue ##{i['number']} #{i['title']}}.wrap(2) }.join("\n")}
|
234
|
+
"
|
235
|
+
end.join("\n")}
|
236
236
|
You can find a complete list of issues here:
|
237
237
|
|
238
238
|
* https://github.com/ruboto/ruboto/issues?state=closed&milestone=#{milestone}
|
@@ -287,20 +287,11 @@ layout: post
|
|
287
287
|
---
|
288
288
|
EOF
|
289
289
|
File.write(RELEASE_DOC, release_doc)
|
290
|
-
sh "git add -f #{RELEASE_DOC}"
|
291
|
-
`git commit -m "* Added release doc for Ruboto #{Ruboto::VERSION}"`
|
292
290
|
Dir.chdir BLOG_DIR do
|
293
291
|
output = `git status --porcelain`
|
294
292
|
old_blog_posts = Dir[RELEASE_BLOG_GLOB] - [RELEASE_BLOG]
|
295
293
|
sh "git rm -f #{old_blog_posts.join(' ')}" unless old_blog_posts.empty?
|
296
294
|
File.write(RELEASE_BLOG, header + release_doc)
|
297
|
-
sh "git add -f #{RELEASE_BLOG}"
|
298
|
-
if output.empty?
|
299
|
-
`git commit -m "* Added release blog for Ruboto #{Ruboto::VERSION}"`
|
300
|
-
sh 'git push'
|
301
|
-
else
|
302
|
-
puts "Workspace not clean!\n#{output}"
|
303
|
-
end
|
304
295
|
end
|
305
296
|
end
|
306
297
|
end
|
@@ -378,6 +369,13 @@ desc 'Push the gem to RubyGems'
|
|
378
369
|
task :release => [:clean, README_FILE, :release_docs, :gem] do
|
379
370
|
output = `git status --porcelain`
|
380
371
|
raise "Workspace not clean!\n#{output}" unless output.empty?
|
372
|
+
Dir.chdir BLOG_DIR do
|
373
|
+
output = `git status --porcelain`
|
374
|
+
raise "Web workspace not clean!\n#{output}" unless output.empty?
|
375
|
+
sh "git add -f #{RELEASE_BLOG}"
|
376
|
+
`git commit -m "* Added release blog for Ruboto #{Ruboto::VERSION}"`
|
377
|
+
sh 'git push'
|
378
|
+
end
|
381
379
|
sh "git tag #{Ruboto::VERSION}"
|
382
380
|
sh 'git push --tags'
|
383
381
|
sh "gem push #{GEM_FILE}"
|
data/assets/rakelib/ruboto.rake
CHANGED
@@ -34,15 +34,15 @@ adb_version_str = `adb version`
|
|
34
34
|
(puts "Unrecognized adb version: #$1"; exit 1) unless adb_version_str =~ /Android Debug Bridge version (\d+\.\d+\.\d+)/
|
35
35
|
(puts "adb version 1.0.31 or later required. Version found: #$1"; exit 1) unless Gem::Version.new($1) >= Gem::Version.new('1.0.31')
|
36
36
|
android_home = ENV['ANDROID_HOME']
|
37
|
-
android_home = android_home.gsub("\\", '/') unless android_home.nil?
|
38
37
|
if android_home.nil?
|
39
38
|
if (adb_path = which('adb'))
|
40
39
|
android_home = File.dirname(File.dirname(adb_path))
|
40
|
+
ENV['ANDROID_HOME'] = android_home
|
41
41
|
else
|
42
42
|
abort 'You need to set the ANDROID_HOME environment variable.'
|
43
43
|
end
|
44
44
|
else
|
45
|
-
android_home.gsub
|
45
|
+
android_home = android_home.gsub('\\', '/')
|
46
46
|
end
|
47
47
|
|
48
48
|
# FIXME(uwe): Simplify when we stop supporting Android SDK < 22: Don't look in platform-tools for dx
|
@@ -12,9 +12,12 @@ class SampleActivity
|
|
12
12
|
|
13
13
|
self.content_view =
|
14
14
|
linear_layout :orientation => :vertical do
|
15
|
-
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
15
|
+
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
16
|
+
:layout => {:width => :match_parent},
|
16
17
|
:gravity => :center, :text_size => 48.0
|
17
|
-
button :text => 'M-x butterfly',
|
18
|
+
button :text => 'M-x butterfly',
|
19
|
+
:layout => {:width => :match_parent},
|
20
|
+
:id => 43, :on_click_listener => proc { butterfly }
|
18
21
|
end
|
19
22
|
rescue Exception
|
20
23
|
puts "Exception creating activity: #{$!}"
|
@@ -46,7 +46,7 @@ module Ruboto
|
|
46
46
|
|
47
47
|
# FIXME(uwe): Deprecated. Remove june 2014.
|
48
48
|
if options[:class_name]
|
49
|
-
puts "\
|
49
|
+
puts "\nDEPRECATION: The ':class_name' option is deprecated. Put the class name in the first argument instead."
|
50
50
|
end
|
51
51
|
|
52
52
|
java_class = options.delete(:java_class) || RubotoActivity
|
data/assets/src/ruboto/widget.rb
CHANGED
@@ -47,26 +47,36 @@ View.class_eval do
|
|
47
47
|
def configure(context, params = {})
|
48
48
|
if width = params.delete(:width)
|
49
49
|
getLayoutParams.width = View.convert_constant(width)
|
50
|
+
puts "\nDEPRECATION: The ':width' option is deprecated. Use :layout => {:width => XX} instead."
|
50
51
|
end
|
51
52
|
|
52
53
|
if height = params.delete(:height)
|
53
54
|
getLayoutParams.height = View.convert_constant(height)
|
55
|
+
puts "\nDEPRECATION: The ':height' option is deprecated. Use :height => {:width => XX} instead."
|
54
56
|
end
|
55
57
|
|
56
58
|
if margins = params.delete(:margins)
|
57
59
|
getLayoutParams.set_margins(*margins)
|
60
|
+
puts "\nDEPRECATION: The ':margins' option is deprecated. Use :layout => {:margins => XX} instead."
|
58
61
|
end
|
59
62
|
|
60
63
|
if layout = params.delete(:layout)
|
61
64
|
lp = getLayoutParams
|
62
65
|
layout.each do |k, v|
|
63
|
-
method_name = k.to_s
|
66
|
+
method_name = k.to_s
|
67
|
+
if lp.respond_to?("#{k}=")
|
68
|
+
method_name = "#{k}="
|
69
|
+
elsif method_name.include?("_")
|
70
|
+
method_name = method_name.gsub(/_([a-z])/){$1.upcase}
|
71
|
+
method_name = "#{method_name}=" if lp.respond_to?("#{method_name}=")
|
72
|
+
end
|
73
|
+
|
64
74
|
invoke_with_converted_arguments(lp, method_name, v)
|
65
75
|
end
|
66
76
|
end
|
67
77
|
|
68
78
|
params.each do |k, v|
|
69
|
-
method_name = "
|
79
|
+
method_name = self.respond_to?("#{k}=") ? "#{k}=" : k
|
70
80
|
invoke_with_converted_arguments(self, method_name, v)
|
71
81
|
end
|
72
82
|
end
|
data/lib/ruboto/util/emulator.rb
CHANGED
data/lib/ruboto/version.rb
CHANGED
@@ -28,7 +28,7 @@ class ExampleDialogFragment < android.app.DialogFragment
|
|
28
28
|
dialog.title = @some_var
|
29
29
|
|
30
30
|
linear_layout :orientation => :vertical do
|
31
|
-
linear_layout :gravity => :center, :layout => {:width
|
31
|
+
linear_layout :gravity => :center, :layout => {:width => :fill_parent} do
|
32
32
|
text_view :text => @some_var, :id => 43, :text_size => 40.0,
|
33
33
|
:gravity => :center
|
34
34
|
end
|
@@ -16,9 +16,11 @@ class ImageButtonActivity
|
|
16
16
|
|
17
17
|
self.content_view =
|
18
18
|
linear_layout :orientation => LinearLayout::VERTICAL, :gravity => android.view.Gravity::CENTER_HORIZONTAL do
|
19
|
-
@text_view = text_view :text => 'What hath Matz wrought?',
|
19
|
+
@text_view = text_view :text => 'What hath Matz wrought?',
|
20
|
+
:id => 42, :layout => {:width => :fill_parent},
|
20
21
|
:gravity => android.view.Gravity::CENTER, :text_size => 48.0
|
21
|
-
image_button :image_resource => $package.R::drawable::get_ruboto_core,
|
22
|
+
image_button :image_resource => $package.R::drawable::get_ruboto_core,
|
23
|
+
:layout => {:width => :wrap_content}, :id => 43,
|
22
24
|
:on_click_listener => click_handler
|
23
25
|
end
|
24
26
|
end
|
@@ -10,11 +10,12 @@ class ImageButtonAndButtonActivity
|
|
10
10
|
self.content_view =
|
11
11
|
linear_layout :orientation => LinearLayout::VERTICAL, :gravity => android.view.Gravity::CENTER_HORIZONTAL do
|
12
12
|
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42, :text_size => 48.0,
|
13
|
-
:width => :fill_parent, :gravity => android.view.Gravity::CENTER
|
13
|
+
:layout => {:width => :fill_parent}, :gravity => android.view.Gravity::CENTER
|
14
14
|
button :text => 'Button', :id => 44, :text_size => 48.0,
|
15
|
-
:width => :fill_parent, :gravity => android.view.Gravity::CENTER,
|
15
|
+
:layout => {:width => :fill_parent}, :gravity => android.view.Gravity::CENTER,
|
16
16
|
:on_click_listener => proc { @text_view.text = 'Button pressed' }
|
17
|
-
image_button :image_resource => $package.R::drawable::get_ruboto_core,
|
17
|
+
image_button :image_resource => $package.R::drawable::get_ruboto_core,
|
18
|
+
:id => 43, :layout => {:width => :wrap_content},
|
18
19
|
:on_click_listener => proc { @text_view.text = 'Image button pressed' }
|
19
20
|
end
|
20
21
|
end
|
@@ -11,7 +11,7 @@ class MarginsActivity
|
|
11
11
|
linear_layout :orientation => LinearLayout::VERTICAL do
|
12
12
|
@text_view_margins = text_view :text => 'What hath Matz wrought?', :id => 42, :margins => [100,0,0,0]
|
13
13
|
@text_view_layout = text_view :text => 'What hath Matz wrought?', :id => 43, :layout => {:set_margins => [100,0,0,0]}
|
14
|
-
@text_view_fieldset = text_view :text => 'What hath Matz wrought?', :id => 44, :layout => {:left_margin
|
14
|
+
@text_view_fieldset = text_view :text => 'What hath Matz wrought?', :id => 44, :layout => {:left_margin => 100}
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -10,20 +10,20 @@ class NavigationActivity
|
|
10
10
|
|
11
11
|
self.content_view =
|
12
12
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
13
|
-
text_view :text => 'Navigation', :id => 42, :width => :match_parent,
|
13
|
+
text_view :text => 'Navigation', :id => 42, :layout => {:width => :match_parent},
|
14
14
|
:gravity => :center, :text_size => 48.0
|
15
15
|
scroll_view :layout => {:weight= => 1} do
|
16
16
|
linear_layout :orientation => :vertical do
|
17
|
-
button :text => 'Java backed by Java class', :width => :match_parent, :id => 43, :on_click_listener => proc { java_backed_by_java_class }
|
18
|
-
button :text => 'Java backed by Ruby class', :width => :match_parent, :id => 44, :on_click_listener => proc { java_backed_by_ruby_class }
|
19
|
-
button :text => 'Java backed by script name', :width => :match_parent, :id => 45, :on_click_listener => proc { java_backed_by_script_name }
|
20
|
-
button :text => 'Inline block', :width => :match_parent, :id => 46, :on_click_listener => proc { start_inline_activity }
|
21
|
-
button :text => 'Inline block with options', :width => :match_parent, :id => 47, :on_click_listener => proc { start_inline_activity_with_options }
|
22
|
-
button :text => 'Infile class', :width => :match_parent, :id => 48, :on_click_listener => proc { start_infile_activity }
|
23
|
-
button :text => 'Ruby file activity', :width => :match_parent, :id => 49, :on_click_listener => proc { start_ruby_file_activity }
|
24
|
-
button :text => 'RubotoActivity no config', :width => :match_parent, :id => 50, :on_click_listener => proc { start_ruboto_activity_no_config }
|
25
|
-
button :text => 'RubotoActivity', :width => :match_parent, :id => 51, :on_click_listener => proc { start_ruboto_activity('RubyFileActivity') }
|
26
|
-
button :text => 'RubotoActivity with Extras', :width => :match_parent, :id => 52, :on_click_listener => proc { start_ruboto_activity('RubyFileActivity', :extras => {:extra_string => 'Started with string extra.'}) }
|
17
|
+
button :text => 'Java backed by Java class', :layout => {:width => :match_parent}, :id => 43, :on_click_listener => proc { java_backed_by_java_class }
|
18
|
+
button :text => 'Java backed by Ruby class', :layout => {:width => :match_parent}, :id => 44, :on_click_listener => proc { java_backed_by_ruby_class }
|
19
|
+
button :text => 'Java backed by script name', :layout => {:width => :match_parent}, :id => 45, :on_click_listener => proc { java_backed_by_script_name }
|
20
|
+
button :text => 'Inline block', :layout => {:width => :match_parent}, :id => 46, :on_click_listener => proc { start_inline_activity }
|
21
|
+
button :text => 'Inline block with options', :layout => {:width => :match_parent}, :id => 47, :on_click_listener => proc { start_inline_activity_with_options }
|
22
|
+
button :text => 'Infile class', :layout => {:width => :match_parent}, :id => 48, :on_click_listener => proc { start_infile_activity }
|
23
|
+
button :text => 'Ruby file activity', :layout => {:width => :match_parent}, :id => 49, :on_click_listener => proc { start_ruby_file_activity }
|
24
|
+
button :text => 'RubotoActivity no config', :layout => {:width => :match_parent}, :id => 50, :on_click_listener => proc { start_ruboto_activity_no_config }
|
25
|
+
button :text => 'RubotoActivity', :layout => {:width => :match_parent}, :id => 51, :on_click_listener => proc { start_ruboto_activity('RubyFileActivity') }
|
26
|
+
button :text => 'RubotoActivity with Extras', :layout => {:width => :match_parent}, :id => 52, :on_click_listener => proc { start_ruboto_activity('RubyFileActivity', :extras => {:extra_string => 'Started with string extra.'}) }
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -58,7 +58,8 @@ class NavigationActivity
|
|
58
58
|
set_title 'Inline Activity'
|
59
59
|
self.content_view =
|
60
60
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
61
|
-
text_view :text => 'This is an inline activity.',
|
61
|
+
text_view :text => 'This is an inline activity.',
|
62
|
+
:id => 42, :layout => {:width => :match_parent},
|
62
63
|
:gravity => :center, :text_size => 48.0
|
63
64
|
end
|
64
65
|
end
|
@@ -72,7 +73,8 @@ class NavigationActivity
|
|
72
73
|
set_title 'Inline Activity'
|
73
74
|
self.content_view =
|
74
75
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
75
|
-
text_view :text => 'This is an inline activity.',
|
76
|
+
text_view :text => 'This is an inline activity.',
|
77
|
+
:id => 42, :layout => {:width => :match_parent},
|
76
78
|
:gravity => :center, :text_size => 48.0
|
77
79
|
end
|
78
80
|
end
|
@@ -107,7 +109,8 @@ class InfileActivity
|
|
107
109
|
set_title 'Infile Activity'
|
108
110
|
self.content_view =
|
109
111
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
110
|
-
text_view :text => 'This is an infile activity.',
|
112
|
+
text_view :text => 'This is an infile activity.',
|
113
|
+
:id => 42, :layout => {:width => :match_parent},
|
111
114
|
:gravity => :center, :text_size => 48.0
|
112
115
|
end
|
113
116
|
end
|
@@ -5,7 +5,8 @@ class NavigationTargetActivity
|
|
5
5
|
|
6
6
|
self.content_view =
|
7
7
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
8
|
-
text_view :text => 'This is the navigation target activity.',
|
8
|
+
text_view :text => 'This is the navigation target activity.',
|
9
|
+
:id => 42, :layout => {:width => :match_parent},
|
9
10
|
:gravity => :center, :text_size => 48.0
|
10
11
|
end
|
11
12
|
end
|
@@ -11,7 +11,7 @@ class OptionMenuActivity
|
|
11
11
|
self.content_view =
|
12
12
|
linear_layout :orientation => LinearLayout::VERTICAL do
|
13
13
|
text_view :text => 'What hath Matz wrought?', :id => 42, :text_size => 48.0,
|
14
|
-
:width => :fill_parent, :gravity => android.view.Gravity::CENTER
|
14
|
+
:layout => {:width => :fill_parent}, :gravity => android.view.Gravity::CENTER
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -6,7 +6,8 @@ class RubyFileActivity
|
|
6
6
|
|
7
7
|
self.content_view =
|
8
8
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
9
|
-
text_view :text => display_text, :id => 42,
|
9
|
+
text_view :text => display_text, :id => 42,
|
10
|
+
:layout => {:width => :match_parent},
|
10
11
|
:gravity => :center, :text_size => 48.0
|
11
12
|
end
|
12
13
|
end
|
@@ -14,8 +14,8 @@ class SpinnerActivity
|
|
14
14
|
|
15
15
|
self.content_view =
|
16
16
|
linear_layout :orientation => :vertical, :gravity => :center_horizontal do
|
17
|
-
spinner :width => :match_parent, :id => 42
|
18
|
-
plain_spinner = spinner :width => :match_parent, :id => 43,
|
17
|
+
spinner :layout => {:width => :match_parent}, :id => 42
|
18
|
+
plain_spinner = spinner :layout => {:width => :match_parent}, :id => 43,
|
19
19
|
:on_item_selected_listener => click_handler
|
20
20
|
plain_spinner.adapter = android.widget.ArrayAdapter.new(self, R::layout::simple_spinner_item)
|
21
21
|
|
@@ -29,22 +29,23 @@ class SpinnerActivity
|
|
29
29
|
end
|
30
30
|
# EMXIF
|
31
31
|
|
32
|
-
spinner :width => :match_parent, :id => 44,
|
32
|
+
spinner :layout => {:width => :match_parent}, :id => 44,
|
33
33
|
:on_item_selected_listener => click_handler,
|
34
34
|
:adapter => android.widget.ArrayAdapter.new(self, R::layout::simple_spinner_item, ['Adapter Spinner', 'Adapter Item'])
|
35
|
-
spinner :width => :match_parent, :id => 45 ,
|
35
|
+
spinner :layout => {:width => :match_parent}, :id => 45 ,
|
36
36
|
:on_item_selected_listener => click_handler,
|
37
37
|
:list => ['List Spinner', 'List Item']
|
38
|
-
spinner :width => :match_parent, :id => 46 ,
|
38
|
+
spinner :layout => {:width => :match_parent}, :id => 46 ,
|
39
39
|
:on_item_selected_listener => click_handler,
|
40
40
|
:list => ['List Spinner', 'List Item'],
|
41
41
|
:item_layout => R::layout::simple_spinner_dropdown_item
|
42
|
-
spinner :width => :match_parent, :id => 47 ,
|
42
|
+
spinner :layout => {:width => :match_parent}, :id => 47 ,
|
43
43
|
:on_item_selected_listener => click_handler,
|
44
44
|
:list => ['List Spinner', 'List Item'],
|
45
45
|
:item_layout => R::layout::simple_spinner_dropdown_item,
|
46
46
|
:dropdown_layout => R::layout::simple_spinner_item
|
47
|
-
@text_view = text_view :text => 'Spinning?', :id => 69,
|
47
|
+
@text_view = text_view :text => 'Spinning?', :id => 69,
|
48
|
+
:layout => {:width => :match_parent},
|
48
49
|
:gravity => :center, :text_size => 48.0
|
49
50
|
end
|
50
51
|
end
|
@@ -10,9 +10,10 @@ class ViewConstantsActivity
|
|
10
10
|
|
11
11
|
self.content_view =
|
12
12
|
linear_layout :orientation => :vertical do
|
13
|
-
@text_view = text_view :text => 'What hath Matz wrought?',
|
13
|
+
@text_view = text_view :text => 'What hath Matz wrought?',
|
14
|
+
:id => 42, :layout => {:width => :fill_parent},
|
14
15
|
:gravity => android.view.Gravity::CENTER, :text_size => 48.0
|
15
|
-
button :text => 'M-x butterfly', :width => :fill_parent, :id => 43, :on_click_listener => proc { butterfly }
|
16
|
+
button :text => 'M-x butterfly', :layout => {:width => :fill_parent}, :id => 43, :on_click_listener => proc { butterfly }
|
16
17
|
end
|
17
18
|
rescue
|
18
19
|
puts "Exception creating activity: \#{$!}"
|
data/test/ruboto_gen_test.rb
CHANGED
@@ -53,11 +53,6 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
53
53
|
# APK was 60.2KB. PLATFORM: CURRENT, ANDROID_TARGET: 15
|
54
54
|
# APK was 74.9KB. PLATFORM: CURRENT, ANDROID_TARGET: 16
|
55
55
|
# APK was 57.1KB. PLATFORM: FROM_GEM, ANDROID_TARGET: 10
|
56
|
-
# APK was 7380.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.0
|
57
|
-
# APK was 7310.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.2
|
58
|
-
# APK was 7337.0KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.2
|
59
|
-
# APK was 7317.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.3
|
60
|
-
# APK was 7332.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.3
|
61
56
|
# APK was 8428.4KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 1.7.4
|
62
57
|
# APK was 7405.8KB. PLATFORM: STANDALONE, ANDROID_TARGET: 15, JRuby: 1.7.4
|
63
58
|
# APK was 7420.9KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.4
|
@@ -65,7 +60,7 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
65
60
|
# APK was 8770.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.5
|
66
61
|
# APK was 8766.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.6
|
67
62
|
# APK was 8781.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.8
|
68
|
-
# APK was
|
63
|
+
# APK was 6689.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev
|
69
64
|
# APK was 6556.7KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
|
70
65
|
def test_new_apk_size_is_within_limits
|
71
66
|
apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / 1024
|
@@ -73,16 +68,12 @@ class RubotoGenTest < Test::Unit::TestCase
|
|
73
68
|
version << ", ANDROID_TARGET: #{ANDROID_TARGET}"
|
74
69
|
if RUBOTO_PLATFORM == 'STANDALONE'
|
75
70
|
upper_limit = {
|
76
|
-
'1.7.0' => ANDROID_TARGET < 15 ? 7400.0 : 7600.0,
|
77
|
-
'1.7.1' => ANDROID_TARGET < 15 ? 7400.0 : 7600.0,
|
78
|
-
'1.7.2' => 7400.0,
|
79
|
-
'1.7.3' => 7400.0,
|
80
71
|
'1.7.4' => 8500.0,
|
81
72
|
'1.7.5' => 8800.0,
|
82
73
|
'1.7.6' => 8800.0,
|
83
74
|
'1.7.8' => 8800.0,
|
84
|
-
'9000.dev' =>
|
85
|
-
}[JRUBY_JARS_VERSION.to_s] ||
|
75
|
+
'9000.dev' => 6700.0,
|
76
|
+
}[JRUBY_JARS_VERSION.to_s] || 0.0
|
86
77
|
version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
|
87
78
|
else
|
88
79
|
upper_limit = {
|
@@ -140,7 +131,8 @@ class RubotoTestAppActivity
|
|
140
131
|
puts "adapter: \#{adapter.inspect}"
|
141
132
|
self.content_view =
|
142
133
|
linear_layout :orientation => :vertical do
|
143
|
-
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
134
|
+
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
135
|
+
:layout => {:width => :match_parent},
|
144
136
|
:gravity => :center, :text_size => 48.0
|
145
137
|
list_view :adapter => adapter, :id => 43,
|
146
138
|
:on_item_click_listener => proc{|parent, view, position, id| @text_view.text = 'List item clicked!'}
|
data/test/service_test.rb
CHANGED
@@ -32,9 +32,11 @@ class RubotoTestAppActivity
|
|
32
32
|
|
33
33
|
self.content_view =
|
34
34
|
linear_layout :orientation => :vertical do
|
35
|
-
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
35
|
+
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42,
|
36
|
+
:layout => {:width => :fill_parent},
|
36
37
|
:gravity => android.view.Gravity::CENTER, :text_size => 48.0
|
37
|
-
button :text => 'M-x butterfly', :
|
38
|
+
button :text => 'M-x butterfly', :layout => {:width => :fill_parent},
|
39
|
+
:id => 43, :on_click_listener => proc { butterfly }
|
38
40
|
end
|
39
41
|
rescue
|
40
42
|
puts "Exception creating activity: \#{$!}"
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Jackoway
|
8
8
|
- Charles Nutter
|
9
9
|
- Scott Moyer
|
10
10
|
- Uwe Kubosch
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: main
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
18
|
requirements:
|
20
19
|
- - '>='
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 4.7.2
|
23
|
-
|
22
|
+
name: main
|
24
23
|
prerelease: false
|
24
|
+
type: :runtime
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 4.7.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name: rake
|
32
31
|
requirement: !ruby/object:Gem::Requirement
|
33
32
|
requirements:
|
34
33
|
- - '>='
|
35
34
|
- !ruby/object:Gem::Version
|
36
35
|
version: '0'
|
37
|
-
|
36
|
+
name: rake
|
38
37
|
prerelease: false
|
38
|
+
type: :runtime
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
|
-
name: rubyzip
|
46
45
|
requirement: !ruby/object:Gem::Requirement
|
47
46
|
requirements:
|
48
47
|
- - '>='
|
49
48
|
- !ruby/object:Gem::Version
|
50
49
|
version: 1.0.0
|
51
|
-
|
50
|
+
name: rubyzip
|
52
51
|
prerelease: false
|
52
|
+
type: :runtime
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '>='
|
@@ -70,8 +70,8 @@ files:
|
|
70
70
|
- Gemfile.lock
|
71
71
|
- LICENSE
|
72
72
|
- README.md
|
73
|
-
- RELEASE_CANDICATE_DOC
|
74
|
-
- RELEASE_DOC
|
73
|
+
- RELEASE_CANDICATE_DOC.md
|
74
|
+
- RELEASE_DOC.md
|
75
75
|
- Rakefile
|
76
76
|
- assets/.DS_Store
|
77
77
|
- assets/.gitignore
|
@@ -210,7 +210,7 @@ homepage: http://ruboto.org/
|
|
210
210
|
licenses:
|
211
211
|
- MIT
|
212
212
|
metadata: {}
|
213
|
-
post_install_message:
|
213
|
+
post_install_message:
|
214
214
|
rdoc_options: []
|
215
215
|
require_paths:
|
216
216
|
- lib
|
@@ -226,8 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project: ruboto/ruboto
|
229
|
-
rubygems_version: 2.
|
230
|
-
signing_key:
|
229
|
+
rubygems_version: 2.1.9
|
230
|
+
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: A platform for developing apps using JRuby on Android.
|
233
233
|
test_files: []
|
data/RELEASE_DOC
DELETED
@@ -1,125 +0,0 @@
|
|
1
|
-
Subject: [ANN] Ruboto 0.16.0 released!
|
2
|
-
|
3
|
-
The Ruboto team is pleased to announce the release of Ruboto 0.16.0.
|
4
|
-
|
5
|
-
Ruboto (JRuby on Android) is a platform for developing full stand-alone
|
6
|
-
apps for Android using the Ruby language and libraries. It includes
|
7
|
-
support libraries and generators for creating projects, classes, tests,
|
8
|
-
and more. The complete APIs of Android, Java, and Ruby are available to
|
9
|
-
you using the Ruby language.
|
10
|
-
|
11
|
-
New in version 0.16.0:
|
12
|
-
|
13
|
-
In this release we add support for Android 4.4 KitKat! You can also use
|
14
|
-
git-based gems in your Gemfile.apk, and implement framework methods like
|
15
|
-
onCreate in a Ruby Module and share them across Ruby classes. We have
|
16
|
-
expanded the Android Fragment support to allow the use of the Ruboto
|
17
|
-
Widget DSL. On the testing side, "ruboto setup" now downloads and
|
18
|
-
installs HAXM which gives a 10 times speedup of the emulator! For early
|
19
|
-
adopters we now support Ruby 2.1 when using JRuby 9000 builds.
|
20
|
-
|
21
|
-
Features:
|
22
|
-
|
23
|
-
* Issue #479 rake log
|
24
|
-
* Issue #491 Add support for git-based gems
|
25
|
-
* Issue #495 Send all script names to be reloaded in one intent to speed
|
26
|
-
up reload
|
27
|
-
* Issue #497 Allow implementing framework methods like onCreate and
|
28
|
-
onResume in a Ruby module only.
|
29
|
-
* Issue #498 Allow use of Ruboto Widget in fragments
|
30
|
-
* Issue #499 Add shortcut "-t" for the "--target" option for "ruboto gen
|
31
|
-
app"
|
32
|
-
* Issue #502 Use "ruboto emulator" to set up HAXM
|
33
|
-
* Issue #503 Add "rake boing" as alias for "rake update_scripts:reload"
|
34
|
-
* Issue #512 Ruby 2.1 support
|
35
|
-
* Issue #517 Generate AVD with new format when running "ruboto emulator"
|
36
|
-
* Issue #521 Add support for running emulator with Android 4.4 api level
|
37
|
-
19
|
38
|
-
* Issue #526 Add KitKat (4.4) support
|
39
|
-
|
40
|
-
Bugfixes:
|
41
|
-
|
42
|
-
* Issue #438 Updating android_api.xml breaks test ruboto_gen_test
|
43
|
-
* Issue #448 Gems added from git repositories with the Gemfile.apk go
|
44
|
-
unrecognized.
|
45
|
-
* Issue #484 "ruboto setup" doesn't work on mac
|
46
|
-
* Issue #494 Ensure that the app is running before triggering reload of
|
47
|
-
scripts on device/emulator
|
48
|
-
* Issue #496 require 'ruboto/activity' from 'ruboto/activity/reload' since
|
49
|
-
we depend on it.
|
50
|
-
* Issue #504 Sporadically missing instance variable
|
51
|
-
* Issue #509 Ruboto setup fails on windows with -y option
|
52
|
-
* Issue #511 "ruboto update app" should rebuild JRubyAdapter.java based on
|
53
|
-
"ruboto.yml"
|
54
|
-
* Issue #516 Spinner#adapter returns nil when used with the :adapter
|
55
|
-
option
|
56
|
-
* Issue #519 Spinner should have prettier layout
|
57
|
-
|
58
|
-
Support:
|
59
|
-
|
60
|
-
* Issue #522 rake BUILD FAILED - Windows and Linux
|
61
|
-
|
62
|
-
Documentation:
|
63
|
-
|
64
|
-
* Issue #492 Add tutorial for using fragments
|
65
|
-
* Issue #493 README proofreading changes
|
66
|
-
* Issue #508 Add AppSurfer as a sponsor.
|
67
|
-
* Issue #514 Remove the 'ruboto update ruboto' command. Use 'ruboto
|
68
|
-
update app' instead.
|
69
|
-
* Issue #515 Add a "Contributors Wanted!" banner to the home page.
|
70
|
-
* Issue #518 Sqlite_ar tutorial no longer works?
|
71
|
-
|
72
|
-
Pull requests:
|
73
|
-
|
74
|
-
* Issue #458 Changed gem_paths to work with a gem pointing to repository
|
75
|
-
git in Gemfile.apk
|
76
|
-
|
77
|
-
Internal:
|
78
|
-
|
79
|
-
* Issue #466 Need faster tests for Travis-CI
|
80
|
-
|
81
|
-
Other:
|
82
|
-
|
83
|
-
* Issue #478 rake debug problem on Windows
|
84
|
-
* Issue #510 Ruboto setup on Windows fails to set path to dx
|
85
|
-
|
86
|
-
You can find a complete list of issues here:
|
87
|
-
|
88
|
-
* https://github.com/ruboto/ruboto/issues?state=closed&milestone=30
|
89
|
-
|
90
|
-
|
91
|
-
Installation:
|
92
|
-
|
93
|
-
To use Ruboto, you need to install a Ruby implementation. Then do
|
94
|
-
(possibly as root/administrator)
|
95
|
-
|
96
|
-
gem install ruboto
|
97
|
-
ruboto setup
|
98
|
-
|
99
|
-
To create a project do
|
100
|
-
|
101
|
-
ruboto gen app --package <your.package.name>
|
102
|
-
cd <project directory>
|
103
|
-
ruboto setup
|
104
|
-
|
105
|
-
To run an emulator for your project
|
106
|
-
|
107
|
-
cd <project directory>
|
108
|
-
ruboto emulator
|
109
|
-
|
110
|
-
To run your project
|
111
|
-
|
112
|
-
cd <project directory>
|
113
|
-
rake install start
|
114
|
-
|
115
|
-
You can find an introductory tutorial at
|
116
|
-
https://github.com/ruboto/ruboto/wiki
|
117
|
-
|
118
|
-
If you have any problems or questions, come see us at http://ruboto.org/
|
119
|
-
|
120
|
-
Enjoy!
|
121
|
-
|
122
|
-
|
123
|
-
--
|
124
|
-
The Ruboto Team
|
125
|
-
http://ruboto.org/
|