heirloom 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/heirloom/config.rb +15 -0
- data/lib/heirloom/version.rb +1 -1
- data/lib/heirloom.rb +5 -4
- metadata +17 -16
@@ -0,0 +1,15 @@
|
|
1
|
+
module Heirloom
|
2
|
+
class Config
|
3
|
+
def self.load_config_file(config_file = "#{ENV['HOME']}/.heirloom.yml")
|
4
|
+
YAML::load( File.open( config_file ) )
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.access_key
|
8
|
+
load_config_file['access_key']
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.secret_key
|
12
|
+
load_config_file['secret_key']
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/heirloom/version.rb
CHANGED
data/lib/heirloom.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "heirloom/aws"
|
2
|
+
require "heirloom/config"
|
2
3
|
require "heirloom/version"
|
3
4
|
|
4
5
|
require 'socket'
|
@@ -108,8 +109,8 @@ module Heirloom
|
|
108
109
|
region = options['region']
|
109
110
|
endpoint = options['endpoint']
|
110
111
|
connection = Fog::Storage.new :provider => 'AWS',
|
111
|
-
:aws_access_key_id =>
|
112
|
-
:aws_secret_access_key =>
|
112
|
+
:aws_access_key_id => Config.access_key,
|
113
|
+
:aws_secret_access_key => Config.secret_key,
|
113
114
|
:region => region
|
114
115
|
|
115
116
|
# Get bucket
|
@@ -216,8 +217,8 @@ module Heirloom
|
|
216
217
|
end
|
217
218
|
|
218
219
|
def self.connect_to_sdb
|
219
|
-
@access_key =
|
220
|
-
@secret_key =
|
220
|
+
@access_key = Config.access_key
|
221
|
+
@secret_key = Config.secret_key
|
221
222
|
|
222
223
|
AWS::SimpleDb.new(@access_key, @secret_key)
|
223
224
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heirloom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70120929125280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70120929125280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: fog
|
27
|
-
requirement: &
|
27
|
+
requirement: &70120929124860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70120929124860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: grit
|
38
|
-
requirement: &
|
38
|
+
requirement: &70120929124420 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70120929124420
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: logger
|
49
|
-
requirement: &
|
49
|
+
requirement: &70120929123960 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70120929123960
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: minitar
|
60
|
-
requirement: &
|
60
|
+
requirement: &70120929123540 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70120929123540
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: trollop
|
71
|
-
requirement: &
|
71
|
+
requirement: &70120929123120 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70120929123120
|
80
80
|
description: I help build and manage artifacts
|
81
81
|
email:
|
82
82
|
- brett@weav.net
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- lib/heirloom.rb
|
95
95
|
- lib/heirloom/aws.rb
|
96
96
|
- lib/heirloom/cli.rb
|
97
|
+
- lib/heirloom/config.rb
|
97
98
|
- lib/heirloom/version.rb
|
98
99
|
homepage: ''
|
99
100
|
licenses: []
|
@@ -109,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
110
|
version: '0'
|
110
111
|
segments:
|
111
112
|
- 0
|
112
|
-
hash:
|
113
|
+
hash: -1672995247567950048
|
113
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
115
|
none: false
|
115
116
|
requirements:
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
version: '0'
|
119
120
|
segments:
|
120
121
|
- 0
|
121
|
-
hash:
|
122
|
+
hash: -1672995247567950048
|
122
123
|
requirements: []
|
123
124
|
rubyforge_project: heirloom
|
124
125
|
rubygems_version: 1.8.16
|