mattly-slicehost-dns 0.3 → 0.3.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.
Files changed (3) hide show
  1. data/README.mkdn +2 -6
  2. data/lib/slicehost-dns.rb +3 -2
  3. metadata +2 -2
data/README.mkdn CHANGED
@@ -16,13 +16,9 @@ Helps you manage your DNS entries on the slicehost DNS server via a local YAML f
16
16
 
17
17
  ## SYNOPSIS
18
18
 
19
- Get an example file:
20
-
21
- slicehost-dns --example > example.yml
22
-
23
- Rename example.yml to config.yml, edit the "api" value to your api key, and dump your current settings
24
- from slicehost to config.yml:
19
+ Set your API key and dump your current config:
25
20
 
21
+ export SLICEHOST_API_KEY=234897293823984729390470fkbslkdfjbh
26
22
  slicehost-dns --dump config.yml
27
23
 
28
24
  Make some changes and push them back, but do a dry run first because we're not sure:
data/lib/slicehost-dns.rb CHANGED
@@ -33,8 +33,9 @@ dump = ARGV.delete('--dump')
33
33
  dry_run = ARGV.delete('--dry')
34
34
  filename = ARGV.shift
35
35
  config = YAML.load_file(filename)
36
- API = config.delete('api')
37
- $TTL = 43200 # 12 hours.
36
+
37
+ API = ENV['SLICEHOST_API_KEY'] || config.delete('api')
38
+ raise ArgumentError, "no API key found" if API.nil?
38
39
 
39
40
  $:.unshift File.dirname(__FILE__)
40
41
  require 'zone'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mattly-slicehost-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.3"
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Lyon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-11 00:00:00 -08:00
12
+ date: 2009-02-10 00:00:00 -08:00
13
13
  default_executable: slicehost-dns
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency