et_full_system 1.0.0.pre29 → 1.0.0.pre30

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: dbee5bddfbf87aeef64f1d29860f6459207605633545d65d4354a0964be6840f
4
- data.tar.gz: 997b39a8c280121f03e6e5e3ea856e73db0124477782e34811a89149a19be51f
3
+ metadata.gz: 6c619e685890fbc1c988a5e7fa0a55e658b9cf3ebba4a41fd8d13d85f8cc368d
4
+ data.tar.gz: 5492b1795c880177674724514095ad1a30466cda9455636938f8b4ca26fba891
5
5
  SHA512:
6
- metadata.gz: caee6a149972b213d37a08af23352f9488a6875524433ae179cbcca6459570684ab2fe726f04eaab26b8c4b67c783b0c639e93ffa03bdd353c3ce04469d54dba
7
- data.tar.gz: 0c0d1b3773b3b9ec56e9344671324442c5c1567a6875377e63bc91864322911b438a4e8d393dbf9b148abb8949b4fd2f9714fe5a694eef9f440e3b79ebf37195
6
+ metadata.gz: 3916660efa38ec304a228b87373df586429eae25072c5285a0941e505a71b0fff42a766e309b36e45ff1941f26dea08231220ec70ef67b95cb17ae6762d92bf5
7
+ data.tar.gz: 138e9913ce4162d3486eeb0558529457e0d83d7efda205c1521229550e6eaa78e29c1d5172bd10c04c6357165eada3b5f2023d089d19ac2946c576c06bb7b15f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_full_system (1.0.0.pre29)
4
+ et_full_system (1.0.0.pre30)
5
5
  aws-sdk-s3 (~> 1.9)
6
6
  azure-storage (~> 0.15.0.preview)
7
7
  dotenv (~> 2.7, >= 2.7.2)
@@ -23,7 +23,7 @@ GEM
23
23
  addressable (2.7.0)
24
24
  public_suffix (>= 2.0.2, < 5.0)
25
25
  aws-eventstream (1.0.3)
26
- aws-partitions (1.258.0)
26
+ aws-partitions (1.260.0)
27
27
  aws-sdk-core (3.86.0)
28
28
  aws-eventstream (~> 1.0, >= 1.0.2)
29
29
  aws-partitions (~> 1, >= 1.239.0)
@@ -78,7 +78,7 @@ GEM
78
78
  jmespath (1.4.0)
79
79
  json-schema (2.8.1)
80
80
  addressable (>= 2.4)
81
- mime-types (3.3)
81
+ mime-types (3.3.1)
82
82
  mime-types-data (~> 3.2015)
83
83
  mime-types-data (3.2019.1009)
84
84
  mini_portile2 (2.4.0)
@@ -89,7 +89,7 @@ GEM
89
89
  mustermann (1.0.3)
90
90
  nokogiri (1.10.7)
91
91
  mini_portile2 (~> 2.4.0)
92
- public_suffix (4.0.1)
92
+ public_suffix (4.0.2)
93
93
  puma (3.12.2)
94
94
  rack (2.0.8)
95
95
  rack-protection (2.0.7)
@@ -115,7 +115,7 @@ GEM
115
115
  thor (0.20.3)
116
116
  thread_safe (0.3.6)
117
117
  tilt (2.0.10)
118
- tzinfo (1.2.5)
118
+ tzinfo (1.2.6)
119
119
  thread_safe (~> 0.1)
120
120
 
121
121
  PLATFORMS
@@ -22,7 +22,7 @@ module EtFullSystem
22
22
  Bundler.with_original_env do
23
23
  gem_root = File.absolute_path('../../..', __dir__)
24
24
  cmd = "/bin/bash --login -c \"cd /home/app/full_system && et_full_system docker bootstrap && et_full_system local setup\""
25
- compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml run --rm et #{cmd}"
25
+ compose_cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml run --rm et #{cmd}"
26
26
  puts compose_cmd
27
27
  exec(compose_cmd)
28
28
  end
@@ -32,17 +32,7 @@ module EtFullSystem
32
32
  def compose(*args)
33
33
  Bundler.with_original_env do
34
34
  gem_root = File.absolute_path('../../..', __dir__)
35
- cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
36
- puts cmd
37
- exec(cmd)
38
- end
39
- end
40
-
41
- desc "invoker", "Provides access to the invoker system running inside docker"
42
- def invoker(*args)
43
- Bundler.with_original_env do
44
- gem_root = File.absolute_path('../../..', __dir__)
45
- cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et bash -lc \"invoker #{args.join(' ')}\""
35
+ cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
46
36
  puts cmd
47
37
  exec(cmd)
48
38
  end
@@ -52,10 +42,10 @@ module EtFullSystem
52
42
  def reset
53
43
  Bundler.with_original_env do
54
44
  gem_root = File.absolute_path('../../..', __dir__)
55
- cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml down -v"
45
+ cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml down -v"
56
46
  puts cmd
57
47
  next unless system(cmd)
58
- cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml build --no-cache"
48
+ cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml build --no-cache"
59
49
  puts cmd
60
50
  next unless system(cmd)
61
51
  self.class.start(['setup'])
@@ -67,7 +57,7 @@ module EtFullSystem
67
57
  Bundler.with_original_env do
68
58
  gem_root = File.absolute_path('../../..', __dir__)
69
59
  cmd = "/bin/bash --login -c \"et_full_system local update_service_url #{service} #{url}\""
70
- compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
60
+ compose_cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
71
61
  puts compose_cmd
72
62
  exec(compose_cmd)
73
63
  end
@@ -83,27 +73,13 @@ module EtFullSystem
83
73
  Bundler.with_original_env do
84
74
  gem_root = File.absolute_path('../../..', __dir__)
85
75
  cmd = "/bin/bash --login -c \"et_full_system local service_env #{service}\""
86
- compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
87
- puts compose_cmd
88
- result = `#{compose_cmd}`
89
- replace_db_host_port(result)
90
- replace_redis_host_port(result)
91
- replace_smtp_host_port(result)
92
- puts result
76
+ compose_cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
77
+ exec(compose_cmd)
93
78
  end
94
79
  end
95
80
 
96
81
  private
97
82
 
98
- def run_compose_command(*args, silent: false)
99
- Bundler.with_original_env do
100
- gem_root = File.absolute_path('../../..', __dir__)
101
- cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
102
- puts cmd unless silent
103
- `#{cmd}`
104
- end
105
- end
106
-
107
83
  def host_ip
108
84
  result = JSON.parse `docker network inspect \`docker network list | grep docker_et_full_system | awk '{print $1}'\``
109
85
  result.first.dig('IPAM', 'Config').first['Gateway']
@@ -121,35 +97,5 @@ module EtFullSystem
121
97
  raise "Unknown host type - this tool only supports mac, linux and windows"
122
98
  end
123
99
  end
124
-
125
- def replace_db_host_port(env)
126
- env.gsub!(/^DB_HOST=.*$/, 'DB_HOST=localhost')
127
- env.gsub!(/^DB_PORT=.*$/, "DB_PORT=#{db_port}")
128
- end
129
-
130
- def replace_redis_host_port(env)
131
- env.gsub!(/^REDIS_HOST=.*$/, 'REDIS_HOST=localhost')
132
- env.gsub!(/^REDIS_PORT=.*$/, "REDIS_PORT=#{redis_port}")
133
- end
134
-
135
- def replace_smtp_host_port(env)
136
- env.gsub!(/^SMTP_HOSTNAME=.*$/, 'SMTP_HOSTNAME=localhost')
137
- env.gsub!(/^SMTP_PORT=.*$/, "SMTP_PORT=#{smtp_port}")
138
- end
139
-
140
- def db_port
141
- result = run_compose_command :port, :db, 5432
142
- result.split(':').last.strip
143
- end
144
-
145
- def redis_port
146
- result = run_compose_command :port, :redis, 6379
147
- result.split(':').last.strip
148
- end
149
-
150
- def smtp_port
151
- result = run_compose_command :port, :et, 1025
152
- result.split(':').last.strip
153
- end
154
100
  end
155
101
  end
@@ -1,3 +1,3 @@
1
1
  module EtFullSystem
2
- VERSION = "1.0.0.pre29"
2
+ VERSION = "1.0.0.pre30"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et_full_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre29
4
+ version: 1.0.0.pre30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2019-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor