ProMotion 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,5 @@
1
1
  module ProMotion
2
2
  module GroupedTable
3
- include ProMotion::Table
4
-
5
3
  def table_style
6
4
  UITableViewStyleGrouped
7
5
  end
@@ -1,6 +1,7 @@
1
1
  module ProMotion
2
2
  class GroupedTableScreen < TableViewController
3
3
  include ProMotion::ScreenModule
4
+ include ProMotion::Table
4
5
  include ProMotion::GroupedTable
5
6
  end
6
7
  end
@@ -60,6 +60,7 @@ module ProMotion
60
60
  end
61
61
 
62
62
  def update_table_view_data(data)
63
+ create_table_view_from_data(data) unless @promotion_table_data
63
64
  @promotion_table_data.data = data
64
65
  table_view.reloadData
65
66
  end
@@ -104,7 +105,7 @@ module ProMotion
104
105
 
105
106
  def delete_row(index_paths, animation = nil)
106
107
  animation = map_row_animation_symbol(animation)
107
- index_paths = Array(index_paths)
108
+ index_paths = [index_paths] if index_paths.kind_of?(NSIndexPath)
108
109
  deletable_index_paths = []
109
110
 
110
111
  index_paths.each do |index_path|
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "1.0.1" unless defined?(ProMotion::VERSION)
2
+ VERSION = "1.0.2" unless defined?(ProMotion::VERSION)
3
3
  end
@@ -95,4 +95,21 @@ describe "table screens" do
95
95
 
96
96
  end
97
97
 
98
+ describe 'test PM::TableScreen\'s method call order' do
99
+ before do
100
+ class MethodCallOrderTestTableScreen < PM::TableScreen
101
+ def table_data; @table_data ||= []; end
102
+ def on_load
103
+ @table_data = [{cells: [ title: 'cell 1' ]}]
104
+ update_table_data
105
+ end
106
+ end
107
+ end
108
+
109
+ it 'should not raise error at load view' do
110
+ proc { @screen = MethodCallOrderTestTableScreen.new }.should.not.raise(NoMethodError)
111
+ end
112
+ end
113
+
98
114
  end
115
+
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.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-07-16 00:00:00.000000000 Z
14
+ date: 2013-07-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: webstub