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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c99382408a106949c0637e1b3cb3d3d04ddc69e39d7135ce782362947047988
4
- data.tar.gz: 52beb449e3e84438fdecb1a2e483bcf51108fe243e49e8c574c25c2a21e8fd51
3
+ metadata.gz: ce49cba89645e3c259f5f883956e267344f32c94e4d6a3fba942ac32b761a7be
4
+ data.tar.gz: 57fcb8b29e0b2bb3e53a83be4b3e0be3a1f854124a29cd1d8f57c2210afb0014
5
5
  SHA512:
6
- metadata.gz: f86d962640cf56d89f574c12cf41f7bfbf7fbe582402e9568df052c62fdf6e07937e4dd59ca3c327f43f30d55fb37f57f16f6628a55194f809f5b35f7c2ce3d9
7
- data.tar.gz: 7cbec9b0cdc21b9ab4fb23091a2d4519a14990267d16eae50168899556a557c8152093e385252984d6c8631877c5f12b62c44bd589da2996f004254e8e844db4
6
+ metadata.gz: 96b8b114a82ad8b0d75b305657025995912b309f0271fbf76bf696135705e24686252112e45962e53bec79b7e65c2f2962b3e8604356aa02c8e6bb0af2ff3a04
7
+ data.tar.gz: b087af61e2127d55675fbeace62d2721c4278c77069830a537104ba2d94183569402f01a24d5370fb8976c9b7c4f38fe416adb03b94a1d35fd1b5b4bbbdcd102
@@ -9,10 +9,10 @@ jobs:
9
9
 
10
10
  steps:
11
11
  - uses: actions/checkout@v2
12
- - name: Set up Ruby 2.6
12
+ - name: Set up Ruby 3.2
13
13
  uses: actions/setup-ruby@v1
14
14
  with:
15
- ruby-version: 2.6.x
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.6.6
1
+ 3.2.4
@@ -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
- %x{ heroku #{cmd} -a #{application.name} }
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
- k = line.split(':')[0].strip
103
- v = line.split(':')[1..-1].join(':').strip
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
@@ -1,3 +1,3 @@
1
1
  module HerokuCLI
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
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.0
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: 2021-07-13 00:00:00.000000000 Z
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.0.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