Permalink
Browse files

Restructured the gem and made tests pass

  • Loading branch information...
1 parent 7c5f9b1 commit b9f10c571ffde224d5a3a74478500a5024b1708c @weibel committed Aug 20, 2012
View
@@ -1,14 +1,9 @@
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
-require 'bundler/gem_tasks'
-Bundler.setup
-Bundler.require
+require 'rubygems'
+require 'lib/map-kit-wrapper'
require 'bubble-wrap/test'
Motion::Project::App.setup do |app|
- # Use `rake config' to see complete project settings.
app.name = 'MapKitWrapper'
- app.files = Dir.glob(File.join(app.project_dir, 'motion/**/*.rb'))
- app.files_dependencies 'motion/map_view.rb' => 'motion/zoom_level.rb'
- app.frameworks += ['CoreLocation', 'MapKit']
end
View
@@ -0,0 +1,14 @@
+unless defined?(Motion::Project::Config)
+ raise "This file must be required within a RubyMotion project Rakefile."
+end
+
+Motion::Project::App.setup do |app|
+ Dir.glob(File.join(File.dirname(__FILE__), 'map_kit_wrapper/*.rb')).each do |file|
+ app.files.unshift(file)
+ end
+ app.files_dependencies({'lib/map_kit_wrapper/map_view.rb' => 'lib/map_kit_wrapper/map_kit_data_types.rb',
+ 'lib/map_kit_wrapper/map_kit_data_types.rb' => 'lib/map_kit_wrapper/core_location_data_types.rb',
+ 'lib/map_kit_wrapper/core_location_data_types.rb' => 'lib/map_kit_wrapper/zoom_level.rb'
+ })
+ app.frameworks += ['CoreLocation', 'MapKit']
+end
View
@@ -1 +0,0 @@
-require 'map_kit_wrapper/version' unless defined?(MapKit::VERSION)
File renamed without changes.
File renamed without changes.
@@ -4,6 +4,7 @@ class TestSuiteDelegate
def application(application, didFinishLaunchingWithOptions: launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@window.rootViewController = UIViewController.alloc.init
+ @window.makeKeyAndVisible
true
end
end
File renamed without changes.
View
@@ -4,8 +4,7 @@ require File.expand_path('../lib/map_kit_wrapper/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Kasper Weibel Nielsen-Refs"]
gem.email = ["weibel@gmail.com"]
- gem.summary = %q{This is a MapKit wrapper for RubyMotion. It's
-purpose is to make make dealing with MapKit less painfull}
+ gem.summary = %q{This is a MapKit wrapper for RubyMotion. It's purpose is to make make dealing with MapKit less painful}
gem.homepage = "https://github.com/weibel/MapKitWrapper"
gem.files = `git ls-files`.split($\)
View
@@ -0,0 +1,9 @@
+describe "Application 'MapKitWrapper'" do
+ before do
+ @app = UIApplication.sharedApplication
+ end
+
+ it "has one window" do
+ @app.windows.size.should == 1
+ end
+end

0 comments on commit b9f10c5

Please sign in to comment.