ploy 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDM2ZGI2OWE5OTY0NmE1MWY5Y2EwYzU4NTgxNzJkMDI3ZDFhMjc5Nw==
4
+ OWFlZjlhYzU5NjBjMGNhYWMzMDA3NmU5YmZhZTYzYmYyMGU3MmM5Yg==
5
5
  data.tar.gz: !binary |-
6
- OWQ5MWYyODUxNzRjNDlhNTk1NTY3ZGU2MjJiZjhkOWMxZWE5MmJiMw==
6
+ M2NiNmMxNzE3NzVhZjJhMGE4MTc3OGVmZmY4MmRmYWU0ODFhMDcxNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmM5YjZhODQyYWIwODZjOTc2N2E2YzEwMGZkN2NiODVhOGNmZWVkNTBiNDYw
10
- ZmMxMjRmNjcwYTQyMWJmZWMwMWE0MjQxYTk1YWRlOTMzMjZkZTk3MzFhY2Fm
11
- YmRhODFiZDU2N2ZjNTAzNmQzYjNmZmI0ZjkyNmY0ZThhNjMwYmE=
9
+ Mzc0YTQyNzQ4NTJjYzM0MzE4NDZiMDQyNDM3OWNlMGZjYTdiMzViN2JkZmY1
10
+ ODU2YWU4NjNmMTQwMWYwNjRiZTVlMTRkZWU1NTkyNWIyZjVkMmQwNjE4YjA1
11
+ NDE5Y2MyZTZlNThkMmExYzg3YzEwZTE2NzE3ZmEzZmNhM2FlOTY=
12
12
  data.tar.gz: !binary |-
13
- MmFkNzJhNTU1YTVmNzExMmZlOTU3ZTI2YjQzOTM3ZTRlYjBiN2ExZGMxZDE1
14
- MjNjZjA5OWY5MGJiMTM4ZTZmOWIwODBjY2JkMTk2MTdmMTc4MTNiYTI5MTkz
15
- ZjBmZGExMGJkYTNhMzFmNTQ2YTgwYzBjYTQ1MzU0OTY3ZTZjNjQ=
13
+ ZDYyYzJkZDI2ZTcyMTA1YTIxYmY0NjJiMjNkZjVkOWFiNGFjNWVjYmExMzIz
14
+ MmQ1N2U2YWQxYzczZDZlNDg0NDk5MWMzMTNlMTU5NTlmZmMxYjFiNTI0ZDQ3
15
+ YjMxYTBmZDM4ZDRkZTA0NTMyMzZjYmIwN2ZjMTZkY2QyYThjMGU=
@@ -6,7 +6,7 @@ module Ploy
6
6
  module Command
7
7
  class Bless < Base
8
8
  def run(argv)
9
- o = {}
9
+ o = { :variant => "blessed" }
10
10
  optparser(o).parse!(argv)
11
11
  pkgs = []
12
12
  if (o[:datapath]) then
@@ -16,9 +16,9 @@ module Ploy
16
16
  end
17
17
 
18
18
  pkgs.each do |pkg|
19
- blessed = pkg.bless
19
+ blessed = pkg.bless(o[:variant])
20
20
  blessed.make_current
21
- puts "blessed #{pkg.deploy_name}/#{pkg.branch} at #{pkg.version}"
21
+ puts "blessed #{pkg.deploy_name}/#{pkg.branch} at #{pkg.version} with variant #{o[:variant]}"
22
22
  end
23
23
  end
24
24
 
@@ -60,6 +60,9 @@ helptext
60
60
  opts.on("-f", "--data-file PATH", "load a set of dep/branch/version data from a", "version file compatible with ploy oracle output") do |path|
61
61
  o[:datapath] = path
62
62
  end
63
+ opts.on("--variant VARIANT", "bless with a different variant. default is (blessed)") do |variant|
64
+ o[:variant] = variant
65
+ end
63
66
  end
64
67
  return options
65
68
  end
@@ -7,7 +7,7 @@ module Ploy
7
7
  module Command
8
8
  class List < Base
9
9
  def run(argv)
10
- o = {:branch => 'master', :all => false, :json => false, :deploy => nil}
10
+ o = {:branch => 'master', :all => false, :json => false, :deploy => nil, :variant => 'blessed'}
11
11
  optparser(o).parse!(argv)
12
12
  #puts o.to_yaml
13
13
 
@@ -24,7 +24,7 @@ module Ploy
24
24
 
25
25
  packages.each do |name|
26
26
  current = Ploy::Package.new(bucket, name, branch, 'current').remote_version
27
- blessed_current = Ploy::Package.new(bucket, name, branch, 'current', 'blessed').remote_version
27
+ blessed_current = Ploy::Package.new(bucket, name, branch, 'current', o[:variant]).remote_version
28
28
 
29
29
  if o[:all] || current != blessed_current
30
30
  if o[:json]
@@ -72,7 +72,9 @@ helptext
72
72
  opts.on("-B", "--branch BRANCH", "use the given branch instead of #{o[:branch]}") do |branch|
73
73
  o[:branch] = branch
74
74
  end
75
-
75
+ opts.on("--variant VARIANT", "bless with a different variant. default is (blessed)") do |variant|
76
+ o[:variant] = variant
77
+ end
76
78
  opts.on("-a", "--all", "include packages where blessed is current") do |asdf|
77
79
  o[:all] = true
78
80
  end
data/lib/ploy/package.rb CHANGED
@@ -42,12 +42,12 @@ module Ploy
42
42
  end
43
43
  end
44
44
 
45
- def blessed
46
- return Ploy::Package.new(@bucket, @deploy_name, @branch, @version, "blessed")
45
+ def blessed(variant="blessed")
46
+ return Ploy::Package.new(@bucket, @deploy_name, @branch, @version, variant)
47
47
  end
48
48
 
49
- def bless
50
- b = self.blessed
49
+ def bless(variant="blessed")
50
+ b = self.blessed(variant)
51
51
  @store.copy(
52
52
  location,
53
53
  b.location
@@ -43,7 +43,7 @@ module Ploy
43
43
  package_names = []
44
44
  dirs.each do |dir|
45
45
  dir.chop!
46
- if dir != 'hub' && dir != 'blessed'
46
+ if dir != 'hub' && dir != 'blessed' && dir != 'staging'
47
47
  package_names.push(dir)
48
48
  end
49
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce