orchestration 0.7.4 → 0.7.6
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/Gemfile.lock +13 -0
- data/config/locales/en.yml +1 -0
- data/lib/orchestration/docker_compose/app_service.rb +1 -0
- data/lib/orchestration/docker_compose/compose_configuration.rb +2 -0
- data/lib/orchestration/make/orchestration.mk +3 -2
- data/lib/orchestration/make.rb +2 -0
- data/lib/orchestration/services/database/adapters/postgis.rb +48 -0
- data/lib/orchestration/services/database/adapters.rb +1 -0
- data/lib/orchestration/services/database/configuration.rb +1 -0
- data/lib/orchestration/terminal.rb +1 -1
- data/lib/orchestration/version.rb +1 -1
- data/lib/orchestration.rb +5 -5
- data/orchestration.gemspec +1 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0cff2ba702a69453da3a15fb8d316ffb3885d0b464af20aa8e72f753e8476a
|
4
|
+
data.tar.gz: dd0b4d18a96e7bc6cc6fc4249f021692b323e456bd45f5155eb515a0ad540fd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a504bca615203bb7338cadfd80f5ae255ba0fa7692f704cd56fba2c8249a9c423f0bb740380a615e9e2a423be21f2e29f830975f800a65bfb1fb752e64c5b56
|
7
|
+
data.tar.gz: fdd6bd51d62c861d1191ea2a414acf44f5447f05f855a282a18e3f58f8a7433fa720b6b7694cf973da0e147bd6d9ff4d758abadf5114fdb961315b509c86cf96
|
data/Gemfile.lock
CHANGED
@@ -66,6 +66,9 @@ GEM
|
|
66
66
|
activerecord (7.0.3)
|
67
67
|
activemodel (= 7.0.3)
|
68
68
|
activesupport (= 7.0.3)
|
69
|
+
activerecord-postgis-adapter (8.0.1)
|
70
|
+
activerecord (~> 7.0.0)
|
71
|
+
rgeo-activerecord (~> 7.0.0)
|
69
72
|
activestorage (7.0.3)
|
70
73
|
actionpack (= 7.0.3)
|
71
74
|
activejob (= 7.0.3)
|
@@ -114,6 +117,7 @@ GEM
|
|
114
117
|
marcel (1.0.2)
|
115
118
|
method_source (1.0.0)
|
116
119
|
mini_mime (1.1.2)
|
120
|
+
mini_portile2 (2.8.0)
|
117
121
|
minitest (5.15.0)
|
118
122
|
mongo (2.17.1)
|
119
123
|
bson (>= 4.8.2, < 5.0.0)
|
@@ -137,6 +141,9 @@ GEM
|
|
137
141
|
net-protocol
|
138
142
|
timeout
|
139
143
|
nio4r (2.5.8)
|
144
|
+
nokogiri (1.13.6)
|
145
|
+
mini_portile2 (~> 2.8.0)
|
146
|
+
racc (~> 1.4)
|
140
147
|
nokogiri (1.13.6-x86_64-linux)
|
141
148
|
racc (~> 1.4)
|
142
149
|
paint (2.2.1)
|
@@ -181,6 +188,10 @@ GEM
|
|
181
188
|
redis (4.6.0)
|
182
189
|
regexp_parser (2.4.0)
|
183
190
|
rexml (3.2.5)
|
191
|
+
rgeo (2.4.0)
|
192
|
+
rgeo-activerecord (7.0.1)
|
193
|
+
activerecord (>= 5.0)
|
194
|
+
rgeo (>= 1.0.0)
|
184
195
|
rspec (3.11.0)
|
185
196
|
rspec-core (~> 3.11.0)
|
186
197
|
rspec-expectations (~> 3.11.0)
|
@@ -242,10 +253,12 @@ GEM
|
|
242
253
|
zeitwerk (2.5.4)
|
243
254
|
|
244
255
|
PLATFORMS
|
256
|
+
ruby
|
245
257
|
x86_64-linux
|
246
258
|
|
247
259
|
DEPENDENCIES
|
248
260
|
activerecord (>= 6.0)
|
261
|
+
activerecord-postgis-adapter (~> 8.0)
|
249
262
|
bunny (~> 2.19)
|
250
263
|
devpack (~> 0.4.0)
|
251
264
|
mongoid (~> 7.4)
|
data/config/locales/en.yml
CHANGED
@@ -40,5 +40,6 @@ en:
|
|
40
40
|
|
41
41
|
dbconsole:
|
42
42
|
postgresql: "PGPASSWORD='%<password>s' psql --username=%<username>s --host=%<host>s --port=%<port>s --dbname=%<database>s"
|
43
|
+
postgis: "PGPASSWORD='%<password>s' psql --username=%<username>s --host=%<host>s --port=%<port>s --dbname=%<database>s"
|
43
44
|
sqlite3: "sqlite3 %<database>s"
|
44
45
|
mysql2: "mysql --user=%<username>s --port=%<port>s --host=%<host>s --password=%<password>s --no-auto-rehash %<database>s"
|
@@ -118,6 +118,7 @@ module Orchestration
|
|
118
118
|
def database_url
|
119
119
|
{
|
120
120
|
'postgresql' => 'postgresql://postgres:password@database-local:5432/production',
|
121
|
+
'postgis' => 'postgis://postgres:password@database-local:5432/production',
|
121
122
|
'mysql2' => 'mysql2://root:password@database-local:3306/production',
|
122
123
|
'sqlite3' => 'sqlite3:db/production.sqlite3'
|
123
124
|
}.fetch(DockerCompose::ComposeConfiguration.database_adapter_name, nil)
|
@@ -5,6 +5,7 @@ module Orchestration
|
|
5
5
|
class ComposeConfiguration
|
6
6
|
def self.database_adapter_name
|
7
7
|
return nil unless defined?(ActiveRecord)
|
8
|
+
return 'postgis' if defined?(::POSTGIS)
|
8
9
|
return 'postgresql' if defined?(::PG)
|
9
10
|
return 'mysql2' if defined?(::Mysql2)
|
10
11
|
return 'sqlite3' if defined?(::SQLite3)
|
@@ -28,6 +29,7 @@ module Orchestration
|
|
28
29
|
return nil unless defined?(ActiveRecord)
|
29
30
|
|
30
31
|
base = Orchestration::Services::Database::Adapters
|
32
|
+
return base::Postgis.new if defined?(::PostGIS)
|
31
33
|
return base::Postgresql.new if defined?(::PG)
|
32
34
|
return base::Mysql2.new if defined?(::Mysql2)
|
33
35
|
return base::Sqlite3.new if defined?(::SQLite3)
|
@@ -2,7 +2,8 @@
|
|
2
2
|
### Environment setup ###
|
3
3
|
SHELL:=/bin/bash
|
4
4
|
MAKE:=mkpath=${mkpath} make --no-print-directory
|
5
|
-
|
5
|
+
ORCHESTRATION_DISABLE_ENV=1
|
6
|
+
export
|
6
7
|
TERM ?= 'dumb'
|
7
8
|
pwd:=$(shell pwd)
|
8
9
|
|
@@ -142,7 +143,7 @@ DOCKER_TAG ?= latest
|
|
142
143
|
ifneq (,$(wildcard ./Gemfile))
|
143
144
|
bundle_cmd = bundle exec
|
144
145
|
endif
|
145
|
-
rake=DEVPACK_DISABLE=1 RACK_ENV=${env} SECRET_KEY_BASE='placeholder-secret' RAILS_ENV=${env} ${bundle_cmd} rake
|
146
|
+
rake=ORCHESTRATION_DISABLE_ENV=1 DEVPACK_DISABLE=1 RACK_ENV=${env} SECRET_KEY_BASE='placeholder-secret' RAILS_ENV=${env} ${bundle_cmd} rake
|
146
147
|
|
147
148
|
ifneq (,$(wildcard ${env_file}))
|
148
149
|
ifeq (,$(findstring deploy,$(MAKECMDGOALS)))
|
data/lib/orchestration/make.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Orchestration
|
4
|
+
module Services
|
5
|
+
module Database
|
6
|
+
module Adapters
|
7
|
+
class Postgis
|
8
|
+
include AdapterBase
|
9
|
+
|
10
|
+
def name
|
11
|
+
'postgis'
|
12
|
+
end
|
13
|
+
|
14
|
+
def image
|
15
|
+
'postgis/postgis:15-3.3'
|
16
|
+
end
|
17
|
+
|
18
|
+
def credentials
|
19
|
+
{
|
20
|
+
'username' => 'postgres',
|
21
|
+
'password' => 'password',
|
22
|
+
'database' => 'postgres'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def errors
|
27
|
+
[PG::ConnectionBad]
|
28
|
+
end
|
29
|
+
|
30
|
+
def default_port
|
31
|
+
5432
|
32
|
+
end
|
33
|
+
|
34
|
+
def environment
|
35
|
+
{
|
36
|
+
'POSTGRES_PASSWORD' => 'password',
|
37
|
+
'PGDATA' => data_dir
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
def data_dir
|
42
|
+
'/var/pgdata'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -12,4 +12,5 @@ end
|
|
12
12
|
require 'orchestration/services/database/adapters/adapter_base'
|
13
13
|
require 'orchestration/services/database/adapters/mysql2'
|
14
14
|
require 'orchestration/services/database/adapters/postgresql'
|
15
|
+
require 'orchestration/services/database/adapters/postgis'
|
15
16
|
require 'orchestration/services/database/adapters/sqlite3'
|
@@ -48,7 +48,7 @@ module Orchestration
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def print_variable(variable, value)
|
51
|
-
$
|
51
|
+
$stderr.print "#{Paint[variable, :blue]}#{Paint['=', :white]}#{Paint[value, :cyan]}"
|
52
52
|
end
|
53
53
|
|
54
54
|
private
|
data/lib/orchestration.rb
CHANGED
@@ -62,13 +62,13 @@ module Orchestration
|
|
62
62
|
def print_environment
|
63
63
|
return unless File.exist?('.env')
|
64
64
|
|
65
|
-
$
|
66
|
-
|
67
|
-
$
|
65
|
+
$stderr.puts
|
66
|
+
warn("#{prefix} #{Paint['Loading environment from', :cyan]} #{Paint['.env', :green]}")
|
67
|
+
$stderr.puts
|
68
68
|
environment_variables.each do |variable, value|
|
69
69
|
terminal.print_variable(variable, value)
|
70
70
|
end
|
71
|
-
$
|
71
|
+
$stderr.puts
|
72
72
|
end
|
73
73
|
|
74
74
|
private
|
@@ -92,7 +92,7 @@ module Orchestration
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
if ENV['RAILS_ENV'] == 'development'
|
95
|
+
if ENV['RAILS_ENV'] == 'development' && !ENV.key?('ORCHESTRATION_DISABLE_ENV')
|
96
96
|
require 'dotenv-rails'
|
97
97
|
Dotenv::Railtie.load
|
98
98
|
Orchestration.print_environment
|
data/orchestration.gemspec
CHANGED
@@ -36,6 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_runtime_dependency 'thor', '~> 1.2'
|
37
37
|
|
38
38
|
spec.add_development_dependency 'activerecord', '>= 6.0'
|
39
|
+
spec.add_development_dependency 'activerecord-postgis-adapter', '~> 8.0'
|
39
40
|
spec.add_development_dependency 'bunny', '~> 2.19'
|
40
41
|
spec.add_development_dependency 'devpack', '~> 0.4.0'
|
41
42
|
spec.add_development_dependency 'mongoid', '~> 7.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '6.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: activerecord-postgis-adapter
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '8.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '8.0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: bunny
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -413,6 +427,7 @@ files:
|
|
413
427
|
- lib/orchestration/services/database/adapters.rb
|
414
428
|
- lib/orchestration/services/database/adapters/adapter_base.rb
|
415
429
|
- lib/orchestration/services/database/adapters/mysql2.rb
|
430
|
+
- lib/orchestration/services/database/adapters/postgis.rb
|
416
431
|
- lib/orchestration/services/database/adapters/postgresql.rb
|
417
432
|
- lib/orchestration/services/database/adapters/sqlite3.rb
|
418
433
|
- lib/orchestration/services/database/configuration.rb
|
@@ -466,7 +481,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
466
481
|
- !ruby/object:Gem::Version
|
467
482
|
version: '0'
|
468
483
|
requirements: []
|
469
|
-
rubygems_version: 3.
|
484
|
+
rubygems_version: 3.4.7
|
470
485
|
signing_key:
|
471
486
|
specification_version: 4
|
472
487
|
summary: Docker orchestration toolkit
|