engineyard-dnsimple 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +4 -0
- data/README.md +10 -0
- data/features/assign_dns_to_environment.feature +7 -3
- data/lib/engineyard-dnsimple/cli.rb +6 -4
- data/lib/engineyard-dnsimple/version.rb +1 -1
- metadata +3 -3
data/ChangeLog.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Simple DNS for Engine Yard AppCloud environments
|
2
2
|
|
3
|
+
Currently creates A records for a domain (.myapp.com and www.myapp.com) to
|
4
|
+
point to the public IP of an AppCloud environment.
|
5
|
+
|
3
6
|
## Usage
|
4
7
|
|
5
8
|
Setup `ey` and `dnsimple` gems and credentials (see below).
|
@@ -42,6 +45,13 @@ Test you have DNSimple working:
|
|
42
45
|
Found 1 domains:
|
43
46
|
myapp.com
|
44
47
|
|
48
|
+
## Development
|
49
|
+
|
50
|
+
Currently the test suite is a simple cucumber feature which shouldn't be run.
|
51
|
+
|
52
|
+
I have asked question https://github.com/aetrion/dnsimple-ruby/issues/4 about how to write
|
53
|
+
3rd party tests against DNSimple.
|
54
|
+
|
45
55
|
## License
|
46
56
|
|
47
57
|
Copyright (c) 2010 Engine Yard, Inc
|
@@ -13,11 +13,15 @@ Feature: Assign DNS to environment IP address
|
|
13
13
|
When I run local executable "ey-dnsimple" with arguments "assign myapp.com --account main --environment giblets"
|
14
14
|
Then I should see exactly
|
15
15
|
"""
|
16
|
+
Fetching environment information...
|
16
17
|
Assigning myapp.com --> 174.129.7.113 (main/giblets)
|
18
|
+
Created A record for banjowilliams.com (id:40434)
|
19
|
+
Assigning www.myapp.com --> 174.129.7.113 (main/giblets)
|
20
|
+
Created A record for banjowilliams.com (id:40435)
|
17
21
|
Complete!
|
18
|
-
|
19
|
-
|
20
|
-
.myapp.com (A)-> 174.129.7.113 (ttl:0, id:
|
22
|
+
Found 2 records for myapp.com
|
23
|
+
.myapp.com (A)-> 174.129.7.113 (ttl:0, id:40434)
|
24
|
+
www.myapp.com (A)-> 174.129.7.113 (ttl:0, id:40435)
|
21
25
|
"""
|
22
26
|
|
23
27
|
|
@@ -40,12 +40,14 @@ module EngineYard
|
|
40
40
|
public_ip = "#{$1}.#{$2}.#{$3}.#{$4}"
|
41
41
|
|
42
42
|
say "Found environment #{env_name} on account #{account_name} with IP #{public_ip}"
|
43
|
-
say "Assigning "; say "#{domain} ", :green; say "--> "; say "#{public_ip} ", :green; say "(#{account_name}/#{env_name})"
|
44
43
|
$stdout.flush
|
45
|
-
|
44
|
+
|
46
45
|
::DNSimple::Client.load_credentials_if_necessary
|
47
|
-
|
48
|
-
|
46
|
+
|
47
|
+
say "Assigning "; say "#{domain} ", :green; say "--> "; say "#{public_ip} ", :green; say "(#{account_name}/#{env_name})"
|
48
|
+
::DNSimple::Commands::CreateRecord.new.execute([domain, "", "A", public_ip, "60"]) # A record for .mydomain.com
|
49
|
+
say "Assigning "; say "www.#{domain} ", :green; say "--> "; say "#{public_ip} ", :green; say "(#{account_name}/#{env_name})"
|
50
|
+
::DNSimple::Commands::CreateRecord.new.execute([domain, "www", "A", public_ip, "60"]) # A record for www.mydomain.com
|
49
51
|
|
50
52
|
say "Complete!", :green
|
51
53
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-dnsimple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dr Nic Williams
|