alephant 0.0.5-java → 0.0.6-java

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: 2fab1ace0ff9d2ef8b5bb2003bb6fced04808a48
4
- data.tar.gz: fd3b8c6a161ea075fef0865fbb1278cb5ac4c47c
3
+ metadata.gz: a1840eda13ae723ff872f73da21ee753fc9e8ed6
4
+ data.tar.gz: 60f842f7a8a2b0f4787d9394fe5af967a6887eea
5
5
  SHA512:
6
- metadata.gz: d72470cccb094e58d2735fbce0b19fbf2840949f2ba3aabfd97bd0c400fe8b43baf1da54577677d4c006d972ed49808eef25f9400f4c52641f4df5b05880a345
7
- data.tar.gz: 35b38982cfc40c7cf796c2b440d288a6373b0e948f54d85e63e0f4ed8bb806dd9d7c8ea9e3971eb780579dda240b69d3f3fc55378daa42c0fe53df06b4d867a5
6
+ metadata.gz: 177994daa57df4abae27d9494d11d0e3074f2d6451d2a45795f4339ff65f55c82e65996d1ac746c49e42677d60454e14364ee929bd73a96c9718ff199fb7bbc2
7
+ data.tar.gz: fe480adb9ca995f169843f02540d2c95b16b5f214aacf6c4635f2029da0dfd0aee4202b41a77f5dc0ecf604d8f9045b4c50882e2f5b54da230c0800966dd6f96
data/README.md CHANGED
@@ -7,6 +7,8 @@ Static publishing to S3 on push notification from SQS
7
7
 
8
8
  [![Build Status](https://travis-ci.org/BBC-News/alephant.png?branch=master)](https://travis-ci.org/BBC-News/alephant)
9
9
 
10
+ [![Dependency Status](https://gemnasium.com/BBC-News/alephant.png)](https://gemnasium.com/BBC-News/alephant)
11
+
10
12
  [![Gem Version](https://badge.fury.io/rb/alephant.png)](http://badge.fury.io/rb/alephant)
11
13
 
12
14
  ##Dependencies
data/alephant.gemspec CHANGED
@@ -27,6 +27,8 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency "guard"
28
28
  s.add_development_dependency "guard-rspec"
29
29
  s.add_development_dependency "pry"
30
+ s.add_development_dependency "pry-remote"
31
+ s.add_development_dependency "pry-nav"
30
32
 
31
33
  s.add_runtime_dependency 'aws-sdk', '~> 1.0'
32
34
  s.add_runtime_dependency 'mustache', '>= 0.99.5'
data/lib/alephant.rb CHANGED
@@ -24,6 +24,7 @@ module Alephant
24
24
  :table_name,
25
25
  :sqs_queue_id,
26
26
  :view_id,
27
+ :view_path,
27
28
  :sequential_proc,
28
29
  :set_last_seen_proc
29
30
  ]
@@ -40,7 +41,7 @@ module Alephant
40
41
 
41
42
  @queue = Queue.new(@sqs_queue_id)
42
43
  @cache = Cache.new(@s3_bucket_id, @s3_object_path)
43
- @renderer = Renderer.new(@view_id)
44
+ @renderer = Renderer.new(@view_id, @view_path)
44
45
  end
45
46
 
46
47
  def parse(msg)
@@ -7,8 +7,9 @@ module Alephant
7
7
 
8
8
  attr_reader :id
9
9
 
10
- def initialize(id)
10
+ def initialize(id, view_base_path=nil)
11
11
  @id = id
12
+ self.base_path = view_base_path unless view_base_path.nil?
12
13
  end
13
14
 
14
15
  def render(data)
@@ -1,3 +1,3 @@
1
1
  module Alephant
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -86,12 +86,23 @@ describe Alephant::Alephant do
86
86
 
87
87
  context "initializes @renderer" do
88
88
  it "with Renderer.new(@view_id)" do
89
- Alephant::Renderer.should_receive(:new).with(:view_id)
89
+ Alephant::Renderer.should_receive(:new).with(:view_id, nil)
90
90
 
91
91
  instance = subject.new({
92
- :view_id => :view_id
92
+ :view_id => :view_id,
93
+ :view_path => nil
93
94
  })
94
95
  end
96
+
97
+ it "with Renderer.new(@view_id, @view_path)" do
98
+ Alephant::Renderer.should_receive(:new).with(:view_id, :view_path)
99
+
100
+ instance = subject.new({
101
+ :view_id => :view_id,
102
+ :view_path => :view_path
103
+ })
104
+ end
105
+
95
106
  end
96
107
  end
97
108
 
@@ -4,9 +4,16 @@ describe Alephant::Renderer do
4
4
  let(:id) { :id }
5
5
  subject { Alephant::Renderer }
6
6
 
7
- describe "id=" do
8
- it "sets the attribute id" do
9
- expect(subject.new(id).id).to eq(id)
7
+ describe "initialize(id, view_base_path=nil)" do
8
+ context "id = :id" do
9
+ it "sets the attribute id" do
10
+ expect(subject.new(id).id).to eq(id)
11
+ end
12
+ context "view_base_path = '.'" do
13
+ it "sets base_path" do
14
+ expect(subject.new(id,'.').base_path).to eq('.')
15
+ end
16
+ end
10
17
  end
11
18
  end
12
19
 
@@ -79,9 +86,9 @@ describe Alephant::Renderer do
79
86
 
80
87
  describe "base_path" do
81
88
  it "should return DEFAULT_LOCATION" do
82
- expect(subject.new(id).base_path).to eq(
83
- Alephant::Renderer::DEFAULT_LOCATION
84
- )
89
+ expect(subject.new(id).base_path).to eq(
90
+ Alephant::Renderer::DEFAULT_LOCATION
91
+ )
85
92
  end
86
93
 
87
94
  context "base_path = '.'" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alephant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: java
6
6
  authors:
7
7
  - Robert Kenny
@@ -94,6 +94,34 @@ dependencies:
94
94
  version: '0'
95
95
  prerelease: false
96
96
  type: :development
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-remote
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - '>='
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ prerelease: false
110
+ type: :development
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-nav
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirement: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ prerelease: false
124
+ type: :development
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: aws-sdk
99
127
  version_requirements: !ruby/object:Gem::Requirement