snaptoken 0.23.0 → 0.24.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: '006850149613e2b91770ee1d314f523a0e0741e2'
4
- data.tar.gz: 4499961406d699b379850ae58c59d0e3251945c5
3
+ metadata.gz: 2b6525154b59c8cca1e88b42cb2368311fa54332
4
+ data.tar.gz: 9651c5f3d0fd6c7936498fabe7c39e7f919f2b84
5
5
  SHA512:
6
- metadata.gz: 9d6870227063fb6e61802d4838729a9797d56dba1baa17802384b3d3ea46ddb5a5886708ba7290e351db3f7b56314e74f121bb3a7271840490b8b61d904e018d
7
- data.tar.gz: e7816626ea373b8c46f249a40acc499c19c76279499d9ebb65deab49778382a3e899a0b1feae248d700709eae5a697d2f5394b1b788e99163476d75fab5c4649
6
+ metadata.gz: 9d6f248e6a9a3e163ec598eda5fc9084e193079f36f0b2b88908d9686eaeffc897ae0dbf5a5343fbfce25bef0d61e69e43d8b43252faabfd536bc35fa8b66af1
7
+ data.tar.gz: 39140694465988218f57547a027929eaa6173d75a3f3f7fcd2e0fec6cd36c6cd786ef3e3c684356c5998e99fec714496ebaff940d3ecd843d0e9290fe42bc1fa
@@ -30,7 +30,7 @@ class Snaptoken::Commands::BaseCommand
30
30
  end
31
31
  @opts = {}
32
32
  parser.parse!(@args)
33
- rescue OptionParser::InvalidOption => e
33
+ rescue OptionParser::InvalidOption, OptionParser::InvalidArgument => e
34
34
  puts "#{e.message}"
35
35
  puts
36
36
  parser.parse("--help")
@@ -13,10 +13,15 @@ class Snaptoken::Commands::Sync < Snaptoken::Commands::BaseCommand
13
13
  end
14
14
 
15
15
  def self.usage
16
- "[-q] [<source>]"
16
+ "[-q] [-s <source>]"
17
17
  end
18
18
 
19
19
  def setopts!(o)
20
+ o.on("-s", "--source SOURCE", [:repo, :steps, :diff],
21
+ "Override the default sync source") do |src|
22
+ @opts[:source] = src
23
+ end
24
+
20
25
  o.on("-q", "--quiet", "Don't output progress") do |q|
21
26
  @opts[:quiet] = q
22
27
  end
@@ -26,8 +31,8 @@ class Snaptoken::Commands::Sync < Snaptoken::Commands::BaseCommand
26
31
  needs! :config
27
32
 
28
33
  source = nil
29
- if !@args.empty?
30
- source = @args.first
34
+ if @opts[:source]
35
+ source = @opts[:source].to_s
31
36
  else
32
37
  FileUtils.cd(@config[:path])
33
38
  repo_exists = File.exist?("repo")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptoken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Ruten