ruby_motion_query 0.5.3 → 0.5.5

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGJjYWZmMzUyNWEzY2ExZTI5OWUxNjQ0NzVhODg1N2ZkZGM5YjFkMw==
4
+ OTg1MDhiZjc4MDZkZjM4NDBmMGQyZTI4MmJkZWYwNjJlOTJjMDQwYw==
5
5
  data.tar.gz: !binary |-
6
- MTZlMzYxZDAyNjdjMmM4NmU5ODA5NTAyOWU3MmRkODg4MDRmYjI0Yg==
6
+ MjI2OGY0ZTUzYmUyZmY1OWNhZWIzNThiZWY0OTRjMTEwMDQ2ZmFkMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTg3Yjk2NGI2N2IxYTA5YmE2NDgyYzRmNzk1NjEyNWIwNWEwOWU1NWQ5NGY4
10
- ZTQ4MTIzMjZhZmRjNmE5NmUwMWJkZTZkYmUxYmYyMTJlMTE3MTBmMjZjZDRh
11
- M2FmODhiYzAwNjlhN2QyOGI0ZjM0MDg5MDUwOTlmNDI1ZjY2MWU=
9
+ ZTI0NmFhZWRkOTk4NTg1MGUyMjYyZDdkZjBlZjQwYjMyZDRlN2I3YzBiNGU2
10
+ YTQ1NDUwYjg3OWE3ZjY4Njk4MDc2OWVmMzQzNzliNzUzMzViZWZhMzVmZmZl
11
+ OWE5MDU0YzJjYmE4NTY3ZWI0MWZlYTgxZmIxMzIxZDgwOTc3ZTg=
12
12
  data.tar.gz: !binary |-
13
- OTA1ZDlmNTljYzY3ZTdhZDBkOWViMzA5YTgzNzc3YWVjYjc5NzNkOTZhMTU2
14
- MTIxMzE0YWVjNjY2MTNhMmQ1OTc3NDdmNDVhMDVhOWNjMWRkZThlZTIyZDY1
15
- YjM3MzIwZTIwNTZhN2ZkNjZjZWE0NDYyNTY3MGI2YThkZThiOWQ=
13
+ NWZjYzBlNDk4NmY0ZGJjOTQyMDdiMTg4YjZiMWY0YjI5NDVmNzZmNjMwYzhi
14
+ NDc3YTE0Mzg1NzliNWFkYjQ5YjkzMTI5MDVhZjU1ZTMyYTRlZWVkMTZhNWZl
15
+ YTNjOWYyNzNiYWUxN2E0ODdhMmJmNzkzZmVhNGQ3NTEzZjRlM2Y=
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![RQM logo](http://ir_wp.s3.amazonaws.com/wp-content/uploads/sites/9/2013/07/rmq_logo.png)
1
+ ![RMQ logo](https://raw.github.com/infinitered/rmq/master/resources/logo@2x.png?raw=true)
2
2
 
3
3
  # RubyMotionQuery - RMQ
4
4
 
@@ -718,7 +718,7 @@ class MainController < UIViewController
718
718
  def viewDidLoad
719
719
  super
720
720
 
721
- rmq.stylesheet = MainControllerStyleSheet
721
+ rmq.stylesheet = MainStyleSheet
722
722
  view.rmq.apply_style :root_view
723
723
 
724
724
  @title_label = rmq.append(UILabel, :title_label).get
data/motion/ext.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  class Object
2
2
  def rmq(*working_selectors)
3
- if window = RubyMotionQuery::RMQ.app.window
4
- RubyMotionQuery::RMQ.app.current_view_controller.rmq(working_selectors)
3
+ if (app = RubyMotionQuery::RMQ.app) && (window = app.window) && (cvc = app.current_view_controller)
4
+ cvc.rmq(working_selectors)
5
+ else
6
+ RubyMotionQuery::RMQ.create_with_array_and_selectors([], working_selectors, self)
5
7
  end
6
8
  end
7
9
  end
@@ -16,7 +16,9 @@ module RubyMotionQuery
16
16
 
17
17
  # @return [UIWindow]
18
18
  def window
19
- UIApplication.sharedApplication.keyWindow || UIApplication.sharedApplication.windows[0]
19
+ if shared_application = UIApplication.sharedApplication
20
+ shared_application.keyWindow || shared_application.windows[0]
21
+ end
20
22
  end
21
23
 
22
24
  # @return [UIApplicationDelegate]
@@ -1,9 +1,16 @@
1
1
  module RubyMotionQuery
2
2
  module Stylers
3
3
 
4
- class UIScrollViewStyler < UIViewStyler
4
+ class UIScrollViewStyler < UIViewStyler
5
5
  def paging=(value) ; @view.pagingEnabled = value ; end
6
6
  def paging ; @view.isPagingEnabled ; end
7
+
8
+ def scroll_enabled=(value) ; @view.scrollEnabled = value ; end
9
+ def scroll_enabled ; @view.isScrollEnabled ; end
10
+
11
+ def direction_lock=(value) ; @view.directionalLockEnabled = value ; end
12
+ def direction_lock ; @view.isDirectionalLockEnabled ; end
13
+
7
14
  end
8
15
 
9
16
  end
@@ -1,7 +1,25 @@
1
1
  module RubyMotionQuery
2
2
  module Stylers
3
3
 
4
- class UITableViewStyler < UIScrollViewStyler
4
+ class UITableViewStyler < UIScrollViewStyler
5
+
6
+ def separator_style=(value)
7
+ @view.separatorStyle = (SEPARATOR_STYLES[value] || value)
8
+ end
9
+ def separator_style ; @view.separatorStyle ; end
10
+
11
+ def separator_color=(value) ; @view.separatorColor = value ; end
12
+ def separator_color ; @view.separatorColor ; end
13
+
14
+ def allows_selection=(value) ; @view.allowsSelection = value ; end
15
+ def allows_selection ; @view.allowsSelection ; end
16
+
17
+ SEPARATOR_STYLES = {
18
+ none: UITableViewCellSeparatorStyleNone,
19
+ single: UITableViewCellSeparatorStyleSingleLine,
20
+ etched: UITableViewCellSeparatorStyleSingleLineEtched
21
+ }
22
+
5
23
  end
6
24
 
7
25
  end
@@ -266,6 +266,11 @@ module RubyMotionQuery
266
266
  @view.clipsToBounds
267
267
  end
268
268
 
269
+ def tint_color=(value)
270
+ @view.tintColor = value if @view.respond_to?('setTintColor:')
271
+ end
272
+ def tint_color ; @view.tintColor ; end
273
+
269
274
  def layer
270
275
  @view.layer
271
276
  end
@@ -1,5 +1,5 @@
1
1
  module RubyMotionQuery
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.5"
3
3
 
4
4
  class RMQ
5
5
  def version
@@ -37,7 +37,7 @@ class <%= @name_camel_case %>Controller < UITableViewController
37
37
  data_row = @data[index_path.row]
38
38
 
39
39
  cell = table_view.dequeueReusableCellWithIdentifier(<%= @name.upcase %>_CELL_ID) || begin
40
- rmq.create(<%= @name_camel_case %>Cell).get
40
+ rmq.create(<%= @name_camel_case %>Cell, :<%= @name %>_cell, reuse_identifier: <%= @name.upcase %>_CELL_ID).get
41
41
  end
42
42
 
43
43
  cell.update(data_row)
@@ -1,8 +1,6 @@
1
1
  class <%= @name_camel_case %>Cell < UITableViewCell
2
2
 
3
3
  def rmq_build
4
- rmq(self).apply_style :<%= @name %>_cell
5
-
6
4
  rmq(self.contentView).tap do |q|
7
5
  # Add your subviews, init stuff here
8
6
  # @foo = q.append(UILabel, :foo).get
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_motion_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Werth
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-17 00:00:00.000000000 Z
12
+ date: 2014-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon