megaphone-client 0.1.1 → 0.1.2

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: 7d1ea480c2579db9048fad472bc3c347802e0265
4
- data.tar.gz: 5b6cc0a2baf4d7c0e543da4252bbbc8981248e5d
3
+ metadata.gz: 7a7dc6659a187ca9b78ded1116c0f8719a35b5ab
4
+ data.tar.gz: 8abc464dcab0b286d8a677975ddfbaaf5a194e82
5
5
  SHA512:
6
- metadata.gz: 0cef69532192fc0dc039ab9b201f3561122b335178f4cbf977dbbedd922411c153232991d098a9feb9b8fbeda51f7407421cada0a6e6fb3e4a9db36a025a932c
7
- data.tar.gz: 4cd2ae1602235ff9dd395c233e125599a9dc5511f9f939529ed35adc7aa567dbad6f69d709647d54220cc41581777286ef15b5e77ad2487cd54722a31f99e7eb
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
@@ -1,5 +1,5 @@
1
1
  module Megaphone
2
2
  class Client
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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
@@ -1,5 +0,0 @@
1
- steps:
2
- - name: 'unit test'
3
- command: scripts/build.sh
4
- agents:
5
- location: aws
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /pkg/
6
- /spec/reports/
7
- /tmp/
8
- *.swp
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.2.3
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in megaphone-client.gemspec
4
- gemspec
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
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -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
@@ -1,2 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
- require 'megaphone/client'