spurious-ruby-awssdk-helper 0.2.3 → 0.2.4

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: 6f4413c5b9e15ec0279c1f8f9a4d17b6b0d60936
4
- data.tar.gz: 802ae87bd5b425c9bfff06e22574ab233aec0309
3
+ metadata.gz: 2c81d258107cec71268b9225fc1b0c15a33eeed1
4
+ data.tar.gz: 11c9e8dee50768286df55051432b977b6feededd
5
5
  SHA512:
6
- metadata.gz: b17561e340b31e93afeaebd6be20e2cb9dd7049d36faf86088247ed59b952dc9dea9e47b56db11226235ff7dde2365fbf2c20fba05682d858d02073c3fdd583e
7
- data.tar.gz: 998ac29dcf47badf5206f0ef44196193172876367cb06390e77b64e555d2121ff717ff8d119de9ff40e490d7f5a2683078f0fc3f043e5259ac6442faed5bdbe9
6
+ metadata.gz: 64709e8d94cbfab2dbb08bdf92a5e7e0d75739ac93be87cb15fa72ffc18f3ad16e015a5229a9162d33b35caf13d9802e444f4929b3316c284f46275033307cc5
7
+ data.tar.gz: de423bf9a666b95da9e50240f2994b3aed3c16c2f7dde0b3b42da708bfc5aaa6ad6582fccdf7754b6da6c7cde60c86a25c42af0ba5eb1c2873f3ed493a96f0e2
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ sudo: false
5
+ notifications:
6
+ email:
7
+ recipients:
8
+ - stevenmajack@gmail.com
9
+ on_failure: change
10
+ on_success: never
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Spurious::Ruby::Awssdk::Helper
2
2
 
3
- TODO: Write a gem description
3
+ [![Build Status](https://travis-ci.org/spurious-io/ruby-awssdk-helper.png?branch=master)](https://travis-ci.org/spurious-io/ruby-awssdk-helper)
4
+ [![Gem Version](https://badge.fury.io/rb/spurious-ruby-awssdk-helper.png)](http://badge.fury.io/rb/spurious-ruby-awssdk-helper)
5
+
6
+ A ruby helper class for configuring the ruby `aws-sdk` to
7
+ talk to the spurious services.
4
8
 
5
9
  ## Installation
6
10
 
@@ -18,11 +22,45 @@ Or install it yourself as:
18
22
 
19
23
  ## Usage
20
24
 
21
- TODO: Write usage instructions here
25
+ You can configure the `aws-sdk` two different ways:
26
+
27
+ 1. Shelling out to the CLI tool for the current port mappings
28
+ 2. Getting current port mappings from linked docker containers
29
+
30
+ ## CLI strategy
31
+
32
+ Generally you have this setup done at the entry point of your
33
+ application or in a di container:
34
+
35
+ ```ruby
36
+ require 'spurious/ruby/awssdk/helper'
37
+
38
+ Spurious::Ruby::Awssdk::Helper.configure
39
+ ```
40
+
41
+
42
+ ## Docker strategy
43
+
44
+ If you're running you application in a container on the same host
45
+ as spurious then you can pass in the following linked containers:
46
+
47
+ ```bash
48
+ docker run ... --link sprious-s3:s3.spurious.localhost --link spurious
49
+ -sqs:sqs.spurious.localhost --link spurious-dynamodb:dynamodb.spurious.localhost
50
+ ```
51
+
52
+ then inside your application:
53
+
54
+ ```ruby
55
+ require 'spurious/ruby/awssdk/helper'
56
+
57
+ Spurious::Ruby::Awssdk::Helper.configure :docker
58
+
59
+ ```
22
60
 
23
61
  ## Contributing
24
62
 
25
- 1. Fork it ( https://github.com/stevenjack/spurious-ruby-awssdk-helper/fork )
63
+ 1. Fork it ( https://github.com/spurious-io/ruby-awssdk-helper/fork )
26
64
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
65
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
66
  4. Push to the branch (`git push origin my-new-feature`)
data/Rakefile CHANGED
@@ -1,2 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rake/rspec"
3
+
4
+ task :default => :spec
2
5
 
@@ -2,7 +2,7 @@ module Spurious
2
2
  module Ruby
3
3
  module Awssdk
4
4
  module Helper
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
8
8
  end
@@ -8,19 +8,22 @@ describe Spurious::Ruby::Awssdk::Strategy do
8
8
  'spurious-sqs' => [
9
9
  {
10
10
  'GuestPort' => 123,
11
- 'HostPort' => 456
11
+ 'HostPort' => 456,
12
+ 'Host' => 'foo'
12
13
  }
13
14
  ],
14
15
  'spurious-s3' => [
15
16
  {
16
17
  'GuestPort' => 789,
17
- 'HostPort' => 101
18
+ 'HostPort' => 101,
19
+ 'Host' => 'foo'
18
20
  }
19
21
  ],
20
22
  'spurious-dynamo' => [
21
23
  {
22
24
  'GuestPort' => 121,
23
- 'HostPort' => 314
25
+ 'HostPort' => 314,
26
+ 'Host' => 'foo'
24
27
  }
25
28
  ]
26
29
  }
@@ -31,7 +34,7 @@ describe Spurious::Ruby::Awssdk::Strategy do
31
34
  subject.sqs
32
35
  subject.s3
33
36
 
34
- expect(AWS).to receive(:config).exactly(3).times
37
+ expect(AWS).to receive(:config).exactly(7).times
35
38
  subject.apply(config)
36
39
 
37
40
  end
@@ -39,7 +42,7 @@ describe Spurious::Ruby::Awssdk::Strategy do
39
42
  it "only applys a subset of the options" do
40
43
  subject.dynamo(true, true)
41
44
 
42
- expect(AWS).to receive(:config).exactly(2).times
45
+ expect(AWS).to receive(:config).exactly(3).times
43
46
  subject.apply(config)
44
47
 
45
48
  end
@@ -47,7 +50,9 @@ describe Spurious::Ruby::Awssdk::Strategy do
47
50
  it "only sets the port for one service" do
48
51
  subject.dynamo(true)
49
52
 
50
- expect(AWS).to receive(:config).once.with(:dynamo_db_port => 314).times
53
+ expect(AWS).to receive(:config).with(:dynamo_db_port => 314)
54
+ expect(AWS).to receive(:config).with(:dynamo_db_endpoint => "foo")
55
+ expect(AWS).to receive(:config).with({:use_ssl=>false, :s3_force_path_style=>true})
51
56
  subject.apply(config)
52
57
 
53
58
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "rake-rspec", ">= 0.0.2"
23
24
 
24
- spec.add_runtime_dependency "aws-sdk"
25
+ spec.add_runtime_dependency "aws-sdk", "~> 1"
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spurious-ruby-awssdk-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-04 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,19 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: aws-sdk
42
+ name: rake-rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
47
+ version: 0.0.2
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 0.0.2
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: '1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1'
55
69
  description: Helper gem for configuring the AWS ruby SDK with spurious details
56
70
  email:
57
71
  - stevenmajack@gmail.com
@@ -60,6 +74,7 @@ extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
76
  - .gitignore
77
+ - .travis.yml
63
78
  - Gemfile
64
79
  - LICENSE.txt
65
80
  - README.md
@@ -90,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
105
  version: '0'
91
106
  requirements: []
92
107
  rubyforge_project:
93
- rubygems_version: 2.0.14
108
+ rubygems_version: 2.2.2
94
109
  signing_key:
95
110
  specification_version: 4
96
111
  summary: Helper gem for configuring the AWS ruby SDK with spurious details