logplex 0.0.1 → 0.0.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: dc2d2954418c3b93be55493748e2561c4b7b4b27
4
- data.tar.gz: c5fb17e4a46500eb26779b3089b7aeb357e60498
3
+ metadata.gz: 3b2fa2290f15377734c9c9c55fbf27b106d9842c
4
+ data.tar.gz: 14aa8562fc2f12d1debf16f5bc567e2799ea7d5b
5
5
  SHA512:
6
- metadata.gz: 35fd6b2c2f5e56e6ed6d2036ae5add5e487f25418a552fdce091c02d2a6ecc5e6693a43a44cfc3dc2a24f4eb75728d3cea58865750a2a141f24e711c338a1f18
7
- data.tar.gz: dd7b526faa13b42dd98261bdc7d3bd64c9389e734a7fcdfc106740b03ecaba58f896665e901d003276cdbfc116dddae24537c6cb26616b1493d985414f050422
6
+ metadata.gz: bc0f333026bcec31dd8655783720e899bc16ebc1390e8a567a56a73636c7763d406653bc2b262ece8583bba5a10fc803e74f978f818bc8d536c06bdd81d87991
7
+ data.tar.gz: 941d778d32f734cd3a417a496b5d8b8aa0c64ff8019e77f9e2e25ea4f856df956b510d0d31e259d1875152627bf2a5400e5f3767077b37380e30dfcd2a154466
@@ -39,6 +39,7 @@ module Logplex
39
39
  Excon.post(@logplex_url, body: message, headers: {
40
40
  "Content-Type" => 'application/logplex-1',
41
41
  "Content-Length" => message.length,
42
+ "Logplex-Msg-Count" => '1'
42
43
  }, expects: [200, 204])
43
44
  end
44
45
  end
@@ -1,3 +1,3 @@
1
1
  module Logplex
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'logplex/publisher'
3
+ require 'logplex/message'
3
4
 
4
5
  describe Logplex::Publisher do
5
6
  describe '#publish' do
@@ -72,5 +73,16 @@ describe Logplex::Publisher do
72
73
  publisher = Logplex::Publisher.new('https://token:t.some-token@logplex.example.com')
73
74
  expect(publisher.publish('hi')).to be_falsey
74
75
  end
76
+
77
+ it "includes the correct headers" do
78
+ message = 'hello-harold'
79
+ headers = {
80
+ "Content-Type" => 'application/logplex-1',
81
+ "Content-Length" => 79,
82
+ "Logplex-Msg-Count" => '1'
83
+ }
84
+ expect(Excon).to receive(:post).with(any_args, hash_including(:headers => headers))
85
+ Logplex::Publisher.new('https://token:t.some-token@logplex.example.com').publish(message)
86
+ end
75
87
  end
76
88
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logplex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harold Giménez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-26 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: valcro
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: excon
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Publish and Consume Logplex messages
@@ -59,9 +59,9 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".travis.yml"
62
+ - .gitignore
63
+ - .rspec
64
+ - .travis.yml
65
65
  - Gemfile
66
66
  - LICENSE
67
67
  - LICENSE.txt
@@ -86,17 +86,17 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">="
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.4.5.1
99
+ rubygems_version: 2.0.14.1
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Publish and Consume Logplex messages
@@ -105,4 +105,3 @@ test_files:
105
105
  - spec/logplex/message_spec.rb
106
106
  - spec/logplex/publisher_spec.rb
107
107
  - spec/spec_helper.rb
108
- has_rdoc: