dnsimple-ruby 0.1.0 → 0.1.1

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.
@@ -0,0 +1 @@
1
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -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
@@ -8,7 +8,8 @@ module DNSimple
8
8
  class CLI
9
9
  def initialize
10
10
  credentials = load_credentials
11
- Client.credentials(credentials['username'], credentials['password'])
11
+ Client.username = credentials['username']
12
+ Client.password = credentials['password']
12
13
  end
13
14
 
14
15
  def execute(command_name, args, options={})
@@ -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
- self.credentials[:username] = username
15
+ @@username = username
16
+ end
17
+
18
+ def self.password
19
+ @@password
12
20
  end
13
21
 
14
22
  def self.password=(password)
15
- self.credentials[:password] = password
23
+ @@password = password
16
24
  end
17
25
 
18
- def self.credentials(username=nil, password=nil)
19
- @credentials ||= {}
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(site=nil)
25
- self.base_uri = site if site
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
@@ -2,7 +2,6 @@ module DNSimple
2
2
  module Commands
3
3
  class ListDomains
4
4
  def execute(args, options={})
5
- puts "Base URI: #{Domain.base_uri}"
6
5
  domains = Domain.all
7
6
  puts "Found #{domains.length} domains:"
8
7
  domains.each do |domain|
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
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: []