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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7c2f7020c1df1e241c8aeba1d979b6cfd18ea5e
4
- data.tar.gz: 5a7a8a2302d20af4cef6be3eddf91fce8b0417cf
3
+ metadata.gz: f348244c6375dc642a98dc060faf37aeedbac8c0
4
+ data.tar.gz: 3b2a32b7852141a15353eadd3780e4ddef30dda9
5
5
  SHA512:
6
- metadata.gz: 192d57c3bd1e1d02f9357462cb53fdd619cfb78a6b5f1195b5fd9042a4dc3113dd34607dced786d7b652f06b09a878bbef82498769b80459531ae23201d72387
7
- data.tar.gz: 91d9bc269c4b79d232e8281e5c89df7d011087c7f9bbf8e60d2e56d0e6bdc957ccd9b50987298215b9f2b2864f09e36054b5990176cc3ff814bca4f9be73e9a1
6
+ metadata.gz: 9baf9cbae0e6264f14c9bad01fa6deb2ea646de345a4b7178b7b0935df3a04708bd3f60e403a78a436ab8bf0c51cfc11aa21f72fc09aaf873e7969f3fffb7919
7
+ data.tar.gz: f48cb525ae0ddbaef536e7759746d35c302b0d8a887ea0e46bccb57ba7295eed338f665e0668450f81c10afb23b18cfa7d02ceaf35061a93c2617ac8643d6c2e
@@ -1 +1 @@
1
- jruby-1.7.8
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
- config = { :sqs_queue_url => 'your-sqs-queue-url',
29
- :bucket_id => 'your-bucket-id',
30
- :lookup_table_name => 'your-lookup-table-name',
31
- :sequencer_table_name => 'your-sequencer-table-name' }
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)
@@ -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 = ["Steven Jack"]
10
- spec.email = ["stevenmajack@gmail.com"]
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 = ""
@@ -45,7 +45,7 @@ module Alephant
45
45
  end
46
46
 
47
47
  exists.tap do |e|
48
- yeild if e && block_given?
48
+ yield if e && block_given?
49
49
  end
50
50
  end
51
51
 
@@ -1,5 +1,5 @@
1
1
  module Alephant
2
2
  module Harness
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Steven Jack
7
+ - BBC News
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-16 00:00:00.000000000 Z
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: '1.6'
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: '0'
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: '3'
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: '0'
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
- - stevenmajack@gmail.com
85
+ - FutureMediaNewsRubyGems@bbc.co.uk
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []