moo_moo 0.8.0 → 0.9.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 +4 -4
- data/lib/moo_moo/middleware/open_srs_xml_builder.rb +1 -2
- data/lib/moo_moo/version.rb +1 -1
- data/spec/moo_moo/middleware/open_srs_xml_builder_spec.rb +9 -4
- metadata +22 -13
- data/.gitignore +0 -7
- data/.rspec +0 -2
- data/.rvmrc +0 -59
- data/.travis.yml +0 -17
- data/moo_moo.gemspec +0 -31
- data/scripts/parse_cctld_csv +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a332f4371a4e59f7e17008b9ac2772504fb7a0f5
|
4
|
+
data.tar.gz: 0e3b44eee9966f4a04591d66b89b4f2da9d8b2d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e01671753a28ee08bf8911ab5d05947006d23ca4c51f9a0e88493978c247a82510c58c104a7403f08cdc1bf348850c5b53dabe0a4c0f8f6aa6e5ecffd1dae92f
|
7
|
+
data.tar.gz: cbb3f0172e5006f7cfab5cbb34fa5724ce8f170d315f3e98c226a4eb4369763cab95d8ecdaa3b5dc09a363fbdc89b3e2ef473c1c520c4e6842ebb12b43f81c58
|
@@ -40,7 +40,6 @@ module MooMoo
|
|
40
40
|
<item key="protocol">XCP</item>
|
41
41
|
<item key="action">GET_BALANCE</item>
|
42
42
|
<item key="object">BALANCE</item>
|
43
|
-
<item key="registrant_ip"/>
|
44
43
|
</dt_assoc>
|
45
44
|
</data_block>
|
46
45
|
</body>
|
@@ -90,4 +89,4 @@ module MooMoo
|
|
90
89
|
)
|
91
90
|
end
|
92
91
|
end
|
93
|
-
end
|
92
|
+
end
|
data/lib/moo_moo/version.rb
CHANGED
@@ -5,9 +5,10 @@ describe MooMoo::OpenSRSXMLBuilder do
|
|
5
5
|
describe "#build_command" do
|
6
6
|
before :each do
|
7
7
|
params = {
|
8
|
-
:cookie
|
9
|
-
:domain
|
10
|
-
:
|
8
|
+
:cookie => "thecookie",
|
9
|
+
:domain => "mydomain.com",
|
10
|
+
:registrant_ip => "theregistrantip",
|
11
|
+
:attributes => {
|
11
12
|
:string => "stringparam",
|
12
13
|
:hash => {:the => "hashparam"},
|
13
14
|
:array => [{:param => "arrayvalue1"}, {:param => "arrayvalue2"}],
|
@@ -29,6 +30,10 @@ describe MooMoo::OpenSRSXMLBuilder do
|
|
29
30
|
@body.root.elements["body/data_block/dt_assoc/item[@key='object']"].text.should == "theobject"
|
30
31
|
end
|
31
32
|
|
33
|
+
it "should set the registrant_ip" do
|
34
|
+
@body.root.elements["body/data_block/dt_assoc/item[@key='registrant_ip']"].text.should == "theregistrantip"
|
35
|
+
end
|
36
|
+
|
32
37
|
it "should set the the cookie" do
|
33
38
|
@body.root.elements["body/data_block/dt_assoc/item[@key='cookie']"].text.should == "thecookie"
|
34
39
|
end
|
@@ -58,4 +63,4 @@ describe MooMoo::OpenSRSXMLBuilder do
|
|
58
63
|
end
|
59
64
|
end
|
60
65
|
|
61
|
-
end
|
66
|
+
end
|
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.9.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:
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: extlib
|
@@ -115,17 +115,12 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
- .gitignore
|
119
|
-
- .rspec
|
120
|
-
- .rvmrc
|
121
|
-
- .travis.yml
|
122
118
|
- Gemfile
|
123
119
|
- LICENSE
|
124
|
-
- README.md
|
125
120
|
- Rakefile
|
121
|
+
- README.md
|
126
122
|
- config/cctld-pricing.csv
|
127
123
|
- config/tlds.yml
|
128
|
-
- lib/moo_moo.rb
|
129
124
|
- lib/moo_moo/base_command.rb
|
130
125
|
- lib/moo_moo/config.rb
|
131
126
|
- lib/moo_moo/exceptions.rb
|
@@ -140,8 +135,7 @@ files:
|
|
140
135
|
- lib/moo_moo/services/provisioning.rb
|
141
136
|
- lib/moo_moo/services/transfer.rb
|
142
137
|
- lib/moo_moo/version.rb
|
143
|
-
- moo_moo.
|
144
|
-
- scripts/parse_cctld_csv
|
138
|
+
- lib/moo_moo.rb
|
145
139
|
- spec/fixtures/success_response.xml
|
146
140
|
- spec/integration_spec.rb
|
147
141
|
- spec/moo_moo/base_command_spec.rb
|
@@ -157,7 +151,8 @@ files:
|
|
157
151
|
- spec/spec_helper.rb
|
158
152
|
- spec/vcr_cassettes/integration/lookup.yml
|
159
153
|
homepage: ''
|
160
|
-
licenses:
|
154
|
+
licenses:
|
155
|
+
- MIT
|
161
156
|
metadata: {}
|
162
157
|
post_install_message:
|
163
158
|
rdoc_options: []
|
@@ -175,8 +170,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
170
|
version: '0'
|
176
171
|
requirements: []
|
177
172
|
rubyforge_project: opensrs
|
178
|
-
rubygems_version: 2.0.
|
173
|
+
rubygems_version: 2.0.14
|
179
174
|
signing_key:
|
180
175
|
specification_version: 4
|
181
176
|
summary: Implements OpenSRS XML API
|
182
|
-
test_files:
|
177
|
+
test_files:
|
178
|
+
- spec/fixtures/success_response.xml
|
179
|
+
- spec/integration_spec.rb
|
180
|
+
- spec/moo_moo/base_command_spec.rb
|
181
|
+
- spec/moo_moo/config_spec.rb
|
182
|
+
- spec/moo_moo/middleware/open_srs_xml_builder_spec.rb
|
183
|
+
- spec/moo_moo/services/cookie_spec.rb
|
184
|
+
- spec/moo_moo/services/dns_zone_spec.rb
|
185
|
+
- spec/moo_moo/services/lookup_spec.rb
|
186
|
+
- spec/moo_moo/services/nameserver_spec.rb
|
187
|
+
- spec/moo_moo/services/provisioning_spec.rb
|
188
|
+
- spec/moo_moo/services/transfer_spec.rb
|
189
|
+
- spec/moo_moo_spec.rb
|
190
|
+
- spec/spec_helper.rb
|
191
|
+
- spec/vcr_cassettes/integration/lookup.yml
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rvmrc
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
function moo() {
|
4
|
-
echo " ______________________"
|
5
|
-
echo "< Feed me before I die >"
|
6
|
-
echo " ---------------------- "
|
7
|
-
echo " \ ^__^"
|
8
|
-
echo " \ (oo)\_______"
|
9
|
-
echo " (__)\ )\\/\\"
|
10
|
-
echo " ||----w |"
|
11
|
-
echo " || ||"
|
12
|
-
}
|
13
|
-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
14
|
-
# development environment upon cd'ing into the directory
|
15
|
-
|
16
|
-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
|
17
|
-
environment_id="ruby-1.9.2-p180@moomoo"
|
18
|
-
|
19
|
-
#
|
20
|
-
# First we attempt to load the desired environment directly from the environment
|
21
|
-
# file. This is very fast and efficicent compared to running through the entire
|
22
|
-
# CLI and selector. If you want feedback on which environment was used then
|
23
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
24
|
-
#
|
25
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
26
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
|
27
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
28
|
-
moo
|
29
|
-
else
|
30
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
31
|
-
rvm --create use "$environment_id"
|
32
|
-
moo
|
33
|
-
fi
|
34
|
-
|
35
|
-
#
|
36
|
-
# If you use an RVM gemset file to install a list of gems (*.gems), you can have
|
37
|
-
# it be automatically loaded. Uncomment the following and adjust the filename if
|
38
|
-
# necessary.
|
39
|
-
#
|
40
|
-
# filename=".gems"
|
41
|
-
# if [[ -s "$filename" ]] ; then
|
42
|
-
# rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
|
43
|
-
# fi
|
44
|
-
|
45
|
-
#
|
46
|
-
# If you use bundler and would like to run bundle each time you enter the
|
47
|
-
# directory, you can uncomment the following code.
|
48
|
-
#
|
49
|
-
# # Ensure that Bundler is installed. Install it if it is not.
|
50
|
-
# if ! command -v bundle >/dev/null; then
|
51
|
-
# printf "The rubygem 'bundler' is not installed. Installing it now.\n"
|
52
|
-
# gem install bundler
|
53
|
-
# fi
|
54
|
-
#
|
55
|
-
# # Bundle while reducing excess noise.
|
56
|
-
# printf "Bundling your gems. This may take a few minutes on a fresh clone.\n"
|
57
|
-
# bundle | grep -v '^Using ' | grep -v ' is complete' | sed '/^$/d'
|
58
|
-
#
|
59
|
-
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
script: "bundle exec rake spec"
|
3
|
-
notifications:
|
4
|
-
email:
|
5
|
-
recipients:
|
6
|
-
- engineering@internal.site5.com
|
7
|
-
on_success: never
|
8
|
-
on_failure: always
|
9
|
-
rvm:
|
10
|
-
- 1.8.7
|
11
|
-
- 1.9.2
|
12
|
-
- 1.9.3
|
13
|
-
- ree
|
14
|
-
- rbx-head
|
15
|
-
- rbx-18mode
|
16
|
-
- jruby-18mode
|
17
|
-
- jruby-19mode
|
data/moo_moo.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require 'moo_moo/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "moo_moo"
|
7
|
-
s.version = MooMoo::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Tim Parkin"]
|
10
|
-
s.email = ["tparkin@site5.com"]
|
11
|
-
s.homepage = ""
|
12
|
-
s.summary = %q{Implements OpenSRS XML API}
|
13
|
-
s.description = %q{Implements OpenSRS XML API}
|
14
|
-
|
15
|
-
s.rubyforge_project = "opensrs"
|
16
|
-
|
17
|
-
s.add_runtime_dependency 'extlib', '~> 0.9.15'
|
18
|
-
s.add_runtime_dependency 'faraday', '~> 0.8.0'
|
19
|
-
s.add_runtime_dependency 'jruby-openssl', '~> 0.7.3' if RUBY_PLATFORM == 'java'
|
20
|
-
|
21
|
-
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
22
|
-
s.add_development_dependency 'rspec', '~> 2.10.0'
|
23
|
-
s.add_development_dependency 'rdoc', '~> 3.12'
|
24
|
-
s.add_development_dependency 'webmock', '~> 1.8.7'
|
25
|
-
s.add_development_dependency 'vcr', '~> 1.11.3'
|
26
|
-
|
27
|
-
s.files = `git ls-files`.split("\n")
|
28
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
30
|
-
s.require_paths = ["lib"]
|
31
|
-
end
|
data/scripts/parse_cctld_csv
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Converts an OpenSRS Country Code Top Level Domains pricing csv file to a list of TLD
|
4
|
-
# and stores them in a yml file. For non country code tlds, as OpenSRS does not
|
5
|
-
# provide a csv file, we keep them in a custom list.
|
6
|
-
#
|
7
|
-
# Sources:
|
8
|
-
# - http://opensrs.com/images/elements/cctld-pricing.csv
|
9
|
-
# - http://www.opensrs.com/site/services/domains/tlds
|
10
|
-
|
11
|
-
require 'csv'
|
12
|
-
|
13
|
-
csv_file = File.expand_path("../../config/cctld-pricing.csv", __FILE__)
|
14
|
-
yml_file = File.expand_path("../../config/tlds.yml", __FILE__)
|
15
|
-
|
16
|
-
# Non Country Code Top Level Domains
|
17
|
-
defaults = %w(com net org info biz mobi pro name asia tel co me tv ws xxx jobs aero coop)
|
18
|
-
|
19
|
-
File.open(yml_file, 'w') do |file|
|
20
|
-
# Writes domains that are not part of the cctld-pricing.csv file
|
21
|
-
defaults.each do |tld|
|
22
|
-
file.write("- #{tld}\n")
|
23
|
-
end
|
24
|
-
|
25
|
-
CSV.foreach(csv_file, col_sep: ",", headers: true, return_headers: false) do |row|
|
26
|
-
if row[2]
|
27
|
-
row[2].gsub(";", "").split(", ").each do |tld|
|
28
|
-
file.write("- #{tld.strip}\n")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|