ish_models 3.1.0.22 → 3.1.0.24

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: cf823aeb00ff0318b485b16629c5340c3108f5797f4876e31fcc34b8de3bf995
4
- data.tar.gz: b9c7e209d59296da77c0d337722deccd5b6147adf285b45c05e2f7a8b993fa8f
3
+ metadata.gz: 959f1a8fb81000fc4ffbc104e01cd7fba9791360644300834a5863621df57b08
4
+ data.tar.gz: c796dcb26096dc78550f4923a088a1f645bf869cdf94b23747a691a4c4d70e99
5
5
  SHA512:
6
- metadata.gz: a1993b116f20082efe3102c86170c41faf80fe0c4070b2927b128696139b3a4e3aebf4ff40eeac7ffba079753333c6d0522d11fc51603095af1c39b967c17ef4
7
- data.tar.gz: cba2dac300f2cd89cf8a19ab69c59dff727dbe35c4960630eb22e9a0bc59f85b7dc7d63e509bfcc3b226243622aede1342ce6394069dfbcd63f00fccd3ca2ea9
6
+ metadata.gz: 352115eab59c287cb05dc18f6b0ee4dbe927456eef2fd2c930fde8c1822f3bb4802c2c71e3ad6a0603a08dd4dd849741154493d5bcee7e31e1b6a87704837841
7
+ data.tar.gz: a47b4504aed94102c3860c91f5cfac86e8f1c0a4c1c41de479d33a0825f4ea24081713a13db0e29e714271db1750bc98ef62e589e49a63d26376e34a0e88f98e
@@ -9,12 +9,12 @@ class WcoHosting::Domain
9
9
 
10
10
  ## orbital.city : Z0145070C3DD1OJWHTXJ
11
11
  ## oquaney-splicing.com : Z060228025Y0JHUA35GN5
12
- field :route53_zone
13
- validates :route53_zone, presence: true
12
+ # field :route53_zone
13
+ # validates :route53_zone, presence: true
14
14
 
15
15
  STATE_ACTIVE = 'active'
16
16
  STATE_INACTIVE = 'inactive'
17
- STATES = [ 'active', 'inactive' ]
17
+ STATES = [ 'active', 'inactive' ]
18
18
  field :state, default: STATE_ACTIVE
19
19
 
20
20
  def self.list
@@ -1,6 +1,7 @@
1
1
 
2
2
  require 'net/scp'
3
3
  require 'open3'
4
+ require 'droplet_kit'
4
5
 
5
6
  class WcoHosting::Serverhost
6
7
  include Mongoid::Document
@@ -40,6 +41,17 @@ class WcoHosting::Serverhost
40
41
  end
41
42
 
42
43
  def create_subdomain app
44
+ client = DropletKit::Client.new(access_token: DO_TOKEN_1)
45
+ record = DropletKit::DomainRecord.new(
46
+ type: 'A',
47
+ name: app.subdomain,
48
+ data: app.serverhost.public_ip,
49
+ )
50
+ client.domain_records.create(record, for_domain: app.domain )
51
+ end
52
+
53
+ ## obsolete _vp_ 2023-12-23
54
+ def aws_create_subdomain app
43
55
  ac = ActionController::Base.new
44
56
  ac.instance_variable_set( :@app, app )
45
57
  rendered_str = ac.render_to_string("wco_hosting/scripts/create_subdomain.json")
@@ -51,7 +63,8 @@ class WcoHosting::Serverhost
51
63
 
52
64
  cmd = "aws route53 change-resource-record-sets \
53
65
  --hosted-zone-id #{ app.route53_zone } \
54
- --change-batch file://#{ file.path } "
66
+ --change-batch file://#{ file.path } \
67
+ --profile route53 "
55
68
  do_exec( cmd )
56
69
  end
57
70
 
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.22
4
+ version: 3.1.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - mac_a2141
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 4.0.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: droplet_kit
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 3.20.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 3.20.0
125
139
  description: https://wasya.co
126
140
  email:
127
141
  - victor@piousbox.com
@@ -158,7 +172,7 @@ files:
158
172
  - app/views/wco_hosting/docker-compose/dc-any.erb
159
173
  - app/views/wco_hosting/docker-compose/dc-helloworld.erb
160
174
  - app/views/wco_hosting/docker-compose/dc-wordpress.erb
161
- - app/views/wco_hosting/scripts/create_subdomain.json.erb
175
+ - app/views/wco_hosting/scripts/create_subdomain.json.erb-trash
162
176
  - app/views/wco_hosting/scripts/create_volume.erb
163
177
  - app/views/wco_hosting/scripts/nginx_site.conf.erb
164
178
  - config/routes.rb