graylog2-client 0.0.2 → 0.0.3

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.
data/README.md CHANGED
@@ -24,10 +24,7 @@ Usage
24
24
  You will need to set some configurations:
25
25
 
26
26
  config = {
27
- :user => "theuser",
28
- :password => "p4s5w0rd",
29
- :url => "http://graylog2.yourcompany.com",
30
- :stream_id => "000000000000000000000000"
27
+ :url => "http://graylogbackend:9200/graylog2/_search"
31
28
  }
32
29
 
33
30
  The `stream_id` is the id from the required graylog stream.
@@ -21,7 +21,9 @@ module Graylog2Client
21
21
  })
22
22
  response = HTTParty.get(url, :body => params)
23
23
  hits = response["hits"]["hits"]
24
- hits.map {|m| m["_source"]["message"]}.sort
24
+
25
+ hits.sort_by! {|m| m["_source"]["created_at"]}
26
+ hits.map {|m| m["_source"]["message"]}
25
27
  end
26
28
  end
27
29
  end
@@ -1,4 +1,4 @@
1
1
  # -*- coding: UTF-8 -*-
2
2
  module Graylog2Client
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graylog2-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-29 00:00:00.000000000 Z
13
+ date: 2012-07-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
17
- requirement: &2151903780 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2151903780
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: rspec
28
- requirement: &2151902900 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
@@ -33,7 +38,12 @@ dependencies:
33
38
  version: '0'
34
39
  type: :development
35
40
  prerelease: false
36
- version_requirements: *2151902900
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
37
47
  description: A simple gem to search on a graylog2 server
38
48
  email:
39
49
  - pothix@pothix.com
@@ -42,16 +52,16 @@ executables: []
42
52
  extensions: []
43
53
  extra_rdoc_files: []
44
54
  files:
45
- - ./Gemfile
46
55
  - ./graylog2-client.gemspec
47
- - ./lib/graylog2-client/parser.rb
48
- - ./lib/graylog2-client/version.rb
49
- - ./lib/graylog2-client.rb
50
- - ./LICENSE
56
+ - ./spec/spec_helper.rb
57
+ - ./spec/graylog2-client.rb
51
58
  - ./Rakefile
59
+ - ./Gemfile
52
60
  - ./README.md
53
- - ./spec/graylog2-client.rb
54
- - ./spec/spec_helper.rb
61
+ - ./LICENSE
62
+ - ./lib/graylog2-client.rb
63
+ - ./lib/graylog2-client/version.rb
64
+ - ./lib/graylog2-client/parser.rb
55
65
  homepage: http://github.com/locaweb/graylog2-client
56
66
  licenses: []
57
67
  post_install_message:
@@ -72,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
82
  version: '0'
73
83
  requirements: []
74
84
  rubyforge_project:
75
- rubygems_version: 1.8.10
85
+ rubygems_version: 1.8.23
76
86
  signing_key:
77
87
  specification_version: 3
78
88
  summary: This gem provides a simple interface to search on a graylog server for a