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 +4 -4
- data/.circleci/config.yml +14 -4
- data/lib/bump/cli/commands/deploy.rb +3 -3
- data/lib/bump/cli/commands/preview.rb +1 -1
- data/lib/bump/cli/commands/validate.rb +1 -1
- data/lib/bump/cli/parser.rb +5 -3
- data/lib/bump/cli/references.rb +6 -2
- data/lib/bump/cli/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 165f19120b51a189b1f7428e00901fed5ea5b91bfb5f21bc2f9fe983adc3cc31
|
4
|
+
data.tar.gz: 724ec534aff1c7d264b185ca8c9d6bf46db552d8149d39fe2a2cf3c2185a341d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a5df45b5a14cb7e79063504ce1a5dc5e5342088840de2dcf6eca79928712b46115ed590765e4a516c497e461eb12cdeaa65ce052f217decfb5eb5e9075bfc7a
|
7
|
+
data.tar.gz: 3c3ab329ab7c5bd4d0bada3147cd4fdb8c61131fcc32efb3e980811e48bdecef868d1d99823e099b7b612b4b18755c1b7706cc71adb129e717dc2ddfa265e43c
|
data/.circleci/config.yml
CHANGED
@@ -3,7 +3,7 @@ jobs:
|
|
3
3
|
build-latest: &common-build
|
4
4
|
working_directory: ~/bump-cli
|
5
5
|
docker:
|
6
|
-
- image: circleci/ruby:
|
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:
|
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
|
44
|
+
- image: circleci/ruby:2.4
|
37
45
|
build-2-3:
|
38
46
|
<<: *common-build
|
39
47
|
docker:
|
40
|
-
- image: circleci/ruby:2.3
|
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 "
|
28
|
+
puts "The new version is currently being processed."
|
29
29
|
elsif response.code == 204
|
30
|
-
puts "
|
30
|
+
puts "This version has already been deployed."
|
31
31
|
else
|
32
32
|
display_error(response)
|
33
33
|
end
|
data/lib/bump/cli/parser.rb
CHANGED
@@ -7,9 +7,11 @@ module Bump
|
|
7
7
|
def load(content)
|
8
8
|
[:json, ::JSON.parse(content)]
|
9
9
|
rescue ::JSON::ParserError => e
|
10
|
-
|
11
|
-
|
12
|
-
|
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)
|
data/lib/bump/cli/references.rb
CHANGED
@@ -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
|
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
|
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
|
data/lib/bump/cli/version.rb
CHANGED
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.
|
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-
|
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
|
-
|
185
|
-
|
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: []
|