avm-tools 0.26.0 → 0.27.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: 5cd4428c87bbb4fa7c5e7e49f2324bae1f9c34a63adad1790ca84dd3e44726bc
4
- data.tar.gz: 0f658f19e437688c90766266a69f9aede92bde9036804eaed08562c8bd8bf2b7
3
+ metadata.gz: 26cf030a3f42c0f5fdf7942b2971bec85421f8df517011ab391a1fb95d224312
4
+ data.tar.gz: 0c257ee1e27f65c8dd0f4f92d1e2b7c53859a572d030485a9c99a3647a1f3b20
5
5
  SHA512:
6
- metadata.gz: cce720c19266b3441dfd04c469179bad41e42e71d984b57ef32677d0a247637b829e2674c53f8e20f17a62f280d52e131da103db9b55f75d39ddf7b64893bb72
7
- data.tar.gz: 9ae68611ffa2d35623a553ffb7d3b89ec0cb04878c472275544f33b17b7014c1a7bfe49c357eb78ebaf3361e3776aa40b268e50b3872618f943c0458ce6f8800
6
+ metadata.gz: 20162f7cb80187392299e43eeadb1e7fb02df97eb38fcdceccffec660d7a450d2cbc3abb342e4d60b87779e5143f89170ff3699d5e68f1dc385406bb4ddf82b8
7
+ data.tar.gz: 2933f9e4acda6314ef99b431f5181323695336026d76978271191f2c3d5ed90cbe43ff20d4cadf9838fc1a86c0b33c9a92361933fd8ccd2e83d0405af08bdd61
@@ -53,8 +53,8 @@ module Avm
53
53
  def host_env_uncached
54
54
  access = read_entry(:access, list: ::Avm::Instances::Base.lists.access.values)
55
55
  case access
56
- when 'local' then return ::EacRubyUtils::Envs.local
57
- when 'ssh' then return ::EacRubyUtils::Envs.ssh(read_entry('ssh.url'))
56
+ when 'local' then ::EacRubyUtils::Envs.local
57
+ when 'ssh' then ::EacRubyUtils::Envs.ssh(read_entry('ssh.url'))
58
58
  else raise("Unmapped access value: \"#{access}\"")
59
59
  end
60
60
  end
@@ -11,6 +11,7 @@ module Avm
11
11
  assert_database
12
12
  database_migrate
13
13
  compile_assets
14
+ restart_tasks_scheduler
14
15
  touch_restart_file
15
16
  end
16
17
 
@@ -34,6 +35,11 @@ module Avm
34
35
  instance.rake('db:migrate').system!
35
36
  end
36
37
 
38
+ def restart_tasks_scheduler
39
+ infom 'Restarting Tasks Scheduler\'s daemon...'
40
+ instance.bundle('exec', 'tasks_scheduler', 'restart').system!
41
+ end
42
+
37
43
  def touch_restart_file
38
44
  infom 'Touching restart file...'
39
45
  instance.host_env.command(
@@ -6,6 +6,7 @@ require 'eac_ruby_utils/core_ext'
6
6
  require 'eac_launcher/git/base'
7
7
  require 'avm/git'
8
8
  require 'avm/patches/object/template'
9
+ require 'net/http'
9
10
 
10
11
  module Avm
11
12
  module Stereotypes
@@ -16,7 +17,7 @@ module Avm
16
17
  enable_console_speaker
17
18
  enable_simple_cache
18
19
 
19
- JOBS = %w[git_deploy setup_files_units assert_instance_branch].freeze
20
+ JOBS = %w[git_deploy setup_files_units assert_instance_branch request_test].freeze
20
21
  define_callbacks(*JOBS)
21
22
 
22
23
  attr_reader :instance, :git_reference
@@ -65,6 +66,14 @@ module Avm
65
66
  git.execute!('push', git_remote_name, "#{commit_sha1}:refs/heads/#{instance.id}", '-f')
66
67
  end
67
68
 
69
+ def request_test
70
+ infom 'Requesting web interface...'
71
+ uri = URI(instance.read_entry('web.url'))
72
+ response = ::Net::HTTP.get_response(uri)
73
+ infov 'Response status', response.code
74
+ fatal_error "Request to #{uri} failed" unless response.code.to_i == 200
75
+ end
76
+
68
77
  def commit_sha1_uncached
69
78
  git_fetch
70
79
  r = git.rev_parse(git_reference_found)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.26.0'
5
+ VERSION = '0.27.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-28 00:00:00.000000000 Z
11
+ date: 2020-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -132,14 +132,14 @@ dependencies:
132
132
  requirements:
133
133
  - - "~>"
134
134
  - !ruby/object:Gem::Version
135
- version: 0.76.0
135
+ version: 0.79.0
136
136
  type: :development
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
- version: 0.76.0
142
+ version: 0.79.0
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: rubocop-rspec
145
145
  requirement: !ruby/object:Gem::Requirement