dnsimple-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/bin/dnsimple.rb +1 -1
- data/lib/dnsimple/cli.rb +2 -1
- data/lib/dnsimple/client.rb +14 -10
- data/lib/dnsimple/commands/list_domains.rb +0 -1
- metadata +4 -2
data/README.rdoc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/bin/dnsimple.rb
CHANGED
@@ -12,7 +12,7 @@ options = {}
|
|
12
12
|
|
13
13
|
global = OptionParser.new do |opts|
|
14
14
|
opts.on("-s", "--site [ARG]") do |site|
|
15
|
-
DNSimple::Client.base_uri site
|
15
|
+
DNSimple::Client.base_uri = site
|
16
16
|
end
|
17
17
|
opts.on("-u", "--username [ARG]") do |username|
|
18
18
|
DNSimple::Client.username = username
|
data/lib/dnsimple/cli.rb
CHANGED
@@ -8,7 +8,8 @@ module DNSimple
|
|
8
8
|
class CLI
|
9
9
|
def initialize
|
10
10
|
credentials = load_credentials
|
11
|
-
Client.
|
11
|
+
Client.username = credentials['username']
|
12
|
+
Client.password = credentials['password']
|
12
13
|
end
|
13
14
|
|
14
15
|
def execute(command_name, args, options={})
|
data/lib/dnsimple/client.rb
CHANGED
@@ -7,28 +7,32 @@ module DNSimple
|
|
7
7
|
@debug = debug
|
8
8
|
end
|
9
9
|
|
10
|
+
def self.username
|
11
|
+
@@username
|
12
|
+
end
|
13
|
+
|
10
14
|
def self.username=(username)
|
11
|
-
|
15
|
+
@@username = username
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.password
|
19
|
+
@@password
|
12
20
|
end
|
13
21
|
|
14
22
|
def self.password=(password)
|
15
|
-
|
23
|
+
@@password = password
|
16
24
|
end
|
17
25
|
|
18
|
-
def self.credentials
|
19
|
-
|
20
|
-
@credentials = {:username => username, :password => password} if username && password
|
21
|
-
@credentials
|
26
|
+
def self.credentials
|
27
|
+
{:username => self.username, :password => self.password}
|
22
28
|
end
|
23
29
|
|
24
|
-
def self.base_uri
|
25
|
-
|
26
|
-
@@base_uri ||= "http://localhost:3000"
|
30
|
+
def self.base_uri
|
31
|
+
@@base_uri ||= "http://dnsimple.com"
|
27
32
|
end
|
28
33
|
|
29
34
|
def self.base_uri=(base_uri)
|
30
35
|
@@base_uri = base_uri.gsub(/\/$/, '')
|
31
|
-
puts "Using #{@@base_uri}"
|
32
36
|
end
|
33
37
|
end
|
34
38
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Anthony Eden
|
@@ -27,6 +27,7 @@ extensions: []
|
|
27
27
|
|
28
28
|
extra_rdoc_files:
|
29
29
|
- README
|
30
|
+
- README.rdoc
|
30
31
|
files:
|
31
32
|
- README
|
32
33
|
- VERSION
|
@@ -53,6 +54,7 @@ files:
|
|
53
54
|
- spec/record_spec.rb
|
54
55
|
- spec/spec_helper.rb
|
55
56
|
- spec/template_spec.rb
|
57
|
+
- README.rdoc
|
56
58
|
has_rdoc: true
|
57
59
|
homepage: http://github.com/aetrion/dnsimple-ruby
|
58
60
|
licenses: []
|