ProMotion 1.1.0.rc1 → 1.1.0

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: 2a8dbafa82311f57f50c6d99c19cecae98f63b67
4
- data.tar.gz: fdd29443346a2450e79dc914431a621f1a037d45
3
+ metadata.gz: 2c289bc5115257f2c28e10f19f7429a7c7109650
4
+ data.tar.gz: 1a8f4ab9bb350afb7aedf0094a38c68d7119a468
5
5
  SHA512:
6
- metadata.gz: 25ed34fdb3a9f089113559a1383baedf0b4de0cbf2c1472aadde51e7d920111b7e0aba7702bc061583b195e3020569cef2032ddf56ef87c2d6181f8466510ee1
7
- data.tar.gz: 5085d8e82fadf7747305d270f669ab72db9301e139031a7851df8b892f53616c24fc4443b87b9cddae8930bfcad4041072e683faddb610420c7bda05d4f30904
6
+ metadata.gz: f005ecaf40238101957db10d7c10f7e05996ef000069f64813bc4909ee7a2b2cacc4c8e6a0fca194530945b3284218e550564f200e54b1094b6947429d3074e5
7
+ data.tar.gz: 3787444a538d4dc38828a38407934bb9ef4557e9acb5ff862e6d55531022bae2bd82ce9f8431388d302b6c8e89b9bca793e96c33c9f5c418681c0492af797ea3
data/.travis.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  language: objective-c
2
2
  gemfile:
3
3
  - Gemfile
4
- before_script: sudo chown -R travis ~/Library/RubyMotion
5
4
  script: bundle exec rake spec
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,20 @@
1
+ Over 20 developers have contributed to ProMotion. We love it when ProMotion users become ProMotion contributors.
2
+
3
+ ## Working on New Features
4
+
5
+ 1. Clone the repo into `<My iOS Projects Folder>/ProMotion`
6
+ 2. Update your `Gemfile`to reference the project as `gem 'ProMotion', :path => "../ProMotion"`
7
+ 3. Run `bundle`
8
+ 4. Run `rake clean` and then `rake`
9
+ 5. Contribute!
10
+
11
+ ## Submitting a Pull Request
12
+
13
+ 1. Fork the project
14
+ 2. Create a feature branch
15
+ 3. Code
16
+ 4. Update or create new specs ** NOTE: your PR is far more likely to be merged if you include comprehensive tests! **
17
+ 5. Make sure tests are passing by running `rake spec` *(you can run functional and unit specs separately with `rake spec:functional` and `rake spec:unit`)*
18
+ 6. Submit pull request to `edge` (for new features) or `master` (for bugfixes)
19
+ 7. Make a million little nitpicky changes that @jamonholmgren wants
20
+ 8. Merged, then fame, adoration, kudos everywhere
data/README.md CHANGED
@@ -11,25 +11,33 @@ Watch the [September Motion Meetup](http://www.youtube.com/watch?v=rf7h-3AiMRQ)
11
11
  interviews Jamon Holmgren about ProMotion!
12
12
 
13
13
  ```ruby
14
+ # app/app_delegate.rb
14
15
  class AppDelegate < PM::Delegate
15
16
  def on_load(app, options)
16
17
  open RootScreen.new(nav_bar: true)
17
18
  end
18
19
  end
19
20
 
21
+ # app/screens/root_screen.rb
20
22
  class RootScreen < PM::Screen
21
23
  title "Root Screen"
22
24
 
23
- def push_new_screen
24
- open NewScreen
25
+ def on_load
26
+ set_bar_button :right, title: "Help", action: :push_help_screen
27
+ end
28
+
29
+ def push_help_screen
30
+ open HelpScreen
25
31
  end
26
32
  end
27
33
 
28
- class NewScreen < PM::TableScreen
34
+ # app/screens/help_screen.rb
35
+ class HelpScreen < PM::TableScreen
29
36
  title "Table Screen"
30
37
 
31
38
  def table_data
32
39
  [{
40
+ title: "Help",
33
41
  cells: [
34
42
  { title: "About this app", action: :tapped_about },
35
43
  { title: "Log out", action: :log_out }
@@ -58,30 +66,25 @@ end
58
66
 
59
67
  # Getting Started
60
68
 
61
- Check out our new [Getting Started Guide](https://github.com/clearsightstudio/ProMotion/wiki/Guide:-Getting-Started) in the wiki!
69
+ Check out the [Getting Started Guide](https://github.com/clearsightstudio/ProMotion/wiki/Guide:-Getting-Started) in the wiki!
62
70
 
63
71
  # What's New?
64
72
 
65
- ## Version 1.0
66
-
67
- * **New Screen** [`PM::MapScreen`](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::MapScreen)
68
- * **New Screen** [`PM::WebScreen`](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::WebScreen)
69
- * Added [`indexable`](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::TableScreen#indexable) as a `PM::TableScreen` feature
70
- * Added `PM::SplitViewController` and the ability to open a screen `in_detail:` or `in_master:`. [More info here.](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Screen#openscreen-args--)
71
- * Added `PM::TabBarController` and `PM::Tabs` and refactored the `open_tab_bar` code
72
- * **IMPORTANT:** Changed `on_load` to fire more consistently. You are now encouraged to put your view setup code in here rather than `will_appear`.
73
- * Many methods that used to require long UIKit constants now take short :symbols. Check documentation.
74
- * Simpler `PM::Delegate` code, added `will_load(app, options)` and others. [See the documentation.](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Delegate)
75
- * [Added a few keys and improvements](https://github.com/clearsightstudio/ProMotion/wiki/Reference%3A-All-available-table_data-options) to table_data
76
- * Removed `PM::SectionedTableScreen` (`PM::TableScreen` is already a sectioned table)
77
- * Removed any last UIKit monkeypatching. Everything is a subclass now. ProMotion is probably the least invasive RubyMotion gem in common use.
78
- * Push Notification updates
79
- * Renamed `PM::ViewHelper` to `PM::Styling` and [added some common helpers](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Screen#hex_colorstr)
80
- * Added `will_present`, `on_present`, `will_dismiss`, `on_dismiss` to screens
81
- * Major internal refactors everywhere
82
- * Lots of new unit & functional tests
83
- * Removed deprecations, cleaned up a lot of code
84
- * Huge improvements to the [wiki](https://github.com/clearsightstudio/ProMotion/wiki)
73
+ ## Version 1.1.x
74
+
75
+ * Added a [ProMotion executable](https://github.com/clearsightstudio/ProMotion/wiki/Command-Line-Tool) called `promotion`. You can type `promotion new <myapp>` and it will create a ProMotion-specific app. We will be adding more functionality in the future.
76
+ * Can now pass a symbol to `add`, `add_to`, and `set_attributes` to call a method with that name to get styles.
77
+ * Added `button_title:` to `open_split_screen` to [customize the auto-generated button title](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::SplitScreen#open_split_screenmaster-detail-args--)
78
+ * Updates to [set_tab_bar_button](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Tabs#set_tab_bar_itemargs)
79
+ * Added to PM::Delegate [`on_open_url(args = {})`](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Delegate#on_open_urlargs--) where `args` contains `:url`, `:source_app`, and `:annotation`
80
+ * Added to PM::Delegate [`tint_color`](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::Delegate#tint_color) to customize the application-wide tint color
81
+ * Added to [PM::MapScreen annotations](https://github.com/clearsightstudio/ProMotion/wiki/API-Reference:-ProMotion::MapScreen) the ability to set an image
82
+ * Removed legacy `navigation_controller` references which were causing confusion.
83
+ * Allowed setting a `custom_view` for `bar_button_item`s.
84
+ * Added `will_begin_search` and `will_end_search` callbacks to PM::TableScreen.
85
+ * Added `title_view` and `title_view_height` to sections in PM::TableScreen.
86
+ * Updated screenshots for iOS 7
87
+ * Refactored code and lots of new passing tests
85
88
 
86
89
  # Tutorials
87
90
 
@@ -114,34 +117,13 @@ We've created a comprehensive and always updated wiki with code examples, usage
114
117
 
115
118
  # Help
116
119
 
117
- If you need help, feel free to ping me on twitter [@jamonholmgren](http://twitter.com/jamonholmgren)
120
+ If you need help, feel free to tweet [@jamonholmgren](http://twitter.com/jamonholmgren)
118
121
  or open an issue on GitHub. Opening an issue is usually the best and we respond to those pretty quickly.
122
+ If we don't respond within a day, tweet Jamon or Mark a link to the issue.
119
123
 
120
124
  # Contributing
121
125
 
122
- I'm very open to ideas. Tweet me with your ideas or open a ticket (I don't mind!)
123
- and let's discuss. **It's a good idea to run your idea by the committers before creating
124
- a pull request.** We'll always consider your ideas carefully but not all ideas will be
125
- incorporated.
126
-
127
- ## Working on New Features
128
-
129
- 1. Clone the repos into `Your-Project/Vendor/ProMotion`
130
- 2. Update your `Gemfile`to reference the project as `gem 'ProMotion', :path => "vendor/ProMotion/"`
131
- 3. Run `bundle`
132
- 4. Run `rake clean` and then `rake`
133
- 5. Contribute!
134
-
135
- ## Submitting a Pull Request
136
-
137
- 1. Fork the project
138
- 2. Create a feature branch
139
- 3. Code
140
- 4. Update or create new specs ** NOTE: your PR is far more likely to be merged if you include comprehensive tests! **
141
- 5. Make sure tests are passing by running `rake spec` *(you can run functional and unit specs separately with `rake spec:functional` and `rake spec:unit`)*
142
- 6. Submit pull request to `edge` (for new features) or `master` (for bugfixes)
143
- 7. Make a million little nitpicky changes that @jamonholmgren wants
144
- 8. Merged, then fame, adoration, kudos everywhere
126
+ See [CONTRIBUTING.md](./).
145
127
 
146
128
  ## Primary Contributors
147
129
 
@@ -112,7 +112,7 @@ module ProMotion
112
112
 
113
113
  def ensure_wrapper_controller_in_place(screen, args={})
114
114
  unless args[:close_all] || args[:modal] || args[:in_detail] || args[:in_master]
115
- screen.navigationController ||= self.navigationController
115
+ screen.navigationController ||= self.navigationController if screen.respond_to?("navigationController=")
116
116
  screen.tab_bar ||= self.tab_bar if screen.respond_to?("tab_bar=")
117
117
  end
118
118
  end
@@ -73,7 +73,9 @@ module ProMotion
73
73
  end
74
74
 
75
75
  def set_data_cell_defaults(data_cell)
76
- data_cell[:cell_style] ||= UITableViewCellStyleDefault
76
+ data_cell[:cell_style] ||= begin
77
+ data_cell[:subtitle] ? UITableViewCellStyleSubtitle : UITableViewCellStyleDefault
78
+ end
77
79
  data_cell[:cell_class] ||= PM::TableViewCell
78
80
  data_cell[:cell_identifier] ||= build_cell_identifier(data_cell)
79
81
 
@@ -131,7 +131,6 @@ module ProMotion
131
131
  table_cell = table_view.dequeueReusableCellWithIdentifier(data_cell[:cell_identifier])
132
132
 
133
133
  unless table_cell
134
- data_cell[:cell_style] ||= UITableViewCellStyleSubtitle
135
134
  table_cell = data_cell[:cell_class].alloc.initWithStyle(data_cell[:cell_style], reuseIdentifier:data_cell[:cell_identifier])
136
135
  table_cell.extend PM::TableViewCellModule unless table_cell.is_a?(PM::TableViewCellModule)
137
136
  table_cell.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "1.1.0.rc1" unless defined?(ProMotion::VERSION)
2
+ VERSION = "1.1.0" unless defined?(ProMotion::VERSION)
3
3
  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: 1.1.0.rc1
4
+ version: 1.1.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: 2013-11-21 00:00:00.000000000 Z
13
+ date: 2013-12-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: webstub
@@ -108,6 +108,7 @@ extra_rdoc_files: []
108
108
  files:
109
109
  - .gitignore
110
110
  - .travis.yml
111
+ - CONTRIBUTING.md
111
112
  - Gemfile
112
113
  - Gemfile.lock
113
114
  - LICENSE
@@ -217,12 +218,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
218
  version: '0'
218
219
  required_rubygems_version: !ruby/object:Gem::Requirement
219
220
  requirements:
220
- - - '>'
221
+ - - '>='
221
222
  - !ruby/object:Gem::Version
222
- version: 1.3.1
223
+ version: '0'
223
224
  requirements: []
224
225
  rubyforge_project:
225
- rubygems_version: 2.0.3
226
+ rubygems_version: 2.0.14
226
227
  signing_key:
227
228
  specification_version: 4
228
229
  summary: ProMotion is a new way to organize RubyMotion apps. Instead of dealing with