megaphone-client 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/megaphone/client/version.rb +1 -1
- metadata +1 -12
- data/.buildkite/pipeline.yml +0 -5
- data/.gitignore +0 -8
- data/.rspec +0 -2
- data/.ruby-version +0 -1
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -38
- data/Rakefile +0 -6
- data/megaphone-client.gemspec +0 -22
- data/scripts/build.sh +0 -1
- data/spec/megaphone/client_spec.rb +0 -52
- data/spec/spec_helper.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7dc6659a187ca9b78ded1116c0f8719a35b5ab
|
4
|
+
data.tar.gz: 8abc464dcab0b286d8a677975ddfbaaf5a194e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920ad515454fe90b307e9b4714960f21aaade7e67071fb76105774c303357420c384a8606420a6508dcf3088598b7a84524ee1e9980bcab9b2745ca77e60ee51
|
7
|
+
data.tar.gz: 20b6399bab9dfed81affd0a7cec8f409c4075f88d7a1caac62b6b6e95024efbd4cb54ed33e72b3612709039ba8453286d8a6bbd738d6fa418d63fa34d6f9af1e
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,12 @@ this project versions are for now mere release numbers. They don't have any part
|
|
8
8
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
9
9
|
|
10
10
|
|
11
|
+
## 0.1.2 - 2017-08-04
|
12
|
+
|
13
|
+
### Fix
|
14
|
+
|
15
|
+
- Removing unnecessary files from gemspec
|
16
|
+
|
11
17
|
## 0.1.1 - 2017-08-03
|
12
18
|
|
13
19
|
### Fix
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megaphone-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Redbubble
|
@@ -63,26 +63,15 @@ executables: []
|
|
63
63
|
extensions: []
|
64
64
|
extra_rdoc_files: []
|
65
65
|
files:
|
66
|
-
- ".buildkite/pipeline.yml"
|
67
|
-
- ".gitignore"
|
68
|
-
- ".rspec"
|
69
|
-
- ".ruby-version"
|
70
66
|
- CHANGELOG.md
|
71
|
-
- Gemfile
|
72
|
-
- Gemfile.lock
|
73
67
|
- LICENSE
|
74
68
|
- README.md
|
75
|
-
- Rakefile
|
76
69
|
- doc/redbubble.png
|
77
70
|
- lib/megaphone/client.rb
|
78
71
|
- lib/megaphone/client/errors.rb
|
79
72
|
- lib/megaphone/client/event.rb
|
80
73
|
- lib/megaphone/client/fluent_logger.rb
|
81
74
|
- lib/megaphone/client/version.rb
|
82
|
-
- megaphone-client.gemspec
|
83
|
-
- scripts/build.sh
|
84
|
-
- spec/megaphone/client_spec.rb
|
85
|
-
- spec/spec_helper.rb
|
86
75
|
homepage: https://github.com/redbubble/megaphone-client-ruby
|
87
76
|
licenses:
|
88
77
|
- GPL-3.0
|
data/.buildkite/pipeline.yml
DELETED
data/.gitignore
DELETED
data/.rspec
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.2.3
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
megaphone-client (0.1.0)
|
5
|
-
fluent-logger (~> 0.7.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
diff-lcs (1.3)
|
11
|
-
fluent-logger (0.7.1)
|
12
|
-
msgpack (>= 1.0.0, < 2)
|
13
|
-
msgpack (1.1.0)
|
14
|
-
rake (10.5.0)
|
15
|
-
rspec (3.6.0)
|
16
|
-
rspec-core (~> 3.6.0)
|
17
|
-
rspec-expectations (~> 3.6.0)
|
18
|
-
rspec-mocks (~> 3.6.0)
|
19
|
-
rspec-core (3.6.0)
|
20
|
-
rspec-support (~> 3.6.0)
|
21
|
-
rspec-expectations (3.6.0)
|
22
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
-
rspec-support (~> 3.6.0)
|
24
|
-
rspec-mocks (3.6.0)
|
25
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.6.0)
|
27
|
-
rspec-support (3.6.0)
|
28
|
-
|
29
|
-
PLATFORMS
|
30
|
-
ruby
|
31
|
-
|
32
|
-
DEPENDENCIES
|
33
|
-
megaphone-client!
|
34
|
-
rake (~> 10.0)
|
35
|
-
rspec (~> 3.0)
|
36
|
-
|
37
|
-
BUNDLED WITH
|
38
|
-
1.15.3
|
data/Rakefile
DELETED
data/megaphone-client.gemspec
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'megaphone/client/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "megaphone-client"
|
8
|
-
spec.version = Megaphone::Client::VERSION
|
9
|
-
spec.authors = ["Redbubble", "Gonzalo Bulnes Guilpain", "Guilherme Reis Campos"]
|
10
|
-
spec.email = ["developers@redbubble.com", "gonzalo.bulnes@redbubble.com", "guilherme.campos@redbubble.com"]
|
11
|
-
|
12
|
-
spec.summary = "Send events to Megaphone."
|
13
|
-
spec.homepage = "https://github.com/redbubble/megaphone-client-ruby"
|
14
|
-
spec.license = "GPL-3.0"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.require_paths = ["lib"]
|
18
|
-
|
19
|
-
spec.add_dependency "fluent-logger", "~> 0.7.0"
|
20
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
22
|
-
end
|
data/scripts/build.sh
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
bundle install && bundle exec rake
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Megaphone::Client do
|
4
|
-
it 'has a version number' do
|
5
|
-
expect(Megaphone::Client::VERSION).not_to be nil
|
6
|
-
end
|
7
|
-
|
8
|
-
describe '#publish!' do
|
9
|
-
let(:config) { { origin: 'some-service' } }
|
10
|
-
let(:client) do
|
11
|
-
described_class.new(config, fluentd_logger)
|
12
|
-
end
|
13
|
-
|
14
|
-
let(:fluentd_logger) { instance_double(Megaphone::Client::FluentLogger, post: true) }
|
15
|
-
|
16
|
-
let(:topic) { :page_changes }
|
17
|
-
let(:subtopic) { :product_pages }
|
18
|
-
let(:payload) { { url: 'http://rb.com/' } }
|
19
|
-
|
20
|
-
it 'sends the event to fluentd' do
|
21
|
-
expect(fluentd_logger).to receive(:post).with(topic, {
|
22
|
-
topic: topic,
|
23
|
-
subtopic: subtopic,
|
24
|
-
origin: 'some-service',
|
25
|
-
payload: payload
|
26
|
-
})
|
27
|
-
client.publish!(topic, subtopic, payload)
|
28
|
-
end
|
29
|
-
|
30
|
-
context 'when sending event from My Awesome Service' do
|
31
|
-
|
32
|
-
let(:config) { { origin: 'my-awesome-service' } }
|
33
|
-
|
34
|
-
it 'sends the event to fluentd with the origin as my aweseome service' do
|
35
|
-
expect(fluentd_logger).to receive(:post).with(topic, hash_including(origin: 'my-awesome-service'))
|
36
|
-
client.publish!(topic, subtopic, payload)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
context 'when Megaphone (fluentd) is unavailable' do
|
41
|
-
|
42
|
-
before(:each) do
|
43
|
-
allow(fluentd_logger).to receive(:post).and_return(false)
|
44
|
-
allow(fluentd_logger).to receive(:last_error).and_return(Errno::ECONNREFUSED.new)
|
45
|
-
end
|
46
|
-
|
47
|
-
it 'raises an error' do
|
48
|
-
expect { client.publish!(topic, subtopic, payload) }.to raise_error(Megaphone::Client::MegaphoneUnavailableError, /The following event was not published/)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
data/spec/spec_helper.rb
DELETED