ProMotion 2.0.0.rc5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1b745b9285361e5c83902ad54555b26eb25ef64
4
- data.tar.gz: 3efb5c16c82d9f136dde950742724cc4713b1d49
3
+ metadata.gz: 14987f5aeab8920859f57503394853b2df7d89bb
4
+ data.tar.gz: ecdd5d911f9642b4b2bebc68f2741bc21ea71e7f
5
5
  SHA512:
6
- metadata.gz: 6ee92756d4cafbbe466cc4e03e8bf9a136c89335d961e69d61b0553473b96e0313179ddd4179995ad58d738b3d4cd6d0e5861ee6d5ec02902ca6dce6e55b5d74
7
- data.tar.gz: abce7aecfb21cb8ca89bef8c0af872307bf18b278cb89ffc51bafb98329d5b2133f73fd83087cb2fa039c220e13bd8e90e38ec9fcc7b4608a8c0f11cc2a055d3
6
+ metadata.gz: 74a9842f7871a930fd367c216c6a54a131869c6ce2c8d8be355265f8a4af37347da4a887fa6977dbcaf2973ce843394bfa08c02e5ca09b293321fd5da22692ce
7
+ data.tar.gz: 3d42d49c8f5993725fb564deb77d76a6bccf59d493c0c8c4c59427c86692afb330b63374419714db098b46029661ed42f16ed5829516136be920db06ae2b615d
data/README.md CHANGED
@@ -9,7 +9,7 @@ simple, Ruby-like DSL.
9
9
 
10
10
  * Watch Jamon Holmgren give a talk about ProMotion at [RubyMotion #inspect2014](http://confreaks.com/videos/3813-inspect-going-pro-with-promotion-from-prototype-to-production) (video)
11
11
  * Watch the [September 2013 Motion Meetup](http://www.youtube.com/watch?v=rf7h-3AiMRQ) where Gant Laborde
12
- interviews Jamon Holmgren about ProMotion!
12
+ interviews Jamon Holmgren about ProMotion
13
13
 
14
14
  ```ruby
15
15
  # app/app_delegate.rb
@@ -80,6 +80,7 @@ end
80
80
  1. Check out the [Getting Started Guide](https://github.com/clearsightstudio/ProMotion/wiki/Guide:-Getting-Started) in the wiki
81
81
  2. Watch the excellent [MotionInMotion screencast about ProMotion](https://motioninmotion.tv/screencasts/8) (very reasonably priced subscription required)
82
82
  3. Follow a tutorial: [Building an ESPN app using RubyMotion, ProMotion, and TDD](http://jamonholmgren.com/building-an-espn-app-using-rubymotion-promotion-and-tdd)
83
+ 4. Read the updated and exhaustive [Wiki](https://github.com/clearsightstudio/ProMotion/wiki)
83
84
 
84
85
  # Changelog
85
86
 
@@ -128,9 +129,7 @@ We've created a comprehensive and always updated wiki with code examples, usage
128
129
  ProMotion is not only an easy DSL to get started. The community is very helpful and
129
130
  welcoming to new RubyMotion developers. We don't mind newbie questions.
130
131
 
131
- If you need help, feel free to tweet [@jamonholmgren](http://twitter.com/jamonholmgren)
132
- or open an issue on GitHub. Opening an issue is usually the best and we respond to those
133
- pretty quickly. If we don't respond within a day, tweet Jamon or Mark a link to the issue.
132
+ If you need help, feel free to open an issue on GitHub. If we don't respond within a day, tweet us a link to the issue -- sometimes we get busy.
134
133
 
135
134
  # Contributing
136
135
 
@@ -140,6 +139,6 @@ See [CONTRIBUTING.md](https://github.com/clearsightstudio/ProMotion/blob/master/
140
139
 
141
140
  * Jamon Holmgren: [@jamonholmgren](https://twitter.com/jamonholmgren)
142
141
  * Silas Matson: [@silasjmatson](https://twitter.com/silasjmatson)
143
- * Matt Brewer: [@macfanatic](https://twitter.com/macfanatic)
144
142
  * Mark Rickert: [@markrickert](https://twitter.com/markrickert)
143
+ * Ryan Linton: [@ryanlntn](https://twitter.com/ryanlntn)
145
144
  * [Many others](https://github.com/clearsightstudio/ProMotion/graphs/contributors)
@@ -47,7 +47,7 @@ module ProMotion
47
47
 
48
48
  elsif self.navigationController
49
49
  close_nav_screen args
50
- send_on_return(args) # TODO: this would be better implemented in a callback or view_did_disappear.
50
+ send_on_return(args)
51
51
 
52
52
  else
53
53
  PM.logger.warn "Tried to close #{self.to_s}; however, this screen isn't modal or in a nav bar."
@@ -138,6 +138,7 @@ module ProMotion
138
138
  def close_nav_screen(args={})
139
139
  args[:animated] = true unless args.has_key?(:animated)
140
140
  if args[:to_screen] == :root
141
+ self.parent_screen = self.navigationController.viewControllers.first
141
142
  self.navigationController.popToRootViewControllerAnimated args[:animated]
142
143
  elsif args[:to_screen] && args[:to_screen].is_a?(UIViewController)
143
144
  self.parent_screen = args[:to_screen]
@@ -87,7 +87,8 @@ module ProMotion
87
87
 
88
88
  def delete_row(index_paths, animation = nil)
89
89
  deletable_index_paths = []
90
- Array(index_paths).each do |index_path|
90
+ index_paths = [index_paths] if index_paths.kind_of?(NSIndexPath)
91
+ index_paths.each do |index_path|
91
92
  delete_cell = false
92
93
  delete_cell = send(:on_cell_deleted, self.promotion_table_data.cell(index_path: index_path)) if self.respond_to?("on_cell_deleted:")
93
94
  unless delete_cell == false
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "2.0.0.rc5" unless defined?(ProMotion::VERSION)
2
+ VERSION = "2.0.0" unless defined?(ProMotion::VERSION)
3
3
  end
@@ -231,10 +231,6 @@ describe "screen helpers" do
231
231
 
232
232
  describe "closing a screen" do
233
233
 
234
- before do
235
- @second_screen = BasicScreen.new
236
- end
237
-
238
234
  it "should close a modal screen" do
239
235
  parent_screen = HomeScreen.new
240
236
  @screen.parent_screen = parent_screen
@@ -291,6 +287,30 @@ describe "screen helpers" do
291
287
  @screen.send_on_return key: :value
292
288
  end
293
289
 
290
+ context "there are two parent screens and we're closing to the first" do
291
+ it "#send_on_return should pass args to the first screen" do
292
+ first_screen = HomeScreen.new(nav_bar: true)
293
+ second_screen = first_screen.open(BasicScreen)
294
+ second_screen.open @screen
295
+
296
+
297
+ second_screen.stub!(:on_return) { |args| should.flunk "shouldn't call on_return on second_screen!" }
298
+ first_screen.mock!(:on_return) { |args| args[:key].should == :value }
299
+ @screen.close({ key: :value, to_screen: first_screen })
300
+ end
301
+
302
+ it "#send_on_return should pass args to the first screen with :root" do
303
+ first_screen = HomeScreen.new(nav_bar: true)
304
+ second_screen = first_screen.open(BasicScreen)
305
+ second_screen.open @screen
306
+
307
+
308
+ second_screen.stub!(:on_return) { |args| should.flunk "shouldn't call on_return on second_screen!" }
309
+ first_screen.mock!(:on_return) { |args| args[:key].should == :value }
310
+ @screen.close({ key: :value, to_screen: :root })
311
+ end
312
+ end
313
+
294
314
  end
295
315
 
296
316
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProMotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc5
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-29 00:00:00.000000000 Z
13
+ date: 2014-08-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: methadone
@@ -171,9 +171,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - ">"
174
+ - - ">="
175
175
  - !ruby/object:Gem::Version
176
- version: 1.3.1
176
+ version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
179
  rubygems_version: 2.2.2