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 +8 -8
- data/README.md +18 -8
- data/motion/ruby_motion_query/stylers/ui_button_styler.rb +3 -0
- data/motion/ruby_motion_query/stylers/ui_view_styler.rb +1 -1
- data/motion/ruby_motion_query/utils.rb +6 -2
- data/motion/ruby_motion_query/version.rb +1 -1
- data/templates/collection_view_controller/app/stylesheets/name_controller_stylesheet.rb +1 -1
- data/templates/controller/app/stylesheets/name_controller_stylesheet.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDQxZDk3Y2FlZTc1ZTkzNWQwZmRhNDc2YTgzMjU2YWIwNWU2ZWRhOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWM4MmVjZjU5MmM3NjNlZGQyZmM5YTBlODcwNGQyZGYxYzRkZTgwNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDZhYzYxZTY2ZTZjMjBjODEyMDA0OTIyZWYyY2IyYTczNDM0NmYyZDkzNDJl
|
10
|
+
NWE0ODkxNzdhODgxMDg0MWM2NjM4OGE1MTc1ZjllOWFjZWU4NzJiMTE2MmU0
|
11
|
+
MTZmODc5MjIyODcwMzk3ZTYyM2FkZjE2ODkyZmIwMTQ0MjhhYzg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDRlOTNmMzUwYWY1YTBmZmFhNzhiMjc3YWZjOTM5NDEzZDE2MDdkN2VkY2Nj
|
14
|
+
NDlhYTJjMDdkN2VmZmNhMGY2NTIyOWJjZjJmNDUxNTNiYWY0MmQ5NDc4YTdm
|
15
|
+
ZjNjMGRmMWNhYzBlODgyYTNjYmU2ZjI0MmMyYzFmMzM3NzM3YjA=
|
data/README.md
CHANGED
@@ -1,13 +1,21 @@
|
|
1
1
|

|
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
|
[](https://gemnasium.com/infinitered/rmq)
|
9
6
|
[](https://travis-ci.org/infinitered/rmq)
|
10
7
|
[](http://badge.fury.io/rb/ruby_motion_query)
|
8
|
+
[](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 :
|
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
|
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
|
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
|
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
|
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
|
@@ -50,7 +50,9 @@ module RubyMotionQuery
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
# @deprecated this
|
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
|
@@ -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
|
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
|
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.
|
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:
|
12
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bacon
|