snapshot 1.4.2 → 1.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96f6aa6d5034a51c6bd41f7c1ba31796b19daa55
4
- data.tar.gz: 2ffaec44d9ca48065f8dada8142b8f324740be5a
3
+ metadata.gz: 0c5edfee2a420a70bee0a6af831f2f5d42950767
4
+ data.tar.gz: e3c20c036bb41d12cb7dfcf2a444e7a6c233024d
5
5
  SHA512:
6
- metadata.gz: a06cc5ff23182185afa183e4928fb4b0b041ec4943157e21424cbc69d40b92a8fbce0e7c23d97d5c07d1c37c9c72ac242949892619a71d6527e7552d3f1fa02c
7
- data.tar.gz: 777220ead255052ff6d08eb231d0efdbefaf8d0dbd8b041bee9b4425128ccf49224279e72ce5db86866f95130f5e3ce4c0f2ec8cb159612a02e812ae7381f7e4
6
+ metadata.gz: 09fbafd083e1435dcbdac39a795d9f530bb5dc3e8a2bf3b01f5d0a484f327f91dff7bec6ce7ae0ec9fbf1fac897701fe50b71af7ca0ef8e5fc2c5cfe35388969
7
+ data.tar.gz: c1435617ea8b08662ffb1092ab7020d79e002a74b278e68b0fc7555fb786440003ae832dc36d9c114e7cd0976c7fd95590fee537e0cbbad0cfd9c261cc91dc83
data/README.md CHANGED
@@ -142,7 +142,7 @@ Here a few links to get started:
142
142
  - Run `snapshot init` in your project folder
143
143
  - Add the ./SnapshotHelper.swift to your UI Test target (You can move the file anywhere you want)
144
144
  - (Objective C only) add the bridging header to your test class.
145
- - `#import MYUITests-Swift.h"`
145
+ - `#import "MYUITests-Swift.h"`
146
146
  - The bridging header is named after your test target with -Swift.h appended.
147
147
  - In your UI Test class, click the `Record` button on the bottom left and record your interaction
148
148
  - To take a snapshot, call the following between interactions
data/lib/snapshot.rb CHANGED
@@ -39,6 +39,7 @@ module Snapshot
39
39
  end
40
40
 
41
41
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
42
+ UI = FastlaneCore::UI
42
43
 
43
44
  Snapshot::DependencyChecker.check_dependencies
44
45
 
@@ -41,7 +41,7 @@ module Snapshot
41
41
  Helper.log.info "Loading up '#{plist_path}'..." if $verbose
42
42
  report = Plist.parse_xml(plist_path)
43
43
 
44
- activities = []
44
+ to_store = [] # contains the names of all the attachments we want to use
45
45
  report["TestableSummaries"].each do |summary|
46
46
  (summary["Tests"] || []).each do |test|
47
47
  (test["Subtests"] || []).each do |subtest|
@@ -49,8 +49,9 @@ module Snapshot
49
49
  (subtest2["Subtests"] || []).each do |subtest3|
50
50
  (subtest3["ActivitySummaries"] || []).each do |activity|
51
51
  # We now check if it's the rotation gesture, because that's the only thing we care about
52
- was_snapshot = activity["Title"] == "Set device orientation to Unknown"
53
- activities << activity if was_snapshot
52
+ if activity["Title"] == "Set device orientation to Unknown"
53
+ to_store << activity["Attachments"].last["FileName"]
54
+ end
54
55
  end
55
56
  end
56
57
  end
@@ -58,14 +59,7 @@ module Snapshot
58
59
  end
59
60
  end
60
61
 
61
- Helper.log.info "Found #{activities.count} screenshots..."
62
-
63
- to_store = [] # contains the names of all the attachments we want to use
64
- activities.each do |activity|
65
- attachment_entry = activity
66
- to_store << attachment_entry["Attachments"].last["FileName"]
67
- end
68
-
62
+ Helper.log.info "Found #{to_store.count} screenshots..."
69
63
  Helper.log.info "Found #{to_store.join(', ')}" if $verbose
70
64
  return to_store
71
65
  end
@@ -19,7 +19,7 @@ module Snapshot
19
19
 
20
20
  if Snapshot::LatestIosVersion.version.to_f < 9 # to_f is bad, but should be good enough
21
21
  Helper.log.fatal '#############################################################'
22
- Helper.log.fatal "# Your xcode-select Xcode version is below 9.0"
22
+ Helper.log.fatal "# Your xcode-select Xcode version is below 7.0"
23
23
  Helper.log.fatal "# To use snapshot 1.0 and above you need at least iOS 9"
24
24
  Helper.log.fatal "# Set the path to the Xcode version that supports UI Tests"
25
25
  Helper.log.fatal "# or downgrade to versions older than snapshot 1.0"
@@ -31,10 +31,10 @@ module Snapshot
31
31
  end),
32
32
  FastlaneCore::ConfigItem.new(key: :devices,
33
33
  description: "A list of devices you want to take the screenshots from",
34
- is_string: false,
34
+ short_option: "-d",
35
+ type: Array,
35
36
  optional: true,
36
37
  verify_block: proc do |value|
37
- raise "Devices must be an array" unless value.kind_of?(Array)
38
38
  available = FastlaneCore::Simulator.all
39
39
  value.each do |current|
40
40
  unless available.any? { |d| d.name.strip == current.strip }
@@ -44,17 +44,15 @@ module Snapshot
44
44
  end),
45
45
  FastlaneCore::ConfigItem.new(key: :languages,
46
46
  description: "A list of languages which should be used",
47
- is_string: false,
48
- default_value: [
49
- 'en-US'
50
- ]),
47
+ short_option: "-g",
48
+ type: Array,
49
+ default_value: ['en-US']),
51
50
  FastlaneCore::ConfigItem.new(key: :launch_arguments,
52
51
  env_name: 'SNAPSHOT_LAUNCH_ARGUMENTS',
53
52
  description: "A list of launch arguments which should be used",
54
- is_string: false,
55
- default_value: [
56
- ''
57
- ]),
53
+ short_option: "-m",
54
+ type: Array,
55
+ default_value: ['']),
58
56
  FastlaneCore::ConfigItem.new(key: :output_directory,
59
57
  short_option: "-o",
60
58
  env_name: "SNAPSHOT_OUTPUT_DIRECTORY",
@@ -36,6 +36,7 @@ module Snapshot
36
36
  results[device][language] = true
37
37
  rescue => ex
38
38
  Helper.log.error ex # we should to show right here as well
39
+ Helper.log.error "Backtrace:\n\t#{ex.backtrace.join("\n\t")}"
39
40
  errors << ex
40
41
  results[device][language] = false
41
42
  raise ex if Snapshot.config[:stop_after_first_error]
@@ -1,4 +1,4 @@
1
1
  module Snapshot
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
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.4.2
4
+ version: 1.4.3
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-12-11 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.21.0
33
+ version: 0.30.0
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 1.0.0
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.21.0
43
+ version: 0.30.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.0
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  requirements: []
252
252
  rubyforge_project:
253
- rubygems_version: 2.4.0
253
+ rubygems_version: 2.4.5.1
254
254
  signing_key:
255
255
  specification_version: 4
256
256
  summary: Automate taking localized screenshots of your iOS app on every device