ish_models 3.1.0.20 → 3.1.0.22

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: e376c27171200c2fc25d4b6c7bb8d866a6a01642b009d3302e591d34252a6fd5
4
- data.tar.gz: 8912f90aaf505ed8749439308c47a4c91106c59e8ceaa2f42136032d1912e2f2
3
+ metadata.gz: cf823aeb00ff0318b485b16629c5340c3108f5797f4876e31fcc34b8de3bf995
4
+ data.tar.gz: b9c7e209d59296da77c0d337722deccd5b6147adf285b45c05e2f7a8b993fa8f
5
5
  SHA512:
6
- metadata.gz: 5480969543c02a514ca62abeddbdf09541c8a9a8969b88fa742c41bcff0922df086791a8d996b74edaf5bdfe4522d5328b846554d5c16250eea565d23398391c
7
- data.tar.gz: 7ecdf9d17d8642a7e053c79782f9dba2f2a6dca6abd040008b80f1bf9047f2a869db2d902815735cc62ce312d9b2100295a2fb15ce645bcd3056cc559b8cfec3
6
+ metadata.gz: a1993b116f20082efe3102c86170c41faf80fe0c4070b2927b128696139b3a4e3aebf4ff40eeac7ffba079753333c6d0522d11fc51603095af1c39b967c17ef4
7
+ data.tar.gz: cba2dac300f2cd89cf8a19ab69c59dff727dbe35c4960630eb22e9a0bc59f85b7dc7d63e509bfcc3b226243622aede1342ce6394069dfbcd63f00fccd3ca2ea9
@@ -19,6 +19,9 @@ class WcoHosting::Appliance
19
19
  def host
20
20
  "#{subdomain}.#{domain}"
21
21
  end
22
+ def route53_zone
23
+ WcoHosting::Domain.find_by( name: domain ).route53_zone
24
+ end
22
25
 
23
26
  belongs_to :appliance_tmpl, class_name: 'WcoHosting::ApplianceTmpl'
24
27
  def tmpl
@@ -30,7 +33,6 @@ class WcoHosting::Appliance
30
33
 
31
34
  belongs_to :serverhost, class_name: 'WcoHosting::Serverhost'
32
35
 
33
- # field :ip
34
36
  field :port
35
37
 
36
38
  STATE_PENDING = 'state-pending'
@@ -50,8 +50,8 @@ class WcoHosting::Serverhost
50
50
  file.close
51
51
 
52
52
  cmd = "aws route53 change-resource-record-sets \
53
- --hosted-zone-id <%= app.route53_zone %> \
54
- --change-batch file://<%= file.path %> "
53
+ --hosted-zone-id #{ app.route53_zone } \
54
+ --change-batch file://#{ file.path } "
55
55
  do_exec( cmd )
56
56
  end
57
57
 
@@ -168,23 +168,26 @@ class WcoHosting::Serverhost
168
168
  end
169
169
 
170
170
  def do_exec cmd
171
- @messages ||= []
172
- @errors ||= []
173
- @statuses ||= []
171
+ # @messages ||= []
172
+ # @errors ||= []
173
+ # @statuses ||= []
174
174
 
175
175
  puts! cmd, '#do_exec'
176
176
  stdout, stderr, status = Open3.capture3(cmd)
177
177
  puts "+++ +++ stdout"
178
178
  puts stdout
179
- @messages.push( stdout )
179
+ # @messages.push( stdout )
180
180
  puts "+++ +++ stderr"
181
181
  puts stderr
182
- @errors.push( stderr )
182
+ # @errors.push( stderr )
183
183
  puts! status, 'status'
184
- @statuses.push( status.to_s.split.last.to_i )
184
+ # @statuses.push( status.to_s.split.last.to_i )
185
185
  end
186
186
 
187
187
  def done_exec
188
+ @messages ||= []
189
+ @errors ||= []
190
+ @statuses ||= []
188
191
  OpenStruct.new( statuses: @statuses, errors: @errors, messages: @messages )
189
192
  end
190
193
 
@@ -5,6 +5,6 @@ server {
5
5
  location / {
6
6
  proxy_pass http://127.0.0.1:<%= @app.port %>/;
7
7
  }
8
- # ssl_certificate /etc/letsencrypt/live/<%= @app.host %>/fullchain.pem; # managed by Certbot
9
- # ssl_certificate_key /etc/letsencrypt/live/<%= @app.host %>/privkey.pem; # managed by Certbot
8
+ ssl_certificate /etc/letsencrypt/live/<%= @app.host %>/fullchain.pem; # managed by Certbot
9
+ ssl_certificate_key /etc/letsencrypt/live/<%= @app.host %>/privkey.pem; # managed by Certbot
10
10
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.20
4
+ version: 3.1.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - mac_a2141