ood_appkit 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ood_appkit/cluster.rb +9 -3
- data/lib/ood_appkit/shell_url.rb +3 -3
- data/lib/ood_appkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d9dd72dd897997eadf63e025a8e085a6ae842b7
|
4
|
+
data.tar.gz: 8db16a0e7b2c3e010412967a1c015288780dd212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35aad26d17cf8df49f4399b55f138c9959b795e4d16e6054593a6066ab364d0754ba25a24adfb3a35a9ebadaefe71d20aaed70bab2200612276789fc03c88cab
|
7
|
+
data.tar.gz: ecdf518bfded907f0faf195c4468d82f82e7ba3433cef67a64ba71dfffa87ebb4882b343c5f56c1bab0916048029c495f220130383e7b1cb740c1a402f793870
|
data/lib/ood_appkit/cluster.rb
CHANGED
@@ -6,6 +6,10 @@ module OodAppkit
|
|
6
6
|
# YAML configuration version
|
7
7
|
VERSION = :v1
|
8
8
|
|
9
|
+
# Unique ID of the cluster
|
10
|
+
# @return [Symbol] id of cluster
|
11
|
+
attr_reader :id
|
12
|
+
|
9
13
|
# Title of the cluster
|
10
14
|
# @return [String] title of cluster
|
11
15
|
attr_reader :title
|
@@ -24,17 +28,19 @@ module OodAppkit
|
|
24
28
|
# @return [Hash<Cluster>] list of clusters user has access to
|
25
29
|
def self.all(file: File.expand_path('../../../config/clusters.yml', __FILE__), force: false)
|
26
30
|
parse_config(file).each_with_object({}) do |(k, v), h|
|
27
|
-
c = Cluster.new v
|
31
|
+
c = Cluster.new v.merge(id: k)
|
28
32
|
h[k] = c if c.valid? || force
|
29
33
|
end
|
30
34
|
end
|
31
35
|
|
36
|
+
# @param id [Symbol] id of cluster
|
32
37
|
# @param title [String] title of cluster
|
33
38
|
# @param validators [Hash] hash of validations that describe the validators
|
34
39
|
# @param servers [Hash] hash of servers with corresponding server info
|
35
40
|
# @param hpc_cluster [Boolean] whether this is an hpc-style cluster
|
36
|
-
def initialize(title:, validators: {}, servers: {}, hpc_cluster: true)
|
37
|
-
# Set title of cluster
|
41
|
+
def initialize(id:, title:, validators: {}, servers: {}, hpc_cluster: true)
|
42
|
+
# Set id & title of cluster
|
43
|
+
@id = id
|
38
44
|
@title = title
|
39
45
|
|
40
46
|
# Generate hash of validations
|
data/lib/ood_appkit/shell_url.rb
CHANGED
@@ -20,10 +20,10 @@ module OodAppkit
|
|
20
20
|
|
21
21
|
# URL to access this app for a given host and absolute file path
|
22
22
|
# @param host [String] the host the app will make an ssh connection with
|
23
|
-
# @param path [
|
23
|
+
# @param path [#to_s] the absolute path to the directory ssh app opens up in
|
24
24
|
# @return [Addressable::URI] the url used to access the app
|
25
|
-
def url(
|
26
|
-
@template.expand url: @base_url + @ssh_url, path: path.to_s
|
25
|
+
def url(host: 'default', path: '')
|
26
|
+
@template.expand url: @base_url + @ssh_url, host: host, path: path.to_s
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/ood_appkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ood_appkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Franz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|