ProMotion 1.0.4 → 1.1.0.rc1
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/ProMotion.gemspec +3 -2
- data/README.md +10 -7
- data/app/screens/basic_screen.rb +12 -0
- data/bin/promotion +45 -0
- data/lib/ProMotion/cocoatouch/table_view_controller.rb +2 -2
- data/lib/ProMotion/cocoatouch/view_controller.rb +2 -2
- data/lib/ProMotion/containers/split_screen.rb +6 -1
- data/lib/ProMotion/containers/tabs.rb +12 -1
- data/lib/ProMotion/delegate/delegate_module.rb +16 -2
- data/lib/ProMotion/delegate/delegate_notifications.rb +7 -7
- data/lib/ProMotion/map/map_screen_annotation.rb +10 -1
- data/lib/ProMotion/map/map_screen_module.rb +8 -3
- data/lib/ProMotion/pro_motion.rb +1 -1
- data/lib/ProMotion/screen/screen_module.rb +35 -16
- data/lib/ProMotion/screen/screen_navigation.rb +11 -13
- data/lib/ProMotion/table/extensions/indexable.rb +2 -2
- data/lib/ProMotion/table/extensions/searchable.rb +4 -3
- data/lib/ProMotion/table/grouped_table.rb +7 -2
- data/lib/ProMotion/table/table.rb +54 -47
- data/lib/ProMotion/thirdparty/formotion_screen.rb +5 -3
- data/lib/ProMotion/version.rb +1 -1
- data/lib/ProMotion/view/styling.rb +33 -20
- data/resources/test.png +0 -0
- data/spec/functional/func_map_screen_spec.rb +60 -3
- data/spec/functional/func_screen_spec.rb +29 -6
- data/spec/functional/func_searchable_table_spec.rb +13 -1
- data/spec/functional/func_split_screen_spec.rb +8 -0
- data/spec/functional/func_table_screen_spec.rb +28 -23
- data/spec/functional/func_web_screen_spec.rb +1 -1
- data/spec/helpers/custom_title_view.rb +4 -0
- data/spec/helpers/home_screen.rb +6 -0
- data/spec/helpers/table_screen.rb +23 -27
- data/spec/helpers/table_screen_formotion.rb +5 -0
- data/spec/helpers/table_screen_searchable.rb +10 -0
- data/spec/helpers/test_delegate_colors.rb +17 -0
- data/spec/helpers/test_helper.rb +5 -0
- data/spec/unit/delegate_spec.rb +79 -1
- data/spec/unit/map_spec.rb +22 -0
- data/spec/unit/screen_helpers_spec.rb +44 -35
- data/spec/unit/screen_spec.rb +45 -6
- data/spec/unit/split_screen_open_screen_spec.rb +1 -1
- data/spec/unit/tables/formotion_screen_spec.rb +6 -0
- data/spec/unit/tables/table_module_spec.rb +28 -2
- data/spec/unit/tables/table_view_cell_spec.rb +5 -4
- data/spec/unit/view_helper_spec.rb +21 -10
- metadata +28 -6
- data/resources/test.jpeg +0 -0
data/spec/unit/map_spec.rb
CHANGED
@@ -30,6 +30,28 @@ describe "map properties" do
|
|
30
30
|
@map.annotations.count.should == 6
|
31
31
|
end
|
32
32
|
|
33
|
+
it "should return custom annotation parameters" do
|
34
|
+
ann = {
|
35
|
+
longitude: -82.966093558105,
|
36
|
+
latitude: 35.092520895652,
|
37
|
+
title: "Custom",
|
38
|
+
another_value: "Mark"
|
39
|
+
}
|
40
|
+
@map.add_annotation(ann)
|
41
|
+
@map.annotations.last.another_value.should == "Mark"
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should return nil for custom annotation parameters that don't exist" do
|
45
|
+
ann = {
|
46
|
+
longitude: -82.966093558105,
|
47
|
+
latitude: 35.092520895652,
|
48
|
+
title: "Custom",
|
49
|
+
another_value: "Mark"
|
50
|
+
}
|
51
|
+
@map.add_annotation(ann)
|
52
|
+
@map.annotations.last.another_value_fake.should == nil
|
53
|
+
end
|
54
|
+
|
33
55
|
it "should clear annotations" do
|
34
56
|
@map.clear_annotations
|
35
57
|
@map.annotations.count.should == 0
|
@@ -18,18 +18,40 @@ describe "screen helpers" do
|
|
18
18
|
@screen.view.subviews.first.backgroundColor.should == UIColor.redColor
|
19
19
|
end
|
20
20
|
|
21
|
+
it "should set attributes using a symbol" do
|
22
|
+
@screen.add @subview, :subview_styles
|
23
|
+
@screen.view.subviews.first.backgroundColor.should == UIColor.greenColor
|
24
|
+
end
|
25
|
+
|
21
26
|
it "should let you remove a view" do
|
22
27
|
@screen.view.addSubview @subview
|
23
28
|
@screen.remove @subview
|
24
29
|
@screen.view.subviews.count.should == 0
|
25
30
|
end
|
26
31
|
|
32
|
+
it "should let you remove an array of subviews" do
|
33
|
+
subview_a = UIView.alloc.initWithFrame CGRectZero
|
34
|
+
subview_b = UIView.alloc.initWithFrame CGRectZero
|
35
|
+
@screen.view.addSubview subview_a
|
36
|
+
@screen.view.addSubview subview_b
|
37
|
+
@screen.remove [subview_a, subview_b]
|
38
|
+
@screen.view.subviews.count.should == 0
|
39
|
+
end
|
40
|
+
|
27
41
|
it "should add a subview to another element" do
|
28
42
|
sub_subview = UIView.alloc.initWithFrame CGRectZero
|
29
43
|
@screen.add_to @subview, sub_subview
|
30
44
|
@subview.subviews.include?(sub_subview).should == true
|
31
45
|
end
|
32
46
|
|
47
|
+
it "should add an array of subviews to another element" do
|
48
|
+
sub_subview_a = UIView.alloc.initWithFrame CGRectZero
|
49
|
+
sub_subview_b = UIView.alloc.initWithFrame CGRectZero
|
50
|
+
@screen.add_to @subview, [sub_subview_a, sub_subview_b]
|
51
|
+
@subview.subviews.include?(sub_subview_a).should == true
|
52
|
+
@subview.subviews.include?(sub_subview_b).should == true
|
53
|
+
end
|
54
|
+
|
33
55
|
it "should add a subview to another element with attributes" do
|
34
56
|
sub_subview = UIView.alloc.initWithFrame CGRectZero
|
35
57
|
@screen.add_to @subview, sub_subview, { backgroundColor: UIColor.redColor }
|
@@ -44,38 +66,27 @@ describe "screen helpers" do
|
|
44
66
|
@screen = HomeScreen.new(nav_bar: true)
|
45
67
|
end
|
46
68
|
|
47
|
-
it "should add a left nav bar button" do
|
48
|
-
@screen.set_nav_bar_button :left, title: "Save", action: :save_something, type: UIBarButtonItemStyleDone
|
49
|
-
@screen.navigationItem.leftBarButtonItem.class.should == UIBarButtonItem
|
50
|
-
end
|
51
69
|
|
52
|
-
|
53
|
-
|
54
|
-
@screen.navigationItem.rightBarButtonItem.class.should == UIBarButtonItem
|
55
|
-
end
|
70
|
+
[:left, :right, :back].each do |placement|
|
71
|
+
buttonItemMethod = :"#{placement}BarButtonItem"
|
56
72
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
@screen.navigationItem.rightBarButtonItem.image.should == image
|
62
|
-
end
|
73
|
+
it "should add a #{placement} nav bar button" do
|
74
|
+
@screen.set_nav_bar_button placement, title: "Save", action: :save_something, type: UIBarButtonItemStyleDone
|
75
|
+
@screen.navigationItem.send(buttonItemMethod).class.should == UIBarButtonItem
|
76
|
+
end
|
63
77
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
78
|
+
it "should add an image #{placement} nav bar button" do
|
79
|
+
image = UIImage.imageNamed("list.png")
|
80
|
+
@screen.set_nav_bar_button placement, image: image, action: :return_to_some_other_screen, type: UIBarButtonItemStylePlain
|
81
|
+
@screen.navigationItem.send(buttonItemMethod).image.class.should == UIImage
|
82
|
+
@screen.navigationItem.send(buttonItemMethod).image.should == image
|
83
|
+
end
|
70
84
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
85
|
+
it "should add a #{placement} UIBarButtonItem" do
|
86
|
+
@screen.set_nav_bar_button placement, system_item: :add
|
87
|
+
@screen.navigationItem.send(buttonItemMethod).class.should == UIBarButtonItem
|
88
|
+
end
|
75
89
|
|
76
|
-
it "should add a right UIBarButtonItem" do
|
77
|
-
@screen.set_nav_bar_button :right, system_item: :add
|
78
|
-
@screen.navigationItem.rightBarButtonItem.class.should == UIBarButtonItem
|
79
90
|
end
|
80
91
|
end
|
81
92
|
|
@@ -88,9 +99,9 @@ describe "screen helpers" do
|
|
88
99
|
end
|
89
100
|
|
90
101
|
it "#push_view_controller should use the default navigation controller if not provided" do
|
91
|
-
vcs = @screen.
|
102
|
+
vcs = @screen.navigationController.viewControllers
|
92
103
|
@screen.push_view_controller @second_vc
|
93
|
-
@screen.
|
104
|
+
@screen.navigationController.viewControllers.count.should == vcs.count + 1
|
94
105
|
end
|
95
106
|
|
96
107
|
it "#push_view_controller should use a provided navigation controller" do
|
@@ -153,7 +164,7 @@ describe "screen helpers" do
|
|
153
164
|
screen = @screen.open BasicScreen, modal: true
|
154
165
|
screen.should.be.kind_of BasicScreen
|
155
166
|
end
|
156
|
-
|
167
|
+
|
157
168
|
it "should present a modal screen if open_modal is used" do
|
158
169
|
@screen.mock!(:present_modal_view_controller) do |screen, animated|
|
159
170
|
screen.should.be.instance_of BasicScreen
|
@@ -185,18 +196,16 @@ describe "screen helpers" do
|
|
185
196
|
end
|
186
197
|
|
187
198
|
it "should pop onto navigation controller if current screen is on nav stack already" do
|
188
|
-
@screen.mock!(:push_view_controller) { |vc| vc.should.be.instance_of BasicScreen }
|
199
|
+
@screen.mock!(:push_view_controller) { |vc, n, a| vc.should.be.instance_of BasicScreen }
|
189
200
|
screen = @screen.open BasicScreen
|
190
201
|
screen.should.be.kind_of BasicScreen
|
191
202
|
end
|
192
|
-
|
203
|
+
|
193
204
|
it "should ignore its own navigation controller if current screen has a navigation controller" do
|
194
205
|
basic = BasicScreen.new(nav_bar: true) # creates a dangling nav_bar that will be discarded.
|
195
206
|
screen = @screen.open basic
|
196
207
|
screen.should.be.kind_of BasicScreen
|
197
208
|
basic.navigationController.should == @screen.navigationController
|
198
|
-
basic.navigation_controller.should == @screen.navigationController
|
199
|
-
@screen.navigation_controller.should == @screen.navigationController
|
200
209
|
end
|
201
210
|
|
202
211
|
it "should open the provided view controller as root view if no other conditions are met" do
|
@@ -252,7 +261,7 @@ describe "screen helpers" do
|
|
252
261
|
end
|
253
262
|
|
254
263
|
it "#close should pop from the navigation controller" do
|
255
|
-
@screen.
|
264
|
+
@screen.navigationController.mock!(:popViewControllerAnimated) { |animated| animated.should == true }
|
256
265
|
@screen.close
|
257
266
|
end
|
258
267
|
|
data/spec/unit/screen_spec.rb
CHANGED
@@ -25,7 +25,7 @@ describe "screen properties" do
|
|
25
25
|
@screen.title = "instance method"
|
26
26
|
HomeScreen.get_title.should != 'instance method'
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
it "should set the tab bar item with a system icon" do
|
30
30
|
@screen.set_tab_bar_item system_icon: :contacts
|
31
31
|
comparison = UITabBarItem.alloc.initWithTabBarSystemItem(UITabBarSystemItemContacts, tag: 0)
|
@@ -36,10 +36,10 @@ describe "screen properties" do
|
|
36
36
|
|
37
37
|
it "should set the tab bar item with a custom icon and title" do
|
38
38
|
@screen.set_tab_bar_item title: "My Screen", icon: "list"
|
39
|
-
|
39
|
+
|
40
40
|
icon_image = UIImage.imageNamed("list")
|
41
41
|
comparison = UITabBarItem.alloc.initWithTitle("My Screen", image: icon_image, tag: 0)
|
42
|
-
|
42
|
+
|
43
43
|
@screen.tabBarItem.systemItem.should == comparison.systemItem
|
44
44
|
@screen.tabBarItem.tag.should == comparison.tag
|
45
45
|
@screen.tabBarItem.image.should == comparison.image
|
@@ -134,8 +134,7 @@ describe "screen properties" do
|
|
134
134
|
@screen.nav_bar?.should == true
|
135
135
|
end
|
136
136
|
|
137
|
-
it "#
|
138
|
-
@screen.navigation_controller.should.be.instance_of ProMotion::NavigationController
|
137
|
+
it "#navigationController should return a navigation controller" do
|
139
138
|
@screen.navigationController.should.be.instance_of ProMotion::NavigationController
|
140
139
|
end
|
141
140
|
|
@@ -197,6 +196,18 @@ describe "screen properties" do
|
|
197
196
|
end
|
198
197
|
end
|
199
198
|
|
199
|
+
describe 'custom view bar buttons' do
|
200
|
+
before do
|
201
|
+
@activity = UIActivityIndicatorView.alloc.initWithActivityIndicatorStyle(UIActivityIndicatorViewStyleWhite)
|
202
|
+
@screen.set_nav_bar_button :right, {custom_view: @activity}
|
203
|
+
end
|
204
|
+
|
205
|
+
it "has a right bar button item of the correct type" do
|
206
|
+
@screen.navigationItem.rightBarButtonItem.should.be.instance_of UIBarButtonItem
|
207
|
+
@screen.navigationItem.rightBarButtonItem.customView.should.be.instance_of UIActivityIndicatorView
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
200
211
|
end
|
201
212
|
|
202
213
|
end
|
@@ -211,10 +222,38 @@ describe "screen with toolbar" do
|
|
211
222
|
end
|
212
223
|
|
213
224
|
it "hidden" do
|
214
|
-
# Simulate AppDelegate setup of main screen
|
215
225
|
screen = HomeScreen.new modal: true, nav_bar: true, toolbar: false
|
216
226
|
screen.on_load
|
217
227
|
screen.navigationController.toolbarHidden?.should == true
|
218
228
|
end
|
219
229
|
|
230
|
+
it "adds a single item" do
|
231
|
+
screen = HomeScreen.new modal: true, nav_bar: true, toolbar: true
|
232
|
+
screen.on_load
|
233
|
+
screen.set_toolbar_button([{title: "Testing Toolbar"}])
|
234
|
+
|
235
|
+
screen.navigationController.toolbar.items.should.be.instance_of Array
|
236
|
+
screen.navigationController.toolbar.items.count.should == 1
|
237
|
+
screen.navigationController.toolbar.items.first.should.be.instance_of UIBarButtonItem
|
238
|
+
screen.navigationController.toolbar.items.first.title.should == "Testing Toolbar"
|
239
|
+
end
|
240
|
+
|
241
|
+
it "adds multiple items" do
|
242
|
+
screen = HomeScreen.new modal: true, nav_bar: true, toolbar: true
|
243
|
+
screen.set_toolbar_buttons [{title: "Testing Toolbar"}, {title: "Another Test"}]
|
244
|
+
|
245
|
+
screen.navigationController.toolbar.items.should.be.instance_of Array
|
246
|
+
screen.navigationController.toolbar.items.count.should == 2
|
247
|
+
screen.navigationController.toolbar.items.first.title.should == "Testing Toolbar"
|
248
|
+
screen.navigationController.toolbar.items.last.title.should == "Another Test"
|
249
|
+
end
|
250
|
+
|
251
|
+
it "shows the toolbar when setting items" do
|
252
|
+
screen = HomeScreen.new modal: true, nav_bar: true, toolbar: false
|
253
|
+
screen.on_load
|
254
|
+
screen.navigationController.toolbarHidden?.should == true
|
255
|
+
screen.set_toolbar_button([{title: "Testing Toolbar"}], false)
|
256
|
+
screen.navigationController.toolbarHidden?.should == false
|
257
|
+
end
|
220
258
|
end
|
259
|
+
|
@@ -48,7 +48,7 @@ describe "split screen `open` functionality" do
|
|
48
48
|
home = HomeScreen.new(nav_bar: true)
|
49
49
|
child = BasicScreen.new
|
50
50
|
screen = home.open child, in_detail: true, in_master: true
|
51
|
-
home.
|
51
|
+
home.navigationController.topViewController.should == child
|
52
52
|
screen.should == child
|
53
53
|
end
|
54
54
|
|
@@ -13,4 +13,10 @@ describe "PM::FormotionScreen" do
|
|
13
13
|
@screen.title.should == "Formotion Test"
|
14
14
|
end
|
15
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
|
+
|
16
22
|
end
|
@@ -43,6 +43,10 @@ describe "PM::Table module" do
|
|
43
43
|
title: "Table cell group 3", cells: [ cell_factory(title: "3-1"), cell_factory(title: "3-2", background_color: UIColor.blueColor) ]
|
44
44
|
},{
|
45
45
|
title: "Table cell group 4", cells: [ custom_cell, cell_factory(title: "4-2"), cell_factory(title: "4-3"), cell_factory(title: "4-4") ]
|
46
|
+
},{
|
47
|
+
title: "Custom section title 1", title_view: CustomTitleView, cells: [ ]
|
48
|
+
},{
|
49
|
+
title: "Custom section title 2", title_view: CustomTitleView.new, title_view_height: 50, cells: [ ]
|
46
50
|
}]
|
47
51
|
end
|
48
52
|
|
@@ -55,7 +59,7 @@ describe "PM::Table module" do
|
|
55
59
|
end
|
56
60
|
|
57
61
|
it "should have the right number of sections" do
|
58
|
-
@subject.numberOfSectionsInTableView(@subject.table_view).should ==
|
62
|
+
@subject.numberOfSectionsInTableView(@subject.table_view).should == 6
|
59
63
|
end
|
60
64
|
|
61
65
|
it "should set the section titles" do
|
@@ -63,6 +67,8 @@ describe "PM::Table module" do
|
|
63
67
|
@subject.tableView(@subject.table_view, titleForHeaderInSection:1).should == "Table cell group 2"
|
64
68
|
@subject.tableView(@subject.table_view, titleForHeaderInSection:2).should == "Table cell group 3"
|
65
69
|
@subject.tableView(@subject.table_view, titleForHeaderInSection:3).should == "Table cell group 4"
|
70
|
+
@subject.tableView(@subject.table_view, titleForHeaderInSection:4).should == "Custom section title 1"
|
71
|
+
@subject.tableView(@subject.table_view, titleForHeaderInSection:5).should == "Custom section title 2"
|
66
72
|
end
|
67
73
|
|
68
74
|
it "should create the right number of cells" do
|
@@ -70,6 +76,8 @@ describe "PM::Table module" do
|
|
70
76
|
@subject.tableView(@subject.table_view, numberOfRowsInSection:1).should == 1
|
71
77
|
@subject.tableView(@subject.table_view, numberOfRowsInSection:2).should == 2
|
72
78
|
@subject.tableView(@subject.table_view, numberOfRowsInSection:3).should == 4
|
79
|
+
@subject.tableView(@subject.table_view, numberOfRowsInSection:4).should == 0
|
80
|
+
@subject.tableView(@subject.table_view, numberOfRowsInSection:5).should == 0
|
73
81
|
end
|
74
82
|
|
75
83
|
it "should create the jumplist" do
|
@@ -102,7 +110,7 @@ describe "PM::Table module" do
|
|
102
110
|
|
103
111
|
@subject.tableView(@subject.table_view, didSelectRowAtIndexPath:@custom_ip)
|
104
112
|
end
|
105
|
-
|
113
|
+
|
106
114
|
it "should set a custom cell background image" do
|
107
115
|
@image.should.not.be.nil
|
108
116
|
ip = NSIndexPath.indexPathForRow(0, inSection: 3) # Cell 2-1
|
@@ -119,4 +127,22 @@ describe "PM::Table module" do
|
|
119
127
|
cell.backgroundColor.should == UIColor.blueColor
|
120
128
|
end
|
121
129
|
|
130
|
+
describe("section with custom title_view") do
|
131
|
+
|
132
|
+
it "should use the correct class for section view" do
|
133
|
+
cell = @subject.tableView(@subject.table_view, viewForHeaderInSection: 4)
|
134
|
+
cell.should.be.kind_of(CustomTitleView)
|
135
|
+
end
|
136
|
+
|
137
|
+
it "should use the default section height if none is specified" do
|
138
|
+
header_height = (UIDevice.currentDevice.systemVersion.to_f >= 7.0) ? 23.0 : 22.0
|
139
|
+
@subject.tableView(@subject.table_view, heightForHeaderInSection:4).should == header_height # Built-in default
|
140
|
+
end
|
141
|
+
|
142
|
+
it "should use the set title_view_height if one is specified" do
|
143
|
+
@subject.tableView(@subject.table_view, heightForHeaderInSection:5).should == 50.0
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
122
148
|
end
|
@@ -111,7 +111,7 @@ describe "PM::TableViewCellModule" do
|
|
111
111
|
it "should set the accessory view to a button" do
|
112
112
|
ip = NSIndexPath.indexPathForRow(2, inSection: 1)
|
113
113
|
subject = @screen.tableView(@screen.table_view, cellForRowAtIndexPath: ip)
|
114
|
-
subject.accessoryView.should.be.kind_of(
|
114
|
+
subject.accessoryView.should.be.kind_of(UIButton)
|
115
115
|
end
|
116
116
|
|
117
117
|
it "should set the accessory type to edit" do
|
@@ -128,9 +128,10 @@ describe "PM::TableViewCellModule" do
|
|
128
128
|
end
|
129
129
|
|
130
130
|
it "should create two extra subviews" do
|
131
|
-
@subject.subviews.
|
132
|
-
|
133
|
-
|
131
|
+
content_view = TestHelper.ios7 ? @subject.subviews.first : @subject
|
132
|
+
content_view.subviews.length.should == 3
|
133
|
+
content_view.subviews[1].class.should == UIView
|
134
|
+
content_view.subviews[2].class.should == UILabel
|
134
135
|
end
|
135
136
|
|
136
137
|
|
@@ -79,7 +79,7 @@ describe "view helpers" do
|
|
79
79
|
before do
|
80
80
|
@dummy = UIView.alloc.initWithFrame CGRectZero
|
81
81
|
@dummy.extend ProMotion::Styling
|
82
|
-
|
82
|
+
|
83
83
|
@parent = UIView.alloc.initWithFrame(CGRectMake(0, 0, 320, 480))
|
84
84
|
@child = UIView.alloc.initWithFrame(CGRectZero)
|
85
85
|
end
|
@@ -89,11 +89,11 @@ describe "view helpers" do
|
|
89
89
|
resize: [:left, :right, :top, :bottom, :width, :height]
|
90
90
|
}
|
91
91
|
|
92
|
-
mask = UIViewAutoresizingFlexibleLeftMargin |
|
93
|
-
UIViewAutoresizingFlexibleRightMargin |
|
94
|
-
UIViewAutoresizingFlexibleTopMargin |
|
95
|
-
UIViewAutoresizingFlexibleBottomMargin |
|
96
|
-
UIViewAutoresizingFlexibleWidth |
|
92
|
+
mask = UIViewAutoresizingFlexibleLeftMargin |
|
93
|
+
UIViewAutoresizingFlexibleRightMargin |
|
94
|
+
UIViewAutoresizingFlexibleTopMargin |
|
95
|
+
UIViewAutoresizingFlexibleBottomMargin |
|
96
|
+
UIViewAutoresizingFlexibleWidth |
|
97
97
|
UIViewAutoresizingFlexibleHeight
|
98
98
|
|
99
99
|
@child.autoresizingMask.should == mask
|
@@ -104,8 +104,8 @@ describe "view helpers" do
|
|
104
104
|
resize: [:left, :right, :top]
|
105
105
|
}
|
106
106
|
|
107
|
-
mask = UIViewAutoresizingFlexibleLeftMargin |
|
108
|
-
UIViewAutoresizingFlexibleRightMargin |
|
107
|
+
mask = UIViewAutoresizingFlexibleLeftMargin |
|
108
|
+
UIViewAutoresizingFlexibleRightMargin |
|
109
109
|
UIViewAutoresizingFlexibleTopMargin
|
110
110
|
|
111
111
|
@child.autoresizingMask.should == mask
|
@@ -116,8 +116,8 @@ describe "view helpers" do
|
|
116
116
|
resize: [:bottom, :width, :height]
|
117
117
|
}
|
118
118
|
|
119
|
-
mask = UIViewAutoresizingFlexibleBottomMargin |
|
120
|
-
UIViewAutoresizingFlexibleWidth |
|
119
|
+
mask = UIViewAutoresizingFlexibleBottomMargin |
|
120
|
+
UIViewAutoresizingFlexibleWidth |
|
121
121
|
UIViewAutoresizingFlexibleHeight
|
122
122
|
|
123
123
|
@child.autoresizingMask.should == mask
|
@@ -142,6 +142,17 @@ describe "view helpers" do
|
|
142
142
|
@child.frame.should == CGRectMake(10, 20, 100, 50)
|
143
143
|
end
|
144
144
|
|
145
|
+
it "Should create a frame with x & y" do
|
146
|
+
@dummy.set_easy_attributes @parent, @child, {
|
147
|
+
x: 10,
|
148
|
+
y: 20,
|
149
|
+
width: 100,
|
150
|
+
height: 50
|
151
|
+
}
|
152
|
+
|
153
|
+
@child.frame.should == CGRectMake(10, 20, 100, 50)
|
154
|
+
end
|
155
|
+
|
145
156
|
end
|
146
157
|
|
147
158
|
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.0.
|
4
|
+
version: 1.1.0.rc1
|
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-
|
13
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: webstub
|
@@ -82,12 +82,27 @@ dependencies:
|
|
82
82
|
- - '>='
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: methadone
|
87
|
+
requirement: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
type: :runtime
|
93
|
+
prerelease: false
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
85
99
|
description: ProMotion is a new way to easily build RubyMotion iOS apps.
|
86
100
|
email:
|
87
101
|
- jamon@clearsightstudio.com
|
88
102
|
- silas@clearsightstudio.com
|
89
103
|
- contact@clearsightstudio.com
|
90
|
-
executables:
|
104
|
+
executables:
|
105
|
+
- promotion
|
91
106
|
extensions: []
|
92
107
|
extra_rdoc_files: []
|
93
108
|
files:
|
@@ -101,6 +116,7 @@ files:
|
|
101
116
|
- Rakefile
|
102
117
|
- app/app_delegate.rb
|
103
118
|
- app/screens/basic_screen.rb
|
119
|
+
- bin/promotion
|
104
120
|
- lib/ProMotion.rb
|
105
121
|
- lib/ProMotion/cocoatouch/navigation_controller.rb
|
106
122
|
- lib/ProMotion/cocoatouch/split_view_controller.rb
|
@@ -140,7 +156,7 @@ files:
|
|
140
156
|
- lib/ProMotion/web/web_screen_module.rb
|
141
157
|
- resources/WebScreen.html
|
142
158
|
- resources/list.png
|
143
|
-
- resources/test.
|
159
|
+
- resources/test.png
|
144
160
|
- spec/functional/func_map_screen_spec.rb
|
145
161
|
- spec/functional/func_screen_spec.rb
|
146
162
|
- spec/functional/func_searchable_table_spec.rb
|
@@ -149,6 +165,7 @@ files:
|
|
149
165
|
- spec/functional/func_table_screen_spec.rb
|
150
166
|
- spec/functional/func_web_screen_spec.rb
|
151
167
|
- spec/helpers/basic_screen.rb
|
168
|
+
- spec/helpers/custom_title_view.rb
|
152
169
|
- spec/helpers/detail_screen.rb
|
153
170
|
- spec/helpers/dummy_class.rb
|
154
171
|
- spec/helpers/functional_screen.rb
|
@@ -164,6 +181,8 @@ files:
|
|
164
181
|
- spec/helpers/table_screen_refreshable.rb
|
165
182
|
- spec/helpers/table_screen_searchable.rb
|
166
183
|
- spec/helpers/test_delegate.rb
|
184
|
+
- spec/helpers/test_delegate_colors.rb
|
185
|
+
- spec/helpers/test_helper.rb
|
167
186
|
- spec/helpers/web_screen.rb
|
168
187
|
- spec/unit/delegate_spec.rb
|
169
188
|
- spec/unit/logger_spec.rb
|
@@ -198,9 +217,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
217
|
version: '0'
|
199
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
219
|
requirements:
|
201
|
-
- - '
|
220
|
+
- - '>'
|
202
221
|
- !ruby/object:Gem::Version
|
203
|
-
version:
|
222
|
+
version: 1.3.1
|
204
223
|
requirements: []
|
205
224
|
rubyforge_project:
|
206
225
|
rubygems_version: 2.0.3
|
@@ -219,6 +238,7 @@ test_files:
|
|
219
238
|
- spec/functional/func_table_screen_spec.rb
|
220
239
|
- spec/functional/func_web_screen_spec.rb
|
221
240
|
- spec/helpers/basic_screen.rb
|
241
|
+
- spec/helpers/custom_title_view.rb
|
222
242
|
- spec/helpers/detail_screen.rb
|
223
243
|
- spec/helpers/dummy_class.rb
|
224
244
|
- spec/helpers/functional_screen.rb
|
@@ -234,6 +254,8 @@ test_files:
|
|
234
254
|
- spec/helpers/table_screen_refreshable.rb
|
235
255
|
- spec/helpers/table_screen_searchable.rb
|
236
256
|
- spec/helpers/test_delegate.rb
|
257
|
+
- spec/helpers/test_delegate_colors.rb
|
258
|
+
- spec/helpers/test_helper.rb
|
237
259
|
- spec/helpers/web_screen.rb
|
238
260
|
- spec/unit/delegate_spec.rb
|
239
261
|
- spec/unit/logger_spec.rb
|