ragios-client 0.0.7 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94a6de0be7af241876c75561127cc5a7a052d1d9
4
- data.tar.gz: 827f4091bcadbbfbd5a3e65efa654500b71ce8d2
3
+ metadata.gz: 30cdcbb29c5feb7f6be4514f5cf20e5bffdfc5da
4
+ data.tar.gz: ef4d5945ef67bac738855c114fb8b611a4051522
5
5
  SHA512:
6
- metadata.gz: 5b1a9ec6cc9000930cffb6437bb3dd5780ba2a08d72068f25f4f3be8f1e5b40675764a607e1442ef84fbf88ea491102d043d093525f6b4596f63302f271097dd
7
- data.tar.gz: f794a28bc5baee99daa9624c7fbb548a7fc3c23ea5dbfaa7bf163fd1735fe45fa714bfff4fb259330f960383ab97b81a9c6983935a893ccad0dd6c9bad9a6a4f
6
+ metadata.gz: c9bea7ae88a1b3713d8bb92224d9b6d444ce09df4a4ac76c72053e69322b7a428239591352e1cd06c1942890e4cfbf85062b9c712cfb0b1b1effff0c62a627a2
7
+ data.tar.gz: 0ca21d7ca98595d270a666274135929e24e84bb861102b1619809d1405b4edc1e7499838f0575026f85bff0b1b99f3f10c2d66d529e846058b8489235a1238b8
data/Gemfile CHANGED
@@ -1,12 +1,7 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
  gem "rest-client"
6
- gem "json_pure"
3
+ gem "multi_json"
7
4
 
8
- # Add dependencies to develop your gem here.
9
- # Include everything needed to run rake, tests, features, etc.
10
5
  group :development do
11
6
  gem "pry"
12
7
  gem "rdoc", "~> 3.12"
data/Gemfile.lock CHANGED
@@ -1,13 +1,15 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.5)
4
+ addressable (2.4.0)
5
5
  builder (3.2.2)
6
- coderay (1.1.0)
7
- diff-lcs (1.2.4)
8
- faraday (0.8.8)
6
+ coderay (1.1.1)
7
+ diff-lcs (1.2.5)
8
+ domain_name (0.5.20160309)
9
+ unf (>= 0.0.5, < 1.0.0)
10
+ faraday (0.8.11)
9
11
  multipart-post (~> 1.2.0)
10
- git (1.2.6)
12
+ git (1.3.0)
11
13
  github_api (0.10.1)
12
14
  addressable
13
15
  faraday (~> 0.8.1)
@@ -15,9 +17,10 @@ GEM
15
17
  multi_json (~> 1.4)
16
18
  nokogiri (~> 1.5.2)
17
19
  oauth2
18
- hashie (2.0.5)
19
- highline (1.6.20)
20
- httpauth (0.2.0)
20
+ hashie (3.4.3)
21
+ highline (1.7.8)
22
+ http-cookie (1.0.2)
23
+ domain_name (~> 0.5)
21
24
  jeweler (1.8.8)
22
25
  builder
23
26
  bundler (~> 1.0)
@@ -27,42 +30,50 @@ GEM
27
30
  nokogiri (= 1.5.10)
28
31
  rake
29
32
  rdoc
30
- json (1.8.1)
31
- json_pure (1.8.1)
32
- jwt (0.1.8)
33
- multi_json (>= 1.5)
33
+ json (1.8.3)
34
+ jwt (1.5.1)
34
35
  method_source (0.8.2)
35
- mime-types (1.25.1)
36
- multi_json (1.8.2)
36
+ mime-types (2.99.1)
37
+ multi_json (1.11.2)
37
38
  multi_xml (0.5.5)
38
39
  multipart-post (1.2.0)
40
+ netrc (0.11.0)
39
41
  nokogiri (1.5.10)
40
- oauth2 (0.9.2)
41
- faraday (~> 0.8)
42
- httpauth (~> 0.2)
43
- jwt (~> 0.1.4)
44
- multi_json (~> 1.0)
42
+ oauth2 (1.1.0)
43
+ faraday (>= 0.8, < 0.10)
44
+ jwt (~> 1.0, < 1.5.2)
45
+ multi_json (~> 1.3)
45
46
  multi_xml (~> 0.5)
46
- rack (~> 1.2)
47
- pry (0.9.12.4)
48
- coderay (~> 1.0)
49
- method_source (~> 0.8)
47
+ rack (>= 1.2, < 3)
48
+ pry (0.10.3)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.8.1)
50
51
  slop (~> 3.4)
51
- rack (1.5.2)
52
- rake (10.1.0)
52
+ rack (1.6.4)
53
+ rake (11.1.0)
53
54
  rdoc (3.12.2)
54
55
  json (~> 1.4)
55
- rest-client (1.6.7)
56
- mime-types (>= 1.16)
57
- rspec (2.14.1)
58
- rspec-core (~> 2.14.0)
59
- rspec-expectations (~> 2.14.0)
60
- rspec-mocks (~> 2.14.0)
61
- rspec-core (2.14.6)
62
- rspec-expectations (2.14.3)
63
- diff-lcs (>= 1.1.3, < 2.0)
64
- rspec-mocks (2.14.4)
65
- slop (3.4.7)
56
+ rest-client (1.8.0)
57
+ http-cookie (>= 1.0.2, < 2.0)
58
+ mime-types (>= 1.16, < 3.0)
59
+ netrc (~> 0.7)
60
+ rspec (3.4.0)
61
+ rspec-core (~> 3.4.0)
62
+ rspec-expectations (~> 3.4.0)
63
+ rspec-mocks (~> 3.4.0)
64
+ rspec-core (3.4.4)
65
+ rspec-support (~> 3.4.0)
66
+ rspec-expectations (3.4.0)
67
+ diff-lcs (>= 1.2.0, < 2.0)
68
+ rspec-support (~> 3.4.0)
69
+ rspec-mocks (3.4.1)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.4.0)
72
+ rspec-support (3.4.1)
73
+ slop (3.6.0)
74
+ unf (0.1.4)
75
+ unf_ext
76
+ unf_ext (0.0.7.2)
66
77
 
67
78
  PLATFORMS
68
79
  ruby
@@ -70,8 +81,11 @@ PLATFORMS
70
81
  DEPENDENCIES
71
82
  bundler (~> 1.0)
72
83
  jeweler (~> 1.8.7)
73
- json_pure
84
+ multi_json
74
85
  pry
75
86
  rdoc (~> 3.12)
76
87
  rest-client
77
88
  rspec
89
+
90
+ BUNDLED WITH
91
+ 1.11.2
data/README.rdoc CHANGED
@@ -47,6 +47,12 @@
47
47
 
48
48
  ragios.events_by_state(monitor_id, state, start_date, end_date, limit)
49
49
 
50
+ ragios.find_event(event_id)
51
+
52
+ ragios.delete_event(event_id)
53
+
54
+ ragios.all_events(limit)
55
+
50
56
  ragios.address
51
57
  #=> http://localhost
52
58
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.1.0
data/lib/ragios-client.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rest_client'
2
- require 'json/pure'
2
+ require 'multi_json'
3
3
  require 'uri'
4
4
 
5
5
  module Ragios
@@ -109,11 +109,11 @@ private
109
109
  end
110
110
 
111
111
  def generate_json(str)
112
- JSON.generate(str)
112
+ MultiJson.dump(str)
113
113
  end
114
114
 
115
115
  def parse_json(str)
116
- JSON.parse(str, symbolize_names: true)
116
+ MultiJson.load(str, symbolize_names: true)
117
117
  end
118
118
 
119
119
  def auth_session
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: ragios-client 0.0.7 ruby lib
5
+ # stub: ragios-client 0.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "ragios-client"
9
- s.version = "0.0.7"
9
+ s.version = "0.1.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["obi-a"]
14
- s.date = "2015-01-19"
14
+ s.date = "2016-03-12"
15
15
  s.description = "ruby client for ragios"
16
16
  s.email = "obioraakubue@yahoo.com"
17
17
  s.extra_rdoc_files = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  ]
33
33
  s.homepage = "http://github.com/obi-a/ragios-client"
34
34
  s.licenses = ["MIT"]
35
- s.rubygems_version = "2.4.3"
35
+ s.rubygems_version = "2.4.8"
36
36
  s.summary = "Ruby client for ragios"
37
37
 
38
38
  if s.respond_to? :specification_version then
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
 
41
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
42
  s.add_runtime_dependency(%q<rest-client>, [">= 0"])
43
- s.add_runtime_dependency(%q<json_pure>, [">= 0"])
43
+ s.add_runtime_dependency(%q<multi_json>, [">= 0"])
44
44
  s.add_development_dependency(%q<pry>, [">= 0"])
45
45
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
46
46
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
48
48
  s.add_development_dependency(%q<rspec>, [">= 0"])
49
49
  else
50
50
  s.add_dependency(%q<rest-client>, [">= 0"])
51
- s.add_dependency(%q<json_pure>, [">= 0"])
51
+ s.add_dependency(%q<multi_json>, [">= 0"])
52
52
  s.add_dependency(%q<pry>, [">= 0"])
53
53
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
54
54
  s.add_dependency(%q<bundler>, ["~> 1.0"])
@@ -57,7 +57,7 @@ Gem::Specification.new do |s|
57
57
  end
58
58
  else
59
59
  s.add_dependency(%q<rest-client>, [">= 0"])
60
- s.add_dependency(%q<json_pure>, [">= 0"])
60
+ s.add_dependency(%q<multi_json>, [">= 0"])
61
61
  s.add_dependency(%q<pry>, [">= 0"])
62
62
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
63
63
  s.add_dependency(%q<bundler>, ["~> 1.0"])
@@ -109,7 +109,7 @@ describe "Ragios Client" do
109
109
  end
110
110
 
111
111
  it "cannot create a badly formed monitor" do
112
- expect{@ragios.create("bad data")}.to raise_error(JSON::GeneratorError)
112
+ expect{@ragios.create("bad data")}.to raise_error(Ragios::ClientException)
113
113
  end
114
114
  end
115
115
  describe "More API calls" do
@@ -154,7 +154,7 @@ describe "Ragios Client" do
154
154
  @ragios.update(@monitor_id, update_options).should == {ok: true}
155
155
  end
156
156
  it "cannot update a monitor with bad data" do
157
- expect { @ragios.update(@monitor_id,"bad data") }.to raise_error(JSON::GeneratorError)
157
+ expect { @ragios.update(@monitor_id,"bad data") }.to raise_error(Ragios::ClientException)
158
158
  end
159
159
  it "cannot update a monitor that don't exist" do
160
160
  update_options = {every: "5m", via: ["twitter_notifier"]}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ragios-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - obi-a
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2016-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: json_pure
28
+ name: multi_json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.4.3
149
+ rubygems_version: 2.4.8
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Ruby client for ragios