motion-juxtapose 0.3.0 → 0.3.1

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: d2ccac7f22e4efec4bbf3c70e6beea4764eb4539
4
- data.tar.gz: 3eb7f65dd5b4585f891a97f7eac80892fbc5d828
3
+ metadata.gz: 63ccd001cc58321d3e6a1f0f26b00aa5aaf61c15
4
+ data.tar.gz: cf1665161b4fc35cba7dbf0911df67a85e01b081
5
5
  SHA512:
6
- metadata.gz: ed97658f49980bbeb7aad17b81d63d6c6be702aff3e6a5651c9eb97dd0130b2e815b33c8b5542c9016f15af2addef85b7175716f306991efaa6d5bbba666acf1
7
- data.tar.gz: d667feadb1158ce8dc85be01d79569fb96ef690bf77d19337aa39e0dfdfa806c6193aa30792ef69550cd6672cf9df5dcc96662f19ef61ff02e2d009ade0f4a32
6
+ metadata.gz: 596df2d0cb510adff4ae4f32a0c064c6a6eb6223253e7f7b598fb6718f4097c3e713e99d0ceb0eb3d149e206c46c9dbaa6eba9e8c354e0612ad1d0450eaba928
7
+ data.tar.gz: 710afe7ea4fdc765ef4a8f4f39e5d2ba68bfeb29bf097e706115e7d62d7b5f5c92840b287e15cd853bb733bb3da28291da4930c586c5b88619f6cb72ee75acfd
data/README.md CHANGED
@@ -153,6 +153,10 @@ To start it, run `bundle exec juxtapose` in the root of your project and browse
153
153
 
154
154
  ## Release Notes
155
155
 
156
+ #### v.0.3.1
157
+ * Fixes bug where you could not test against non-portrait screenshots ([@ohammersmith](https://github.com/ohammersmith))
158
+
159
+
156
160
  #### v.0.3.0
157
161
  * Add Appium support ([@squidpunch](http://github.com/squidpunch))
158
162
  * Add support for 6/6+ screen sizes ([@squidpunch](http://github.com/squidpunch))
@@ -177,6 +181,7 @@ To start it, run `bundle exec juxtapose` in the root of your project and browse
177
181
  * [Jeffrey Chupp](http://github.com/semanticart)
178
182
  * [Michael Denomy](http://github.com/mdenomy)
179
183
  * [David Larrabee](http://github.com/squidpunch)
184
+ * [Otto Hammersmith](https://github.com/ohammersmith)
180
185
 
181
186
 
182
187
  ## Contributing
@@ -15,10 +15,10 @@ module Juxtapose
15
15
 
16
16
  def device_name
17
17
  name = [UIDevice.currentDevice.model.gsub(/\s+Simulator/, '').downcase]
18
- name << 'retina' if UIScreen.mainScreen.scale > 1
19
- name << '5' if UIScreen.mainScreen.bounds.size.height == 568.0
20
- name << '6' if UIScreen.mainScreen.bounds.size.height == 667.0
21
- name << '6-plus' if UIScreen.mainScreen.bounds.size.height == 736.0
18
+ name << 'retina' if retina?
19
+ name << '5' if iphone5?
20
+ name << '6' if iphone6?
21
+ name << '6-plus' if iphone6plus?
22
22
  name.join('-')
23
23
  end
24
24
 
@@ -40,15 +40,15 @@ module Juxtapose
40
40
 
41
41
  if currentOrientation == UIInterfaceOrientationLandscapeLeft
42
42
  CGContextTranslateCTM(context, size.width / 2.0, size.height / 2.0)
43
- CGContextRotateCTM(context, M_PI_2)
43
+ CGContextRotateCTM(context, (Math::PI/2))
44
44
  CGContextTranslateCTM(context, - size.height / 2.0, - size.width / 2.0)
45
45
  elsif currentOrientation == UIInterfaceOrientationLandscapeRight
46
46
  CGContextTranslateCTM(context, size.width / 2.0, size.height / 2.0)
47
- CGContextRotateCTM(context, -M_PI_2)
47
+ CGContextRotateCTM(context, -(Math::PI/2))
48
48
  CGContextTranslateCTM(context, - size.height / 2.0, - size.width / 2.0)
49
49
  elsif currentOrientation == UIInterfaceOrientationPortraitUpsideDown
50
50
  CGContextTranslateCTM(context, size.width / 2.0, size.height / 2.0)
51
- CGContextRotateCTM(context, M_PI)
51
+ CGContextRotateCTM(context, Math::PI)
52
52
  CGContextTranslateCTM(context, -size.width / 2.0, -size.height / 2.0)
53
53
  end
54
54
 
@@ -89,6 +89,22 @@ module Juxtapose
89
89
  def height
90
90
  resolution.size.height
91
91
  end
92
+
93
+ def iphone5?
94
+ height == 568.0 || (height == 320.0 && width == 568.0)
95
+ end
96
+
97
+ def iphone6?
98
+ height == 667.0 || height == 375.0
99
+ end
100
+
101
+ def iphone6plus?
102
+ height == 736.0 || height == 414
103
+ end
104
+
105
+ def retina?
106
+ UIScreen.mainScreen.scale > 1
107
+ end
92
108
 
93
109
  end
94
110
  end
@@ -1,3 +1,3 @@
1
1
  module Juxtapose
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-juxtapose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Lind
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-18 00:00:00.000000000 Z
13
+ date: 2015-06-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra