sfrest 0.0.12 → 0.0.13
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 +4 -4
- data/lib/sfrest/codebase.rb +16 -0
- data/lib/sfrest/connection.rb +1 -0
- data/lib/sfrest/site.rb +22 -5
- data/lib/sfrest/version.rb +1 -1
- data/lib/sfrest.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edf073b0cb0a501406818044613d07af0f2105b2
|
4
|
+
data.tar.gz: b47e8e4f6d1c59ad1f5bd13eadfa675d032500dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2835b20da38d1762f099504dd5e7c97e39ee69d29fa3caddd6f1dccdf62ac0c77499e866af7c266752a15a9df3289d002248415b0886f9576c7f0e986e25312
|
7
|
+
data.tar.gz: 27c5cb395231d07733a9cb26e1379a0e8a0972de6fd7827be9e6cf2daba76f3d9b4253ddc30226a52b1bb8434bb0e5b5bff7352e856fa78c9d738025d2ffd342
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SFRest
|
2
|
+
# List codebases on the factory.
|
3
|
+
class Codebase
|
4
|
+
# @param [SFRest::Connection] conn
|
5
|
+
def initialize(conn)
|
6
|
+
@conn = conn
|
7
|
+
end
|
8
|
+
|
9
|
+
# Lists the codebases
|
10
|
+
# @return [Hash] A hash of codebases configured for the factory.
|
11
|
+
# { "stacks" => { 1 => "abcde", 2 => 'fghij' } }
|
12
|
+
def list
|
13
|
+
@conn.get('/api/v1/stacks')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/sfrest/connection.rb
CHANGED
data/lib/sfrest/site.rb
CHANGED
@@ -80,16 +80,33 @@ module SFRest
|
|
80
80
|
end
|
81
81
|
|
82
82
|
# Creates a site.
|
83
|
-
# @param [String] sitename The name of the site to create
|
84
|
-
# @param [Integer] group_id The Id of the group the site is to be a member of
|
85
|
-
# @param [String] install_profile The install profile to use when creating the site
|
86
|
-
|
83
|
+
# @param [String] sitename The name of the site to create.
|
84
|
+
# @param [Integer] group_id The Id of the group the site is to be a member of.
|
85
|
+
# @param [String] install_profile The install profile to use when creating the site.
|
86
|
+
# @param [Integer] codebase The codebase index to use in installs.
|
87
|
+
def create_site(sitename, group_id, install_profile = nil, codebase = nil)
|
87
88
|
current_path = '/api/v1/sites'
|
88
89
|
payload = { 'site_name' => sitename, 'group_ids' => [group_id],
|
89
|
-
'install_profile' => install_profile }.to_json
|
90
|
+
'install_profile' => install_profile, 'codebase' => codebase }.to_json
|
90
91
|
@conn.post(current_path, payload)
|
91
92
|
end
|
92
93
|
|
94
|
+
# Creates a site.
|
95
|
+
# Alias for create_site
|
96
|
+
# @param [String] sitename The name of the site to create
|
97
|
+
# @param [Integer] group_id The Id of the group the site is to be a member of
|
98
|
+
# @param [String] install_profile The install profile to use when creating the site
|
99
|
+
# @param [Integer] codebase The codebase index to use in installs.
|
100
|
+
alias create create_site
|
101
|
+
|
102
|
+
# Deletes a site.
|
103
|
+
# @param [Integer] site_id The id of the stie to be deleted
|
104
|
+
# @return [Hash]
|
105
|
+
def delete(site_id)
|
106
|
+
current_path = '/api/v1/sites/' + site_id.to_s
|
107
|
+
@conn.delete current_path
|
108
|
+
end
|
109
|
+
|
93
110
|
# accessors for backups/restore
|
94
111
|
# so that you can do site.backup.list_backups
|
95
112
|
def backup
|
data/lib/sfrest/version.rb
CHANGED
data/lib/sfrest.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ACSF Engineering
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/sfrest.rb
|
104
104
|
- lib/sfrest/audit.rb
|
105
105
|
- lib/sfrest/backup.rb
|
106
|
+
- lib/sfrest/codebase.rb
|
106
107
|
- lib/sfrest/collection.rb
|
107
108
|
- lib/sfrest/connection.rb
|
108
109
|
- lib/sfrest/domains.rb
|
@@ -140,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
141
|
version: '0'
|
141
142
|
requirements: []
|
142
143
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.6.
|
144
|
+
rubygems_version: 2.6.13
|
144
145
|
signing_key:
|
145
146
|
specification_version: 4
|
146
147
|
summary: Acquia Site Factory Rest API.
|