ProMotion 1.2.1 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -10
- data/lib/ProMotion.rb +11 -2
- data/lib/ProMotion/cocoatouch/ns_string.rb +5 -0
- data/lib/ProMotion/cocoatouch/ns_url.rb +5 -0
- data/lib/ProMotion/cocoatouch/tab_bar_controller.rb +5 -7
- data/lib/ProMotion/cocoatouch/table_view_cell.rb +0 -16
- data/lib/ProMotion/cocoatouch/table_view_controller.rb +2 -3
- data/lib/ProMotion/cocoatouch/view_controller.rb +3 -6
- data/lib/ProMotion/delegate/delegate.rb +0 -3
- data/lib/ProMotion/delegate/delegate_module.rb +24 -20
- data/lib/ProMotion/{containers → ipad}/split_screen.rb +30 -32
- data/lib/ProMotion/{logger.rb → logger/logger.rb} +6 -5
- data/lib/ProMotion/screen/nav_bar_module.rb +126 -0
- data/lib/ProMotion/screen/screen.rb +0 -3
- data/lib/ProMotion/screen/screen_module.rb +54 -177
- data/lib/ProMotion/screen/screen_navigation.rb +29 -40
- data/lib/ProMotion/{view → styling}/styling.rb +17 -47
- data/lib/ProMotion/table/cell/table_view_cell_module.rb +76 -123
- data/lib/ProMotion/table/data/table_data.rb +1 -1
- data/lib/ProMotion/table/extensions/longpressable.rb +24 -0
- data/lib/ProMotion/table/extensions/refreshable.rb +1 -0
- data/lib/ProMotion/table/grouped_table_screen.rb +0 -5
- data/lib/ProMotion/table/table.rb +63 -83
- data/lib/ProMotion/table/table_screen.rb +0 -4
- data/lib/ProMotion/{containers → tabs}/tabs.rb +20 -21
- data/lib/ProMotion/version.rb +1 -1
- data/lib/ProMotion/web/web_screen.rb +0 -4
- data/lib/ProMotion/web/web_screen_module.rb +8 -5
- data/spec/functional/func_screen_spec.rb +14 -18
- data/spec/functional/func_split_screen_spec.rb +2 -2
- data/spec/functional/func_table_screen_spec.rb +54 -40
- data/spec/functional/func_web_screen_spec.rb +12 -17
- data/spec/helpers/test_helper.rb +27 -0
- data/spec/unit/delegate_spec.rb +4 -67
- data/spec/unit/image_title_screen.rb +9 -0
- data/spec/unit/image_view_title_screen.rb +9 -0
- data/spec/unit/load_view_spec.rb +27 -0
- data/spec/unit/main_spec.rb +0 -6
- data/spec/unit/screen_helpers_spec.rb +23 -17
- data/spec/unit/screen_spec.rb +21 -17
- data/spec/unit/searchable_table_spec.rb +55 -0
- data/spec/unit/split_screen_in_tab_bar_spec.rb +5 -5
- data/spec/unit/split_screen_spec.rb +4 -4
- data/spec/unit/tab_bar_spec.rb +79 -0
- data/spec/unit/tab_spec.rb +11 -5
- data/spec/unit/tables/table_module_spec.rb +22 -8
- data/spec/unit/tables/table_screen_spec.rb +1 -1
- data/spec/unit/tables/table_view_cell_spec.rb +16 -16
- data/spec/unit/view_helper_spec.rb +6 -81
- data/spec/unit/view_title_screen.rb +10 -0
- data/spec/unit/web_spec.rb +31 -37
- metadata +37 -111
- data/.gitignore +0 -33
- data/.travis.yml +0 -4
- data/CONTRIBUTING.md +0 -20
- data/Gemfile +0 -5
- data/LICENSE +0 -22
- data/ProMotion.gemspec +0 -30
- data/Rakefile +0 -66
- data/app/app_delegate.rb +0 -7
- data/app/screens/basic_screen.rb +0 -15
- data/lib/ProMotion/delegate/delegate_notifications.rb +0 -70
- data/lib/ProMotion/extensions/conversions.rb +0 -20
- data/lib/ProMotion/map/map_screen.rb +0 -10
- data/lib/ProMotion/map/map_screen_annotation.rb +0 -65
- data/lib/ProMotion/map/map_screen_module.rb +0 -212
- data/lib/ProMotion/push_notification/push_notification.rb +0 -58
- data/resources/WebScreen.html +0 -6
- data/resources/list.png +0 -0
- data/resources/test.png +0 -0
- data/spec/functional/func_image_title_screen.rb +0 -20
- data/spec/functional/func_image_view_title_screen.rb +0 -20
- data/spec/functional/func_map_screen_spec.rb +0 -162
- data/spec/functional/func_searchable_table_spec.rb +0 -56
- data/spec/functional/func_tab_bar_spec.rb +0 -78
- data/spec/functional/func_view_title_screen.rb +0 -21
- data/spec/helpers/basic_screen.rb +0 -3
- data/spec/helpers/custom_title_view.rb +0 -4
- data/spec/helpers/detail_screen.rb +0 -3
- data/spec/helpers/dummy_class.rb +0 -3
- data/spec/helpers/functional_screen.rb +0 -15
- data/spec/helpers/home_screen.rb +0 -19
- data/spec/helpers/image_title_screen.rb +0 -15
- data/spec/helpers/image_view_title_screen.rb +0 -15
- data/spec/helpers/map_screen.rb +0 -53
- data/spec/helpers/master_screen.rb +0 -3
- data/spec/helpers/present_screen.rb +0 -26
- data/spec/helpers/screen_module_view_controller.rb +0 -55
- data/spec/helpers/tab_screen.rb +0 -4
- data/spec/helpers/table_screen.rb +0 -117
- data/spec/helpers/table_screen_indexable.rb +0 -18
- data/spec/helpers/table_screen_refreshable.rb +0 -11
- data/spec/helpers/table_screen_searchable.rb +0 -72
- data/spec/helpers/test_delegate.rb +0 -34
- data/spec/helpers/test_delegate_colors.rb +0 -17
- data/spec/helpers/view_title_screen.rb +0 -15
- data/spec/helpers/web_screen.rb +0 -23
- data/spec/unit/map_spec.rb +0 -71
@@ -1,34 +0,0 @@
|
|
1
|
-
class TestDelegate < ProMotion::Delegate
|
2
|
-
status_bar false
|
3
|
-
|
4
|
-
attr_accessor :called_on_load, :called_will_load, :called_on_activate, :called_will_deactivate, :called_on_enter_background, :called_will_enter_foreground, :called_on_unload
|
5
|
-
|
6
|
-
def on_load(app, options)
|
7
|
-
self.called_on_load = true
|
8
|
-
end
|
9
|
-
|
10
|
-
def will_load(application, launch_options)
|
11
|
-
self.called_will_load = true
|
12
|
-
end
|
13
|
-
|
14
|
-
def on_activate
|
15
|
-
self.called_on_activate = true
|
16
|
-
end
|
17
|
-
|
18
|
-
def will_deactivate
|
19
|
-
self.called_will_deactivate = true
|
20
|
-
end
|
21
|
-
|
22
|
-
def on_enter_background
|
23
|
-
self.called_on_enter_background = true
|
24
|
-
end
|
25
|
-
|
26
|
-
def will_enter_foreground
|
27
|
-
self.called_will_enter_foreground = true
|
28
|
-
end
|
29
|
-
|
30
|
-
def on_unload
|
31
|
-
self.called_on_unload = true
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class TestDelegateColored < TestDelegate
|
2
|
-
status_bar false
|
3
|
-
|
4
|
-
def on_load(app, options)
|
5
|
-
open BasicScreen.new(nav_bar: true)
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
class TestDelegateRed < TestDelegateColored
|
10
|
-
tint_color UIColor.redColor
|
11
|
-
end
|
12
|
-
|
13
|
-
# Other colors
|
14
|
-
|
15
|
-
# class TestDelegateBlack < TestDelegateColored
|
16
|
-
# tint_color UIColor.blackColor
|
17
|
-
# end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class ViewTitleScreen < PM::Screen
|
2
|
-
attr_accessor :button_was_triggered
|
3
|
-
|
4
|
-
title UIView.alloc.init
|
5
|
-
|
6
|
-
def will_appear
|
7
|
-
self.button_was_triggered = false
|
8
|
-
add UILabel.alloc.initWithFrame([[ 10, 10 ], [ 300, 40 ]]),
|
9
|
-
text: "Label Here"
|
10
|
-
end
|
11
|
-
|
12
|
-
def triggered_button
|
13
|
-
self.button_was_triggered = true
|
14
|
-
end
|
15
|
-
end
|
data/spec/helpers/web_screen.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
class TestWebScreen < PM::WebScreen
|
2
|
-
|
3
|
-
title "WebScreen Test"
|
4
|
-
|
5
|
-
# accesor for wait_change method which is testing helper
|
6
|
-
attr_accessor :is_load_started, :is_load_finished, :is_load_failed, :is_load_failed_error
|
7
|
-
|
8
|
-
# implementation of PM::WebScreen's hook
|
9
|
-
def load_started
|
10
|
-
self.is_load_started = true
|
11
|
-
end
|
12
|
-
|
13
|
-
def load_finished
|
14
|
-
self.is_load_finished = true
|
15
|
-
end
|
16
|
-
|
17
|
-
def load_failed(error)
|
18
|
-
puts "Load Failed: #{error.localizedDescription}"
|
19
|
-
puts error.localizedFailureReason
|
20
|
-
self.is_load_failed = true
|
21
|
-
self.is_load_failed_error = error
|
22
|
-
end
|
23
|
-
end
|
data/spec/unit/map_spec.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
describe "map properties" do
|
2
|
-
|
3
|
-
before do
|
4
|
-
# Simulate AppDelegate setup of map screen
|
5
|
-
@map = TestMapScreen.new modal: true, nav_bar: true
|
6
|
-
@map.view_will_appear(false)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "should store title" do
|
10
|
-
@map.get_title.should == "Gorges State Park, NC"
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should have 5 annotations" do
|
14
|
-
@map.annotations.count.should == 5
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should convert annotation hashes to MapViewAnnotations" do
|
18
|
-
@map.annotations.each do |annotation|
|
19
|
-
annotation.class.to_s.should == "NSKVONotifying_MapScreenAnnotation"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should add an annotation" do
|
24
|
-
ann = {
|
25
|
-
longitude: -82.966093558105,
|
26
|
-
latitude: 35.092520895652,
|
27
|
-
title: "Something Else"
|
28
|
-
}
|
29
|
-
@map.add_annotation(ann)
|
30
|
-
@map.annotations.count.should == 6
|
31
|
-
end
|
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
|
-
|
55
|
-
it "should clear annotations" do
|
56
|
-
@map.clear_annotations
|
57
|
-
@map.annotations.count.should == 0
|
58
|
-
end
|
59
|
-
|
60
|
-
# it "keeps breaking travis" do DELETED end
|
61
|
-
# it "should geocode an address" do
|
62
|
-
# @map.lookup_infinite_loop
|
63
|
-
# wait_for_change @map, 'infinite_loop_points' do
|
64
|
-
# placemarks = @map.infinite_loop_points
|
65
|
-
# placemarks.count.should == 1
|
66
|
-
# placemarks.first.postalCode.should == "95014"
|
67
|
-
# placemarks.first.description.include?("Cupertino").should == true
|
68
|
-
# end
|
69
|
-
# end
|
70
|
-
|
71
|
-
end
|