snapshot 1.10.0 → 1.11.0

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: 1f423c7b8038df57343f37a6d205c3d7df858612
4
- data.tar.gz: 10ff5a81421f1a3bad034c590297c812e69e7277
3
+ metadata.gz: 1f1c80767948a568435448321574416a51975c4d
4
+ data.tar.gz: 08b2573705b5d716d1ada5a58067d341195330c3
5
5
  SHA512:
6
- metadata.gz: 7cc9ad37a6ff4e4fdf627866821784474fc471f2bfb8769805aee42d8540fe892aa71b0d690052a535631dd87b1d7e8554a5aebb95a9a931ed49d109da8f681a
7
- data.tar.gz: 1c436151af68dfe77df868b95460ad6ad35c27821100a440aea6c72ffceb520e2502676b61a54f509dfa25f91accf5c4625989f97a424e398e2fef6aae1c180a
6
+ metadata.gz: ccf0d605b2de18c6aec30073fc7e641c70dfb94e31847f040c468941ed378db7f406c93d767665d76a53f648cc345982557c3bfee0941cde1f35bf37d3cd7291
7
+ data.tar.gz: 80050ee54779dd305ba6ac591dfeb9673cf96a5330ff6aa1f7b1dbc4be444d54f2102a08a4bb379690480235f0c8c168f6587b3a315f570b943c355c70ec301f
data/README.md CHANGED
@@ -249,7 +249,7 @@ languages([
249
249
  ["pt", "pt_BR"] # Portuguese with Brazilian locale
250
250
  ])
251
251
 
252
- launch_arguments("-username Felix")
252
+ launch_arguments(["-username Felix"])
253
253
 
254
254
  # The directory in which the screenshots should be stored
255
255
  output_directory './screenshots'
@@ -286,7 +286,18 @@ to update your `SnapshotHelper.swift` files. In case you modified your `Snapshot
286
286
 
287
287
  ## Launch Arguments
288
288
 
289
- You can provide additional arguments to your app on launch. These strings will be available in your app (eg. not in the testing target) through `NSProcessInfo.processInfo().arguments`. Alternatively use user-default syntax (`-key value`) and they will be available as key-value pairs in `NSUserDefaults.standardUserDefaults()`.
289
+ You can provide additional arguments to your app on launch. These strings will be available in your app (eg. not in the testing target) through `NSProcessInfo.processInfo().arguments`. Alternatively, use user-default syntax (`-key value`) and they will be available as key-value pairs in `NSUserDefaults.standardUserDefaults()`.
290
+
291
+ ```ruby
292
+ launch_arguments([
293
+ "-firstName Felix -lastName Krause"
294
+ ])
295
+ ```
296
+
297
+ ```swift
298
+ name.text = NSUserDefaults.standardUserDefaults().stringForKey("firstName")
299
+ // name.text = "Felix"
300
+ ```
290
301
 
291
302
  `snapshot` includes `-FASTLANE_SNAPSHOT YES`, which will set a temporary user default for the key `FASTLANE_SNAPSHOT`, you may use this to detect when the app is run by `snapshot`.
292
303
 
@@ -294,9 +305,6 @@ You can provide additional arguments to your app on launch. These strings will b
294
305
  if NSUserDefaults.standardUserDefaults().boolForKey("FASTLANE_SNAPSHOT") {
295
306
  // runtime check that we are in snapshot mode
296
307
  }
297
-
298
- username.text = NSUserDefaults.standardUserDefaults().stringForKey("username")
299
- // username.text = "Felix"
300
308
  ```
301
309
 
302
310
  Specify multiple argument strings and `snapshot` will generate screenshots for each combination of arguments, devices, and languages. This is useful for comparing the same screenshots with different feature flags, dynamic text sizes, and different data sets.
@@ -18,7 +18,7 @@ languages([
18
18
  ])
19
19
 
20
20
  # Arguments to pass to the app on launch. See https://github.com/fastlane/snapshot#launch-arguments
21
- # launch_arguments("-favColor red")
21
+ # launch_arguments(["-favColor red"])
22
22
 
23
23
  # The name of the scheme which contains the UI Tests
24
24
  # scheme "SchemeName"
@@ -2,7 +2,7 @@ module Snapshot
2
2
  # Responsible for collecting the generated screenshots and copying them over to the output directory
3
3
  class Collector
4
4
  # Returns true if it succeeds
5
- def self.fetch_screenshots(output, language, device_type, launch_arguments_index)
5
+ def self.fetch_screenshots(output, dir_name, device_type, launch_arguments_index)
6
6
  # Documentation about how this works in the project README
7
7
  containing = File.join(TestCommandGenerator.derived_data_path, "Logs", "Test")
8
8
  attachments_path = File.join(containing, "Attachments")
@@ -22,7 +22,7 @@ module Snapshot
22
22
  name = current[0]
23
23
  filename = to_store[index]
24
24
 
25
- language_folder = File.join(Snapshot.config[:output_directory], language)
25
+ language_folder = File.join(Snapshot.config[:output_directory], dir_name)
26
26
  FileUtils.mkdir_p(language_folder)
27
27
 
28
28
  device_name = device_type.delete(" ")
@@ -175,7 +175,10 @@ module Snapshot
175
175
  end)
176
176
 
177
177
  raw_output = File.read(TestCommandGenerator.xcodebuild_log_path)
178
- return Collector.fetch_screenshots(raw_output, language, device_type, launch_arguments.first)
178
+
179
+ dir_name = locale || language
180
+
181
+ return Collector.fetch_screenshots(raw_output, dir_name, device_type, launch_arguments.first)
179
182
  end
180
183
 
181
184
  def uninstall_app(device_type)
@@ -1,4 +1,4 @@
1
1
  module Snapshot
2
- VERSION = "1.10.0"
2
+ VERSION = "1.11.0"
3
3
  DESCRIPTION = "Automate taking localized screenshots of your iOS app on every device"
4
4
  end
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.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-26 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage