-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #457 from clearsightstudio/pm2
ProMotion 2.0 Prelim Pull Request
- Loading branch information
Showing
98 changed files
with
1,182 additions
and
2,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ tmp | |
*.tmproject | ||
tmtags | ||
*.sublime-workspace | ||
|
||
lib/ProMotion/delegate/delegate_module.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
language: objective-c | ||
before_install: | ||
- (ruby --version) | ||
- sudo chown -R travis ~/Library/RubyMotion | ||
- mkdir -p ~/Library/RubyMotion/build | ||
- sudo motion update | ||
gemfile: | ||
- Gemfile | ||
script: bundle exec rake spec | ||
script: | ||
- bundle install | ||
- bundle exec rake clean | ||
- bundle exec rake spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'motion-require' | ||
# Specify your gem's dependencies in ProMotion.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2013 Jamon Holmgren | ||
Copyright (c) 2012-2014 Jamon Holmgren | ||
|
||
MIT License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
$:.unshift("/Library/RubyMotion/lib") | ||
require 'motion/project/template/ios' | ||
require 'bundler' | ||
Bundler.require(:development) | ||
require 'ProMotion' | ||
|
||
Motion::Project::App.setup do |app| | ||
app.name = 'ProMotionTest' | ||
app.version = "0.99.0" | ||
app.redgreen_style = :full # :focused, :full | ||
app.frameworks += %w(CoreLocation MapKit) | ||
|
||
# Devices | ||
app.deployment_target = "6.0" | ||
app.device_family = [:ipad] # so we can test split screen capability | ||
end | ||
|
||
def all_files | ||
App.config.spec_files | ||
end | ||
|
||
def functional_files | ||
Dir.glob('./spec/functional/**/*.rb') | ||
end | ||
|
||
def unit_files | ||
Dir.glob('./spec/unit/**/*.rb') | ||
app.name = 'ProMotion' | ||
app.device_family = [ :ipad ] # so we can test split screen capability | ||
app.detect_dependencies = true | ||
end | ||
|
||
namespace :spec do | ||
task :unit do | ||
App.config.spec_mode = true | ||
spec_files = all_files | ||
spec_files -= functional_files | ||
spec_files = App.config.spec_files - Dir.glob('./spec/functional/**/*.rb') | ||
App.config.instance_variable_set("@spec_files", spec_files) | ||
Rake::Task["simulator"].invoke | ||
end | ||
|
||
task :func do | ||
Rake::Task["spec:functional"].invoke | ||
end | ||
|
||
task :functional do | ||
App.config.spec_mode = true | ||
spec_files = all_files | ||
spec_files -= unit_files | ||
App.config.instance_variable_set("@spec_files", spec_files) | ||
Rake::Task["simulator"].invoke | ||
end | ||
|
||
task :single do | ||
App.config.spec_mode = true | ||
spec_files = App.config.spec_files | ||
spec_files -= unit_files | ||
spec_files -= functional_files | ||
spec_files += Dir.glob("./spec/unit/**/#{ENV['f'] || ENV['file']}.rb") | ||
spec_files += Dir.glob("./spec/functional/**/#{ENV['f'] || ENV['file']}.rb") | ||
App.config.instance_variable_set("@spec_files", spec_files) | ||
Rake::Task["simulator"].invoke | ||
end | ||
|
||
end | ||
|
||
task :sim_close do | ||
sh "osascript -e 'tell application \"iphone simulator\" to quit'" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class HomeScreen < ProMotion::Screen | ||
|
||
title "Home" | ||
|
||
def on_load | ||
set_nav_bar_button :left, title: "Save", action: :save_something, type: :done | ||
set_nav_bar_button :right, image: UIImage.imageNamed("list.png"), action: :return_to_some_other_screen, type: :plain | ||
end | ||
|
||
def on_return(args={}) | ||
end | ||
|
||
def subview_styles | ||
{ | ||
background_color: UIColor.greenColor | ||
} | ||
end | ||
|
||
end |
2 changes: 1 addition & 1 deletion
2
spec/helpers/image_title_screen.rb → app/test_screens/image_title_screen.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
spec/helpers/image_view_title_screen.rb → app/test_screens/image_view_title_screen.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class MyView < UIView; end | ||
|
||
class LoadViewScreen < PM::Screen | ||
def load_view | ||
self.view = MyView.new | ||
end | ||
|
||
def on_load | ||
self.view.backgroundColor = UIColor.redColor | ||
end | ||
end | ||
|
||
class MyTableView < UITableView; end | ||
|
||
class LoadViewTableScreen < PM::Screen | ||
def load_view | ||
self.view = MyTableView.new | ||
end | ||
|
||
def on_load | ||
self.view.backgroundColor = UIColor.greenColor | ||
end | ||
|
||
def table_data | ||
[] | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class TabScreen < PM::Screen | ||
title "Tab" | ||
tab_bar_item title: "Tab Item", icon: "list" | ||
tab_bar_item title: "Tab Item", item: "list" | ||
end |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.