bump-cli 0.6.0 → 0.6.1

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
  SHA256:
3
- metadata.gz: a76424c2ad6eed8a8b65caa28e57e26c7efb892b8909a9e6aed60871b9964105
4
- data.tar.gz: 4f597a0961e36cfb2108409198a11abae798333b49fadf298fbd0f7b332c529a
3
+ metadata.gz: 165f19120b51a189b1f7428e00901fed5ea5b91bfb5f21bc2f9fe983adc3cc31
4
+ data.tar.gz: 724ec534aff1c7d264b185ca8c9d6bf46db552d8149d39fe2a2cf3c2185a341d
5
5
  SHA512:
6
- metadata.gz: bda499aed9b3edfb4600ccd8ede77a65dd6bd98403937f29b714c557e8fb5457f8258d49d55ab5968499c5e10ff67b6a0cd446d3304a5b0ea69afeab20f0e47d
7
- data.tar.gz: 2fa948728d09d134b552954d12d2f64d3141bf5c0422ffdd95ec853afed861aed0440c4c6a3ff5378025f5788d1ceb535e04c37a12e8b4180441d35b850b499c
6
+ metadata.gz: 5a5df45b5a14cb7e79063504ce1a5dc5e5342088840de2dcf6eca79928712b46115ed590765e4a516c497e461eb12cdeaa65ce052f217decfb5eb5e9075bfc7a
7
+ data.tar.gz: 3c3ab329ab7c5bd4d0bada3147cd4fdb8c61131fcc32efb3e980811e48bdecef868d1d99823e099b7b612b4b18755c1b7706cc71adb129e717dc2ddfa265e43c
@@ -3,7 +3,7 @@ jobs:
3
3
  build-latest: &common-build
4
4
  working_directory: ~/bump-cli
5
5
  docker:
6
- - image: circleci/ruby:2.5.0-node
6
+ - image: circleci/ruby:latest
7
7
  steps:
8
8
  - checkout
9
9
  - run:
@@ -29,20 +29,30 @@ jobs:
29
29
 
30
30
  - run:
31
31
  name: Run tests
32
- command: rake
32
+ command: bundle exec rspec
33
+ build-2-6:
34
+ <<: *common-build
35
+ docker:
36
+ - image: circleci/ruby:2.6
37
+ build-2-5:
38
+ <<: *common-build
39
+ docker:
40
+ - image: circleci/ruby:2.5
33
41
  build-2-4:
34
42
  <<: *common-build
35
43
  docker:
36
- - image: circleci/ruby:2.4.3-node
44
+ - image: circleci/ruby:2.4
37
45
  build-2-3:
38
46
  <<: *common-build
39
47
  docker:
40
- - image: circleci/ruby:2.3.6-node
48
+ - image: circleci/ruby:2.3
41
49
 
42
50
  workflows:
43
51
  version: 2
44
52
  build:
45
53
  jobs:
46
54
  - build-latest
55
+ - build-2-6
56
+ - build-2-5
47
57
  - build-2-4
48
58
  - build-2-3
@@ -20,14 +20,14 @@ module Bump
20
20
  with_errors_rescued do
21
21
  response = post(
22
22
  url: API_URL + "/versions",
23
- body: body(file, options).to_json,
23
+ body: body(file, **options).to_json,
24
24
  token: options[:token]
25
25
  )
26
26
 
27
27
  if response.code == 201
28
- puts "New version has been successfully deployed."
28
+ puts "The new version is currently being processed."
29
29
  elsif response.code == 204
30
- puts "Version was already deployed."
30
+ puts "This version has already been deployed."
31
31
  else
32
32
  display_error(response)
33
33
  end
@@ -12,7 +12,7 @@ module Bump
12
12
  with_errors_rescued do
13
13
  response = post(
14
14
  url: API_URL + "/previews",
15
- body: body(file, options).to_json
15
+ body: body(file, **options).to_json
16
16
  )
17
17
 
18
18
  if response.code == 201
@@ -20,7 +20,7 @@ module Bump
20
20
  with_errors_rescued do
21
21
  response = post(
22
22
  url: API_URL + "/validations",
23
- body: body(file, options).to_json,
23
+ body: body(file, **options).to_json,
24
24
  token: options[:token]
25
25
  )
26
26
 
@@ -7,9 +7,11 @@ module Bump
7
7
  def load(content)
8
8
  [:json, ::JSON.parse(content)]
9
9
  rescue ::JSON::ParserError => e
10
- [:yaml, ::YAML.safe_load(content, [Date, Time])]
11
- rescue ::Psych::SyntaxError
12
- raise 'Invalid format: definition file should be valid YAML or JSON'
10
+ begin
11
+ [:yaml, ::YAML.safe_load(content, [Date, Time])]
12
+ rescue ::Psych::SyntaxError
13
+ [:text, content]
14
+ end
13
15
  end
14
16
 
15
17
  def dump(definition, format)
@@ -25,12 +25,16 @@ module Bump
25
25
 
26
26
  attr_reader :base_path, :processed, :external_references
27
27
 
28
- def traverse_and_replace_external_references(current, parent = nil)
28
+ def traverse_and_replace_external_references(current)
29
29
  current.each do |key, value|
30
30
  if key == '$ref'
31
31
  current[key] = replace_external_reference(value)
32
32
  elsif value.is_a?(Hash)
33
- traverse_and_replace_external_references(value, key)
33
+ traverse_and_replace_external_references(value)
34
+ elsif value.is_a?(Array)
35
+ value.each do |array_value|
36
+ traverse_and_replace_external_references(array_value)
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -1,5 +1,5 @@
1
1
  module Bump
2
2
  class CLI
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bump-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehdi Lahmam
8
8
  - Sébastien Charrier
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-06-05 00:00:00.000000000 Z
12
+ date: 2020-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-cli
@@ -166,7 +166,7 @@ licenses:
166
166
  metadata:
167
167
  allowed_push_host: https://rubygems.org
168
168
  source_code_uri: https://github.com/bump-sh/bump-cli
169
- post_install_message:
169
+ post_install_message:
170
170
  rdoc_options: []
171
171
  require_paths:
172
172
  - lib
@@ -181,9 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.7.4
186
- signing_key:
184
+ rubygems_version: 3.1.2
185
+ signing_key:
187
186
  specification_version: 4
188
187
  summary: Bump.sh CLI
189
188
  test_files: []