ruboto 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/test/rake_test.rb CHANGED
@@ -42,6 +42,16 @@ class RakeTest < Test::Unit::TestCase
42
42
  end
43
43
  end
44
44
 
45
+ def test_that_apk_is_built_if_only_one_non_ruby_source_file_has_changed
46
+ Dir.chdir APP_DIR do
47
+ system 'rake debug'
48
+ apk_timestamp = File.ctime("bin/#{APP_NAME}-debug.apk")
49
+ FileUtils.touch 'src/not_ruby_source.properties'
50
+ system 'rake debug'
51
+ assert_not_equal apk_timestamp, File.ctime("bin/#{APP_NAME}-debug.apk"), 'APK should have been rebuilt'
52
+ end
53
+ end
54
+
45
55
  def test_that_manifest_is_updated_when_project_properties_are_changed
46
56
  Dir.chdir APP_DIR do
47
57
  manifest = File.read('AndroidManifest.xml')
@@ -60,8 +60,9 @@ class RubotoGenTest < Test::Unit::TestCase
60
60
  # APK was 8770.2KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.5
61
61
  # APK was 8766.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.6
62
62
  # APK was 8781.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.8
63
+ # APK was 8789.6KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 1.7.9
63
64
  # APK was 6689.5KB. PLATFORM: STANDALONE, ANDROID_TARGET: 10, JRuby: 9000.dev
64
- # APK was 6556.7KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
65
+ # APK was 6962.1KB. PLATFORM: STANDALONE, ANDROID_TARGET: 16, JRuby: 9000.dev
65
66
  def test_new_apk_size_is_within_limits
66
67
  apk_size = BigDecimal(File.size("#{APP_DIR}/bin/RubotoTestApp-debug.apk").to_s) / 1024
67
68
  version = " PLATFORM: #{RUBOTO_PLATFORM}"
@@ -72,7 +73,8 @@ class RubotoGenTest < Test::Unit::TestCase
72
73
  '1.7.5' => 8800.0,
73
74
  '1.7.6' => 8800.0,
74
75
  '1.7.8' => 8800.0,
75
- '9000.dev' => 6700.0,
76
+ '1.7.9' => 8800.0,
77
+ '9000.dev' => 7000.0,
76
78
  }[JRUBY_JARS_VERSION.to_s] || 0.0
77
79
  version << ", JRuby: #{JRUBY_JARS_VERSION.to_s}"
78
80
  else
@@ -175,7 +177,6 @@ class RubotoArrayAdapter
175
177
  import android.content.Context
176
178
 
177
179
  def getView(position, convert_view, parent)
178
- puts "IN get_view!!!"
179
180
  @inflater = context.getSystemService(Context::LAYOUT_INFLATER_SERVICE) unless @inflater
180
181
  if convert_view
181
182
  row = convert_view
@@ -0,0 +1,31 @@
1
+ require File.expand_path('test_helper', File.dirname(__FILE__))
2
+
3
+ #fake package import
4
+ def android
5
+ OpenStruct.new('util' => OpenStruct.new('Log' => nil))
6
+ end
7
+
8
+ class Log
9
+ def self.v(*args)
10
+ raise 'Log.v should be called with two arguments' if args.length != 2
11
+ end
12
+
13
+ def self.e(*args)
14
+ raise 'Log.e should be called with two arguments' if args.length != 2
15
+ end
16
+ end
17
+
18
+ class SampleBroadcastReceiverTest < Test::Unit::TestCase
19
+ require 'assets/samples/sample_broadcast_receiver'
20
+
21
+ def test_on_receive_calls_log_v
22
+ context = {}
23
+ intent = OpenStruct.new(:getExtras => '')
24
+ SampleBroadcastReceiver.new.onReceive(context, intent)
25
+ end
26
+
27
+ def test_on_receive_calls_log_e
28
+ SampleBroadcastReceiver.new.onReceive(nil, nil)
29
+ end
30
+
31
+ end
data/test/test_helper.rb CHANGED
@@ -161,7 +161,7 @@ class Test::Unit::TestCase
161
161
  update = options.delete(:update) || false
162
162
  raise "Unknown options: #{options.inspect}" unless options.empty?
163
163
 
164
- raise "Inclusion/exclusion of libs requires standalone mode." if (included_stdlibs || excluded_stdlibs) && !standalone
164
+ raise 'Inclusion/exclusion of libs requires standalone mode.' if (included_stdlibs || excluded_stdlibs) && !standalone
165
165
 
166
166
  Dir.mkdir TMP_DIR unless File.exists? TMP_DIR
167
167
 
@@ -302,7 +302,7 @@ class Test::Unit::TestCase
302
302
  puts "Adding Gemfile.apk: #{gems.join(' ')}"
303
303
  File.open('Gemfile.apk', 'w') do |f|
304
304
  f << "source 'http://rubygems.org/'\n\n"
305
- gems.each { |g| f << "gem '#{g}'\n" }
305
+ gems.each { |g| f << "gem #{[*g].map{|gp|"'#{gp}'"}.join(', ')}\n" }
306
306
  end
307
307
  end
308
308
 
metadata CHANGED
@@ -1,60 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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-12-24 00:00:00.000000000 Z
14
+ date: 2014-01-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
+ name: main
17
18
  requirement: !ruby/object:Gem::Requirement
18
19
  requirements:
19
- - - '>='
20
+ - - ~>
20
21
  - !ruby/object:Gem::Version
21
- version: 4.7.2
22
- name: main
23
- prerelease: false
22
+ version: '5.0'
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 4.7.2
29
+ version: '5.0'
30
30
  - !ruby/object:Gem::Dependency
31
+ name: rake
31
32
  requirement: !ruby/object:Gem::Requirement
32
33
  requirements:
33
- - - '>='
34
+ - - ~>
34
35
  - !ruby/object:Gem::Version
35
- version: '0'
36
- name: rake
37
- prerelease: false
36
+ version: '10.0'
38
37
  type: :runtime
38
+ prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - '>='
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '10.0'
44
44
  - !ruby/object:Gem::Dependency
45
+ name: rubyzip
45
46
  requirement: !ruby/object:Gem::Requirement
46
47
  requirements:
47
- - - '>='
48
+ - - ~>
48
49
  - !ruby/object:Gem::Version
49
- version: 1.0.0
50
- name: rubyzip
51
- prerelease: false
50
+ version: '1.0'
52
51
  type: :runtime
52
+ prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - '>='
55
+ - - ~>
56
56
  - !ruby/object:Gem::Version
57
- version: 1.0.0
57
+ version: '1.0'
58
58
  description: |
59
59
  Ruboto (JRuby on Android) is a platform for developing full stand-alone apps for
60
60
  Android using the Ruby language and libraries. It includes support libraries
@@ -191,6 +191,7 @@ files:
191
191
  - test/activity/view_constants_activity.rb
192
192
  - test/activity/view_constants_activity_test.rb
193
193
  - test/app_test_methods.rb
194
+ - test/arjdbc_test.rb
194
195
  - test/broadcast_receiver_test.rb
195
196
  - test/gem_test.rb
196
197
  - test/git_based_gem_test.rb
@@ -199,6 +200,7 @@ files:
199
200
  - test/ruboto_activity_test.rb
200
201
  - test/ruboto_gen_test.rb
201
202
  - test/ruboto_update_test.rb
203
+ - test/sample_broadcast_receiver_test.rb
202
204
  - test/service_test.rb
203
205
  - test/splash_test.rb
204
206
  - test/sqldroid_test.rb
@@ -210,7 +212,7 @@ homepage: http://ruboto.org/
210
212
  licenses:
211
213
  - MIT
212
214
  metadata: {}
213
- post_install_message:
215
+ post_install_message:
214
216
  rdoc_options: []
215
217
  require_paths:
216
218
  - lib
@@ -226,8 +228,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
228
  version: '0'
227
229
  requirements: []
228
230
  rubyforge_project: ruboto/ruboto
229
- rubygems_version: 2.1.9
230
- signing_key:
231
+ rubygems_version: 2.0.6
232
+ signing_key:
231
233
  specification_version: 4
232
234
  summary: A platform for developing apps using JRuby on Android.
233
235
  test_files: []