diff --git a/.travis.yml b/.travis.yml index 65ad321..e33865f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,23 @@ language: objective-c +osx_image: xcode12 +env: + global: + - RUBYMOTION_LICENSE=1dcac45cc434293009f74b33037bdf7361a3a1ff # Official license key for open-source projects + - TMP_DIR=./tmp # For motion repo, so it doesn't attempt to use /tmp, to which it has no access + - OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES before_install: - - (ruby --version) - - sudo chown -R travis ~/Library/RubyMotion - - mkdir -p ~/Library/RubyMotion/build - - sudo motion update -gemfile: - - Gemfile -script: - - bundle install - - bundle exec rake clean - - bundle exec rake spec + - brew update + - brew outdated xctool || brew upgrade xctool + - (xcrun simctl list) + - wget http://travisci.rubymotion.com/ -O RubyMotion-TravisCI.pkg + - sudo installer -pkg RubyMotion-TravisCI.pkg -target / + - cp -r /usr/lib/swift/*.dylib /Applications/Xcode.app/Contents/Frameworks/ + - touch /Applications/Xcode.app/Contents/Frameworks/.swift-5-staged + - sudo mkdir -p ~/Library/RubyMotion/build + - sudo chown -R travis ~/Library/RubyMotion + - eval "sudo motion activate $RUBYMOTION_LICENSE" + - sudo motion update + - (motion --version) + - (ruby --version) + - motion repo +script: bundle exec rake spec \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 4171179..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,30 +0,0 @@ -PATH - remote: . - specs: - ProMotion-map (0.7.0) - ProMotion (~> 2.0) - -GEM - remote: https://rubygems.org/ - specs: - ProMotion (2.4.2) - methadone (~> 1.7) - motion_print (~> 1.0) - methadone (1.9.1) - bundler - motion-redgreen (0.1.0) - motion-stump (0.3.2) - motion_print (1.2.0) - rake (10.4.2) - -PLATFORMS - ruby - -DEPENDENCIES - ProMotion-map! - motion-redgreen (~> 0.1) - motion-stump (~> 0.3) - rake - -BUNDLED WITH - 1.10.4 diff --git a/ProMotion-map.gemspec b/ProMotion-map.gemspec index 04668bb..c4d2acd 100644 --- a/ProMotion-map.gemspec +++ b/ProMotion-map.gemspec @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |spec| spec.name = "ProMotion-map" - spec.version = "0.7.0" + spec.version = "0.8.0" spec.authors = ["Mark Rickert", "Jamon Holmgren"] spec.email = ["mark@mohawkapps.com", "jamon@clearsightstudio.com"] spec.description = %q{Adds PM::MapScreen support to ProMotion.} @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(spec)/}) spec.require_paths = ["lib"] - spec.add_dependency "ProMotion", "~> 2.0" + spec.add_dependency "ProMotion", "~> 3.0" spec.add_development_dependency "motion-stump", "~> 0.3" spec.add_development_dependency "motion-redgreen", "~> 0.1" spec.add_development_dependency "rake" diff --git a/Rakefile b/Rakefile index e4ed14e..84e84f6 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- $:.unshift("/Library/RubyMotion/lib") +$:.unshift("~/.rubymotion/rubymotion-templates") # Add this line require 'motion/project/template/ios' + require 'bundler' Bundler.require(:development) require 'ProMotion' @@ -10,6 +12,4 @@ Motion::Project::App.setup do |app| # Use `rake config' to see complete project settings. app.name = 'ProMotion-map' - # app.sdk_version = "8.1" - # app.deployment_target = '7.1' end diff --git a/spec/func_map_screen_spec.rb b/spec/func_map_screen_spec.rb index 24c2b8e..d1e29e0 100644 --- a/spec/func_map_screen_spec.rb +++ b/spec/func_map_screen_spec.rb @@ -52,7 +52,7 @@ def add_image_annotation end it "should select an annotation" do - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation map_screen.annotations.first wait 0.75 do map_screen.selected_annotations.count.should == 1 @@ -60,7 +60,7 @@ def add_image_annotation end it "should select an annotation by index" do - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation_at 2 wait 0.75 do map_screen.selected_annotations.count.should == 1 @@ -69,7 +69,7 @@ def add_image_annotation end it "should select another annotation and check that the title is correct" do - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation map_screen.annotations[1] wait 0.75 do map_screen.selected_annotations.count.should == 1 @@ -88,7 +88,7 @@ def add_image_annotation map_screen.deselect_annotations wait 0.75 do - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] end end @@ -136,7 +136,7 @@ def add_image_annotation it "should select an image annotation" do add_image_annotation - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation map_screen.annotations.last wait 0.75 do map_screen.selected_annotations.count.should == 1 @@ -145,7 +145,7 @@ def add_image_annotation it "should select an image annotation by index" do add_image_annotation - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation_at 5 wait 0.75 do map_screen.selected_annotations.count.should == 1 @@ -155,7 +155,7 @@ def add_image_annotation it "should select an image annotation and check that the title is correct" do add_image_annotation - map_screen.selected_annotations.should == nil + map_screen.selected_annotations.should == [] map_screen.select_annotation map_screen.annotations[5] wait 0.75 do map_screen.selected_annotations.count.should == 1