alephant-harness 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +14 -4
- data/alephant-harness.gemspec +2 -2
- data/lib/alephant/harness/service/s3.rb +1 -1
- data/lib/alephant/harness/version.rb +1 -1
- data/spec/service/s3_spec.rb +21 -0
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f348244c6375dc642a98dc060faf37aeedbac8c0
|
4
|
+
data.tar.gz: 3b2a32b7852141a15353eadd3780e4ddef30dda9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9baf9cbae0e6264f14c9bad01fa6deb2ea646de345a4b7178b7b0935df3a04708bd3f60e403a78a436ab8bf0c51cfc11aa21f72fc09aaf873e7969f3fffb7919
|
7
|
+
data.tar.gz: f48cb525ae0ddbaef536e7759746d35c302b0d8a887ea0e46bccb57ba7295eed338f665e0668450f81c10afb23b18cfa7d02ceaf35061a93c2617ac8643d6c2e
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jruby-1.7.
|
1
|
+
jruby-1.7.17
|
data/README.md
CHANGED
@@ -25,10 +25,20 @@ Add the following code to your Alephant-based project's Rakefile, with your own
|
|
25
25
|
```ruby
|
26
26
|
require 'alephant/harness'
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
bbc_config = BBC::Cosmos::Config.app
|
29
|
+
|
30
|
+
config = {
|
31
|
+
:tables => [
|
32
|
+
{ :name => bbc_config[:lookup_table_name], :schema => 'lookup' },
|
33
|
+
{ :name => bbc_config[:sequencer_table_name], :schema => 'sequencer' }
|
34
|
+
],
|
35
|
+
:queues => [
|
36
|
+
bbc_config[:sqs_queue_name]
|
37
|
+
],
|
38
|
+
:buckets => [
|
39
|
+
bbc_config[:bucket_id]
|
40
|
+
]
|
41
|
+
}
|
32
42
|
|
33
43
|
task :harness do
|
34
44
|
Alephant::Harness::Setup.configure(config, ENV)
|
data/alephant-harness.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'alephant/harness/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "alephant-harness"
|
8
8
|
spec.version = Alephant::Harness::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
9
|
+
spec.authors = ["BBC News"]
|
10
|
+
spec.email = ["FutureMediaNewsRubyGems@bbc.co.uk"]
|
11
11
|
spec.summary = %q{Stuff}
|
12
12
|
spec.description = %q{More Stuff}
|
13
13
|
spec.homepage = ""
|
data/spec/service/s3_spec.rb
CHANGED
@@ -71,6 +71,27 @@ describe Alephant::Harness::Service::S3 do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
describe ".bucket_exists?" do
|
75
|
+
before(:each) do
|
76
|
+
allow_any_instance_of(AWS::S3).to receive(:buckets).and_return(buckets)
|
77
|
+
allow(buckets).to receive(:[]).with(id).and_return(bucket)
|
78
|
+
end
|
79
|
+
|
80
|
+
context "when bucket exists" do
|
81
|
+
it "yields control" do
|
82
|
+
allow(bucket).to receive(:exists?).and_return(true)
|
83
|
+
expect { |b| subject.bucket_exists?(id, &b) }.to yield_control
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
context "when bucket does not exist" do
|
88
|
+
it "does not yield control" do
|
89
|
+
allow(bucket).to receive(:exists?).and_return(false)
|
90
|
+
expect { |b| subject.bucket_exists?(id, &b) }.to_not yield_control
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
74
95
|
describe ".exists?" do
|
75
96
|
context "when queue exists" do
|
76
97
|
it "yields control" do
|
metadata
CHANGED
@@ -1,88 +1,88 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-harness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aws-sdk
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
14
|
requirement: !ruby/object:Gem::Requirement
|
21
15
|
requirements:
|
22
16
|
- - '>='
|
23
17
|
- !ruby/object:Gem::Version
|
24
18
|
version: '0'
|
19
|
+
name: aws-sdk
|
25
20
|
prerelease: false
|
26
21
|
type: :runtime
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
22
|
version_requirements: !ruby/object:Gem::Requirement
|
30
23
|
requirements:
|
31
|
-
- -
|
24
|
+
- - '>='
|
32
25
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
30
|
- - ~>
|
37
31
|
- !ruby/object:Gem::Version
|
38
32
|
version: '1.6'
|
33
|
+
name: bundler
|
39
34
|
prerelease: false
|
40
35
|
type: :development
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
36
|
version_requirements: !ruby/object:Gem::Requirement
|
44
37
|
requirements:
|
45
|
-
- -
|
38
|
+
- - ~>
|
46
39
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
48
42
|
requirement: !ruby/object:Gem::Requirement
|
49
43
|
requirements:
|
50
44
|
- - '>='
|
51
45
|
- !ruby/object:Gem::Version
|
52
46
|
version: '0'
|
47
|
+
name: rake
|
53
48
|
prerelease: false
|
54
49
|
type: :development
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
50
|
version_requirements: !ruby/object:Gem::Requirement
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
62
56
|
requirement: !ruby/object:Gem::Requirement
|
63
57
|
requirements:
|
64
58
|
- - ~>
|
65
59
|
- !ruby/object:Gem::Version
|
66
60
|
version: '3'
|
61
|
+
name: rspec
|
67
62
|
prerelease: false
|
68
63
|
type: :development
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
71
64
|
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
|
-
- -
|
66
|
+
- - ~>
|
74
67
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
68
|
+
version: '3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
76
70
|
requirement: !ruby/object:Gem::Requirement
|
77
71
|
requirements:
|
78
72
|
- - '>='
|
79
73
|
- !ruby/object:Gem::Version
|
80
74
|
version: '0'
|
75
|
+
name: pry
|
81
76
|
prerelease: false
|
82
77
|
type: :development
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
83
|
description: More Stuff
|
84
84
|
email:
|
85
|
-
-
|
85
|
+
- FutureMediaNewsRubyGems@bbc.co.uk
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|