ProMotion-formotion 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ab04bad1690c4aecbc86eeaf598322262a40537
4
- data.tar.gz: 901b5fa9cc74ab2d2d21f9b61354729ac200081d
3
+ metadata.gz: 4937d8ef4a8cfdeea4f1d5fae87bc15b041d9c36
4
+ data.tar.gz: a97813a67ef069ab05848c434e165b70cf99c8ce
5
5
  SHA512:
6
- metadata.gz: be967150f673259c5747667a1180002f9d003968faa8515d26516edbc15e8fcb71d447afd070f16eb79cb880efa7d3cf9dae16a1dce8e4637fbe5feb286a5df7
7
- data.tar.gz: 05aed54a4fba8035544f4725c5a58c866c8d9035a9d66b070d33e30e9927c4a47087526ad3df8b14cb6f9fcd83d4c0756e332e731a823af82f2be48098ee5653
6
+ metadata.gz: fc33787ca0604a526c943a87a243eed88766fe4f0b762cb937ff26843c51343efd5085fcdc6bfb8115eff06f7da84024733f1528d69cf1f8982725cc170e7e94
7
+ data.tar.gz: 1f3ade815b85e5509f1dcd37dcff211997b0402227e466424b598714ae165e0ede56f9c8ab5d59b2b5f2159a53dc1c4b5c0785846b3854634cc0a97e909ff0eb
data/.gitignore CHANGED
@@ -6,6 +6,8 @@ coverage
6
6
  InstalledFiles
7
7
  lib/bundler/man
8
8
  pkg
9
+ build
10
+ gems
9
11
  rdoc
10
12
  spec/reports
11
13
  test/tmp
data/Gemfile.lock CHANGED
@@ -1,17 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ProMotion-formotion (0.0.5)
5
- ProMotion (~> 0.4.1)
6
- formotion (~> 1.1.4)
4
+ ProMotion-formotion (0.1.2)
5
+ ProMotion (>= 1.1.1)
6
+ formotion (>= 1.4.0)
7
+ motion-require (>= 0.0.3)
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
11
- ProMotion (0.4.1)
12
- bubble-wrap (1.1.5)
13
- formotion (1.1.5)
14
- bubble-wrap (>= 1.1.4)
12
+ ProMotion (1.1.2)
13
+ methadone
14
+ bubble-wrap (1.4.0)
15
+ formotion (1.7)
16
+ bubble-wrap (~> 1.4.0)
17
+ motion-require (~> 0.0.3)
18
+ methadone (1.3.2)
19
+ bundler
20
+ motion-require (0.0.7)
15
21
 
16
22
  PLATFORMS
17
23
  ruby
@@ -19,8 +19,8 @@ Gem::Specification.new do |gem|
19
19
  gem.name = "ProMotion-formotion"
20
20
  gem.require_paths = ["lib"]
21
21
  gem.version = ProMotion::Formotion::VERSION
22
- gem.add_runtime_dependency("ProMotion", ">= 1.1.1")
23
- gem.add_runtime_dependency("formotion", ">= 1.6")
24
- gem.add_runtime_dependency("motion-require", ">= 0.1.1")
22
+ gem.add_runtime_dependency("ProMotion", ">= 1.2.0")
23
+ gem.add_runtime_dependency("formotion", ">= 1.7")
24
+ gem.add_runtime_dependency("motion-require", ">= 0.2.0")
25
25
  end
26
26
 
data/README.md CHANGED
@@ -4,13 +4,21 @@ ProMotion Formotion Screen
4
4
 
5
5
  Made a gem from the ProMotion formotion example at https://github.com/clearsightstudio/ProMotion#using-your-own-uiviewcontroller
6
6
 
7
- Now with 100% more motion_require
8
-
9
7
 
10
8
  ## Setup
11
9
 
12
- Add this gem to your project, in Gemfile `gem 'ProMotion-formotion'`,
13
- then `bundle update`
10
+ Add this gem to your project, in Gemfile `gem 'ProMotion-formotion'`:
11
+ ```
12
+ gem "rake"
13
+ gem 'ProMotion', :git => 'https://github.com/clearsightstudio/ProMotion.git'
14
+ gem 'formotion', :git => 'https://github.com/clayallsopp/formotion.git'
15
+ gem 'ProMotion-formotion'
16
+ ```
17
+ then `bundle update`.
18
+
19
+ __Important__: At the moment you need to use the git versions of the ProMotion and formotion Gems for a working App.
20
+
21
+ Please add `app.detect_dependencies = false` to your Rakefile in Motion::Project::App.setup as we use motion-require.
14
22
 
15
23
  Create a Formotion Screen with:
16
24
  ```ruby
@@ -46,8 +54,8 @@ class LoginScreen < PM::FormotionScreen
46
54
  }]
47
55
  }
48
56
  end
49
-
50
-
51
-
52
57
  end
53
58
  ```
59
+
60
+ ## Example
61
+ See under https://github.com/rheoli/formotion-example.
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ $:.unshift("/Library/RubyMotion/lib")
2
+ require 'motion/project/template/ios'
3
+ require 'bundler'
4
+ Bundler.require(:development)
5
+
6
+ Motion::Project::App.setup do |app|
7
+ app.name = 'ProMotion-formotion-Test'
8
+ app.version = "0.1.1"
9
+ #app.redgreen_style = :full # :focused, :full
10
+ #app.frameworks += %w(CoreLocation MapKit)
11
+
12
+ # Devices
13
+ app.deployment_target = "6.0"
14
+ app.device_family = [:ipad] # so we can test split screen capability
15
+ end
@@ -0,0 +1,7 @@
1
+ class AppDelegate
2
+
3
+ def on_load(app, options)
4
+ open BasicScreen.new(nav_bar: true)
5
+ end
6
+
7
+ end
@@ -0,0 +1,15 @@
1
+ class BasicScreen < PM::Screen
2
+ title "Basic"
3
+
4
+ attr_reader :animation_ts
5
+
6
+ def will_appear
7
+ @will_appear_ts = NSDate.date
8
+ end
9
+
10
+ def on_appear
11
+ @on_appear_ts = NSDate.date
12
+ @animation_ts = @on_appear_ts - @will_appear_ts
13
+ end
14
+
15
+ end
@@ -1,5 +1,5 @@
1
1
  module ProMotion
2
2
  module Formotion
3
- VERSION = "0.1.3" unless defined?(ProMotion::Formotion::VERSION)
3
+ VERSION = "0.1.4" unless defined?(ProMotion::Formotion::VERSION)
4
4
  end
5
5
  end
@@ -0,0 +1,50 @@
1
+ class TestFormotionScreen < PM::FormotionScreen
2
+ attr_accessor :submitted_form
3
+
4
+ title "Formotion Test"
5
+
6
+ def table_data
7
+ @table_data ||= {
8
+ sections: [{
9
+ title: "Currency",
10
+ key: :currency,
11
+ select_one: true,
12
+ rows: [{
13
+ title: "EUR",
14
+ key: :eur,
15
+ value: true,
16
+ type: :check
17
+ }, {
18
+ title: "USD",
19
+ key: :usd,
20
+ type: :check
21
+ }]
22
+ }]
23
+ }
24
+ end
25
+
26
+ def on_submit(form)
27
+ self.submitted_form = form
28
+ end
29
+
30
+ def test_update_table_data
31
+ @table_data = {
32
+ sections: [{
33
+ title: "Updated Data",
34
+ key: :currency,
35
+ select_one: true,
36
+ rows: [{
37
+ title: "EUR",
38
+ key: :eur,
39
+ value: true,
40
+ type: :check
41
+ }, {
42
+ title: "USD",
43
+ key: :usd,
44
+ type: :check
45
+ }]
46
+ }]
47
+ }
48
+ update_table_data
49
+ end
50
+ end
@@ -0,0 +1,37 @@
1
+ describe "PM::FormotionScreen" do
2
+
3
+ before do
4
+ @screen = TestFormotionScreen.new
5
+ end
6
+
7
+ it "should store title" do
8
+ TestFormotionScreen.get_title.should == 'Formotion Test'
9
+ @screen.class.get_title.should == "Formotion Test"
10
+ end
11
+
12
+ it "should set default title on new instances" do
13
+ @screen.title.should == "Formotion Test"
14
+ end
15
+
16
+ it "should fire the on_submit method when form is submitted" do
17
+ @screen.form.submit
18
+ @screen.submitted_form.should.not.be.nil
19
+ @screen.submitted_form.render.should.be.kind_of(Hash)
20
+ end
21
+
22
+ describe "After update_table_data" do
23
+ before do
24
+ @screen.test_update_table_data
25
+ end
26
+
27
+ it "should update the table data" do
28
+ @screen.table_data[:sections][0][:title].should == "Updated Data"
29
+ end
30
+
31
+ it "should fire the on_submit method when form is submitted" do
32
+ @screen.form.submit
33
+ @screen.submitted_form.should.not.be.nil
34
+ @screen.submitted_form.render.should.be.kind_of(Hash)
35
+ end
36
+ end
37
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProMotion-formotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Toggweiler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2014-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ProMotion
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.1
19
+ version: 1.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.1
26
+ version: 1.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: formotion
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '1.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: motion-require
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.1
47
+ version: 0.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.1
54
+ version: 0.2.0
55
55
  description: ProMotion-formotion bind ProMotion and formotion together.
56
56
  email:
57
57
  - stephan@rheoli.net
@@ -65,9 +65,14 @@ files:
65
65
  - LICENSE
66
66
  - ProMotion-formotion.gemspec
67
67
  - README.md
68
+ - Rakefile
69
+ - app/app_delegate.rb
70
+ - app/screens/basic_screen.rb
68
71
  - lib/ProMotion-formotion.rb
69
72
  - lib/ProMotion/formotion/formotion_screen.rb
70
73
  - lib/ProMotion/formotion/version.rb
74
+ - spec/helpers/table_screen_formotion.rb
75
+ - spec/unit/formotion_screen_spec.rb
71
76
  homepage: https://github.com/rheoli/ProMotion-formotion
72
77
  licenses: []
73
78
  metadata: {}
@@ -94,4 +99,6 @@ summary: ProMotion is a new way to organize RubyMotion apps. Instead of dealing
94
99
  UIViewControllers, you work with Screens. Screens are a logical way to think of
95
100
  your app and include a ton of great utilities to make iOS development more like
96
101
  Ruby and less like Objective-C.
97
- test_files: []
102
+ test_files:
103
+ - spec/helpers/table_screen_formotion.rb
104
+ - spec/unit/formotion_screen_spec.rb