snapshot 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/snapshot/latest_ios_version.rb +3 -1
- data/lib/snapshot/reset_simulators.rb +2 -1
- data/lib/snapshot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f71095c13f7d3cc8e55479bcb07f15ab6d0720a
|
4
|
+
data.tar.gz: 6bcdd85eb02adced990564c7b866673723ad9185
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b1a0c5ef2b726e35494db3fd63e396a7288d1d0447f33c78c3acd9c0337fe1e7a161115c01fceb118aece60cebcd771adb8a1d887f0180aee931fa30a86760
|
7
|
+
data.tar.gz: ea2ed05b36db8e095581a00039d61adcabfdabc78827be753229872e84a7d3b4cc93f17fa81776d27d77ae76a477ec777dab34630510f9450fda16a77a04e492
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ snapshot
|
|
34
34
|
|
35
35
|
###### Automate taking localized screenshots of your iOS app on every device
|
36
36
|
|
37
|
-
You have to manually create 20 (languages) x
|
37
|
+
You have to manually create 20 (languages) x 6 (devices) x 5 (screenshots) = **600 screenshots**.
|
38
38
|
|
39
39
|
It's hard to get everything right!
|
40
40
|
|
@@ -162,6 +162,10 @@ Your screenshots will be stored in the `./screenshots/` folder by default (or `.
|
|
162
162
|
|
163
163
|
If any error occurs while running the snapshot script on a device, that device will not have any screenshots, and `snapshot` will continue with the next device or language. To stop the flow after the first error, run
|
164
164
|
|
165
|
+
```sh
|
166
|
+
snapshot --stop_after_first_error
|
167
|
+
```
|
168
|
+
|
165
169
|
Also by default, `snapshot` will open the HTML after all is done. This can be skipped with the following command
|
166
170
|
|
167
171
|
|
@@ -228,7 +232,7 @@ You can use the environment variable `SNAPSHOT_FORCE_DELETE` to stop asking for
|
|
228
232
|
|
229
233
|
The easiest solution would be to just render the UIWindow into a file. That's not possible because UI Tests don't run on a main thread. So `snapshot` uses a different approach:
|
230
234
|
|
231
|
-
When you run unit tests in Xcode, the reporter generates a plist file, documenting all events that occured during the tests ([More Information](http://michele.io/test-logs-in-xcode)). Additionally, Xcode generates screenshots before,
|
235
|
+
When you run unit tests in Xcode, the reporter generates a plist file, documenting all events that occured during the tests ([More Information](http://michele.io/test-logs-in-xcode)). Additionally, Xcode generates screenshots before, during and after each of these events. There seems to be no way to manually trigger a screenshot event. The screenshots and the plist files are stored in the DerivedData directory, which `snapshot` stores in a temporary folder.
|
232
236
|
|
233
237
|
When the user calls `snapshot(...)` in the UI Tests (Swift or Objective C) the script actually just does a swipe gesture outside of the screen bounds which doesn't make any sense. It has no effect to the application and is not something you would do in your tests. The goal was to find *some* event that a user would never trigger, so that we know it's from `snapshot`.
|
234
238
|
|
@@ -13,7 +13,9 @@ module Snapshot
|
|
13
13
|
end
|
14
14
|
|
15
15
|
matched = output.match(/iOS ([\d\.]+) \(.*/)
|
16
|
-
if matched.
|
16
|
+
if matched.nil?
|
17
|
+
raise "Could not determine installed iOS SDK version. Try running the _xcodebuild_ command manually to ensure it works."
|
18
|
+
elsif matched.length > 1
|
17
19
|
return @version ||= matched[1]
|
18
20
|
else
|
19
21
|
raise "Could not determine installed iOS SDK version. Please pass it via the environment variable 'SNAPSHOT_IOS_VERSION'".red
|
@@ -33,7 +33,8 @@ module Snapshot
|
|
33
33
|
# iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
|
34
34
|
# iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
|
35
35
|
all_device_types.each do |device_type|
|
36
|
-
next if device_type.join(' ').include?
|
36
|
+
next if device_type.join(' ').include?("Watch") # we don't want to deal with the Watch right now
|
37
|
+
next if device_type.join(' ').include?("TV") # we don't want to deal with TV right now
|
37
38
|
|
38
39
|
ios_versions.each do |ios_version|
|
39
40
|
puts "Creating #{device_type} for iOS version #{ios_version}"
|
data/lib/snapshot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastimage
|
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
247
247
|
version: '0'
|
248
248
|
requirements: []
|
249
249
|
rubyforge_project:
|
250
|
-
rubygems_version: 2.4.
|
250
|
+
rubygems_version: 2.4.8
|
251
251
|
signing_key:
|
252
252
|
specification_version: 4
|
253
253
|
summary: Automate taking localized screenshots of your iOS app on every device
|