barking 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/README.md +90 -2
- data/bark.gemspec +1 -1
- data/lib/bark/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40b45c65b67192e6eca74da28e3cad8e11ecaf2f
|
4
|
+
data.tar.gz: 71a44619bd5ee65385dc46107d96652ad17e3adc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 888197d28bae12e7621676c0dc9b3c522731c1573c5fb6ecd6831c566748538a05ced923bb3918e7cd1d23e6bd4e9f1973e39c2ea396b5212011071797c026db
|
7
|
+
data.tar.gz: 635f3039fcfb6d4b27fc9c335bf63efa830c2a736e0084d8b867be7ab2cbbd8143b123487887390288f5943c2d975392614d56ac99d7de2bf6d61af0733bb256
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[](http://badge.fury.io/rb/barking)
|
2
|
+
|
1
3
|
# Bark
|
2
4
|
|
3
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bark`. To experiment with that code, run `bin/console` for an interactive prompt.
|
@@ -22,7 +24,93 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
Require Bark:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'barking'
|
31
|
+
```
|
32
|
+
|
33
|
+
Create a Bark client:
|
34
|
+
```ruby
|
35
|
+
client = Bark::Client.new
|
36
|
+
=> #<Bark::Client:0x007fd0aa08c6e0
|
37
|
+
@client=
|
38
|
+
#<Hurley::Client:0x007fd0aa08c3c0
|
39
|
+
@after_callbacks=[],
|
40
|
+
@before_callbacks=[],
|
41
|
+
@connection=nil,
|
42
|
+
@header=#<Hurley::Header {"User-Agent"=>"Hurley v0.2"}>,
|
43
|
+
@request_options=
|
44
|
+
#<struct Hurley::RequestOptions
|
45
|
+
timeout=nil,
|
46
|
+
open_timeout=nil,
|
47
|
+
boundary=nil,
|
48
|
+
bind=nil,
|
49
|
+
proxy=nil,
|
50
|
+
redirection_limit=nil,
|
51
|
+
query_class=nil>,
|
52
|
+
@ssl_options=
|
53
|
+
#<struct Hurley::SslOptions
|
54
|
+
skip_verification=nil,
|
55
|
+
verify_depth=nil,
|
56
|
+
ca_file=nil,
|
57
|
+
ca_path=nil,
|
58
|
+
client_cert=nil,
|
59
|
+
client_cert_path=nil,
|
60
|
+
private_key=nil,
|
61
|
+
private_key_path=nil,
|
62
|
+
private_key_pass=nil,
|
63
|
+
openssl_client_cert=nil,
|
64
|
+
openssl_client_key=nil,
|
65
|
+
openssl_cert_store=nil,
|
66
|
+
version=nil>,
|
67
|
+
@url=#<Hurley::Url http://localhost:2812>>,
|
68
|
+
@host="localhost",
|
69
|
+
@password="monit",
|
70
|
+
@port="2812",
|
71
|
+
@user="admin">
|
72
|
+
```
|
73
|
+
|
74
|
+
Use the Bark client:
|
75
|
+
```ruby
|
76
|
+
client = Bark::Client.new
|
77
|
+
client.status.current
|
78
|
+
=> {:monit=>
|
79
|
+
{:server=>
|
80
|
+
{:id=>"4674ff31c162bba574525571642b67fd",
|
81
|
+
:incarnation=>"1443740471",
|
82
|
+
:version=>"5.14",
|
83
|
+
:uptime=>"16012",
|
84
|
+
:poll=>"30",
|
85
|
+
:startdelay=>"0",
|
86
|
+
:localhostname=>"JohnDoe-Laptop.com",
|
87
|
+
:controlfile=>"/Users/jdoe/.monitrc",
|
88
|
+
:httpd=>{:address=>"localhost", :port=>"2812", :ssl=>"0"}},
|
89
|
+
:platform=>
|
90
|
+
{:name=>"Darwin",
|
91
|
+
:release=>"15.0.0",
|
92
|
+
:version=>
|
93
|
+
"Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64",
|
94
|
+
:machine=>"x86_64",
|
95
|
+
:cpu=>"4",
|
96
|
+
:memory=>"16777216",
|
97
|
+
:swap=>"0"},
|
98
|
+
:service=>
|
99
|
+
{:type=>"5",
|
100
|
+
:name=>"JohnDoe-Laptop.com",
|
101
|
+
:collected_sec=>"1443756456",
|
102
|
+
:collected_usec=>"430689",
|
103
|
+
:status=>"0",
|
104
|
+
:status_hint=>"0",
|
105
|
+
:monitor=>"1",
|
106
|
+
:monitormode=>"0",
|
107
|
+
:pendingaction=>"0",
|
108
|
+
:system=>
|
109
|
+
{:load=>{:avg01=>"2.16", :avg05=>"1.87", :avg15=>"1.81"},
|
110
|
+
:cpu=>{:user=>"10.9", :system=>"5.0"},
|
111
|
+
:memory=>{:percent=>"54.1", :kilobyte=>"9080656"},
|
112
|
+
:swap=>{:percent=>"0.0", :kilobyte=>"0"}}}}}
|
113
|
+
```
|
26
114
|
|
27
115
|
## Development
|
28
116
|
|
@@ -32,5 +120,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
120
|
|
33
121
|
## Contributing
|
34
122
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
123
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kkirsche/bark.
|
36
124
|
|
data/bark.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Bark::VERSION
|
9
9
|
spec.authors = ['Kevin Kirsche']
|
10
10
|
spec.email = ['kev.kirsche@gmail.com']
|
11
|
-
spec.license = 'Apache-2.0
|
11
|
+
spec.license = 'Apache-2.0'
|
12
12
|
|
13
13
|
spec.summary = %q{Monit monitoring made easy!}
|
14
14
|
spec.description = %q{Bark: A Gem For Use By Individuals Looking to Retrieve Data From a Monit Server}
|
data/lib/bark/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Kirsche
|
@@ -165,7 +165,7 @@ files:
|
|
165
165
|
- lib/bark/version.rb
|
166
166
|
homepage: https://github.com/kkirsche/Bark
|
167
167
|
licenses:
|
168
|
-
- Apache-2.0
|
168
|
+
- Apache-2.0
|
169
169
|
metadata: {}
|
170
170
|
post_install_message:
|
171
171
|
rdoc_options: []
|