heroku_cli 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +2 -2
- data/.ruby-version +1 -1
- data/lib/heroku_cli/base.rb +8 -2
- data/lib/heroku_cli/pg/database.rb +6 -2
- data/lib/heroku_cli/pg.rb +2 -2
- data/lib/heroku_cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce49cba89645e3c259f5f883956e267344f32c94e4d6a3fba942ac32b761a7be
|
4
|
+
data.tar.gz: 57fcb8b29e0b2bb3e53a83be4b3e0be3a1f854124a29cd1d8f57c2210afb0014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96b8b114a82ad8b0d75b305657025995912b309f0271fbf76bf696135705e24686252112e45962e53bec79b7e65c2f2962b3e8604356aa02c8e6bb0af2ff3a04
|
7
|
+
data.tar.gz: b087af61e2127d55675fbeace62d2721c4278c77069830a537104ba2d94183569402f01a24d5370fb8976c9b7c4f38fe416adb03b94a1d35fd1b5b4bbbdcd102
|
data/.github/workflows/ruby.yml
CHANGED
@@ -9,10 +9,10 @@ jobs:
|
|
9
9
|
|
10
10
|
steps:
|
11
11
|
- uses: actions/checkout@v2
|
12
|
-
- name: Set up Ruby 2
|
12
|
+
- name: Set up Ruby 3.2
|
13
13
|
uses: actions/setup-ruby@v1
|
14
14
|
with:
|
15
|
-
ruby-version: 2.
|
15
|
+
ruby-version: 3.2.x
|
16
16
|
- name: Build and test with Rake
|
17
17
|
run: |
|
18
18
|
gem install bundler
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
3.2.4
|
data/lib/heroku_cli/base.rb
CHANGED
@@ -6,8 +6,14 @@ module HerokuCLI
|
|
6
6
|
@application = application.is_a?(String) ? Application.new(application) : application
|
7
7
|
end
|
8
8
|
|
9
|
-
def heroku(cmd)
|
10
|
-
|
9
|
+
def heroku(cmd, args=nil)
|
10
|
+
if !args || args.strip.empty?
|
11
|
+
puts "heroku #{cmd} -a #{application.name}"
|
12
|
+
%x{ heroku #{cmd} -a #{application.name} }
|
13
|
+
else
|
14
|
+
puts "heroku #{cmd} -a #{application.name} -- #{args}"
|
15
|
+
%x{ heroku #{cmd} -a #{application.name} -- #{args} }
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -20,6 +20,7 @@ module HerokuCLI
|
|
20
20
|
|
21
21
|
def to_s
|
22
22
|
result = ["=== #{@url_names.join(', ')}"]
|
23
|
+
result.concat([''])
|
23
24
|
result.concat(info.map { |k, v| format("%-22.22s %s", "#{k}:", v)})
|
24
25
|
result.concat([''])
|
25
26
|
result.join("\n")
|
@@ -99,9 +100,12 @@ module HerokuCLI
|
|
99
100
|
@url_names = @url_names.sub('=== ','').split(',').map(&:strip)
|
100
101
|
@info = {}
|
101
102
|
info.each do |line|
|
102
|
-
|
103
|
-
|
103
|
+
next if line.strip.empty?
|
104
|
+
|
105
|
+
k = line.split(':')[0]&.strip
|
106
|
+
v = line.split(':')[1..-1]&.join(':')&.strip
|
104
107
|
next if k.nil? || v.nil?
|
108
|
+
|
105
109
|
@info[k] = v
|
106
110
|
end
|
107
111
|
end
|
data/lib/heroku_cli/pg.rb
CHANGED
@@ -22,7 +22,7 @@ module HerokuCLI
|
|
22
22
|
# create a follower database
|
23
23
|
def create_follower(database, options = {})
|
24
24
|
plan = options.delete(:plan) || database.plan
|
25
|
-
heroku "addons:create heroku-postgresql:#{plan} --follow #{database.resource_name}"
|
25
|
+
heroku "addons:create heroku-postgresql:#{plan}", "--follow #{database.resource_name}"
|
26
26
|
end
|
27
27
|
|
28
28
|
# Remove the following of a database and put DB into write mode
|
@@ -43,7 +43,7 @@ module HerokuCLI
|
|
43
43
|
|
44
44
|
def destroy(database)
|
45
45
|
raise "Cannot destroy #{application.name} main database" if database.main?
|
46
|
-
heroku "addons:destroy #{database.url_name} -c #{application.name}"
|
46
|
+
heroku "addons:destroy #{database.url_name}", "-c #{application.name}"
|
47
47
|
end
|
48
48
|
|
49
49
|
# Return the main database
|
data/lib/heroku_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rasmus Bergholdt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
rubygems_version: 3.
|
102
|
+
rubygems_version: 3.4.19
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: A tiny wrapper for Heroku CLI
|