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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9f7a7c25ba25d14150f6a7c4ce9d1c06750aa62
4
- data.tar.gz: 876b6748f3b878847458bf43abc500d996251d81
3
+ metadata.gz: 5d9dd72dd897997eadf63e025a8e085a6ae842b7
4
+ data.tar.gz: 8db16a0e7b2c3e010412967a1c015288780dd212
5
5
  SHA512:
6
- metadata.gz: 39a1037b54d435c90f6a6021ce8140e476d638542bebe76d1d4c4e3d5db13b0c4236bebadc59690b6eacd8020ee022898dad4c8a4cefdf5ff8e2d14eecb8ee3f
7
- data.tar.gz: 8ad765fe7f3ab062f750d841a32adf8d8a62a8172789b0e222302f82ce7fe500a844c9aab0f26e7e724e85701068d3ccb164b5d26f5dd25574734d7b8a5b415c
6
+ metadata.gz: 35aad26d17cf8df49f4399b55f138c9959b795e4d16e6054593a6066ab364d0754ba25a24adfb3a35a9ebadaefe71d20aaed70bab2200612276789fc03c88cab
7
+ data.tar.gz: ecdf518bfded907f0faf195c4468d82f82e7ba3433cef67a64ba71dfffa87ebb4882b343c5f56c1bab0916048029c495f220130383e7b1cb740c1a402f793870
@@ -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
@@ -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 [String, #to_s] the absolute path to the directory ssh app opens up in
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(path: '', host: 'default')
26
- @template.expand url: @base_url + @ssh_url, path: path.to_s, host: host
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
@@ -1,4 +1,4 @@
1
1
  module OodAppkit
2
2
  # The current version of OodAppkit
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.5"
4
4
  end
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2016-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails