snapshot 1.12.0 → 1.12.1

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: a7f61f2f3c7aa60d70e206209b8d11396233590a
4
- data.tar.gz: eb1d37214aa896123087ee76ad074d03f0852231
3
+ metadata.gz: 5403d3a85b61bd0cd8036fd1fdb3c75dba4c64a7
4
+ data.tar.gz: 504b5e471e8188c7b89fa4da81c2739e17045909
5
5
  SHA512:
6
- metadata.gz: dd88feb6567be7d744de8666406162b0241618a542e4a0deaa9bfaa5c7c6188714e745e7ac13f1de5c8f81ca8276623ab68d3431a743ed875d198dab6db71b20
7
- data.tar.gz: 6ae65a84f6518243ca080a1c3aebe906e0556bfe6b33175b5737f8a1b2b305f0b3c0ef2a6611e4da9addd8c844a8a5627d7b1d12ed1236f5cf6ca6a4edae6967
6
+ metadata.gz: 7993f66ee0575507b64de582d8cb7df939386643a821a186b20a9ea16046a63cb00f52639f19b107919633a91029d3c789f9b84b4fb3948a101cd85c3c475302
7
+ data.tar.gz: 4ddfccd5e70643ed187f1f6fd67cb7d4bb54b231382e985ff0efba85935516cb16a2ab4471dc2d437b1f7fffac675db5d80deb86399fb08f75662d35de1516aa
@@ -43,12 +43,16 @@ module Snapshot
43
43
 
44
44
  def self.attachments(containing)
45
45
  UI.message "Collecting screenshots..."
46
-
47
46
  plist_path = Dir[File.join(containing, "*.plist")].last # we clean the folder before each run
47
+ return attachments_in_file(plist_path)
48
+ end
49
+
50
+ def self.attachments_in_file(plist_path)
48
51
  UI.verbose "Loading up '#{plist_path}'..."
49
52
  report = Plist.parse_xml(plist_path)
50
53
 
51
54
  to_store = [] # contains the names of all the attachments we want to use
55
+
52
56
  report["TestableSummaries"].each do |summary|
53
57
  (summary["Tests"] || []).each do |test|
54
58
  (test["Subtests"] || []).each do |subtest|
@@ -71,7 +75,11 @@ module Snapshot
71
75
  def self.check_activity(activity, to_store)
72
76
  # We now check if it's the rotation gesture, because that's the only thing we care about
73
77
  if activity["Title"] == "Set device orientation to Unknown"
74
- to_store << activity["Attachments"].last["FileName"]
78
+ if activity["Attachments"]
79
+ to_store << activity["Attachments"].last["FileName"]
80
+ else # Xcode 7.3 has stopped including 'Attachments', so we synthesize the filename manually
81
+ to_store << "Screenshot_#{activity['UUID']}.png"
82
+ end
75
83
  end
76
84
  (activity["SubActivities"] || []).each do |subactivity|
77
85
  check_activity(subactivity, to_store)
@@ -1,4 +1,4 @@
1
1
  module Snapshot
2
- VERSION = "1.12.0".freeze
2
+ VERSION = "1.12.1".freeze
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.12.0
4
+ version: 1.12.1
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-03-17 00:00:00.000000000 Z
11
+ date: 2016-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage
@@ -114,6 +114,20 @@ dependencies:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: 3.1.0
117
+ - !ruby/object:Gem::Dependency
118
+ name: rspec_junit_formatter
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: 0.2.3
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: 0.2.3
117
131
  - !ruby/object:Gem::Dependency
118
132
  name: pry
119
133
  requirement: !ruby/object:Gem::Requirement
@@ -251,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
265
  version: '0'
252
266
  requirements: []
253
267
  rubyforge_project:
254
- rubygems_version: 2.4.6
268
+ rubygems_version: 2.4.5.1
255
269
  signing_key:
256
270
  specification_version: 4
257
271
  summary: Automate taking localized screenshots of your iOS app on every device