rightstuff 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rightstuff.rb +18 -9
- metadata +4 -4
data/lib/rightstuff.rb
CHANGED
@@ -9,13 +9,27 @@ module Rightstuff
|
|
9
9
|
module VERSION #:nodoc:
|
10
10
|
MAJOR = 0
|
11
11
|
MINOR = 0
|
12
|
-
TINY =
|
12
|
+
TINY = 4
|
13
13
|
|
14
14
|
STRING = [ MAJOR, MINOR, TINY ].join('.')
|
15
15
|
end
|
16
16
|
|
17
|
+
# Rightstuff::Credentials imposes no restrictions on the structure of the data
|
18
|
+
# It only requires that:
|
19
|
+
# 1. the user has a file called ~/.credentials,
|
20
|
+
# 2. the the file does not have any permissions for other users,
|
21
|
+
# 3. the file contails YAML::load-able data.
|
17
22
|
module Credentials
|
18
23
|
|
24
|
+
def rightscale_data
|
25
|
+
return @rightscale_data if @rightscale_data
|
26
|
+
raise "Missing credentials file '#{ rightscale_data_path }'" if ! File.exist?( rightscale_data_path )
|
27
|
+
check_permissions
|
28
|
+
@rightscale_data = YAML.load_file( rightscale_data_path )
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
19
33
|
def rightscale_data_path
|
20
34
|
File.expand_path( '~/.rightstuff' )
|
21
35
|
end
|
@@ -27,13 +41,6 @@ module Rightstuff
|
|
27
41
|
end
|
28
42
|
end
|
29
43
|
|
30
|
-
def rightscale_data
|
31
|
-
return @rightscale_data if @rightscale_data
|
32
|
-
raise "Missing credentials file '#{ rightscale_data_path }'" if ! File.exist?( rightscale_data_path )
|
33
|
-
check_permissions
|
34
|
-
@rightscale_data = YAML.load_file( rightscale_data_path )
|
35
|
-
end
|
36
|
-
|
37
44
|
end
|
38
45
|
|
39
46
|
class Base
|
@@ -69,7 +76,9 @@ module Rightstuff
|
|
69
76
|
end
|
70
77
|
|
71
78
|
class Server < Base
|
72
|
-
|
79
|
+
|
80
|
+
attr_reader :attributes
|
81
|
+
|
73
82
|
def initialize( client, item )
|
74
83
|
@settings = nil
|
75
84
|
@inputs = nil
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rightstuff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joe Yates
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-13 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|