bento-ya 1.0.1 → 1.1.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: d3a4a811fdc2c81366c62522b1b758f45fb8a12e
4
- data.tar.gz: 929e82a5352413218acbd12c3cc371f278431569
3
+ metadata.gz: eb8eee07d289ad6a42cbb7164c870cb266399555
4
+ data.tar.gz: ccabec4ef641ddf8928912df3699cef8adc8f98d
5
5
  SHA512:
6
- metadata.gz: 4e88969658d00883c8f95b034d45e7f5ae78a2668b676a2f4468dce0a27db38a38797bcc79e8ef1f3905f954580e0c88977310e0d1bb97fb5b6679c3b25028ef
7
- data.tar.gz: db8fdd9566b2ee62a5b7e6db3c704abbe5cbef24cde7fc1c204d284d823f4328e247960e4d0bfc9756da1ca1de41787e2159006dbe96c639c0ef3365eef3130d
6
+ metadata.gz: 1ff44e475ade00eb806139b7ea5163297afacf29268b6be9fbe6856c3388e9cb038e1bfd69ca0a35dc2f8ecd1fffc5860938a50cecfa6c2470261ade97a5f8d0
7
+ data.tar.gz: 98aee6fff66e409d3e0c90d33d1137c561b894b5e6e0f5eb53f0d1dd2284547a1327160189ce18f382f80bddc9fb4b23d9f1a176dc479a43e44f2a4107e924bd
@@ -1,4 +1,10 @@
1
1
  # Change Log
2
+ ## [v1.1.0](https://github.com/cheeseplus/bento-ya/tree/v1.1.0) (2018-01-02)
3
+ [Full Changelog](https://github.com/cheeseplus/bento-ya/compare/v1.0.1...v1.1.0)
4
+
5
+ ### NEW FEATURE
6
+
7
+ * Support for uploading to N and N.N slugs via builds.yml
2
8
 
3
9
  ## [v1.0.1](https://github.com/cheeseplus/bento-ya/tree/v1.0.1) (2017-09-14)
4
10
  [Full Changelog](https://github.com/cheeseplus/bento-ya/compare/v1.0.0...v1.0.1)
@@ -65,7 +65,7 @@ class BuildMetadata
65
65
  override_version
66
66
  else
67
67
  merged_vars.fetch("version", "#{UNKNOWN}.TIMESTAMP").
68
- rpartition(".").first.concat(".#{build_timestamp}")
68
+ rpartition(".").first.concat("#{build_timestamp}")
69
69
  end
70
70
  end
71
71
 
@@ -22,15 +22,26 @@ class UploadRunner
22
22
 
23
23
  def upload(md_file)
24
24
  md = box_metadata(md_file)
25
- box_description = "a bento box for #{md['name']}"
26
- box = vc_account.ensure_box(md["name"], box_description, private_box?(md["name"]))
27
- version = box.ensure_version(md["version"], File.read(md_file))
25
+ box_desc = "a bento box for #{md['name']}"
26
+ box = vc_account.ensure_box(md["name"], box_desc, private_box?(md["name"]))
27
+ box_ver = box.ensure_version(md["version"], File.read(md_file))
28
+
29
+ if builds_yml["slugs"].values.include?(box.name)
30
+ slug_desc = "a bento box for #{builds_yml['slugs'].key(box.name)}"
31
+ slug = vc_account.ensure_box(builds_yml["slugs"].key(box.name), slug_desc, false)
32
+ slug_ver = slug.ensure_version(md["version"], File.read(md_file))
33
+ end
28
34
 
29
35
  md["providers"].each do |k, v|
30
- provider = version.ensure_provider(k, nil)
31
- banner("Uploading #{box.name}/#{version.version}/#{provider.name}...")
36
+ provider = box_ver.ensure_provider(k, nil)
37
+ banner("Uploading #{box.name}/#{box_ver.version}/#{provider.name}...")
32
38
  provider.upload_file("builds/#{v['file']}")
33
39
  banner("#{provider.download_url}")
40
+ next unless builds_yml["slugs"].values.include?(box.name)
41
+ slug_provider = slug_ver.ensure_provider(k, nil)
42
+ banner("Uploading #{slug.name}/#{slug_ver.version}/#{slug_provider.name}...")
43
+ slug_provider.upload_file("builds/#{v['file']}")
44
+ banner("#{slug_provider.download_url}")
34
45
  end
35
46
  end
36
47
  end
@@ -1,3 +1,3 @@
1
1
  module Bento
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bento-ya
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Thomas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2018-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.6.11
94
+ rubygems_version: 2.6.13
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: A RubyGem for managing chef/bento builds