moo_moo 0.7.0 → 0.8.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 +6 -14
- data/README.md +11 -0
- data/lib/moo_moo/base_command.rb +2 -1
- data/lib/moo_moo/config.rb +1 -0
- data/lib/moo_moo/logger.rb +20 -0
- data/lib/moo_moo/version.rb +1 -1
- data/lib/moo_moo.rb +1 -0
- data/moo_moo.gemspec +1 -1
- metadata +9 -22
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MmY1M2ZlM2U4NGUxNDZlN2VkN2E5MTBmNWU0OWZiNjNiMmFmYzc1Y2IzOTQ1
|
10
|
-
NGI0YzA4Y2E1ZWQwMmRiNzUyNzkwZGQ2NzNhYTlkZThlNjY3MGNlYTU5NGM3
|
11
|
-
NDZmZGI3MzQ5OTljYmM4ODc0YzA0MTg0MTZlNzA0ZjI4ZmU5YzM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzM5ZTI2N2I3YjcxMmM1YzZmYjE0N2FiOWRjZTRkMDQ5YWIyYzEyZjNiMzdi
|
14
|
-
OTIwZmEwYTE5ODQ0MTNjYTJjNDJiM2Y0ZjAxZjYwZTJhZTJlNmI0NjdiZDhl
|
15
|
-
OGViNTNiOGM1ODA2NjJiYTJlN2M1ZTQ4OTg1NDI5NmUxMTBmYjY=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4e5942bc856e97e738fe07d104abf733d0c34f10
|
4
|
+
data.tar.gz: c4c11e388b5fc982a850562acb81661a60f53fd4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5e7bd0c935f877a0744d20b28111f4310f706e03cd89314d885dc93bd36021e367c8952ee549688a7c651a3470ca069da57d59dd939a33213653fb2fc8ad2b58
|
7
|
+
data.tar.gz: 4f92b0b9600b27542fc44e22e360a33b0532c648ed7fa4662c837f42c3ed7b78b2feb54bc040061651bb87b8f35bab2d479d009698a0b4be0bf0f9afcb624e35
|
data/README.md
CHANGED
@@ -98,6 +98,17 @@ under config, and run scripts/parse_cctld_csv.
|
|
98
98
|
For non country code top level domains, the scripts/parse_cctld_csv `defaults`
|
99
99
|
list needs to be updated.
|
100
100
|
|
101
|
+
Debugging
|
102
|
+
---------
|
103
|
+
|
104
|
+
If you need to debug requests and responses, you can set a logger object, and
|
105
|
+
MooMoo will `debug` the request/response XMLs. Make sure the log level is set to
|
106
|
+
`debug`.
|
107
|
+
|
108
|
+
MooMoo.configure do |config|
|
109
|
+
config.logger = my_logger
|
110
|
+
end
|
111
|
+
|
101
112
|
Note on Patches/Pull Requests
|
102
113
|
-----------------------------
|
103
114
|
|
data/lib/moo_moo/base_command.rb
CHANGED
@@ -84,6 +84,7 @@ module MooMoo
|
|
84
84
|
c.request :open_srs_xml_builder, action, object, params, key, username
|
85
85
|
c.response :parse_open_srs
|
86
86
|
c.response :open_srs_errors
|
87
|
+
c.response :moo_moo_logger
|
87
88
|
c.adapter :net_http
|
88
89
|
end.post
|
89
90
|
end
|
@@ -102,4 +103,4 @@ module MooMoo
|
|
102
103
|
arr_indexed
|
103
104
|
end
|
104
105
|
end
|
105
|
-
end
|
106
|
+
end
|
data/lib/moo_moo/config.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
module Faraday
|
2
|
+
class Response::MooMooLogger < Response::Middleware
|
3
|
+
def call(env)
|
4
|
+
debug("[MooMoo request] #{env[:body]}")
|
5
|
+
super
|
6
|
+
end
|
7
|
+
|
8
|
+
def on_complete(env)
|
9
|
+
debug("[MooMoo response] #{env[:response].body}")
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def debug(msg)
|
15
|
+
MooMoo.config.logger.debug(msg) if MooMoo.config.logger
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Faraday::Response.register_middleware(:moo_moo_logger => :MooMooLogger)
|
data/lib/moo_moo/version.rb
CHANGED
data/lib/moo_moo.rb
CHANGED
data/moo_moo.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "opensrs"
|
16
16
|
|
17
17
|
s.add_runtime_dependency 'extlib', '~> 0.9.15'
|
18
|
-
s.add_runtime_dependency 'faraday', '~> 0.8.0
|
18
|
+
s.add_runtime_dependency 'faraday', '~> 0.8.0'
|
19
19
|
s.add_runtime_dependency 'jruby-openssl', '~> 0.7.3' if RUBY_PLATFORM == 'java'
|
20
20
|
|
21
21
|
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moo_moo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Parkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: extlib
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.8.0
|
33
|
+
version: 0.8.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.8.0
|
40
|
+
version: 0.8.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- lib/moo_moo/base_command.rb
|
130
130
|
- lib/moo_moo/config.rb
|
131
131
|
- lib/moo_moo/exceptions.rb
|
132
|
+
- lib/moo_moo/logger.rb
|
132
133
|
- lib/moo_moo/middleware/open_srs_errors.rb
|
133
134
|
- lib/moo_moo/middleware/open_srs_xml_builder.rb
|
134
135
|
- lib/moo_moo/middleware/parse_open_srs.rb
|
@@ -164,32 +165,18 @@ require_paths:
|
|
164
165
|
- lib
|
165
166
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
167
|
requirements:
|
167
|
-
- -
|
168
|
+
- - '>='
|
168
169
|
- !ruby/object:Gem::Version
|
169
170
|
version: '0'
|
170
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
172
|
requirements:
|
172
|
-
- -
|
173
|
+
- - '>='
|
173
174
|
- !ruby/object:Gem::Version
|
174
175
|
version: '0'
|
175
176
|
requirements: []
|
176
177
|
rubyforge_project: opensrs
|
177
|
-
rubygems_version: 2.0.
|
178
|
+
rubygems_version: 2.0.0
|
178
179
|
signing_key:
|
179
180
|
specification_version: 4
|
180
181
|
summary: Implements OpenSRS XML API
|
181
|
-
test_files:
|
182
|
-
- spec/fixtures/success_response.xml
|
183
|
-
- spec/integration_spec.rb
|
184
|
-
- spec/moo_moo/base_command_spec.rb
|
185
|
-
- spec/moo_moo/config_spec.rb
|
186
|
-
- spec/moo_moo/middleware/open_srs_xml_builder_spec.rb
|
187
|
-
- spec/moo_moo/services/cookie_spec.rb
|
188
|
-
- spec/moo_moo/services/dns_zone_spec.rb
|
189
|
-
- spec/moo_moo/services/lookup_spec.rb
|
190
|
-
- spec/moo_moo/services/nameserver_spec.rb
|
191
|
-
- spec/moo_moo/services/provisioning_spec.rb
|
192
|
-
- spec/moo_moo/services/transfer_spec.rb
|
193
|
-
- spec/moo_moo_spec.rb
|
194
|
-
- spec/spec_helper.rb
|
195
|
-
- spec/vcr_cassettes/integration/lookup.yml
|
182
|
+
test_files: []
|