dnsimple-ruby 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,4 +7,6 @@ group :development do
7
7
  gem 'jeweler'
8
8
  gem 'rspec', '>= 2.0.0'
9
9
  gem 'ruby-debug'
10
+ gem 'cucumber'
11
+ gem 'aruba', :git => 'git://github.com/aeden/aruba.git'
10
12
  end
data/Gemfile.lock CHANGED
@@ -1,36 +1,62 @@
1
+ GIT
2
+ remote: git://github.com/aeden/aruba.git
3
+ revision: cff8218
4
+ specs:
5
+ aruba (0.3.3)
6
+ childprocess (~> 0.1.7)
7
+ cucumber (~> 0.10)
8
+ rspec (~> 2.5)
9
+
1
10
  GEM
2
11
  remote: http://rubygems.org/
3
12
  specs:
13
+ builder (3.0.0)
14
+ childprocess (0.1.7)
15
+ ffi (~> 0.6.3)
4
16
  columnize (0.3.2)
5
17
  crack (0.1.8)
18
+ cucumber (0.10.0)
19
+ builder (>= 2.1.2)
20
+ diff-lcs (~> 1.1.2)
21
+ gherkin (~> 2.3.2)
22
+ json (~> 1.4.6)
23
+ term-ansicolor (~> 1.0.5)
6
24
  diff-lcs (1.1.2)
25
+ ffi (0.6.3)
26
+ rake (>= 0.8.7)
27
+ gherkin (2.3.4)
28
+ json (~> 1.4.6)
7
29
  git (1.2.5)
8
- httparty (0.6.1)
30
+ httparty (0.7.4)
9
31
  crack (= 0.1.8)
10
- jeweler (1.5.1)
32
+ jeweler (1.5.2)
11
33
  bundler (~> 1.0.0)
12
34
  git (>= 1.2.5)
13
35
  rake
36
+ json (1.4.6)
14
37
  linecache (0.43)
15
38
  rake (0.8.7)
16
- rspec (2.1.0)
17
- rspec-core (~> 2.1.0)
18
- rspec-expectations (~> 2.1.0)
19
- rspec-mocks (~> 2.1.0)
20
- rspec-core (2.1.0)
21
- rspec-expectations (2.1.0)
39
+ rspec (2.5.0)
40
+ rspec-core (~> 2.5.0)
41
+ rspec-expectations (~> 2.5.0)
42
+ rspec-mocks (~> 2.5.0)
43
+ rspec-core (2.5.1)
44
+ rspec-expectations (2.5.0)
22
45
  diff-lcs (~> 1.1.2)
23
- rspec-mocks (2.1.0)
46
+ rspec-mocks (2.5.0)
24
47
  ruby-debug (0.10.4)
25
48
  columnize (>= 0.1)
26
49
  ruby-debug-base (~> 0.10.4.0)
27
50
  ruby-debug-base (0.10.4)
28
51
  linecache (>= 0.3)
52
+ term-ansicolor (1.0.5)
29
53
 
30
54
  PLATFORMS
31
55
  ruby
32
56
 
33
57
  DEPENDENCIES
58
+ aruba!
59
+ cucumber
34
60
  httparty
35
61
  jeweler
36
62
  rake
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
data/bin/dnsimple CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'rubygems'
3
4
  require File.dirname(__FILE__) + '/dnsimple'
@@ -0,0 +1,10 @@
1
+ Feature: check a domain with the CLI
2
+ As a user
3
+ In order to check if a domain is available for registration
4
+ I should be able to use the CLI to check domains
5
+
6
+ @announce-cmd
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run "dnsimple check domain.com"
10
+ Then the output should contain "Check domain result for domain.com: registered"
@@ -0,0 +1,10 @@
1
+ Feature: add a domain with the CLI
2
+ As a user
3
+ In order to add a domain to my account
4
+ I should be able to use the CLI to add domains
5
+
6
+ @announce-cmd
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a new domain
10
+ Then the output should show that the domain was created
@@ -0,0 +1,11 @@
1
+ Feature: add a PTR record with the CLI
2
+ As a user
3
+ In order to add a PTR record to a domain in my account
4
+ I should be able to use the CLI to add the PTR record
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a in-addr.arpa domain
10
+ And I run `dnsimple record:create` with the domain I added and the name "1" and the type "PTR" and the content "domain.com"
11
+ Then the output should show that the "PTR" record was created
@@ -0,0 +1,11 @@
1
+ Feature: add a record with the CLI
2
+ As a user
3
+ In order to add records to a domain in my account
4
+ I should be able to use the CLI to add records
5
+
6
+ @announce-cmd @announce-stdout
7
+ Scenario:
8
+ Given I have set up my credentials
9
+ When I run `dnsimple create` with a new domain
10
+ And I run `dnsimple record:create` with the domain I added and no name and the type "A" and the content "1.2.3.4"
11
+ Then the output should show that the "A" record was created
@@ -0,0 +1,3 @@
1
+ Given /^I have set up my credentials$/ do
2
+ File.exists?(File.expand_path('~/.dnsimple')).should be_true, "Please set up your ~/.dnsimple file to continue"
3
+ end
@@ -0,0 +1,13 @@
1
+ When /^I run `(.*)` with a new domain$/ do |cmd|
2
+ @domain_name = "cli-test-#{Time.now.to_i}.com"
3
+ steps %Q(When I run `#{cmd} #{@domain_name}`)
4
+ end
5
+
6
+ When /^I run `(.*)` with a in\-addr\.arpa domain$/ do |cmd|
7
+ @domain_name = '0.0.10.in-addr.arpa'
8
+ steps %Q(When I run `#{cmd} #{@domain_name}`)
9
+ end
10
+
11
+ Then /^the output should show that the domain was created$/ do
12
+ steps %Q(Then the output should contain "Created #{@domain_name}")
13
+ end
@@ -0,0 +1,11 @@
1
+ When /^I run `(.*)` with the domain I added and no name and the type "([^\"]*)" and the content "([^\"]*)"$/ do |cmd, type, content|
2
+ steps %Q(When I run `#{cmd} #{@domain_name} '' #{type} #{content}`)
3
+ end
4
+
5
+ When /^I run `(.*)` with the domain I added and the name "([^\"]*)" and the type "([^\"]*)" and the content "([^\"]*)"$/ do |cmd, name, type, content|
6
+ steps %Q(When I run `#{cmd} #{@domain_name} #{name} #{type} #{content}`)
7
+ end
8
+
9
+ Then /^the output should show that the "([^\"]*)" record was created$/ do |type|
10
+ steps %Q(Then the output should contain "Created #{type} record for #{@domain_name}")
11
+ end
@@ -0,0 +1,14 @@
1
+ require 'aruba/cucumber'
2
+
3
+ Before do
4
+ @aruba_timeout_seconds = 10
5
+ end
6
+
7
+ After do
8
+ unless ENV['NODELETE']
9
+ if @domain_name && (@domain_name =~ /^cli-/ || @domain_name =~ /in-addr\.arpa/)
10
+ steps %Q(When I run `dnsimple delete #{@domain_name}`)
11
+ end
12
+ end
13
+ end
14
+
@@ -70,6 +70,7 @@ module DNSimple
70
70
 
71
71
  record_hash = {:name => name, :record_type => record_type, :content => content}
72
72
  record_hash[:ttl] = options.delete(:ttl) || 3600
73
+ record_hash[:prio] = options.delete(:priority)
73
74
  record_hash[:prio] = options.delete(:prio) || ''
74
75
 
75
76
  options.merge!({:query => {:record => record_hash}})
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 1
10
- version: 0.9.1
9
+ - 2
10
+ version: 0.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anthony Eden
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-20 00:00:00 -05:00
18
+ date: 2011-03-17 00:00:00 +01:00
19
19
  default_executable: dnsimple
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -91,9 +91,9 @@ dependencies:
91
91
  version: "0"
92
92
  requirement: *id005
93
93
  - !ruby/object:Gem::Dependency
94
- type: :runtime
94
+ type: :development
95
95
  prerelease: false
96
- name: httparty
96
+ name: cucumber
97
97
  version_requirements: &id006 !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
@@ -104,6 +104,34 @@ dependencies:
104
104
  - 0
105
105
  version: "0"
106
106
  requirement: *id006
107
+ - !ruby/object:Gem::Dependency
108
+ type: :development
109
+ prerelease: false
110
+ name: aruba
111
+ version_requirements: &id007 !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 3
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ requirement: *id007
121
+ - !ruby/object:Gem::Dependency
122
+ type: :runtime
123
+ prerelease: false
124
+ name: httparty
125
+ version_requirements: &id008 !ruby/object:Gem::Requirement
126
+ none: false
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ hash: 3
131
+ segments:
132
+ - 0
133
+ version: "0"
134
+ requirement: *id008
107
135
  description: A ruby wrapper for the DNSimple API that also includes a command-line client.
108
136
  email: anthony.eden@dnsimple.com
109
137
  executables:
@@ -129,6 +157,14 @@ files:
129
157
  - bin/dnsimple
130
158
  - bin/dnsimple.rb
131
159
  - dnsimple-ruby.gemspec
160
+ - features/cli/domains/check_domain.feature
161
+ - features/cli/domains/create_domain.feature
162
+ - features/cli/records/create_ptr_record.feature
163
+ - features/cli/records/create_record.feature
164
+ - features/step_definitions/cli_steps.rb
165
+ - features/step_definitions/domain_steps.rb
166
+ - features/step_definitions/record_steps.rb
167
+ - features/support/env.rb
132
168
  - lib/dnsimple.rb
133
169
  - lib/dnsimple/cli.rb
134
170
  - lib/dnsimple/client.rb