snapshot 0.4.3 → 0.4.4

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: 8ef5722f4c32f81f127f18884dec41265401a529
4
- data.tar.gz: 03e0163a980e80c4511bdd9b721e6eecbe2702d3
3
+ metadata.gz: 6af17a18ac0afbd425c435781e0b8ac827581d12
4
+ data.tar.gz: 3755960f20b06fef9e168c11a85e69c65d460a73
5
5
  SHA512:
6
- metadata.gz: e3d96e8e512bfc62217c38e01c70652a266515a9ec6abcec35808c51d2ae345b1154c222fed5d8471176089b46a2992b23aef9f0f629a10b353bae4dbc2368e5
7
- data.tar.gz: 138574f7727d22549203de4bd733d1f57746d19f795f31402485bd49af1058fa7e6455c53d80f5e5f82adb1d002cee884e7111797a0fb3312142eba0e5af39d9
6
+ metadata.gz: 81bb99f82a005ff0ae676de149de5dc950824626dad4063203d1d2b775157b4bfaee9ce6190544c66dea95074b1999a987ac4dcdfe69e7e35d77e564805327ee
7
+ data.tar.gz: a90c8d9ba57e8ffdeb1cd68aa599ca3ad52082fd8e1c51492361b0bbc1f777b4c874cbf78cd4a99b1fbe47c737119aac3804c3cf319749c79c9ff8341fc1bab4
data/README.md CHANGED
@@ -301,7 +301,7 @@ Unfortunately ```Instruments``` sometimes decides, to not respond to anything. W
301
301
  The only way to fix this, is a restart of the Mac.
302
302
 
303
303
  # Need help?
304
- - If there is a technical problem with ```snapshot```, submit an issue. Run ```snapshot --trace``` to get the stacktrace.
304
+ - If there is a technical problem with ```snapshot```, submit an issue.
305
305
  - I'm available for contract work - drop me an email: snapshot@krausefx.com
306
306
 
307
307
  # License
@@ -3,47 +3,57 @@
3
3
  $:.push File.expand_path("../../lib", __FILE__)
4
4
 
5
5
  require 'snapshot'
6
- require 'commander/import'
6
+ require 'commander'
7
7
  require 'snapshot/snapfile_creator'
8
8
  require 'snapshot/snapshot_config'
9
9
 
10
10
  HighLine.track_eof = false
11
11
 
12
12
 
13
- # Commander
14
- program :version, Snapshot::VERSION
15
- program :description, 'CLI for \'Snapshot\' - Automate taking localized screenshots of your iOS app on every device'
16
- program :help, 'Author', 'Felix Krause <snapshot@krausefx.com>'
17
- program :help, 'Website', 'http://fastlane.tools'
18
- program :help, 'GitHub', 'https://github.com/krausefx/snapshot'
19
- program :help_formatter, :compact
13
+ class SnapshotApplication
14
+ include Commander::Methods
20
15
 
21
- global_option('--verbose') { $verbose = true }
16
+ def run
17
+ program :version, Snapshot::VERSION
18
+ program :description, 'CLI for \'Snapshot\' - Automate taking localized screenshots of your iOS app on every device'
19
+ program :help, 'Author', 'Felix Krause <snapshot@krausefx.com>'
20
+ program :help, 'Website', 'http://fastlane.tools'
21
+ program :help, 'GitHub', 'https://github.com/krausefx/snapshot'
22
+ program :help_formatter, :compact
22
23
 
24
+ global_option '--snapfile PATH', String, 'Custom path for your Snapfile.'
25
+ global_option '--noclean', 'Skips the clean process of the build command when running snapshot.'
26
+ global_option('--verbose', 'Shows all output printed by Instruments.') { $verbose = true }
23
27
 
24
- default_command :run
28
+ always_trace!
25
29
 
26
- command :run do |c|
27
- c.syntax = 'snapshot'
28
- c.description = 'Run the script, to take all the screenshots'
29
- c.option '--snapfile STRING', String, 'Custom path for your Snapfile'
30
- c.option '--noclean', 'Skips the clean process when running snapshot.'
30
+ command :run do |c|
31
+ c.syntax = 'snapshot'
32
+ c.description = 'Take new screenshots based on the Snapfile.'
31
33
 
32
- c.action do |args, options|
33
- path = (Snapshot::Helper.fastlane_enabled?? './fastlane' : '.')
34
- Dir.chdir(path) do # switch the context
35
- Snapshot::SnapshotConfig.shared_instance(options.snapfile)
36
- Snapshot::Runner.new.work(clean: !options.noclean)
34
+ c.action do |args, options|
35
+ path = (Snapshot::Helper.fastlane_enabled?? './fastlane' : '.')
36
+ Dir.chdir(path) do # switch the context
37
+ Snapshot::SnapshotConfig.shared_instance(options.snapfile)
38
+ Snapshot::Runner.new.work(clean: !options.noclean)
39
+ end
40
+ end
37
41
  end
38
- end
39
- end
40
42
 
41
- command :init do |c|
42
- c.syntax = 'snapshot init'
43
- c.description = "Creates a new Snapfile in the current directory"
43
+ command :init do |c|
44
+ c.syntax = 'snapshot init'
45
+ c.description = "Creates a new Snapfile in the current directory"
46
+
47
+ c.action do |args, options|
48
+ path = (Snapshot::Helper.fastlane_enabled?? './fastlane' : '.')
49
+ Snapshot::SnapfileCreator.create(path)
50
+ end
51
+ end
44
52
 
45
- c.action do |args, options|
46
- path = (Snapshot::Helper.fastlane_enabled?? './fastlane' : '.')
47
- Snapshot::SnapfileCreator.create(path)
53
+ default_command :run
54
+
55
+ run!
48
56
  end
49
- end
57
+ end
58
+
59
+ SnapshotApplication.new.run
@@ -73,6 +73,7 @@ module Snapshot
73
73
  stdout.each do |line|
74
74
  lines << line
75
75
  begin
76
+ puts line.strip if $verbose
76
77
  result = parse_test_line(line)
77
78
  case result
78
79
  when :retry
@@ -1,3 +1,3 @@
1
1
  module Snapshot
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  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: 0.4.3
4
+ version: 0.4.4
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-01-27 00:00:00.000000000 Z
11
+ date: 2015-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json