snapshot 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 +4 -4
- data/README.md +2 -1
- data/lib/assets/SnapfileTemplate +2 -1
- data/lib/snapshot.rb +1 -0
- data/lib/snapshot/dependency_checker.rb +2 -2
- data/lib/snapshot/page.html.erb +1 -0
- data/lib/snapshot/reports_generator.rb +2 -1
- data/lib/snapshot/simulators.rb +14 -0
- data/lib/snapshot/snapshot_file.rb +2 -13
- data/lib/snapshot/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1657aac81439fe19362e073f189c137b841c194
|
4
|
+
data.tar.gz: 486885b3dc7e0a4e9917be796d9a4a9b834e5472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb7ceeb2cebc1d40066f1da16c2ee655ed65ca1df41ac3a0df6f0ba3abbddaaccc30484262521d223592fbc2da5c005f54158e33d75c301c4df04002ebb9299a
|
7
|
+
data.tar.gz: bc4b7a77f96d64113ad0ecf9104a8335e9b463eae5cc7fd195170b5a49b97899284f67d397c9dc3f37b0b779a10a5a0cffe6527961c5cdac805c8faec5c20a61
|
data/README.md
CHANGED
data/lib/assets/SnapfileTemplate
CHANGED
data/lib/snapshot.rb
CHANGED
@@ -19,8 +19,8 @@ module Snapshot
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.check_simulators
|
22
|
-
Helper.log.debug "Found #{
|
23
|
-
if
|
22
|
+
Helper.log.debug "Found #{Simulators.available_devices.count} simulators."
|
23
|
+
if Simulators.available_devices.count < 1
|
24
24
|
Helper.log.fatal '#############################################################'
|
25
25
|
Helper.log.fatal "# You have to add new simulators using Xcode"
|
26
26
|
Helper.log.fatal "# Xcode => Window => Devices"
|
data/lib/snapshot/page.html.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'erb'
|
2
|
-
require
|
2
|
+
require 'fastimage'
|
3
3
|
|
4
4
|
module Snapshot
|
5
5
|
class ReportsGenerator
|
@@ -52,6 +52,7 @@ module Snapshot
|
|
52
52
|
'iPhone6' => "iPhone 6",
|
53
53
|
'iPhone5' => "iPhone 5",
|
54
54
|
'iPhone4' => "iPhone 4",
|
55
|
+
'iOS-iPad' => "iPad"
|
55
56
|
}
|
56
57
|
end
|
57
58
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Snapshot
|
2
|
+
class Simulators
|
3
|
+
def self.available_devices
|
4
|
+
if not @result
|
5
|
+
@result = []
|
6
|
+
`instruments -s`.split("\n").each do |current|
|
7
|
+
# Example: "iPhone 5 (8.1 Simulator) [C49ECC4A-5A3D-44B6-B9BF-4E25BC326400]"
|
8
|
+
@result << current.split(' [').first if current.include?"Simulator"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
return @result
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -71,8 +71,8 @@ module Snapshot
|
|
71
71
|
value.each do |current|
|
72
72
|
current += " (#{@config.ios_version} Simulator)" unless current.include?"Simulator"
|
73
73
|
|
74
|
-
unless
|
75
|
-
raise "Device '#{current}' not found. Available device types: #{
|
74
|
+
unless Simulators.available_devices.include?current
|
75
|
+
raise "Device '#{current}' not found. Available device types: #{Simulators.available_devices}".red
|
76
76
|
else
|
77
77
|
@config.devices << current
|
78
78
|
end
|
@@ -88,16 +88,5 @@ module Snapshot
|
|
88
88
|
end
|
89
89
|
@config.languages = value
|
90
90
|
end
|
91
|
-
|
92
|
-
def self.available_devices
|
93
|
-
if not @result
|
94
|
-
@result = []
|
95
|
-
`instruments -s`.split("\n").each do |current|
|
96
|
-
# Example: "iPhone 5 (8.1 Simulator) [C49ECC4A-5A3D-44B6-B9BF-4E25BC326400]"
|
97
|
-
@result << current.split(' [').first if current.include?"Simulator"
|
98
|
-
end
|
99
|
-
end
|
100
|
-
return @result
|
101
|
-
end
|
102
91
|
end
|
103
92
|
end
|
data/lib/snapshot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/snapshot/reports_generator.rb
|
188
188
|
- lib/snapshot/runner.rb
|
189
189
|
- lib/snapshot/screenshot_flatten.rb
|
190
|
+
- lib/snapshot/simulators.rb
|
190
191
|
- lib/snapshot/snapfile_creator.rb
|
191
192
|
- lib/snapshot/snapshot_config.rb
|
192
193
|
- lib/snapshot/snapshot_file.rb
|