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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24827b834b22a83117291c6dcf367cbf29122a23
4
- data.tar.gz: 4c7c01ef7964013f6c1063e3c4822e275b5d9222
3
+ metadata.gz: f4ef566ff55a175fce154e5eef0b081a867d5256
4
+ data.tar.gz: fa2e4576268700b0c10aba6d023fd462a516d191
5
5
  SHA512:
6
- metadata.gz: 3a6b0addf226a3bd46b0a45dba729ee83075bb1a96eda9b062cba33ddbc1161bb19f76632a928b855b9875ea9e9e36798674d22bc1187573db828fb1efd5f934
7
- data.tar.gz: 14a1858f578e577e8225af3dfedf9c14ea53800fba52280287ba1401282fd3d0d48ebc07220f7006df1d2832056c0b5e4226e62547073418436a8ea134abe725
6
+ metadata.gz: 98f979a1f3bf6674dce38ea8311a5fcf17f1db06c2a738a19e10eb1efe27cda3b2f66b7b153f2621fb340d6d62454bb5a57f71ab92db0ee1a7fb10977b15d448
7
+ data.tar.gz: 4b1acb6196a47d7d0804bda1cfc3cd4750707e095a523362f2c7be04a00b87d737768b563b53c31a8d7dc4df8946bdfaa148521f87aa6c1f36c841300989ad8c
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Vidsy
2
2
  module Cloudkit
3
- VERSION = "0.7.0"
3
+ VERSION = "0.8.0"
4
4
  end
5
5
  end
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "rake", "~> 10.0"
22
22
  spec.add_development_dependency "rspec", "~> 3.0"
23
23
 
24
+ spec.add_dependency "aws-sdk", "~> 2"
24
25
  spec.add_dependency "json"
25
26
  spec.add_dependency "pry"
26
27
  end
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.7.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-08 00:00:00.000000000 Z
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