ProMotion 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 602b5c98e83522111d9b53bddef00fc265d7e190
4
+ data.tar.gz: 22427e49f5b04332fceb59b721b014a380402151
5
+ SHA512:
6
+ metadata.gz: 8ef6b7a74482a7695a76b7745586cc79bb28974a2ad77cdd44a52b6d38208baf27ab49649fdc5e79efebd2febafcf444f61935303eb9b4a3a59b031a0639d2db
7
+ data.tar.gz: f9766e5e2568e7ca49fd21032de3a0e999541d4dff0abe8f38490a18ed0dfd39470563da0ac6dcffc12259c2baaeb09da9457760479e91b57e6e16a667fb3eb9
data/.gitignore CHANGED
@@ -23,4 +23,11 @@ tmp
23
23
  .ruby-version
24
24
  .DS_Store
25
25
  .dat*
26
- .rake_tasks*
26
+ .rake_tasks*
27
+
28
+ # IDE / editor files
29
+ .idea/
30
+ *.tmproj
31
+ *.tmproject
32
+ tmtags
33
+ *.sublime-workspace
data/README.md CHANGED
@@ -55,7 +55,7 @@ end
55
55
 
56
56
  # Getting Started
57
57
 
58
- Check out our new [Getting Started Guide](https://github.com/clearsightstudio/ProMotion/wiki/Getting-Started-Guide) in the wiki!
58
+ Check out our new [Getting Started Guide](https://github.com/clearsightstudio/ProMotion/wiki/Guide:-Getting-Started) in the wiki!
59
59
 
60
60
  # What's New?
61
61
 
@@ -5,8 +5,9 @@ end
5
5
  require "ProMotion/version"
6
6
 
7
7
  Motion::Project::App.setup do |app|
8
+ app.detect_dependencies = true
8
9
  original_files = app.files
9
10
  delegate = File.join(File.dirname(__FILE__), 'ProMotion/delegate/delegate.rb')
10
11
  promotion_files = FileList[File.join(File.dirname(__FILE__), 'ProMotion/**/*.rb')].exclude(delegate).to_a
11
12
  app.files = (promotion_files << delegate) + original_files
12
- end
13
+ end
@@ -35,8 +35,10 @@ module ProMotion
35
35
  return UITabBarItem.alloc.initWithTabBarSystemItem(icon, tag: tag)
36
36
  end
37
37
 
38
- def create_tab_bar_icon_custom(title, image_name, tag)
39
- icon_image = UIImage.imageNamed(image_name)
38
+ def create_tab_bar_icon_custom(title, icon_image, tag)
39
+ if icon_image.is_a?(String)
40
+ icon_image = UIImage.imageNamed(icon_image)
41
+ end
40
42
  return UITabBarItem.alloc.initWithTitle(title, image:icon_image, tag:tag)
41
43
  end
42
44
 
@@ -1,8 +1,12 @@
1
1
  module ProMotion
2
2
  module Table
3
3
  module Indexable
4
- def index_from_section_titles
5
- @promotion_table_data.filtered ? nil : @promotion_table_data.sections.collect{ |section| section[:title][0] }
4
+ def table_data_index
5
+ return nil if @promotion_table_data.filtered || !self.class.get_indexable
6
+
7
+ index = @promotion_table_data.sections.collect{ |section| section[:title][0] }
8
+ index.unshift("{search}") if self.class.get_searchable
9
+ index
6
10
  end
7
11
  end
8
12
  end
@@ -180,16 +180,12 @@ module ProMotion
180
180
 
181
181
  # Set table_data_index if you want the right hand index column (jumplist)
182
182
  def sectionIndexTitlesForTableView(table_view)
183
- if @promotion_table_data.filtered
184
- nil
183
+ return nil if @promotion_table_data.filtered
184
+
185
+ if self.respond_to?(:table_data_index)
186
+ self.table_data_index
185
187
  else
186
- if self.respond_to?(:table_data_index)
187
- self.table_data_index
188
- elsif self.class.respond_to?(:get_indexable) && self.class.get_indexable
189
- self.index_from_section_titles
190
- else
191
- nil
192
- end
188
+ nil
193
189
  end
194
190
  end
195
191
 
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "1.0.3" unless defined?(ProMotion::VERSION)
2
+ VERSION = "1.0.4" unless defined?(ProMotion::VERSION)
3
3
  end
@@ -11,3 +11,8 @@ class TableScreenIndexable < PM::TableScreen
11
11
  end
12
12
 
13
13
  end
14
+
15
+ class TableScreenIndexableSearchable < TableScreenIndexable
16
+ indexable
17
+ searchable
18
+ end
@@ -1,12 +1,25 @@
1
- describe "PM::Table module" do
2
-
1
+ describe "PM::Table module indexable" do
2
+
3
3
  before do
4
4
  @screen = TableScreenIndexable.new
5
5
  end
6
-
6
+
7
7
  it "should automatically return the first letter of each section" do
8
8
  result = %w{ A G M O S U }
9
9
  @screen.sectionIndexTitlesForTableView(@screen.table_view).should == result
10
10
  end
11
11
 
12
12
  end
13
+
14
+ describe "PM::Table module indexable/searchable" do
15
+
16
+ before do
17
+ @screen = TableScreenIndexableSearchable.new
18
+ end
19
+
20
+ it "should automatically return the first letter of each section" do
21
+ result = %w{ {search} A G M O S U }
22
+ @screen.sectionIndexTitlesForTableView(@screen.table_view).should == result
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProMotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
5
- prerelease:
4
+ version: 1.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jamon Holmgren
@@ -11,86 +10,76 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-08-01 00:00:00.000000000 Z
13
+ date: 2013-09-04 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: webstub
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: '0'
24
22
  type: :development
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: '0'
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: motion-stump
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
- - - ! '>='
33
+ - - '>='
38
34
  - !ruby/object:Gem::Version
39
35
  version: '0'
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
- - - ! '>='
40
+ - - '>='
46
41
  - !ruby/object:Gem::Version
47
42
  version: '0'
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: motion-redgreen
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: '0'
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: '0'
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: formotion
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - '>='
70
62
  - !ruby/object:Gem::Version
71
63
  version: '0'
72
64
  type: :development
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - '>='
78
69
  - !ruby/object:Gem::Version
79
70
  version: '0'
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: rake
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
- - - ! '>='
75
+ - - '>='
86
76
  - !ruby/object:Gem::Version
87
77
  version: '0'
88
78
  type: :development
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
- - - ! '>='
82
+ - - '>='
94
83
  - !ruby/object:Gem::Version
95
84
  version: '0'
96
85
  description: ProMotion is a new way to easily build RubyMotion iOS apps.
@@ -103,8 +92,6 @@ extensions: []
103
92
  extra_rdoc_files: []
104
93
  files:
105
94
  - .gitignore
106
- - .ruby-gemset
107
- - .ruby-version
108
95
  - .travis.yml
109
96
  - Gemfile
110
97
  - Gemfile.lock
@@ -199,27 +186,26 @@ files:
199
186
  homepage: https://github.com/clearsightstudio/ProMotion
200
187
  licenses:
201
188
  - MIT
189
+ metadata: {}
202
190
  post_install_message:
203
191
  rdoc_options: []
204
192
  require_paths:
205
193
  - lib
206
194
  required_ruby_version: !ruby/object:Gem::Requirement
207
- none: false
208
195
  requirements:
209
- - - ! '>='
196
+ - - '>='
210
197
  - !ruby/object:Gem::Version
211
198
  version: '0'
212
199
  required_rubygems_version: !ruby/object:Gem::Requirement
213
- none: false
214
200
  requirements:
215
- - - ! '>='
201
+ - - '>='
216
202
  - !ruby/object:Gem::Version
217
203
  version: '0'
218
204
  requirements: []
219
205
  rubyforge_project:
220
- rubygems_version: 1.8.25
206
+ rubygems_version: 2.0.3
221
207
  signing_key:
222
- specification_version: 3
208
+ specification_version: 4
223
209
  summary: ProMotion is a new way to organize RubyMotion apps. Instead of dealing with
224
210
  UIViewControllers, you work with Screens. Screens are a logical way to think of
225
211
  your app and include a ton of great utilities to make iOS development more like