et_full_system 1.0.1.pre12 → 1.0.1.pre13

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: ba0edeab6a7cd7ea33c538daab1e6fef4b6f1027f11c465169319a972b22d70a
4
- data.tar.gz: 8a4923bb3363a3948abaaccc8e5ad75eca38cc80a970393c6c293864bf9940a0
3
+ metadata.gz: cd5e77f9c1537d80363b72411fc7443723f6b41881db76d468d1fec97604bd5b
4
+ data.tar.gz: 231278716422d0b818138127f81fc9861915074c245e2af19454fb3c86a62e61
5
5
  SHA512:
6
- metadata.gz: d38f980990c69b5c8412f88c0c4725472b0b9fc034327a830da19a3aeaabb7d27b1950e4931d5ed011f10d076832c64578e6c1fc5664b81809bd780a4d32f6e8
7
- data.tar.gz: d356969a269e60114cfc1f67cf93cb33c2bac2185e381a48e96eacdfec7e150ca27318019721a1135e44ecba360a0c6a662653b2b505aedaf951bb4226dfde3c
6
+ metadata.gz: d161596981a35cd4ee5e366c7104e0316b4f577bbaca1885cf3affc8feb57b1615fbeccf2aa5e5992111f7abecc2dee31b6c80f25f58b45844b3f1b0fc9f9319
7
+ data.tar.gz: a7a87c6d25caa5d4b6020d77ebf744f6ce4cc11f037657d71530c0be41a55282092579234b90b11e6ffe822a118b7c74140bea4bd7684d1b017993304fee4248
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_full_system (1.0.1.pre12)
4
+ et_full_system (1.0.1.pre13)
5
5
  aws-sdk-s3 (~> 1.9)
6
6
  azure-storage (~> 0.15.0.preview)
7
7
  dotenv (~> 2.7, >= 2.7.2)
@@ -40,7 +40,7 @@ module EtFullSystem
40
40
 
41
41
  desc "invoker", "Provides access to the invoker system running inside docker"
42
42
  def invoker(*args)
43
- puts run_on_local("invoker #{args.join(' ')}")
43
+ run_on_local("invoker #{args.join(' ')}")
44
44
  end
45
45
 
46
46
  desc "reset", "Bring down the server, remove all caches, rebuild the Dockerfile etc..."
@@ -59,7 +59,7 @@ module EtFullSystem
59
59
 
60
60
  desc "update_service_url SERVICE URL", "Configures the reverse proxy to connect to a specific url for a service - note the URL must be reachable from the docker container and the server must be running"
61
61
  def update_service_url(service, url)
62
- puts run_on_local("update_service_url #{service} #{url}\"")
62
+ run_on_local("update_service_url #{service} #{url}")
63
63
  end
64
64
 
65
65
  desc "local_service SERVICE PORT", "Configures the reverse proxy to connect to a specific port on the host machine - the URL is calculated - otherwise it is the same as update_service_url"
@@ -82,7 +82,7 @@ module EtFullSystem
82
82
 
83
83
  desc "local_ccd_export", "Disables the sidekiq process in the invoker system to allow a developer to run it locally"
84
84
  def local_ccd_export
85
- puts run_on_local('disable_ccd_export')
85
+ run_on_local('disable_ccd_export')
86
86
  puts "ccd_export is now expected to be running on your machine. To configure your environment, run 'et_full_system docker ccd_export_env > .env.local'"
87
87
  end
88
88
 
@@ -130,7 +130,7 @@ module EtFullSystem
130
130
 
131
131
  desc "service_env SERVICE", "Returns the environment variables configured for the specified service"
132
132
  def service_env(service)
133
- result = run_on_local("service_env #{service}")
133
+ result = run_on_local("service_env #{service}", return_output: true)
134
134
  replace_db_host_port(result)
135
135
  replace_redis_host_port(result)
136
136
  replace_smtp_host_port(result)
@@ -139,103 +139,107 @@ module EtFullSystem
139
139
 
140
140
  desc "enable_et1", "Configures the reverse proxy and invoker to use the internal systems instead of local"
141
141
  def enable_et1
142
- puts run_on_local("enable_et1")
142
+ run_on_local("enable_et1")
143
143
  end
144
144
 
145
145
  desc "enable_ccd_export", "Configures invoker to use the internal systems instead of local"
146
146
  def enable_ccd_export
147
- puts run_on_local("enable_ccd_export")
147
+ run_on_local("enable_ccd_export")
148
148
  end
149
149
 
150
150
  desc "enable_atos_api", "Configures invoker to use the internal systems instead of local"
151
151
  def enable_atos_api
152
- puts run_on_local("enable_atos_api")
152
+ run_on_local("enable_atos_api")
153
153
  end
154
154
 
155
155
  desc "enable_api", "Configures the reverse proxy and invoker to use the internal systems instead of local"
156
156
  def enable_api
157
- puts run_on_local("enable_api")
157
+ run_on_local("enable_api")
158
158
  end
159
159
 
160
160
  desc "enable_admin", "Configures the reverse proxy and invoker to use the internal systems instead of local"
161
161
  def enable_admin
162
- puts run_on_local("enable_admin")
162
+ run_on_local("enable_admin")
163
163
  end
164
164
 
165
165
  desc "enable_et3", "Configures the reverse proxy and invoker to use the internal systems instead of local"
166
166
  def enable_et3
167
- puts run_on_local("enable_et3")
167
+ run_on_local("enable_et3")
168
168
  end
169
169
 
170
170
  desc "disable_et1", "Stops et1 from running in the stack"
171
171
  def disable_et1
172
- puts run_on_local("disable_et1")
172
+ run_on_local("disable_et1")
173
173
  end
174
174
 
175
175
  desc "disable_ccd_export", "Stops ccd_export from running in the stack"
176
176
  def disable_ccd_export
177
- puts run_on_local("disable_ccd_export")
177
+ run_on_local("disable_ccd_export")
178
178
  end
179
179
 
180
180
  desc "disable_atos_api", "Stops atos_api running in the stack"
181
181
  def disable_atos_api
182
- puts run_on_local("disable_atos_api")
182
+ run_on_local("disable_atos_api")
183
183
  end
184
184
 
185
185
  desc "disable_api", "Stops api from running in the stack"
186
186
  def disable_api
187
- puts run_on_local("disable_api")
187
+ run_on_local("disable_api")
188
188
  end
189
189
 
190
190
  desc "disable_admin", "Stops admin from running in the stack"
191
191
  def disable_admin
192
- puts run_on_local("disable_admin")
192
+ run_on_local("disable_admin")
193
193
  end
194
194
 
195
195
  desc "disable_et3", "Stops et3 from running in the stack"
196
196
  def disable_et3
197
- puts run_on_local("disable_et3")
197
+ run_on_local("disable_et3")
198
198
  end
199
199
 
200
200
  desc "restart_et1", "Restarts the et1 application"
201
201
  def restart_et1
202
- puts run_on_local("restart_et1")
202
+ run_on_local("restart_et1")
203
203
  end
204
204
 
205
205
  desc "restart_api", "Restarts the api application"
206
206
  def restart_api
207
- puts run_on_local("restart_api")
207
+ run_on_local("restart_api")
208
208
  end
209
209
 
210
210
  desc "restart_et3", "Restarts the et3 application"
211
211
  def restart_et3
212
- puts run_on_local("restart_et3")
212
+ run_on_local("restart_et3")
213
213
  end
214
214
 
215
215
  desc "restart_admin", "Restarts the admin application"
216
216
  def restart_admin
217
- puts run_on_local("restart_admin")
217
+ run_on_local("restart_admin")
218
218
  end
219
219
 
220
220
  desc "restart_atos_api", "Restarts the atos_api application"
221
221
  def restart_atos_api
222
- puts run_on_local("restart_atos_api")
222
+ run_on_local("restart_atos_api")
223
223
  end
224
224
 
225
225
  desc "restart_ccd_export", "Restarts the ccd_export application"
226
226
  def restart_ccd_export
227
- puts run_on_local("restart_ccd_export")
227
+ run_on_local("restart_ccd_export")
228
228
  end
229
229
 
230
230
  private
231
231
 
232
- def run_on_local(cmd)
232
+ def run_on_local(cmd, return_output: false)
233
233
  Bundler.with_unbundled_env do
234
234
  gem_root = File.absolute_path('../../..', __dir__)
235
235
  cmd = "/bin/bash --login -c \"et_full_system local #{cmd}\""
236
236
  compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
237
237
  puts compose_cmd
238
- `#{compose_cmd}`
238
+ if return_output
239
+ `#{compose_cmd}`
240
+ else
241
+ system(compose_cmd)
242
+ end
239
243
  end
240
244
  end
241
245
 
@@ -1,3 +1,3 @@
1
1
  module EtFullSystem
2
- VERSION = "1.0.1.pre12"
2
+ VERSION = "1.0.1.pre13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: et_full_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.pre12
4
+ version: 1.0.1.pre13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor