convox_installer 3.0.1 → 3.1.0

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: c08b32666153594de1c3464ab4c8ea4f324952115facc72fc159d75de7d1a85e
4
- data.tar.gz: 2f162d039ab30ebea6ecd8086bc88b30da9c50234c614594c43725036f75f2cb
3
+ metadata.gz: 6a149716dcd959d0f5dc6b3eae5e4840a354ea07df9c8cf4b35efab5e8df1bbf
4
+ data.tar.gz: 3d5e5ee559ec366960955b0103ac55c1208ae5d7a877eda07ca8b1d0ea82d740
5
5
  SHA512:
6
- metadata.gz: cdaf7159e5bebdde39ffed648fab4be85c5d2a556818b30ec8587ba52e920de44c09434edd654e894501ecb8a68c756c1c64e9de8939412d320dc753ab156163
7
- data.tar.gz: 219b697d883f91bd173e214402af2d3f5ec988881a025e894f4e3aafef1970af61a1bb2905b886fac437788a18812f9dbbc1e6307aa2d80f1997fdc0d800f0be
6
+ metadata.gz: 28484a1e6a93193426e7258e706da77fef934bcf5a5066b0a5cf7db59105a6787dedd4af2fac4601c5add8a1c2627a43d04487908d0baea7cd0e79bbc7c40f18
7
+ data.tar.gz: 3ee1dc4d183a3e31bf25113a33f881dc772ccd185e01868dd092eddfaa4798daf58f665327c0eea931153a557cbff151bd4bc3be8727abe7eafb05fb71f37619
data/README.md CHANGED
@@ -253,8 +253,8 @@ Adds an RDS database to your Terraform config.
253
253
  - **Optional Config:**
254
254
  - `database_allocated_storage` _(default: 30)_
255
255
  - `database_engine` _(default: 'postgres')_
256
- - `database_engine_version` _(default: '14.2')_
257
- - `database_instance_class` _(default: 'db.t3.medium')_
256
+ - `database_engine_version` _(default: '14.8')_
257
+ - `database_instance_class` _(default: 'db.t3.small')_
258
258
  - `database_multi_az` _(default: true)_
259
259
 
260
260
  #### `add_elasticache_cluster`
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
7
7
  s.name = 'convox_installer'
8
8
  s.version = ConvoxInstaller::VERSION
9
9
  s.platform = Gem::Platform::RUBY
10
- s.authors = ['Form Applications Inc.']
11
- s.email = ['support@formapi.io']
12
- s.homepage = 'https://github.com/FormAPI/convox_installer'
10
+ s.authors = ['DocSpring, Inc.']
11
+ s.email = ['support@docspring.com']
12
+ s.homepage = 'https://github.com/DocSpring/convox_installer'
13
13
  s.summary = 'Build a Convox installation workflow'
14
14
  s.description = 'Build a Convox installation workflow'
15
15
  s.license = 'MIT'
data/lib/convox/client.rb CHANGED
@@ -16,7 +16,6 @@ module Convox
16
16
  File.expand_path('~/.convox').freeze
17
17
  end
18
18
 
19
- AUTH_FILE = File.join(CONVOX_CONFIG_DIR, 'auth')
20
19
  CURRENT_FILE = File.join(CONVOX_CONFIG_DIR, 'current')
21
20
 
22
21
  attr_accessor :logger, :config
@@ -55,10 +54,6 @@ module Convox
55
54
  cli_version < Gem::Version.new('4.0.0')
56
55
  end
57
56
 
58
- def auth
59
- load_auth_from_file
60
- end
61
-
62
57
  def initialize(options = {})
63
58
  @logger = Logger.new($stdout)
64
59
  logger.level = options[:log_level] || Logger::INFO
@@ -132,16 +127,8 @@ module Convox
132
127
 
133
128
  def rack_already_installed?
134
129
  require_config(%i[aws_region stack_name])
135
-
136
- return unless File.exist?(AUTH_FILE)
137
-
138
- # region = config.fetch(:aws_region)
139
- stack_name = config.fetch(:stack_name)
140
130
  return true if File.exist?(rack_dir)
141
131
 
142
- auth.each do |rack_name, _password|
143
- return true if rack_name == stack_name
144
- end
145
132
  false
146
133
  end
147
134
 
@@ -443,16 +430,6 @@ module Convox
443
430
 
444
431
  private
445
432
 
446
- def load_auth_from_file
447
- return {} unless File.exist?(AUTH_FILE)
448
-
449
- begin
450
- JSON.parse(File.read(AUTH_FILE))
451
- rescue StandardError
452
- {}
453
- end
454
- end
455
-
456
433
  def require_config(required_keys)
457
434
  required_keys.each do |k|
458
435
  raise "#{k} is missing from the config!" unless config[k]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConvoxInstaller
4
- VERSION = '3.0.1'
4
+ VERSION = '3.1.0'
5
5
  end
@@ -5,15 +5,6 @@ require 'convox/client'
5
5
  RSpec.describe Convox::Client do
6
6
  let(:home_dir) { File.expand_path('~') }
7
7
 
8
- it 'finds the authentication details in ~/.convox/auth' do
9
- expect(File).to receive(:exist?).with("#{home_dir}/.convox/auth").and_return(true)
10
- expect(File).to receive(:read).with("#{home_dir}/.convox/auth").and_return(
11
- '{ "test.example.com": "1234567890" }'
12
- )
13
- client = described_class.new
14
- expect(client.auth).to eq('test.example.com' => '1234567890')
15
- end
16
-
17
8
  describe 'Convox CLI version' do
18
9
  let(:client) { described_class.new }
19
10
 
@@ -107,84 +98,5 @@ RSpec.describe Convox::Client do
107
98
  client.validate_convox_rack_and_write_current!
108
99
  end.to raise_error('aws_region is missing from the config!')
109
100
  end
110
-
111
- it 'raises an error if auth file is missing' do
112
- client = described_class.new(
113
- config: {
114
- aws_region: 'us-east-1',
115
- stack_name: 'asdf'
116
- }
117
- )
118
- expect(File).to receive(:exist?).with(
119
- "#{home_dir}/.convox/auth"
120
- ).and_return(false)
121
-
122
- expect do
123
- client.validate_convox_rack_and_write_current!
124
- end.to raise_error(/Could not find auth file at /)
125
- end
126
-
127
- it 'sets ~/.convox/host if a matching host is found in the auth file' do
128
- expect(File).to receive(:exist?).with(
129
- "#{home_dir}/.convox/auth"
130
- ).twice.and_return(true)
131
-
132
- expect(File).to receive(:read).with("#{home_dir}/.convox/auth").and_return(
133
- '{ "convox-test-697645520.us-west-2.elb.amazonaws.com": "1234567890" }'
134
- )
135
- client = described_class.new(
136
- config: {
137
- aws_region: 'us-west-2',
138
- stack_name: 'convox-test'
139
- }
140
- )
141
- expect(client).to receive(:write_current).with(
142
- 'convox-test-697645520.us-west-2.elb.amazonaws.com'
143
- )
144
- expect(client.validate_convox_rack_and_write_current!).to(
145
- eq('convox-test-697645520.us-west-2.elb.amazonaws.com')
146
- )
147
- end
148
-
149
- it 'raises an error if no matching host is found' do
150
- expect(File).to receive(:exist?).with(
151
- "#{home_dir}/.convox/auth"
152
- ).twice.and_return(true)
153
-
154
- expect(File).to receive(:read).with("#{home_dir}/.convox/auth").and_return(
155
- '{ "convox-test-697645520.us-west-2.elb.amazonaws.com": "1234567890" }'
156
- )
157
- client = described_class.new(
158
- config: {
159
- aws_region: 'us-east-1',
160
- stack_name: 'convox-test'
161
- }
162
- )
163
- expect do
164
- client.validate_convox_rack_and_write_current!
165
- end.to raise_error('Could not find matching authentication for ' \
166
- 'region: us-east-1, stack: convox-test')
167
- end
168
-
169
- it 'raises an error if it finds multiple matching hosts' do
170
- expect(File).to receive(:exist?).with(
171
- "#{home_dir}/.convox/auth"
172
- ).twice.and_return(true)
173
-
174
- expect(File).to receive(:read).with("#{home_dir}/.convox/auth").and_return(
175
- '{ "convox-test-697645520.us-west-2.elb.amazonaws.com": "1234567890", ' \
176
- '"convox-test-1234123412.us-west-2.elb.amazonaws.com": "1234567890" }'
177
- )
178
- client = described_class.new(
179
- config: {
180
- aws_region: 'us-west-2',
181
- stack_name: 'convox-test'
182
- }
183
- )
184
- expect do
185
- client.validate_convox_rack_and_write_current!
186
- end.to raise_error('Found multiple matching hosts for ' \
187
- 'region: us-west-2, stack: convox-test')
188
- end
189
101
  end
190
102
  end
data/terraform/rds.tf.erb CHANGED
@@ -1,8 +1,8 @@
1
1
  resource "aws_db_instance" "rds_database" {
2
2
  allocated_storage = <%= config[:database_allocated_storage] || 30 %>
3
3
  engine = "<%= config[:database_engine] || 'postgres' %>"
4
- engine_version = "<%= config[:database_engine_version] || '14.2' %>"
5
- instance_class = "<%= config[:database_instance_class] || 'db.t3.medium' %>"
4
+ engine_version = "<%= config[:database_engine_version] || '14.8' %>"
5
+ instance_class = "<%= config[:database_instance_class] || 'db.t3.small' %>"
6
6
  name = "<%= config.fetch(:stack_name).gsub('-', '_') %>_database"
7
7
  identifier = "<%= config.fetch(:stack_name) %>-rds-<%= config.fetch(:random_id) %>"
8
8
  multi_az = <%= config[:database_multi_az] || true %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convox_installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
- - Form Applications Inc.
7
+ - DocSpring, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-13 00:00:00.000000000 Z
11
+ date: 2023-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -82,7 +82,7 @@ dependencies:
82
82
  version: 1.0.1
83
83
  description: Build a Convox installation workflow
84
84
  email:
85
- - support@formapi.io
85
+ - support@docspring.com
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
@@ -112,7 +112,7 @@ files:
112
112
  - terraform/elasticache.tf.erb
113
113
  - terraform/rds.tf.erb
114
114
  - terraform/s3_bucket.tf.erb
115
- homepage: https://github.com/FormAPI/convox_installer
115
+ homepage: https://github.com/DocSpring/convox_installer
116
116
  licenses:
117
117
  - MIT
118
118
  metadata:
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.3.7
135
+ rubygems_version: 3.1.6
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Build a Convox installation workflow