ruboto 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -3
  3. data/README.md +1 -1
  4. data/RELEASE_CANDICATE_DOC.md +22 -5
  5. data/RELEASE_DOC.md +58 -26
  6. data/Rakefile +68 -163
  7. data/Vagrantfile +46 -0
  8. data/assets/rakelib/ruboto.device.rb +170 -0
  9. data/assets/rakelib/ruboto.rake +121 -239
  10. data/assets/rakelib/ruboto.stdlib.rake +1 -1
  11. data/assets/src/org/ruboto/JRubyAdapter.java +1 -0
  12. data/lib/ruboto/sdk_versions.rb +5 -4
  13. data/lib/ruboto/util/emulator.rb +6 -4
  14. data/lib/ruboto/util/setup.rb +40 -23
  15. data/lib/ruboto/util/update.rb +61 -13
  16. data/lib/ruboto/version.rb +1 -1
  17. data/test/activity/dir_and_file_activity_test.rb +3 -3
  18. data/test/activity/json_activity.rb +11 -0
  19. data/test/activity/navigation_activity_test.rb +2 -1
  20. data/test/activity/stack_activity_test.rb +16 -12
  21. data/test/app_test_methods.rb +4 -4
  22. data/test/arjdbc_test.rb +18 -7
  23. data/test/broadcast_receiver_test.rb +1 -1
  24. data/test/gem_test.rb +1 -1
  25. data/test/git_based_gem_test.rb +1 -1
  26. data/test/minimal_app_test.rb +7 -5
  27. data/test/rake_test.rb +3 -3
  28. data/test/ruboto_activity_test.rb +1 -1
  29. data/test/ruboto_gen_test.rb +25 -11
  30. data/test/ruboto_setup_test.rb +1 -1
  31. data/test/ruboto_update_test.rb +3 -3
  32. data/test/sample_broadcast_receiver_test.rb +1 -1
  33. data/test/service_block_test.rb +1 -1
  34. data/test/service_gen_class_test.rb +1 -1
  35. data/test/service_infile_class_test.rb +1 -1
  36. data/test/splash_test.rb +1 -1
  37. data/test/sqldroid_test.rb +1 -1
  38. data/test/test_helper.rb +22 -18
  39. data/test/update_test_methods.rb +1 -1
  40. data/test/updated_example_test_methods.rb +1 -1
  41. data/test/uppercase_package_name_test.rb +3 -3
  42. metadata +20 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04f53460885c0bb561a901a29c3e9b91a2110fc4
4
- data.tar.gz: e0cf0b0f70589da752f91b35331ac47cb761d334
3
+ metadata.gz: 43fc738a51f8ba87d63a71d6c03d1447aec6d18e
4
+ data.tar.gz: c7bd31a0ef13ceac40d6f615bb5a0778d7be6e41
5
5
  SHA512:
6
- metadata.gz: d8025d008cc28e62365dc4668065b5d4feddbb710a9fc836b24610069a42eb3a20653ec55d711619c043e3fb4d1385f9e5c268999c91f4b4fd03b9c5d70a2733
7
- data.tar.gz: d04a199b80a4e09444b9efede9333fcb5871aa7751f7fe361eb6d5e78b4e7aa13b8206a8e8a942593aff3379c36954abf21bbe751ae7cef0f3985ed09be7dbf6
6
+ metadata.gz: 7fdfa5f49fca5364727e1d11d32110c24920a3ecd9f5c9d1bde869e6208da4efde2c7ba8b8ad98111fbad3eb844e29b8f72bb6890d5af5961bff29fe66785ef0
7
+ data.tar.gz: 125ad2e435f8d0f9cb9a8dca47a88106efba9b58d39368f40e36727169ed47456adb9d13f00475e00a6ade494a02a489418b4feec6ee68fe37ec142257dfa998
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruboto (1.2.0)
4
+ ruboto (1.3.0.dev)
5
5
  main (~> 5.2)
6
6
  rake (~> 10.0)
7
7
  rubyzip (~> 1.0)
@@ -21,16 +21,18 @@ GEM
21
21
  pry (>= 0.9)
22
22
  map (6.5.5)
23
23
  method_source (0.8.2)
24
+ minitest (5.5.1)
24
25
  pry (0.10.1)
25
26
  coderay (~> 1.1.0)
26
27
  method_source (~> 0.8.1)
27
28
  slop (~> 3.4)
28
- rake (10.3.2)
29
- rubyzip (1.1.6)
29
+ rake (10.4.2)
30
+ rubyzip (1.1.7)
30
31
  slop (3.6.0)
31
32
 
32
33
  PLATFORMS
33
34
  ruby
34
35
 
35
36
  DEPENDENCIES
37
+ minitest (~> 5.5)
36
38
  ruboto!
data/README.md CHANGED
@@ -45,7 +45,7 @@ Before you can use Ruboto, you need the following tools installed:
45
45
  Ruboto offers a setup command to help you with the component installation and
46
46
  configuration:
47
47
 
48
- $ ruboto setup
48
+ $ ruboto setup -y
49
49
 
50
50
  * Generate an [Emulator](http://developer.android.com/guide/developing/tools/emulator.html)
51
51
  image unless you want to develop using your phone.
@@ -1,12 +1,29 @@
1
- Subject: [ANN] Ruboto 1.2.0 release candidate
1
+ Subject: [ANN] Ruboto 1.3.0 release candidate
2
2
 
3
3
  Hi all!
4
4
 
5
- The Ruboto 1.2.0 release candidate is now available.
5
+ The Ruboto 1.3.0 release candidate is now available.
6
6
 
7
- In this release we add support for the Android L preview and the ART
8
- runtime. We also specify accessing the "R" class without specifying a
9
- package to refer to the local package "R" class instead of "android.R".
7
+ It's been a long time since the last release. We have had some problems
8
+ getting the test matrix green at https://travis-ci.org/ruboto/ruboto and
9
+ as there are still some combinations failing, we need help to fix them.
10
+ If you have experience debugging on Android, please contribute.
11
+
12
+ In the meantime, we have added support for JRuby up to 1.7.19 and Android
13
+ up to 5.1. There are still some bugs to sort out, but we are getting
14
+ there :) Testing with JRuby 9000 has begun, but is currently failing.
15
+
16
+ A new feature is the running of "src/environment.rb" if it is present
17
+ right after JRuby initialization. This enables loading of gems and code
18
+ common across activities, broadcast receivers, and services.
19
+
20
+ Use of Bundler has improved to allow gems that duplicate files in Ruby
21
+ Stdlib like JSON, and allow local gems using the "path" option in the
22
+ Gemfile. Support for ActiveRecord has been updated to 4.1.
23
+
24
+ Finally we have updated the homepage and wiki with a few changes.
25
+
26
+ Thanks to all who have contributed!
10
27
 
11
28
  As always we need your help and feedback to ensure the quality of the release. Please install the release candidate using
12
29
 
@@ -1,6 +1,6 @@
1
- Subject: [ANN] Ruboto 1.2.0 released!
1
+ Subject: [ANN] Ruboto 1.3.0 released!
2
2
 
3
- The Ruboto team is pleased to announce the release of Ruboto 1.2.0.
3
+ The Ruboto team is pleased to announce the release of Ruboto 1.3.0.
4
4
 
5
5
  Ruboto (JRuby on Android) is a platform for developing full stand-alone
6
6
  apps for Android using the Ruby language and libraries. It includes
@@ -8,45 +8,77 @@ support libraries and generators for creating projects, classes, tests,
8
8
  and more. The complete APIs of Android, Java, and Ruby are available to
9
9
  you using the Ruby language.
10
10
 
11
- New in version 1.2.0:
11
+ New in version 1.3.0:
12
12
 
13
- In this release we add support for the Android L preview and the ART
14
- runtime. We also specify accessing the "R" class without specifying a
15
- package to refer to the local package "R" class instead of "android.R".
13
+ It's been a long time since the last release. We have had some problems
14
+ getting the test matrix green at https://travis-ci.org/ruboto/ruboto and
15
+ as there are still some combinations failing, we need help to fix them.
16
+ If you have experience debugging on Android, please contribute.
17
+
18
+ In the meantime, we have added support for JRuby up to 1.7.19 and Android
19
+ up to 5.1. There are still some bugs to sort out, but we are getting
20
+ there :) Testing with JRuby 9000 has begun, but is currently failing.
21
+
22
+ A new feature is the running of "src/environment.rb" if it is present
23
+ right after JRuby initialization. This enables loading of gems and code
24
+ common across activities, broadcast receivers, and services.
25
+
26
+ Use of Bundler has improved to allow gems that duplicate files in Ruby
27
+ Stdlib like JSON, and allow local gems using the "path" option in the
28
+ Gemfile. Support for ActiveRecord has been updated to 4.1.
29
+
30
+ Finally we have updated the homepage and wiki with a few changes.
31
+
32
+ Thanks to all who have contributed!
33
+
34
+ API Changes:
35
+
36
+ * Issue #689 Add support for Android 5 Lollipop
37
+ * Issue #690 Update to JRuby 1.7.19
16
38
 
17
39
  Features:
18
40
 
19
- * Issue #523 Support for ART
20
- * Issue #645 Make ::R refer to $package.R instead of android.R
21
- * Issue #652 Set a layout attribute by name even if it is not a JavaBean
22
- attribute (like margins and padding).
23
- * Issue #654 Access android.R inner classes like android.R.id and
24
- android.R.attr directly
25
- * Issue #656 Add support for Android L developer preview
41
+ * Issue #647 Run environment.rb after JRuby initialization
42
+ * Issue #696 Add support for local gems
43
+ * Issue #699 Add support for ActiveRecord 4 and the thread_safe gem
44
+ * Issue #701 Add support for ActiveRecord 4.1
26
45
 
27
46
  Bugfixes:
28
47
 
29
- * Issue #643 Stale code in widget.rb lists
30
- * Issue #648 Service code is broken when trying to use RubotoService
31
- directly
32
- * Issue #667 Ruboto app generation with option --with-jruby 1.7.14 not
33
- working properly
34
- * Issue #671 RubotoService fails to start on Android L
35
- * Issue #672 Problem with ruboto setup
36
- * Issue #674 travis build fails with JRuby 1.7.16
48
+ * Issue #627 Fix HTTPS access to GitHub
49
+ * Issue #678 Update setup.rb (sardaukar)
50
+ * Issue #679 Fix for finding the Platform SDK on OS X when using
51
+ homebrew
52
+ * Issue #681 Warning after ruboto setup
53
+ * Issue #700 Allow non-utf8 output in "rake log"
54
+ * Issue #702 Exception running "ruboto setup -t 19 -y" on OS X 10.10
55
+ * Issue #706 Avoid duplicate files in bundle vs stdlib
56
+ * Issue #707 Choose the latest build-tools in "ruboto setup"
57
+
58
+ Documentation:
59
+
60
+ * Issue #676 Modification to Wiki for Mac OS Guide
61
+ * Issue #677 Ruboto Main Page - misinformation?
37
62
 
38
63
  Support:
39
64
 
40
- * Issue #573 How can I load Ruboto Core Dynamically in Runtime?
65
+ * Issue #590 Cannot open apk in emulator
66
+ * Issue #680 Android SDK Command dx : Not found
67
+ * Issue #682 ruboto gen app only works if sdk api level 15 installed
68
+
69
+ Community:
70
+
71
+ * Issue #578 How can I help? (jaunesarmiento)
72
+ * Issue #581 How can I help? (bobquest33)
41
73
 
42
- Rejected:
74
+ Internal:
43
75
 
44
- * Issue #646 Make ANT quiet by default, enabling verbose and trace
45
- output with the -v and -t rake options
76
+ * Issue #709 Remove swap manipulation and sudo (BanzaiMan)
77
+ * Issue #711 Test JRuby 1.7.20.dev, 1.7.19, 1.7.15, and 1.7.13. (donv)
46
78
 
47
79
  You can find a complete list of issues here:
48
80
 
49
- * https://github.com/ruboto/ruboto/issues?state=closed&milestone=35
81
+ * https://github.com/ruboto/ruboto/issues?state=closed&milestone=36
50
82
 
51
83
 
52
84
  Installation:
data/Rakefile CHANGED
@@ -11,9 +11,10 @@ require 'net/http'
11
11
  require 'net/https'
12
12
  require 'openssl'
13
13
  require 'yaml'
14
+ require_relative 'assets/rakelib/ruboto.device'
14
15
 
15
- PROJECT_DIR = File.expand_path(File.dirname(__FILE__))
16
16
  PLATFORM_PROJECT = File.expand_path('tmp/RubotoCore', File.dirname(__FILE__))
17
+ PLATFORM_PACKAGE = 'org.ruboto.core'
17
18
  PLATFORM_DEBUG_APK = "#{PLATFORM_PROJECT}/bin/RubotoCore-debug.apk"
18
19
  PLATFORM_DEBUG_APK_BAK = "#{PLATFORM_PROJECT}/bin/RubotoCore-debug.apk.bak"
19
20
  PLATFORM_RELEASE_APK = "#{PLATFORM_PROJECT}/bin/RubotoCore-release.apk"
@@ -22,7 +23,7 @@ MANIFEST_FILE = 'AndroidManifest.xml'
22
23
  GEM_FILE = "ruboto-#{Ruboto::VERSION}.gem"
23
24
  GEM_SPEC_FILE = 'ruboto.gemspec'
24
25
  README_FILE = 'README.md'
25
- WEB_DIR = "#{File.dirname PROJECT_DIR}/ruboto.github.com"
26
+ WEB_DIR = File.expand_path('../ruboto.github.com', File.dirname(__FILE__))
26
27
  BLOG_DIR = '_posts'
27
28
  RELEASE_BLOG = "#{BLOG_DIR}/#{Date.today}-Ruboto-#{Ruboto::VERSION}-release-doc.md"
28
29
  RELEASE_BLOG_GLOB = "#{BLOG_DIR}/*-Ruboto-#{Ruboto::VERSION}-release-doc.md"
@@ -118,16 +119,6 @@ end
118
119
  desc 'Generate release docs for a given milestone'
119
120
 
120
121
  def get_github_issues
121
- puts 'GitHub login:'
122
- begin
123
- require 'rubygems'
124
- require 'highline/import'
125
- user = ask('login : ') { |q| q.echo = true }
126
- pass = ask('password: ') { |q| q.echo = '*' }
127
- rescue Exception
128
- print 'user name: '; user = STDIN.gets.chomp
129
- print ' password: '; pass = STDIN.gets.chomp
130
- end
131
122
  host = 'api.github.com'
132
123
  base_uri = "https://#{host}/repos/ruboto/ruboto"
133
124
  https = Net::HTTP.new(host, 443)
@@ -136,7 +127,6 @@ def get_github_issues
136
127
 
137
128
  milestone_uri = URI("#{base_uri}/milestones")
138
129
  req = Net::HTTP::Get.new(milestone_uri.request_uri)
139
- req.basic_auth(user, pass)
140
130
  res = https.start { |http| http.request(req) }
141
131
  milestones = YAML.load(res.body).sort_by { |i| Date.parse(i['due_on']) }
142
132
  milestone_entry = milestones.find { |m| m['title'] == Ruboto::VERSION.chomp('.dev') }
@@ -145,18 +135,17 @@ def get_github_issues
145
135
 
146
136
  uri = URI("#{base_uri}/issues?milestone=#{milestone}&state=closed&per_page=1000")
147
137
  req = Net::HTTP::Get.new(uri.request_uri)
148
- req.basic_auth(user, pass)
149
138
  res = https.start { |http| http.request(req) }
150
139
  issues = YAML.load(res.body).sort_by { |i| i['number'] }
151
140
  milestone_name = issues[0] ? issues[0]['milestone']['title'] : "No issues for milestone #{milestone}"
152
141
  milestone_description = issues[0] ? issues[0]['milestone']['description'] : "No issues for milestone #{milestone}"
153
- milestone_description = milestone_description.split("\r\n").map(&:wrap).join("\r\n")
142
+ milestone_description = milestone_description.split("\r\n").map(&:wrap).join("\n")
154
143
  categories = {
155
- 'Features' => 'feature', 'Bugfixes' => 'bug',
156
- 'Performance' => 'performance', 'Documentation' => 'documentation',
157
- 'Support' => 'support', 'Community' => 'community',
158
- 'Pull requests' => nil, 'Internal' => 'internal',
159
- 'Rejected' => 'rejected', 'Other' => nil
144
+ 'API Changes' => 'API change', 'Features' => 'feature',
145
+ 'Bugfixes' => 'bug', 'Performance' => 'performance',
146
+ 'Documentation' => 'documentation', 'Support' => 'support',
147
+ 'Community' => 'community', 'Pull requests' => nil,
148
+ 'Internal' => 'internal', 'Rejected' => 'rejected', 'Other' => nil
160
149
  }
161
150
  grouped_issues = issues.group_by do |i|
162
151
  labels = i['labels'].map { |l| l['name'] }
@@ -492,8 +481,8 @@ namespace :platform do
492
481
  end
493
482
 
494
483
  desc 'Install the current RubotoCore platform release apk'
495
- task :current => PLATFORM_CURRENT_RELEASE_APK do
496
- install_apk
484
+ task current: PLATFORM_CURRENT_RELEASE_APK do
485
+ install_apk PLATFORM_PACKAGE, PLATFORM_CURRENT_RELEASE_APK
497
486
  end
498
487
 
499
488
  desc 'Install the Ruboto Core platform debug apk'
@@ -505,126 +494,7 @@ namespace :platform do
505
494
 
506
495
  desc 'Uninstall the Ruboto Core platform debug apk'
507
496
  task :uninstall do
508
- uninstall_apk
509
- end
510
-
511
- private
512
-
513
- def package
514
- 'org.ruboto.core'
515
- end
516
-
517
- def wait_for_valid_device
518
- while `adb shell echo "ping"`.strip != 'ping'
519
- `adb kill-server`
520
- `adb devices`
521
- sleep 5
522
- end
523
- end
524
-
525
- def install_apk
526
- wait_for_valid_device
527
-
528
- failure_pattern = /^Failure \[(.*)\]/
529
- success_pattern = /^Success/
530
- install_timeout = 300
531
- case package_installed?
532
- when true
533
- puts "Package #{package} already installed."
534
- return
535
- when false
536
- puts "Package #{package} already installed, but of different size or timestamp. Replacing package."
537
- sh "adb shell date -s #{Time.now.strftime '%Y%m%d.%H%M%S'}"
538
- output = nil
539
- install_retry_count = 0
540
- begin
541
- timeout install_timeout do
542
- output = `adb install -r "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
543
- end
544
- rescue Timeout::Error
545
- puts "Installing package #{package} timed out."
546
- install_retry_count += 1
547
- if install_retry_count <= 3
548
- puts 'Retrying install...'
549
- retry
550
- end
551
- puts 'Trying one final time to install the package:'
552
- output = `adb install -r "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
553
- end
554
- if $? == 0 && output !~ failure_pattern && output =~ success_pattern
555
- return
556
- end
557
- case $1
558
- when 'INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES'
559
- puts 'Found package signed with different certificate. Uninstalling it and retrying install.'
560
- else
561
- puts "'adb install' returned an unknown error: (#$?) #{$1 ? "[#$1}]" : output}."
562
- puts "Uninstalling #{package} and retrying install."
563
- end
564
- uninstall_apk
565
- else
566
- # Package not installed.
567
- sh "adb shell date -s #{Time.now.strftime '%Y%m%d.%H%M%S'}"
568
- end
569
- puts "Installing package #{package}"
570
- output = nil
571
- install_retry_count = 0
572
- begin
573
- timeout install_timeout do
574
- output = `adb install "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
575
- end
576
- rescue Timeout::Error
577
- puts "Installing package #{package} timed out."
578
- install_retry_count += 1
579
- if install_retry_count <= 3
580
- puts 'Retrying install...'
581
- retry
582
- end
583
- puts 'Trying one final time to install the package:'
584
- install_start = Time.now
585
- output = `adb install "#{PLATFORM_CURRENT_RELEASE_APK}" 2>&1`
586
- puts "Install took #{(Time.now - install_start).to_i}s."
587
- end
588
- puts output
589
- raise "Install failed (#{$?}) #{$1 ? "[#$1}]" : output}" if $? != 0 || output =~ failure_pattern || output !~ success_pattern
590
- end
591
-
592
- def uninstall_apk
593
- return if package_installed?.nil?
594
- puts "Uninstalling package #{package}"
595
- system "adb uninstall #{package}"
596
- if $? != 0 && package_installed?
597
- puts "Uninstall failed exit code #{$?}"
598
- exit $?
599
- end
600
- end
601
-
602
- def package_installed?
603
- package_name = package
604
- %w( -0 -1 -2).each do |i|
605
- path = "/data/app/#{package_name}#{i}.apk"
606
- o = `adb shell ls -l #{path}`.chomp
607
- if o =~ /^-rw-r--r-- system\s+system\s+(\d+) \d{4}-\d{2}-\d{2} \d{2}:\d{2} #{File.basename(path)}$/
608
- apk_file = PLATFORM_CURRENT_RELEASE_APK
609
- if !File.exists?(apk_file) || $1.to_i == File.size(apk_file)
610
- return true
611
- else
612
- return false
613
- end
614
- end
615
-
616
- sdcard_path = "/mnt/asec/#{package_name}#{i}/pkg.apk"
617
- o = `adb shell ls -l #{sdcard_path}`.chomp
618
- if o =~ /^-r-xr-xr-x system\s+root\s+(\d+) \d{4}-\d{2}-\d{2} \d{2}:\d{2} #{File.basename(sdcard_path)}$/
619
- apk_file = PLATFORM_CURRENT_RELEASE_APK
620
- if !File.exists?(apk_file) || $1.to_i == File.size(apk_file)
621
- return true
622
- else
623
- return false
624
- end
625
- end
626
- end
627
- return nil
497
+ uninstall_apk(PLATFORM_PACKAGE, PLATFORM_CURRENT_RELEASE_APK)
628
498
  end
629
499
 
630
500
  end
@@ -633,53 +503,88 @@ desc 'Download the latest jruby-jars snapshot'
633
503
  task :get_jruby_jars_snapshots do
634
504
  download_host = 'lafo.ssw.uni-linz.ac.at'
635
505
  index = Net::HTTP.get(download_host, "/graalvm/")
636
- current_gems = index.scan(/jruby-jars-.*?.gem/).uniq
506
+ all_gems = index.scan(%r{(jruby-jars-.*?.gem).*?</td>\s*<td.*?</td>\s*<td.*?>\s*(.*?)</td>})
507
+ current_gems = [all_gems.select{|a| a[1].to_i > 0}.map{|a| a[0]}.
508
+ uniq.sort_by{|v| Gem::Version.new(v[11..-5])}.last]
509
+ current_gems << index.scan(/jruby-jars-1\.7\..*?.gem/).uniq.
510
+ sort_by{|v| Gem::Version.new(v[11..-5])}.last
511
+ FileUtils.rm_rf Dir['jruby-jars-*.gem']
637
512
  current_gems.each do |gem|
638
513
  print "Downloading #{gem}: \r"
639
514
  uri = URI("http://#{download_host}/graalvm/#{gem}")
640
515
  done = 0
641
516
  body = ''
642
517
  Net::HTTP.new(uri.host, uri.port).request_get(uri.path) do |response|
643
- length = response['Content-Length'].to_i
644
- response.read_body do |fragment|
645
- body << fragment
646
- done += fragment.length
647
- progress = (done * 100) / length
648
- print "Downloading #{gem}: #{done / 1024}/#{length / 1024}KB #{progress}%\r"
518
+ if response.code == '200'
519
+ length = response['Content-Length'].to_i
520
+ response.read_body do |fragment|
521
+ body << fragment
522
+ done += fragment.length
523
+ unless length == 0
524
+ progress = (done * 100) / length
525
+ print "Downloading #{gem}: #{done / 1024}/#{length / 1024}KB #{progress}%\r"
526
+ end
527
+ end
528
+ puts
529
+ else
530
+ raise "Unexpected HTTP response code: #{response.code.inspect}"
649
531
  end
650
- puts
651
532
  end
652
- File.open(gem, 'wb') { |f| f << body }
533
+ File.open(gem, 'wb') { |f| f << body } unless body.empty?
653
534
  end
654
535
  end
655
536
 
656
537
  task '.travis.yml' do
657
538
  puts "Regenerating #{'.travis.yml'}"
658
539
  source = File.read('.travis.yml')
540
+ test_parts = 5
659
541
  matrix = ''
660
542
  allow_failures = ''
543
+ # FIXME(uwe): Test the newest api levels
544
+ # [21, 19, 18, 17, 16, 15].each.with_index do |api, i|
661
545
  [19, 17, 16, 15].each.with_index do |api, i|
662
546
  n = i
663
- [['CURRENT', [nil]], ['FROM_GEM', [:MASTER, :STABLE]], ['STANDALONE', [:MASTER, :STABLE, '1.7.13']]].each do |platform, versions|
547
+ # FIXME(uwe): JRuby 1.7.13 works for Nettbuss
548
+ # FIXME(uwe): JRuby 1.7.14 has a malformed gem
549
+ # FIXME(uwe): JRuby 1.7.15 looks OK!
550
+ # FIXME(uwe): JRuby 1.7.16: RaiseException: (ENOENT) No such file or directory - /.gem/jruby/1.9
551
+ # https://github.com/jruby/jruby/issues/2040
552
+ # FIXME(uwe): JRuby 1.7.17: RSS? => RubotoGenTest#test_activity_tests => Native crash
553
+ # FIXME(uwe): JRuby 1.7.18: RSS? => RubotoGenTest#test_activity_tests => Process crashed
554
+ # FIXME(uwe): JRuby 1.7.19: RSS? => RubotoGenTest#test_activity_tests => Native crash
555
+ # FIXME(uwe): JRuby 1.7.20: Fails on RSS and upper case package names
556
+ # FIXME(uwe): RubotoCore (CURRENT) is missing thread_safe
557
+ # FIXME(uwe): Test all of these that work
558
+ # [['CURRENT', [nil]], ['FROM_GEM', [:MASTER, :STABLE]], ['STANDALONE', [:MASTER, :STABLE, '1.7.19', '1.7.18', '1.7.17', '1.7.16', '1.7.15', '1.7.13']]].each do |platform, versions|
559
+ [
560
+ ['STANDALONE', [
561
+ *(['1.7.13']*test_parts),
562
+ *(['1.7.15']*test_parts),
563
+ *(['1.7.19']*test_parts),
564
+ *([:STABLE]*test_parts),
565
+ ]
566
+ ],
567
+ # ['FROM_GEM', ['1.7.13', :STABLE, ]],
568
+ # ['CURRENT', [nil]],
569
+ ].each do |platform, versions|
664
570
  versions.each do |v|
665
- n = (n % 5) + 1
666
- line = " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of5#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
571
+ n = (n % test_parts) + 1
572
+ line = " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of#{test_parts}#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
667
573
  matrix << line
668
- if (platform == 'STANDALONE' && v == :MASTER) ||
669
- # FIXME(uwe): Remove when master and stable branches are green.
670
- v == :MASTER || v == :STABLE ||
671
- # FIXME(uwe): Remove when master and stable branches are green.
672
- v == '1.7.16'
673
- # EMXiF
574
+ if v == :MASTER || # FIXME(uwe): Remove when master branch is green.
575
+ v == :STABLE || # FIXME(uwe): Remove when 1.7.20 supports RSS and upper case package names.
576
+ api == 21 || # FIXME(uwe): Remove when Android 5 is green.
577
+ api == 17 || # FIXME(uwe): Remove when Android 4.2 is green.
578
+ api == 16 || # FIXME(uwe): Remove when Android 4.1 is green.
579
+ api == 15 # FIXME(uwe): Remove when Android 4.0 is green.
674
580
  allow_failures << line.gsub('-', '- env:')
675
581
  end
676
582
  end
677
583
  end
678
584
  matrix << "\n"
679
585
  end
680
- matrix << " - ANDROID_TARGET=10 RUBOTO_PLATFORM=CURRENT\n"
681
- matrix_str = " matrix:\n#{matrix}\n"
682
- allow_failures_str = <<EOF
586
+ matrix_str = " matrix:\n#{matrix}"
587
+ allow_failures_str = <<EOF # FIXME(uwe)
683
588
  allow_failures:
684
589
  # Current master is failing: https://github.com/jruby/jruby/issues/1741
685
590
  # Current JRuby 1.7.x gem is failing. Why?