papertrail-cli 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/papertrail/search_client.rb +6 -6
- data/lib/papertrail-cli.rb +1 -1
- data/papertrail-cli.gemspec +5 -4
- metadata +18 -6
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'time'
|
3
3
|
require 'openssl'
|
4
|
+
require 'faraday_stack'
|
4
5
|
|
5
6
|
module Papertrail
|
6
7
|
class SearchClient
|
7
8
|
def initialize(options)
|
8
|
-
|
9
9
|
ssl_options = { :verify => OpenSSL::SSL::VERIFY_PEER }
|
10
10
|
|
11
11
|
# Make Ubuntu OpenSSL work
|
@@ -17,14 +17,14 @@ module Papertrail
|
|
17
17
|
end
|
18
18
|
|
19
19
|
@conn = Faraday::Connection.new(:url => 'https://papertrailapp.com', :ssl => ssl_options) do |builder|
|
20
|
+
builder.adapter Faraday.default_adapter
|
21
|
+
builder.use FaradayStack::ResponseJSON
|
22
|
+
end.tap do |conn|
|
20
23
|
if options[:username] && options[:password]
|
21
|
-
|
24
|
+
conn.basic_auth(options[:username], options[:password])
|
22
25
|
else
|
23
|
-
|
26
|
+
conn.headers['X-Papertrail-Token'] = options[:token]
|
24
27
|
end
|
25
|
-
|
26
|
-
builder.adapter Faraday.default_adapter
|
27
|
-
builder.response :yajl
|
28
28
|
end
|
29
29
|
|
30
30
|
@max_id_seen = {}
|
data/lib/papertrail-cli.rb
CHANGED
data/papertrail-cli.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'papertrail-cli'
|
16
|
-
s.version = '0.8.
|
17
|
-
s.date = '2011-11-
|
16
|
+
s.version = '0.8.2'
|
17
|
+
s.date = '2011-11-25'
|
18
18
|
s.rubyforge_project = 'papertrail-cli'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -50,11 +50,12 @@ Gem::Specification.new do |s|
|
|
50
50
|
## List your runtime dependencies here. Runtime dependencies are those
|
51
51
|
## that are needed for an end user to actually USE your code.
|
52
52
|
s.add_dependency('yajl-ruby')
|
53
|
-
s.add_dependency('faraday', [ '~> 0.
|
53
|
+
s.add_dependency('faraday', [ '~> 0.6' ])
|
54
|
+
s.add_dependency('faraday-stack', [ '~> 0.1' ])
|
54
55
|
|
55
56
|
## List your development dependencies here. Development dependencies are
|
56
57
|
## those that are only needed during development
|
57
|
-
# s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
|
58
|
+
# s.add_development_dependency('DEVDEPNAME', [">= 1.1.0", "< 2.0.0"])
|
58
59
|
|
59
60
|
## Leave this section as-is. It will be automatically generated from the
|
60
61
|
## contents of your Git repository via the gemspec task. DO NOT REMOVE
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 8
|
8
|
-
-
|
9
|
-
version: 0.8.
|
8
|
+
- 2
|
9
|
+
version: 0.8.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Papertrail
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-11-
|
17
|
+
date: 2011-11-25 00:00:00 -08:00
|
18
18
|
default_executable: papertrail
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -38,11 +38,23 @@ dependencies:
|
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
segments:
|
40
40
|
- 0
|
41
|
-
-
|
42
|
-
|
43
|
-
version: 0.5.7
|
41
|
+
- 6
|
42
|
+
version: "0.6"
|
44
43
|
type: :runtime
|
45
44
|
version_requirements: *id002
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: faraday-stack
|
47
|
+
prerelease: false
|
48
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ~>
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
- 1
|
55
|
+
version: "0.1"
|
56
|
+
type: :runtime
|
57
|
+
version_requirements: *id003
|
46
58
|
description: Command-line client for Papertrail hosted log management service. Tails and searches app server logs and system syslog. Supports Boolean search and works with grep and pipe output (Unix).
|
47
59
|
email: troy@sevenscale.com
|
48
60
|
executables:
|