et_full_system 1.0.1.pre14 → 1.0.1.pre16

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: 75d953ca5a51b548447f8c4c49422b19315029c081ea88415eb6f881cf4a4ce7
4
- data.tar.gz: 4e336ef3aae83383c3b2ff7fadb970f63b6f04b5bde28d237c1901019d4db087
3
+ metadata.gz: a595ff0430c23541f5e72d79666eb638f9c199098f35362e36ad7543c2bc4b4f
4
+ data.tar.gz: 151477baf3daa1172c9b3cd354fdd627f9c19c21c01c204515b5aebcbfb67ea6
5
5
  SHA512:
6
- metadata.gz: '0288afe0df558a547e1c05e9b39ea28771f8112b09c43df2e558c85c7eac5860370d0d33a5f55f56ec779127e5b4ed06d84dcab2d2811331ef2df71b58850c77'
7
- data.tar.gz: 84e922c8d0ec187c843954b513d96cf7067b5876397f8ea4b9fc8dfc3e7ec21ae09634baaa612c43c7e4f56f366ed9ab140919f522f0b091c661ac2f384ccb09
6
+ metadata.gz: 6e63c655c24fb076afe4c5b5afb5fa0846f785b199de2159ffc4ddb0ea1039a29a78cc6a5b0b1457c78ad4636ebfe66c8f28b2e440db404947d5b6b97fdbce23
7
+ data.tar.gz: 8f99162467117b4dad1e81d49089adc4f5461a5e5d80cd7ed213124029de90bdd796fa1bb5b1a05f38042e1ee68097ee34052e295b12e504909d20e6f8a7a53d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_full_system (1.0.1.pre14)
4
+ et_full_system (1.0.1.pre16)
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.269.0)
26
+ aws-partitions (1.270.0)
27
27
  aws-sdk-core (3.89.1)
28
28
  aws-eventstream (~> 1.0, >= 1.0.2)
29
29
  aws-partitions (~> 1, >= 1.239.0)
@@ -10,7 +10,7 @@ module EtFullSystem
10
10
 
11
11
  desc "bootstrap", "Used by the docker-compose file (using sudo) - do not use yourself"
12
12
  def bootstrap
13
- Bundler.with_unbundled_env do
13
+ unbundled do
14
14
  cmd = File.absolute_path('../../../shell_scripts/docker_bootstrap.sh', __dir__)
15
15
  puts cmd
16
16
  exec(cmd)
@@ -19,7 +19,7 @@ module EtFullSystem
19
19
 
20
20
  desc "setup", "Sets up the system for initial run - or after changing branches, adding gems etc.. in any of the services"
21
21
  def setup
22
- Bundler.with_unbundled_env do
22
+ unbundled 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
25
  compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml run --rm et #{cmd}"
@@ -30,7 +30,7 @@ module EtFullSystem
30
30
 
31
31
  desc "compose", "Provides access to the docker-compose command"
32
32
  def compose(*args)
33
- Bundler.with_unbundled_env do
33
+ unbundled do
34
34
  gem_root = File.absolute_path('../../..', __dir__)
35
35
  cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
36
36
  puts cmd
@@ -45,7 +45,7 @@ module EtFullSystem
45
45
 
46
46
  desc "reset", "Bring down the server, remove all caches, rebuild the Dockerfile etc..."
47
47
  def reset
48
- Bundler.with_unbundled_env do
48
+ unbundled do
49
49
  gem_root = File.absolute_path('../../..', __dir__)
50
50
  cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml down -v"
51
51
  puts cmd
@@ -229,12 +229,16 @@ module EtFullSystem
229
229
 
230
230
  private
231
231
 
232
+ def unbundled(&block)
233
+ method = Bundler.respond_to?(:with_unbundled_env) ? :with_unbundled_env : :with_original_env
234
+ Bundler.send(method, &block)
235
+ end
236
+
232
237
  def run_on_local(cmd, return_output: false)
233
- Bundler.with_unbundled_env do
238
+ unbundled do
234
239
  gem_root = File.absolute_path('../../..', __dir__)
235
240
  cmd = "/bin/bash --login -c \"et_full_system local #{cmd}\""
236
241
  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
- puts compose_cmd
238
242
  if return_output
239
243
  `#{compose_cmd}`
240
244
  else
@@ -244,7 +248,7 @@ module EtFullSystem
244
248
  end
245
249
 
246
250
  def run_compose_command(*args, silent: false)
247
- Bundler.with_unbundled_env do
251
+ unbundled do
248
252
  gem_root = File.absolute_path('../../..', __dir__)
249
253
  cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
250
254
  puts cmd unless silent
@@ -17,7 +17,7 @@ module EtFullSystem
17
17
  method_option :record_video, type: :boolean, default: false, aliases: 'record-video', desc: 'When using zalenium, enable video recording'
18
18
  method_option :minimal, type: :boolean, default: false, desc: 'Set to true to only start the minimum (db, redis, mail, s3, azure blob, fake_acas, fake_ccd)'
19
19
  def up(*args)
20
- Bundler.with_unbundled_env do
20
+ unbundled do
21
21
  server_args = []
22
22
  server_args << "--minimal" if options.minimal?
23
23
  server_args << "--without=#{options[:without].join(' ')}" unless options[:without].empty?
@@ -56,7 +56,7 @@ module EtFullSystem
56
56
 
57
57
  desc "down", "Stops the full system server on docker"
58
58
  def down(*args)
59
- ::Bundler.with_unbundled_env do
59
+ unbundled do
60
60
  gem_root = File.absolute_path('../../../..', __dir__)
61
61
  cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml down #{args.join(' ')}"
62
62
  puts cmd
@@ -68,6 +68,12 @@ module EtFullSystem
68
68
 
69
69
  private
70
70
 
71
+ def unbundled(&block)
72
+ method = Bundler.respond_to?(:with_unbundled_env) ? :with_unbundled_env : :with_original_env
73
+ Bundler.send(method, &block)
74
+ end
75
+
76
+
71
77
  def host_ip
72
78
  result = JSON.parse `docker network inspect \`docker network list | grep docker_et_full_system | awk '{print $1}'\``
73
79
  result.first.dig('IPAM', 'Config').first['Gateway']
@@ -94,7 +94,7 @@ module EtFullSystem
94
94
  Process.detach(pid)
95
95
 
96
96
  puts "Starting Invoker"
97
- ::Bundler.with_unbundled_env do
97
+ unbundled do
98
98
  without = options[:without]
99
99
  if options.minimal?
100
100
  without = ['et1', 'et3', 'admin', 'api', 'ccd_export', 'atos_api']
@@ -132,7 +132,7 @@ module EtFullSystem
132
132
 
133
133
  desc "setup_services", "Sets up all services in one command"
134
134
  def setup_services
135
- ::Bundler.with_unbundled_env do
135
+ unbundled do
136
136
  setup_et1_service
137
137
  setup_et3_service
138
138
  setup_api_service
@@ -293,6 +293,11 @@ module EtFullSystem
293
293
 
294
294
  private
295
295
 
296
+ def unbundled(&block)
297
+ method = Bundler.respond_to?(:with_unbundled_env) ? :with_unbundled_env : :with_original_env
298
+ Bundler.send(method, &block)
299
+ end
300
+
296
301
  def invoker_processes_for(service)
297
302
  case service
298
303
  when 'et1' then ['et1_web', 'et1_sidekiq']
@@ -19,6 +19,11 @@ module EtFullSystem
19
19
 
20
20
  private
21
21
 
22
+ def unbundled(&block)
23
+ method = Bundler.respond_to?(:with_unbundled_env) ? :with_unbundled_env : :with_original_env
24
+ Bundler.send(method, &block)
25
+ end
26
+
22
27
  def setup_s3_storage
23
28
  config = {
24
29
  region: ENV.fetch('AWS_REGION', 'us-east-1'),
@@ -49,7 +54,7 @@ module EtFullSystem
49
54
  end
50
55
 
51
56
  def setup_azure_storage
52
- Bundler.with_unbundled_env do
57
+ unbundled do
53
58
  puts `bash --login -c "cd systems/api && rvm use && dotenv -f \"#{GEM_PATH}/foreman/.env\" dotenv -f \"#{GEM_PATH}/foreman/et_api.env\" bundle exec bundle exec rails configure_azure_storage_containers configure_azure_storage_cors"`
54
59
 
55
60
  end
@@ -1,3 +1,3 @@
1
1
  module EtFullSystem
2
- VERSION = "1.0.1.pre14"
2
+ VERSION = "1.0.1.pre16"
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.1.pre14
4
+ version: 1.0.1.pre16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Taylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-28 00:00:00.000000000 Z
11
+ date: 2020-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor