motion-kit 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 462ad96599e3e4f19a827b86bdb8cf45e5dbe8d1
4
- data.tar.gz: 7475ddcdd1b7827558b340287a06df1da1fa7208
3
+ metadata.gz: ff9ff05dc542edf1cf722b6959a0d52d4a16d34c
4
+ data.tar.gz: f9afc6aa8839fb471bfe7dcb8ac44766260b4ddd
5
5
  SHA512:
6
- metadata.gz: fe0754471c569422d35378c26efd2b7c74e41fecf75d95f6c747af6ddc24105d8285b2b8eb11bcf554fcee76f5556bf97f387a6bafd2b66e20a75c70110894be
7
- data.tar.gz: fa2b166f5e8b7e471000038831cda72f6f002b67b5bbdd1b7fd8bec56e39d77036557141d08191a98cf4a0417a233ea41f1acde4b29e0683bd1cd2d4bd416d5c
6
+ metadata.gz: aabf1ad8ebf3a7a231d314823048c9b87d08e5a1b06a87a8c3fe60f7f87398073a136bbdd58985d974276b3b1f0d2e66d669125a158f0d87a675c76c64eb0cd3
7
+ data.tar.gz: 58c9e0bcf282924128803765e8cf2fede6620f6bf2360bc643429e1704fa4abfb2fd4e9b71683294badb1042004b0fc8e0f3b858771546375baef47103f26165
@@ -34,9 +34,9 @@ module MotionKit
34
34
 
35
35
  return case dimension
36
36
  when :width
37
- return (view.superview.frame.size.width * factor + constant).round
37
+ return (full_view.frame.size.width * factor + constant).round
38
38
  when :height
39
- return (view.superview.frame.size.height * factor + constant).round
39
+ return (full_view.frame.size.height * factor + constant).round
40
40
  else
41
41
  raise "Unknown dimension #{dimension}"
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module MotionKit
2
- VERSION = '0.9.3'
2
+ VERSION = '0.9.4'
3
3
  end
@@ -0,0 +1,31 @@
1
+ describe MotionKit::Layout do
2
+ before do
3
+ @subject = TestRelativeLayout.new
4
+ end
5
+
6
+ it "should have two subviews" do
7
+ @subject.view.subviews.count.should == 2
8
+ end
9
+
10
+ describe "should have a test view" do
11
+ it "with origin x = y = 0" do
12
+ @subject.get(:test).frame.origin.x.should == 0
13
+ @subject.get(:test).frame.origin.y.should == 0
14
+ end
15
+ it "with frame w = h = 100" do
16
+ @subject.get(:test).frame.size.width.should == 320 # how do I best set this to 100% of the screen, in case future simulators have higher resolution?
17
+ @subject.get(:test).frame.size.height.should == 100
18
+ end
19
+ end
20
+
21
+ describe "should have a test2 view below test view" do
22
+ it "with origin x = 0, y = 100" do
23
+ @subject.get(:test2).frame.origin.x.should == 0
24
+ @subject.get(:test2).frame.origin.y.should == 100
25
+ end
26
+ it "with frame w = 100, h = 50" do
27
+ @subject.get(:test2).frame.size.width.should == 320 # how do I best set this to 100% of the screen, in case future simulators have higher resolution?
28
+ @subject.get(:test2).frame.size.height.should == 50
29
+ end
30
+ end
31
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-07 00:00:00.000000000 Z
12
+ date: 2014-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dbt
@@ -107,6 +107,7 @@ files:
107
107
  - spec/ios/orientation_helper_specs.rb
108
108
  - spec/ios/parent_layout_spec.rb
109
109
  - spec/ios/parent_spec.rb
110
+ - spec/ios/relative_layout.spec.rb
110
111
  - spec/ios/remove_layout_spec.rb
111
112
  - spec/ios/root_layout_spec.rb
112
113
  - spec/ios/setters_spec.rb
@@ -180,6 +181,7 @@ test_files:
180
181
  - spec/ios/orientation_helper_specs.rb
181
182
  - spec/ios/parent_layout_spec.rb
182
183
  - spec/ios/parent_spec.rb
184
+ - spec/ios/relative_layout.spec.rb
183
185
  - spec/ios/remove_layout_spec.rb
184
186
  - spec/ios/root_layout_spec.rb
185
187
  - spec/ios/setters_spec.rb