heroku_cli 0.2.0 → 0.2.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: 2c99382408a106949c0637e1b3cb3d3d04ddc69e39d7135ce782362947047988
4
- data.tar.gz: 52beb449e3e84438fdecb1a2e483bcf51108fe243e49e8c574c25c2a21e8fd51
3
+ metadata.gz: 7bde86920489f39c39bf2d00cb92374e1bf0de429952a1bb39ebbdd182324def
4
+ data.tar.gz: c78e49f1c81ecb0f356e9881d08705b652e8bac28807b07c1af41a588cafe525
5
5
  SHA512:
6
- metadata.gz: f86d962640cf56d89f574c12cf41f7bfbf7fbe582402e9568df052c62fdf6e07937e4dd59ca3c327f43f30d55fb37f57f16f6628a55194f809f5b35f7c2ce3d9
7
- data.tar.gz: 7cbec9b0cdc21b9ab4fb23091a2d4519a14990267d16eae50168899556a557c8152093e385252984d6c8631877c5f12b62c44bd589da2996f004254e8e844db4
6
+ metadata.gz: a7a3f2180402966a71e43b24beaf125818f047bfef705d81066091df89ea591239cbbc84c52376c4e2feb26cd10686d4d62cce722a73a88dfa377c99374925d2
7
+ data.tar.gz: 0f3607f47744594c9bd6ce33b554d9f9ddc979d65efb72bf6866061b6256e70a9a9a1a7a57c7e0889fc53dabb38bf0e0f79eae5a12cb8ee516b0b3e23868fd2d
@@ -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,14 +22,14 @@ 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
29
29
  def un_follow(database, wait: false)
30
30
  raise "Not a following database #{database.name}" unless database.follower?
31
31
 
32
- heroku "pg:unfollow #{database.url_name} -c #{application.name}"
32
+ heroku "pg:unfollow #{database.url_name}", "-c #{application.name}"
33
33
  wait_for_follow_fork_transformation(database) if wait
34
34
  end
35
35
 
@@ -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.1"
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.1
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