avm-eac_rails_base0 0.9.1 → 0.10.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: 8a51711edbcc0304e58d67f8bbb9041281957c554810434ebd40bb0798b869b6
4
- data.tar.gz: a2b276445f41340a1a68a5c6d0519b29227dc4eb70006ef1f980bd6c74739f17
3
+ metadata.gz: a58380cdb99713ebff2a92c6ef226122dcf8a4150cc618a7ff02e9d25d9d2df2
4
+ data.tar.gz: 8c1531c58c19033403601f39bc5671dc2714255a19dac34649a8998008adc916
5
5
  SHA512:
6
- metadata.gz: eaeb23393d7e0f23785f9cb925d33ce058bc78cc1ae27b3e74805ee3e5448df234c2442ec85735383116ed3f34594cf27d4cd22e2c60d88cbea7400c5d2178f6
7
- data.tar.gz: 2defd0622dbb6e553c6a01ad9c06abd3cee9b42d24cadf0d7bc8dfa5ba86b119131d362c7f1699853acbd8dfbcd8886821f784be0eccb52f7c5f78cc0b781b3c
6
+ metadata.gz: d2624ba89ab88b72b17a67db2bea01827280f14c39bd9580945843e450532f8e21940ecef3a4534590f06145057cac6d75f543b8d04b0fe8ba16e30e48e58bf7
7
+ data.tar.gz: 80a3e9f97086690298ec7480e3aa59f5a39908c369e31c5c4f77387dfb1321e52d5b44d0a4dc2d1e2907bd0dcf5f348fd2741839d0fe2a62d77eb1efa6684a31
@@ -4,7 +4,9 @@ require 'avm/eac_rails_base1/instances/apache_host'
4
4
 
5
5
  module Avm
6
6
  module EacRailsBase0
7
- class ApacheHost < ::Avm::EacRailsBase1::Instances::ApacheHost
7
+ module Instances
8
+ class ApacheHost < ::Avm::EacRailsBase1::Instances::ApacheHost
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/core_ext'
4
+ require 'avm/eac_webapp_base0/instances/apache_path'
5
+ require 'eac_ruby_utils/core_ext'
6
+
7
+ module Avm
8
+ module EacRailsBase0
9
+ module Instances
10
+ class ApachePath < ::Avm::EacWebappBase0::Instances::ApachePath
11
+ def document_root
12
+ ::File.join(super, 'public')
13
+ end
14
+
15
+ def extra_content
16
+ template.child('extra_content.conf').apply(instance)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'avm/eac_rails_base1/instances/base'
4
+ require 'avm/eac_rails_base0/instances/deploy'
4
5
 
5
6
  module Avm
6
7
  module EacRailsBase0
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_templates/core_ext'
4
+ require 'avm/eac_webapp_base0/instances/deploy'
5
+ require 'avm/instances/entry_keys'
6
+
7
+ module Avm
8
+ module EacRailsBase0
9
+ module Instances
10
+ class Deploy < ::Avm::EacWebappBase0::Instances::Deploy
11
+ set_callback :assert_instance_branch, :after do
12
+ bundle_install
13
+ assert_database
14
+ database_migrate
15
+ compile_assets
16
+ restart_tasks_scheduler
17
+ touch_restart_file
18
+ end
19
+
20
+ def assert_database
21
+ infom 'Asserting database...'
22
+ instance.pg.assert
23
+ end
24
+
25
+ def bundle_install
26
+ infom 'Running "bundle install"...'
27
+ instance.bundle('install').system!
28
+ end
29
+
30
+ def compile_assets
31
+ infom 'Compiling assets...'
32
+ instance.rake('assets:clean', 'assets:precompile').system!
33
+ end
34
+
35
+ def database_migrate
36
+ infom 'Running database migrations...'
37
+ instance.rake('db:migrate').system!
38
+ end
39
+
40
+ def restart_tasks_scheduler
41
+ infom 'Restarting Tasks Scheduler\'s daemon...'
42
+ instance.bundle('exec', 'tasks_scheduler', 'restart').system!
43
+ end
44
+
45
+ def touch_restart_file
46
+ infom 'Touching restart file...'
47
+ instance.host_env.command(
48
+ 'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
49
+ 'tmp', 'restart.txt')
50
+ ).system!
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase0
5
- VERSION = '0.9.1'
5
+ VERSION = '0.10.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_rails_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-31 00:00:00.000000000 Z
11
+ date: 2023-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-eac_rails_base1
@@ -65,17 +65,17 @@ extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
67
  - lib/avm/eac_rails_base0.rb
68
- - lib/avm/eac_rails_base0/apache_host.rb
69
- - lib/avm/eac_rails_base0/apache_path.rb
70
- - lib/avm/eac_rails_base0/deploy.rb
71
68
  - lib/avm/eac_rails_base0/instances.rb
69
+ - lib/avm/eac_rails_base0/instances/apache_host.rb
70
+ - lib/avm/eac_rails_base0/instances/apache_path.rb
72
71
  - lib/avm/eac_rails_base0/instances/base.rb
72
+ - lib/avm/eac_rails_base0/instances/deploy.rb
73
73
  - lib/avm/eac_rails_base0/source_generators/base.rb
74
74
  - lib/avm/eac_rails_base0/sources/base.rb
75
75
  - lib/avm/eac_rails_base0/version.rb
76
- - template/avm/eac_rails_base0/apache_path/extra_content.conf
77
- - template/avm/eac_rails_base0/deploy/config/database.yml.template
78
- - template/avm/eac_rails_base0/deploy/config/envvars.d/email.yml.template
76
+ - template/avm/eac_rails_base0/instances/apache_path/extra_content.conf
77
+ - template/avm/eac_rails_base0/instances/deploy/config/database.yml.template
78
+ - template/avm/eac_rails_base0/instances/deploy/config/envvars.d/email.yml.template
79
79
  - template/avm/eac_rails_base0/source_generators/base/Gemfile
80
80
  - template/avm/eac_rails_base0/source_generators/base/Rakefile
81
81
  - template/avm/eac_rails_base0/source_generators/base/app/assets/config/manifest.js
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_templates/core_ext'
4
- require 'avm/eac_webapp_base0/instances/apache_path'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module EacRailsBase0
9
- class ApachePath < ::Avm::EacWebappBase0::Instances::ApachePath
10
- def document_root
11
- ::File.join(super, 'public')
12
- end
13
-
14
- def extra_content
15
- template.child('extra_content.conf').apply(instance)
16
- end
17
- end
18
- end
19
- end
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_templates/core_ext'
4
- require 'avm/eac_webapp_base0/instances/deploy'
5
- require 'avm/instances/entry_keys'
6
-
7
- module Avm
8
- module EacRailsBase0
9
- class Deploy < ::Avm::EacWebappBase0::Instances::Deploy
10
- set_callback :assert_instance_branch, :after do
11
- bundle_install
12
- assert_database
13
- database_migrate
14
- compile_assets
15
- restart_tasks_scheduler
16
- touch_restart_file
17
- end
18
-
19
- def assert_database
20
- infom 'Asserting database...'
21
- instance.pg.assert
22
- end
23
-
24
- def bundle_install
25
- infom 'Running "bundle install"...'
26
- instance.bundle('install').system!
27
- end
28
-
29
- def compile_assets
30
- infom 'Compiling assets...'
31
- instance.rake('assets:clean', 'assets:precompile').system!
32
- end
33
-
34
- def database_migrate
35
- infom 'Running database migrations...'
36
- instance.rake('db:migrate').system!
37
- end
38
-
39
- def restart_tasks_scheduler
40
- infom 'Restarting Tasks Scheduler\'s daemon...'
41
- instance.bundle('exec', 'tasks_scheduler', 'restart').system!
42
- end
43
-
44
- def touch_restart_file
45
- infom 'Touching restart file...'
46
- instance.host_env.command(
47
- 'touch', ::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
48
- 'tmp', 'restart.txt')
49
- ).system!
50
- end
51
- end
52
- end
53
- end