dpl 2.0.0.alpha.7 → 2.0.0.alpha.8

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: 66cc8adc7935d0da254391ac5135aba535446c14
4
- data.tar.gz: 49af677f55e86c5eb07f79d89d94157687be879b
3
+ metadata.gz: 8626f9f9647e9b3dd0b9398323d8a3b2a89e017d
4
+ data.tar.gz: b23f6733a4989c87abf3e8c01812e686698e0ced
5
5
  SHA512:
6
- metadata.gz: 437f05d515c4b2fb0dbabf7f5b048b25a34db045d3cfba265f7172d45f1d2a9e95ed2a6056c7240da9db72ee722a67a8c7090bc25442039c7bc28b7ad26cda86
7
- data.tar.gz: 8e9b20a8e55fab270d90d674f1356effeac52a714f379a30951d01eff5680980c0d4d86d8cc81c4965bf425da99c9b1bfc22c192c356df6a1583c8f0aa1d9959
6
+ metadata.gz: f2d6e4649834d5108f1bd01e8e42cd920c40b4e295099407989ec1919503a863dd3551bd5b8302419ba0a24b8e119ea30218d45d8c0fb2f4f258df245b3faa89
7
+ data.tar.gz: 2ceda8a5f92878c9913c337d53f4e8622e8d042155a228f0cb9c17b57ea32cb768f3fd2818a544c399844751c81cdcc4b505b610277216ffeaa452a4787032ab
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dpl (2.0.0.alpha.6)
4
+ dpl (2.0.0.alpha.7)
5
5
  cl (~> 1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -571,7 +571,7 @@ given as `AZURE_WA_PASSWORD=<password>`.
571
571
 
572
572
  ### Bintray
573
573
 
574
- Support for deployments to Bintray is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
574
+ Support for deployments to Bintray is in **beta**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
575
575
 
576
576
  ```
577
577
  Usage: dpl bintray [options]
@@ -696,7 +696,7 @@ given as `BOXFUSE_SECRET=<secret>`.
696
696
 
697
697
  ### Cargo
698
698
 
699
- Support for deployments to Cargo is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
699
+ Support for deployments to Cargo is in **beta**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
700
700
 
701
701
  ```
702
702
  Usage: dpl cargo [options]
@@ -1599,7 +1599,7 @@ as `NETLIFY_AUTH=<auth>`.
1599
1599
 
1600
1600
  ### npm
1601
1601
 
1602
- Support for deployments to npm is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
1602
+ Support for deployments to npm is in **beta**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
1603
1603
 
1604
1604
  ```
1605
1605
  Usage: dpl npm [options]
@@ -1764,7 +1764,7 @@ be given as `PUPPETFORGE_PASSWORD=<password>`.
1764
1764
 
1765
1765
  ### PyPI
1766
1766
 
1767
- Support for deployments to PyPI is in **alpha**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
1767
+ Support for deployments to PyPI is in **beta**. Please see [Maturity Levels](https://github.com/travis-ci/dpl/#maturity-levels) for details.
1768
1768
 
1769
1769
  ```
1770
1770
  Usage: dpl pypi [options]
@@ -5,7 +5,7 @@ require 'find'
5
5
  module Dpl
6
6
  module Providers
7
7
  class Bintray < Provider
8
- status :alpha
8
+ status :beta
9
9
 
10
10
  description sq(<<-str)
11
11
  tbd
@@ -1,7 +1,7 @@
1
1
  module Dpl
2
2
  module Providers
3
3
  class Cargo < Provider
4
- status :alpha
4
+ status :beta
5
5
 
6
6
  description sq(<<-str)
7
7
  tbd
@@ -29,10 +29,12 @@ module Dpl
29
29
  opt '--acl ACL', 'Access control to set for uploaded objects', default: 'private', enum: %w(private public-read public-read-write authenticated-read bucket-owner-read bucket-owner-full-control), see: 'https://cloud.google.com/storage/docs/reference-headers#xgoogacl'
30
30
  opt '--detect_encoding', 'HTTP header Content-Encoding to set for files compressed with gzip and compress utilities.'
31
31
  opt '--cache_control HEADER', 'HTTP header Cache-Control to suggest that the browser cache the file.', see: 'https://cloud.google.com/storage/docs/xml-api/reference-headers#cachecontrol'
32
+ opt '--glob GLOB', default: '**/*'
32
33
 
33
34
  cmds install: 'curl -L %{URL} | tar xz -C ~ && ~/google-cloud-sdk/install.sh --path-update false --usage-reporting false --command-completion false',
34
35
  login_key: 'gcloud auth activate-service-account --key-file=%{key_file}',
35
- copy: 'gsutil %{gs_opts}cp %{copy_opts}-r %{source} %{target}'
36
+ rsync: 'gsutil %{gs_opts} rsync %{rsync_opts} %{glob} %{target}',
37
+ copy: 'gsutil %{gs_opts} cp %{copy_opts} -r %{source} %{target}'
36
38
 
37
39
  msgs login_key: 'Authenticating with service account key file %{key_file}',
38
40
  login_creds: 'Authenticating with access key: %{access_key_id}'
@@ -60,7 +62,7 @@ module Dpl
60
62
 
61
63
  def deploy
62
64
  Dir.chdir(local_dir) do
63
- source_files.each { |file| copy(file) }
65
+ files.each { |file| copy(file) }
64
66
  end
65
67
  end
66
68
 
@@ -79,12 +81,18 @@ module Dpl
79
81
  write_file '~/.boto', interpolate(BOTO, opts, secure: true), 0600
80
82
  end
81
83
 
82
- def source_files
83
- Dir.glob(*glob).select { |path| File.file?(path) }
84
+ def files
85
+ Dir.glob(*glob_args).select { |path| File.file?(path) }
84
86
  end
85
87
 
86
88
  def copy(source)
87
- shell :copy, gs_opts: gs_opts(source), source: source
89
+ to = [target.sub(%r(/$), ''), source].join('/')
90
+ shell :copy, gs_opts: gs_opts(source), source: source, target: to
91
+ end
92
+
93
+ def dirname(path)
94
+ dir = File.dirname(path)
95
+ dir unless dir.empty? || dir == '.'
88
96
  end
89
97
 
90
98
  def gs_opts(path)
@@ -110,10 +118,10 @@ module Dpl
110
118
  type.to_s if type
111
119
  end
112
120
 
113
- def glob
114
- glob = ['**/*']
115
- glob << File::FNM_DOTMATCH if dot_match?
116
- glob
121
+ def glob_args
122
+ args = [glob]
123
+ args << File::FNM_DOTMATCH if dot_match?
124
+ args
117
125
  end
118
126
  end
119
127
  end
@@ -1,7 +1,7 @@
1
1
  module Dpl
2
2
  module Providers
3
3
  class Npm < Provider
4
- status :alpha
4
+ status :beta
5
5
 
6
6
  full_name 'npm'
7
7
 
@@ -71,7 +71,7 @@ module Dpl
71
71
  if npm_version =~ /^1/ || auth_method == 'auth'
72
72
  "_auth = #{api_token}\nemail = #{email}"
73
73
  else
74
- "//#{registry.sub('https://', '').sub(%r(/$), '')}/:_authToken=#{api_token}"
74
+ "//#{host(registry).sub('https://', '').sub(%r(/$), '')}/:_authToken=#{api_token}"
75
75
  end
76
76
  end
77
77
 
@@ -79,7 +79,11 @@ module Dpl
79
79
  return super if super
80
80
  data = package_json
81
81
  url = data && data.fetch('publishConfig', {})['registry']
82
- url ? URI(url).host : REGISTRY
82
+ url ? host(url) : REGISTRY
83
+ end
84
+
85
+ def host(url)
86
+ URI(url).host
83
87
  end
84
88
 
85
89
  def package_json
@@ -1,7 +1,7 @@
1
1
  module Dpl
2
2
  module Providers
3
3
  class Pypi < Provider
4
- status :alpha
4
+ status :beta
5
5
 
6
6
  full_name 'PyPI'
7
7
 
data/lib/dpl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dpl
2
- VERSION = '2.0.0.alpha.7'
2
+ VERSION = '2.0.0.alpha.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha.7
4
+ version: 2.0.0.alpha.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-09-26 00:00:00.000000000 Z
13
+ date: 2019-10-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cl