fog 0.0.66 → 0.0.67
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/fog +1 -0
- data/fog.gemspec +3 -2
- data/lib/fog/aws/models/s3/files.rb +1 -1
- data/lib/fog/bin.rb +0 -40
- data/lib/fog/credentials.rb +45 -0
- metadata +4 -3
data/VERSION.yml
CHANGED
data/bin/fog
CHANGED
data/fog.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fog}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.67"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["geemus (Wesley Beary)"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-02}
|
13
13
|
s.default_executable = %q{fog}
|
14
14
|
s.description = %q{The Ruby cloud computing library.}
|
15
15
|
s.email = %q{geemus@gmail.com}
|
@@ -138,6 +138,7 @@ Gem::Specification.new do |s|
|
|
138
138
|
"lib/fog/bin.rb",
|
139
139
|
"lib/fog/collection.rb",
|
140
140
|
"lib/fog/connection.rb",
|
141
|
+
"lib/fog/credentials.rb",
|
141
142
|
"lib/fog/model.rb",
|
142
143
|
"lib/fog/parser.rb",
|
143
144
|
"lib/fog/rackspace.rb",
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
attribute :delimiter, 'Delimiter'
|
11
11
|
attribute :is_truncated, 'IsTruncated'
|
12
12
|
attribute :marker, 'Marker'
|
13
|
-
attribute :max_keys, 'MaxKeys'
|
13
|
+
attribute :max_keys, ['MaxKeys', 'max-keys']
|
14
14
|
attribute :prefix, 'Prefix'
|
15
15
|
|
16
16
|
model Fog::AWS::S3::File
|
data/lib/fog/bin.rb
CHANGED
@@ -1,46 +1,6 @@
|
|
1
1
|
module Fog
|
2
2
|
class << self
|
3
3
|
|
4
|
-
def credential=(new_credential)
|
5
|
-
@credential = new_credential
|
6
|
-
@credentials = nil
|
7
|
-
end
|
8
|
-
|
9
|
-
def credential
|
10
|
-
@credential || :default
|
11
|
-
end
|
12
|
-
|
13
|
-
def credentials
|
14
|
-
@credentials ||= begin
|
15
|
-
path = File.expand_path('~/.fog')
|
16
|
-
credentials = if File.exists?(path)
|
17
|
-
File.open(path) do |file|
|
18
|
-
YAML.load(file.read)
|
19
|
-
end
|
20
|
-
else
|
21
|
-
nil
|
22
|
-
end
|
23
|
-
unless credentials && credentials[credential]
|
24
|
-
print("\n To run as '#{credential}', add the following to ~/.fog\n")
|
25
|
-
yml = <<-YML
|
26
|
-
|
27
|
-
:#{credential}:
|
28
|
-
:aws_access_key_id: INTENTIONALLY_LEFT_BLANK
|
29
|
-
:aws_secret_access_key: INTENTIONALLY_LEFT_BLANK
|
30
|
-
:rackspace_api_key: INTENTIONALLY_LEFT_BLANK
|
31
|
-
:rackspace_username: INTENTIONALLY_LEFT_BLANK
|
32
|
-
:slicehost_password: INTENTIONALLY_LEFT_BLANK
|
33
|
-
:terremark_username: INTENTIONALLY_LEFT_BLANK
|
34
|
-
:terremark_password: INTENTIONALLY_LEFT_BLANK
|
35
|
-
|
36
|
-
YML
|
37
|
-
print(yml)
|
38
|
-
raise(ArgumentError.new("Missing Credentials"))
|
39
|
-
end
|
40
|
-
credentials[credential]
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
4
|
def services
|
45
5
|
services = []
|
46
6
|
[::AWS, ::Rackspace, ::Slicehost, ::Terremark].each do |service|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Fog
|
2
|
+
class << self
|
3
|
+
|
4
|
+
def credential=(new_credential)
|
5
|
+
@credential = new_credential
|
6
|
+
@credentials = nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def credential
|
10
|
+
@credential || :default
|
11
|
+
end
|
12
|
+
|
13
|
+
def credentials
|
14
|
+
@credentials ||= begin
|
15
|
+
path = File.expand_path('~/.fog')
|
16
|
+
credentials = if File.exists?(path)
|
17
|
+
File.open(path) do |file|
|
18
|
+
YAML.load(file.read)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
unless credentials && credentials[credential]
|
24
|
+
print("\n To run as '#{credential}', add the following to ~/.fog\n")
|
25
|
+
yml = <<-YML
|
26
|
+
|
27
|
+
:#{credential}:
|
28
|
+
:aws_access_key_id: INTENTIONALLY_LEFT_BLANK
|
29
|
+
:aws_secret_access_key: INTENTIONALLY_LEFT_BLANK
|
30
|
+
:rackspace_api_key: INTENTIONALLY_LEFT_BLANK
|
31
|
+
:rackspace_username: INTENTIONALLY_LEFT_BLANK
|
32
|
+
:slicehost_password: INTENTIONALLY_LEFT_BLANK
|
33
|
+
:terremark_username: INTENTIONALLY_LEFT_BLANK
|
34
|
+
:terremark_password: INTENTIONALLY_LEFT_BLANK
|
35
|
+
|
36
|
+
YML
|
37
|
+
print(yml)
|
38
|
+
raise(ArgumentError.new("Missing Credentials"))
|
39
|
+
end
|
40
|
+
credentials[credential]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 67
|
9
|
+
version: 0.0.67
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- geemus (Wesley Beary)
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-02 00:00:00 -07:00
|
18
18
|
default_executable: fog
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -222,6 +222,7 @@ files:
|
|
222
222
|
- lib/fog/bin.rb
|
223
223
|
- lib/fog/collection.rb
|
224
224
|
- lib/fog/connection.rb
|
225
|
+
- lib/fog/credentials.rb
|
225
226
|
- lib/fog/model.rb
|
226
227
|
- lib/fog/parser.rb
|
227
228
|
- lib/fog/rackspace.rb
|