ProMotion 2.0.0.rc1 → 2.0.0.rc2
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 +4 -4
- data/README.md +3 -1
- data/lib/ProMotion/table/cell/table_view_cell_module.rb +17 -2
- data/lib/ProMotion/version.rb +1 -1
- data/spec/unit/tables/table_view_cell_spec.rb +7 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 237481070752e84a433f41a7d0bc8aca9d315999
|
4
|
+
data.tar.gz: 64fb7aa97e1f907c0805d623a60eb9435ef510f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8395a8ece941acb58790fef73b2b32c13bc1097fb02fefb15e150526d2c4597a6167f96379eb938f35cc3a5b66a2da536ecc3a4b554f0e2a6d847de5c45e86c7
|
7
|
+
data.tar.gz: 6b77365b92b5a7905f904c1e25c0d913068fa9d7382132299ef9e733d775886410ec70aa64f5b16605c7afe101903f77d8adc6a6e3dcc88ae88a748279ff2126
|
data/README.md
CHANGED
@@ -87,6 +87,8 @@ end
|
|
87
87
|
|
88
88
|
Overview: In ProMotion 2.0, we removed deprecated APIs, refactored and cleaned up a ton of code, pulled `PushNotification` and `MapScreen` into their own gems, and simplified the API. It now builds 55% faster and is 20%+ lighter.
|
89
89
|
|
90
|
+
Follow our [Migration Guide](https://github.com/clearsightstudio/ProMotion/wiki/Migration-Guide:-ProMotion-1.2-to-2.0) for a painless upgrade.
|
91
|
+
|
90
92
|
**API changes**
|
91
93
|
|
92
94
|
1. Extracted `PM::MapScreen` into [ProMotion-map](https://github.com/clearsightstudio/ProMotion-map)
|
@@ -111,7 +113,7 @@ Overview: In ProMotion 2.0, we removed deprecated APIs, refactored and cleaned u
|
|
111
113
|
3. Moved many files around into a more logical, simpler structure.
|
112
114
|
4. Removed `PM::Conversions`. The only helper we were using was the `objective_c_method_name` method, and that was only used in `PM::Styling`. So we moved it there.
|
113
115
|
5. New module, `PM::NavBarModule`. Moved any navigation controller methods into this module, cleaning up the `PM::ScreenModule` quite a bit.
|
114
|
-
6. Lots of code refactoring -- CodeClimate went from 2.47 to 3.
|
116
|
+
6. Lots of code refactoring -- CodeClimate went from [2.47 to 3.35 GPA](http://clrsight.co/jh/8fi5l31nzs.png).
|
115
117
|
7. Much cleaner `open` code!
|
116
118
|
8. Converted several *slow* functional tests into *fast* unit tests with the same coverage.
|
117
119
|
|
@@ -16,15 +16,16 @@ module ProMotion
|
|
16
16
|
set_remote_image
|
17
17
|
set_accessory_view
|
18
18
|
set_selection_style
|
19
|
+
set_accessory_type
|
19
20
|
end
|
20
21
|
|
21
22
|
protected
|
22
23
|
|
23
24
|
# TODO: Remove this in ProMotion 2.1. Just for migration purposes.
|
24
25
|
def check_deprecated_styles
|
25
|
-
whitelist = [ :title, :subtitle, :image, :remote_image, :accessory, :selection_style, :action, :arguments, :cell_style, :cell_class, :cell_identifier, :editing_style, :search_text, :keep_selection, :height ]
|
26
|
+
whitelist = [ :title, :subtitle, :image, :remote_image, :accessory, :selection_style, :action, :long_press_action, :arguments, :cell_style, :cell_class, :cell_identifier, :editing_style, :search_text, :keep_selection, :height, :accessory_type ]
|
26
27
|
if (data_cell.keys - whitelist).length > 0
|
27
|
-
PM.logger.deprecated("In #{self.table_screen.class.to_s}#table_data, you should set :#{(data_cell.keys - whitelist).join(", :")} in a `
|
28
|
+
PM.logger.deprecated("In #{self.table_screen.class.to_s}#table_data, you should set :#{(data_cell.keys - whitelist).join(", :")} in a `style:` hash. See TableScreen documentation.")
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
@@ -80,6 +81,10 @@ module ProMotion
|
|
80
81
|
self.selectionStyle = map_selection_style_symbol(data_cell[:selection_style]) if data_cell[:selection_style]
|
81
82
|
end
|
82
83
|
|
84
|
+
def set_accessory_type
|
85
|
+
self.accessoryType = map_accessory_type_symbol(data_cell[:accessory_type]) if data_cell[:accessory_type]
|
86
|
+
end
|
87
|
+
|
83
88
|
private
|
84
89
|
|
85
90
|
def jm_image_cache?
|
@@ -121,5 +126,15 @@ module ProMotion
|
|
121
126
|
default: UITableViewCellSelectionStyleDefault
|
122
127
|
}[symbol] || symbol
|
123
128
|
end
|
129
|
+
|
130
|
+
def map_accessory_type_symbol(symbol)
|
131
|
+
{
|
132
|
+
none: UITableViewCellAccessoryNone,
|
133
|
+
disclosure_indicator: UITableViewCellAccessoryDisclosureIndicator,
|
134
|
+
disclosure_button: UITableViewCellAccessoryDetailDisclosureButton,
|
135
|
+
checkmark: UITableViewCellAccessoryCheckmark,
|
136
|
+
detail_button: UITableViewCellAccessoryDetailButton
|
137
|
+
}[symbol] || symbol
|
138
|
+
end
|
124
139
|
end
|
125
140
|
end
|
data/lib/ProMotion/version.rb
CHANGED
@@ -13,7 +13,7 @@ describe "PM::TableViewCellModule" do
|
|
13
13
|
accessory: {
|
14
14
|
view: :switch, # currently only :switch is supported
|
15
15
|
value: true
|
16
|
-
},
|
16
|
+
},
|
17
17
|
image: {
|
18
18
|
image: UIImage.imageNamed("list"),
|
19
19
|
radius: 15
|
@@ -24,7 +24,8 @@ describe "PM::TableViewCellModule" do
|
|
24
24
|
masks_to_bounds: true
|
25
25
|
},
|
26
26
|
background_color: UIColor.redColor
|
27
|
-
}
|
27
|
+
},
|
28
|
+
accessory_type: :disclosure_indicator
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
@@ -136,6 +137,8 @@ describe "PM::TableViewCellModule" do
|
|
136
137
|
@subject.imageView.layer.cornerRadius.should == 15.0
|
137
138
|
end
|
138
139
|
|
139
|
-
|
140
|
-
|
140
|
+
it "should have the proper accessory type" do
|
141
|
+
@subject.accessoryType.should == UITableViewCellAccessoryDisclosureIndicator
|
142
|
+
end
|
141
143
|
|
144
|
+
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.
|
4
|
+
version: 2.0.0.rc2
|
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-06-
|
13
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: methadone
|