logplex-client 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
1
  *.swp
2
2
  .yardoc/
3
3
  doc/
4
- Gemfile.lock
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
data/Gemfile.lock ADDED
@@ -0,0 +1,43 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ logplex-client (0.1.6)
5
+ clamp (~> 0.5.0)
6
+ excon (~> 0.20.1)
7
+ multi_json
8
+ rest-client
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ clamp (0.5.1)
14
+ diff-lcs (1.2.3)
15
+ excon (0.20.1)
16
+ insist (0.0.8)
17
+ mime-types (1.22)
18
+ multi_json (1.7.2)
19
+ rest-client (1.6.7)
20
+ mime-types (>= 1.16)
21
+ rspec (2.13.0)
22
+ rspec-core (~> 2.13.0)
23
+ rspec-expectations (~> 2.13.0)
24
+ rspec-mocks (~> 2.13.0)
25
+ rspec-core (2.13.1)
26
+ rspec-expectations (2.13.0)
27
+ diff-lcs (>= 1.1.3, < 2.0)
28
+ rspec-mocks (2.13.1)
29
+ tomparse (0.4.2)
30
+ yard (0.8.6.1)
31
+ yard-tomdoc (0.7.1)
32
+ tomparse (>= 0.4.0)
33
+ yard
34
+
35
+ PLATFORMS
36
+ ruby
37
+
38
+ DEPENDENCIES
39
+ insist
40
+ logplex-client!
41
+ rspec
42
+ yard
43
+ yard-tomdoc
data/README.md CHANGED
@@ -115,3 +115,10 @@ the API docs.
115
115
  ### Logplex HTTP API
116
116
 
117
117
  https://logplex.herokuapp.com/
118
+
119
+ ### Testing
120
+
121
+ ```bash
122
+ export LOGPLEX_URL=https:u:p@your-logplex.com
123
+ rspec spec
124
+ ```
@@ -1,6 +1,6 @@
1
1
  module Logplex
2
2
  class Client
3
3
  # The version of this library.
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
6
6
  end
data/lib/logplex/drain.rb CHANGED
@@ -21,7 +21,7 @@ class Logplex::Drain
21
21
  # Returns nothing
22
22
  # Raises TODO(sissel): document exceptions
23
23
  def destroy
24
- @backend.delete_drain(@channel_id, @drain_id)
24
+ @backend.delete_drain(@channel_id, @id)
25
25
  end # def destroy
26
26
 
27
27
  # Public: Set the output of this drain to the given drain_url.
@@ -33,7 +33,7 @@ class Logplex::Drain
33
33
  def drain_url=(drain_url)
34
34
  # I don't really like this API feel, doing RPC calls in a setter feels like
35
35
  # it breaks expectations.
36
- @backend.set_drain_url(@channel_id, @drain_id, drain_url)
36
+ @backend.set_drain_url(@channel_id, @id, drain_url)
37
37
  @target = drain_url
38
38
  end # def use
39
39
 
@@ -27,9 +27,9 @@ describe Logplex::Channel do
27
27
  end # create_drain
28
28
 
29
29
  context "#create_drain(url)" do
30
- let(:url) { ENV["DRAIN_URL"] }
30
+ let(:url) { ENV["DRAIN_URL"] || "http://example.com" }
31
31
  before(:each) { @drain = @channel.create_drain(url) }
32
- after(:each) { @drain.destroy }
32
+ after(:each) { @drain.destroy if @drain }
33
33
 
34
34
  it "should return a Logplex::Drain" do
35
35
  insist { @drain }.is_a?(Logplex::Drain)
@@ -38,6 +38,10 @@ describe Logplex::Channel do
38
38
  it "should create a drain" do
39
39
  insist { @drain.drain_url } == url
40
40
  end
41
+
42
+ it "should have an id" do
43
+ insist { @drain.id } != nil
44
+ end
41
45
  end # create_drain
42
46
 
43
47
  context "#create_session" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logplex-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-05 00:00:00.000000000 Z
13
+ date: 2013-05-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: clamp
@@ -87,6 +87,7 @@ extra_rdoc_files: []
87
87
  files:
88
88
  - .gitignore
89
89
  - Gemfile
90
+ - Gemfile.lock
90
91
  - Makefile
91
92
  - README.md
92
93
  - bin/logplex