vidsy-cloudkit 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidsy/cloudkit.rb +5 -0
- data/lib/vidsy/cloudkit/aws_creds.rb +34 -0
- data/lib/vidsy/cloudkit/version.rb +1 -1
- data/vidsy-cloudkit.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4ef566ff55a175fce154e5eef0b081a867d5256
|
4
|
+
data.tar.gz: fa2e4576268700b0c10aba6d023fd462a516d191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98f979a1f3bf6674dce38ea8311a5fcf17f1db06c2a738a19e10eb1efe27cda3b2f66b7b153f2621fb340d6d62454bb5a57f71ab92db0ee1a7fb10977b15d448
|
7
|
+
data.tar.gz: 4b1acb6196a47d7d0804bda1cfc3cd4750707e095a523362f2c7be04a00b87d737768b563b53c31a8d7dc4df8946bdfaa148521f87aa6c1f36c841300989ad8c
|
data/lib/vidsy/cloudkit.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
+
require "vidsy/cloudkit/aws_creds"
|
1
2
|
require "vidsy/cloudkit/configuration"
|
2
3
|
require "vidsy/cloudkit/routing"
|
3
4
|
require "vidsy/cloudkit/version"
|
4
5
|
|
5
6
|
module Vidsy
|
6
7
|
module Cloudkit
|
8
|
+
def self.aws_creds
|
9
|
+
AwsCreds.get
|
10
|
+
end
|
11
|
+
|
7
12
|
def self.config(node = nil)
|
8
13
|
node ? Configuration.app_config.node(node) : Configuration.app_config.all
|
9
14
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "aws-sdk"
|
2
|
+
require "vidsy/cloudkit/configuration"
|
3
|
+
|
4
|
+
module Vidsy
|
5
|
+
module Cloudkit
|
6
|
+
class AwsCreds
|
7
|
+
def self.get
|
8
|
+
new.get
|
9
|
+
end
|
10
|
+
|
11
|
+
def get
|
12
|
+
if env == "production"
|
13
|
+
::Aws::InstanceProfileCredentials.new
|
14
|
+
else
|
15
|
+
::Aws::Credentials.new(config.access_key, config.secret_key)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def config
|
22
|
+
configuration.app_config.node "app"
|
23
|
+
end
|
24
|
+
|
25
|
+
def configuration
|
26
|
+
Configuration
|
27
|
+
end
|
28
|
+
|
29
|
+
def env
|
30
|
+
configuration.env
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/vidsy-cloudkit.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vidsy-cloudkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charlie Revett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: aws-sdk
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: json
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +104,7 @@ files:
|
|
90
104
|
- Gemfile
|
91
105
|
- lib/vidsy/cloudkit.rb
|
92
106
|
- lib/vidsy/cloudkit/app_config.rb
|
107
|
+
- lib/vidsy/cloudkit/aws_creds.rb
|
93
108
|
- lib/vidsy/cloudkit/configuration.rb
|
94
109
|
- lib/vidsy/cloudkit/routing.rb
|
95
110
|
- lib/vidsy/cloudkit/version.rb
|