ruby_motion_query 0.5.0 → 0.5.1

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
- MzUyNDAwZmQ1YTRmMzBiODg3YTMzY2VlMzNiYTA1ZTFjOWY2OGU3Yg==
4
+ NDQxZDk3Y2FlZTc1ZTkzNWQwZmRhNDc2YTgzMjU2YWIwNWU2ZWRhOQ==
5
5
  data.tar.gz: !binary |-
6
- ZTljMmU0NDcyZDFjNWEyZjEzZGYzZWQ0YjY1YmEzZjUyOWJkZDY1YQ==
6
+ ZWM4MmVjZjU5MmM3NjNlZGQyZmM5YTBlODcwNGQyZGYxYzRkZTgwNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDU2MGU1YmJiNmQzZGFhMjExZWVlYTVmN2IwMzkyN2E0NTBiODQwMjU1NzRh
10
- ZmQ1M2JhZDExMmE4N2FkMjY5NDNmNzdiOTE5OWVkNjk0ODM0MWFhY2FhMTJj
11
- MTEwNzAwOWM0MzY0ZGI0M2NhM2QxNmYxMmEyOWY2YzE0YTNlNzQ=
9
+ MDZhYzYxZTY2ZTZjMjBjODEyMDA0OTIyZWYyY2IyYTczNDM0NmYyZDkzNDJl
10
+ NWE0ODkxNzdhODgxMDg0MWM2NjM4OGE1MTc1ZjllOWFjZWU4NzJiMTE2MmU0
11
+ MTZmODc5MjIyODcwMzk3ZTYyM2FkZjE2ODkyZmIwMTQ0MjhhYzg=
12
12
  data.tar.gz: !binary |-
13
- NTY2NTJmNzhmZTE5YjcyZTcxYTc5ZjcxZDk2ZjBjYjAxYTU5MDc1OTE2NGRi
14
- YjkyMzNkNGYzMmU3NGQwNTcxYjMwODA4Mjg3MTk4M2IzNGRlNWQwMjBlYWRl
15
- NGVlMDdkN2FjNjE0YzRiZDJjNjdkNzkyMjhjYjIxMDlmNWNjYjY=
13
+ NDRlOTNmMzUwYWY1YTBmZmFhNzhiMjc3YWZjOTM5NDEzZDE2MDdkN2VkY2Nj
14
+ NDlhYTJjMDdkN2VmZmNhMGY2NTIyOWJjZjJmNDUxNTNiYWY0MmQ5NDc4YTdm
15
+ ZjNjMGRmMWNhYzBlODgyYTNjYmU2ZjI0MmMyYzFmMzM3NzM3YjA=
data/README.md CHANGED
@@ -1,13 +1,21 @@
1
1
  ![RQM logo](http://ir_wp.s3.amazonaws.com/wp-content/uploads/sites/9/2013/07/rmq_logo.png)
2
2
 
3
3
  # RubyMotionQuery - RMQ
4
- A fast, muggle, nonpolluting, zero-dependency, jQuery-like library for [RubyMotion](http://rubymotion.com).
5
-
6
- **The [RMQ Introductory Guide and other info][1] is a great place to start.**
7
4
 
8
5
  [![Dependency Status](https://gemnasium.com/infinitered/rmq.png)](https://gemnasium.com/infinitered/rmq)
9
6
  [![Build Status](https://travis-ci.org/infinitered/rmq.png?branch=master)](https://travis-ci.org/infinitered/rmq)
10
7
  [![Gem Version](https://badge.fury.io/rb/ruby_motion_query.png)](http://badge.fury.io/rb/ruby_motion_query)
8
+ [![Crusher.io optimized](http://www.crusher.io/repo/infinitered/rmq/badge)](http://www.crusher.io/repo/infinitered/rmq)
9
+
10
+ A fast, muggle, nonpolluting, zero-dependency, jQuery-like library for [RubyMotion](http://rubymotion.com).
11
+
12
+ **The [RMQ website][1] is a great place to start.**
13
+
14
+ Also this 6 minute **[intro video](https://www.youtube.com/watch?v=2ihGjCI2DYE)**
15
+
16
+ And this 36 minute video: **[Creating an Image Browser app in RubyMotion and RubyMotionQuery](https://www.youtube.com/watch?v=4eCNaxqNhKA)**
17
+
18
+ ----------
11
19
 
12
20
  ## General
13
21
 
@@ -86,6 +94,7 @@ for **bleeding edge**, add this to your `Gemfile`:
86
94
 
87
95
  ## Deprecation
88
96
 
97
+ - **RubyMotionQuery::RMQ.weak_ref(object)** - no longer needed post RubyMotion 2.18
89
98
  - **UIView#rmq_did_create(self_in_rmq)** - *Use rmq_build instead*
90
99
 
91
100
 
@@ -582,7 +591,7 @@ rmq.device.iphone?
582
591
  rmq.device.four_inch?
583
592
  rmq.device.retina?
584
593
 
585
- # return values are :unkown, :portrait, :portrait_upside_down, :landscape_Left,
594
+ # return values are :unknown, :portrait, :portrait_upside_down, :landscape_Left,
586
595
  # :landscape_right, :face_up, :face_down
587
596
  rmq.device.orientation
588
597
  rmq.device.landscape?
@@ -772,7 +781,7 @@ end
772
781
 
773
782
  class MainStylesheet < ApplicationStylesheet
774
783
  def setup
775
- # Add sytlesheet specific setup stuff here.
784
+ # Add stylesheet specific setup stuff here.
776
785
  # Add application specific setup stuff in application_stylesheet.rb
777
786
  end
778
787
 
@@ -801,7 +810,7 @@ class MainStylesheet < ApplicationStylesheet
801
810
  # ipad? (and landscape?, etc) is just a convenience methods for
802
811
  # rmq.device.ipad?
803
812
 
804
- # Here is a complete example of different formatting for orientatinos
813
+ # Here is a complete example of different formatting for orientations
805
814
  # and devices
806
815
  # if ipad?
807
816
  # if landscape?
@@ -818,7 +827,7 @@ class MainStylesheet < ApplicationStylesheet
818
827
  # end
819
828
 
820
829
  # If you don't want something to be reapplied during orientation
821
- # changes (assuming you're reapplying durring orientation changes
830
+ # changes (assuming you're reapplying during orientation changes
822
831
  # in your controller, it's not automatic)
823
832
  unless st.view_has_been_styled?
824
833
  st.text = 'Blink labels'
@@ -1157,7 +1166,8 @@ Random future features that I plan on adding
1157
1166
  - add selectors for UITextField
1158
1167
  - add string to height utility, given the font and the width
1159
1168
  - add block to wrap useful for a variety of things, but here is solid example: rmq.append(UIButton).tag(:foo).wrap{|view| view.titleLabel}.tag(:foo_title)
1160
- - add def rmq_build_with_properties(props = {}). Perhaps remove rmq_created and rmq_appended, not sure if those are usefull or not
1169
+ - add def rmq_build_with_properties(props = {}). Perhaps remove rmq_created and rmq_appended, not sure if those are useful or not
1170
+ - add easy way to do alerts and actionsheets
1161
1171
 
1162
1172
 
1163
1173
  ## Contact
@@ -26,6 +26,9 @@ module RubyMotionQuery
26
26
  @view.tintColor
27
27
  end
28
28
 
29
+ def image=(value)
30
+ self.image_normal = value
31
+ end
29
32
  def image_normal=(value)
30
33
  @view.setImage value, forState: UIControlStateNormal
31
34
  end
@@ -260,7 +260,7 @@ module RubyMotionQuery
260
260
  end
261
261
 
262
262
  def clips_to_bounds=(value)
263
- @view.setClipsToBounds value
263
+ @view.clipsToBounds = value
264
264
  end
265
265
  def clips_to_bounds
266
266
  @view.clipsToBounds
@@ -50,7 +50,9 @@ module RubyMotionQuery
50
50
  end
51
51
  end
52
52
 
53
- # @deprecated this has been fixed in 2.17, so this method is no longer needed.
53
+ # @deprecated this is no longer needed in RubyMotion >= 2.19. In a later version this will be
54
+ # changed to simply be a wrapper of RubyMotion's WeakRef
55
+ #
54
56
  #
55
57
  # Creates a weak reference to an object. Unlike WeakRef.new provided by RubyMotion, this will
56
58
  # not wrap a weak ref inside another weak ref (which causes bugs).
@@ -65,15 +67,17 @@ module RubyMotionQuery
65
67
  # foo = RubyMotionQuery::RMQ.weak_ref(bar)
66
68
  def weak_ref(o)
67
69
  weak = WeakRef.new(weak_ref_to_strong_ref(o))
70
+ #WeakRef.new(o) # For future release
68
71
  end
69
72
 
70
- # @deprecated this has been fixed in 2.17, so this method is no longer needed.
73
+ # @deprecated this has been fixed in RubyMotion 2.17, so this method is no longer needed.
71
74
  #
72
75
  # This gets around a bug in RubyMotion
73
76
  # Hopefully I can remove this quickly. Only use this for complex objects that have no comparison
74
77
  # other than that they are the exact same object. For example, strings compare their contents.
75
78
  def weak_ref_is_same_object?(a, b)
76
79
  (a.class == b.class) && (a.object_id == b.object_id)
80
+ #a == b # For future release
77
81
  end
78
82
 
79
83
  # Gets a strong reference from a weak reference
@@ -1,5 +1,5 @@
1
1
  module RubyMotionQuery
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
 
4
4
  class RMQ
5
5
  def version
@@ -3,7 +3,7 @@ class <%= @name_camel_case %>ControllerStylesheet < ApplicationStylesheet
3
3
  include <%= @name_camel_case %>CellStylesheet
4
4
 
5
5
  def setup
6
- # Add sytlesheet specific setup stuff here.
6
+ # Add stylesheet specific setup stuff here.
7
7
  # Add application specific setup stuff in application_stylesheet.rb
8
8
 
9
9
  @margin = ipad? ? 12 : 8
@@ -3,7 +3,7 @@ class <%= @name_camel_case %>ControllerStylesheet < ApplicationStylesheet
3
3
  # include FooStylesheet
4
4
 
5
5
  def setup
6
- # Add sytlesheet specific setup stuff here.
6
+ # Add stylesheet specific setup stuff here.
7
7
  # Add application specific setup stuff in application_stylesheet.rb
8
8
  end
9
9
 
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.0
4
+ version: 0.5.1
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: 2013-12-20 00:00:00.000000000 Z
12
+ date: 2014-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon