engineyard-dnsimple 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
- - jruby
5
4
  - rbx
6
5
  - ree
data/ChangeLog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## v0.3.0 - 2011/5/22
4
+
5
+ * ey-dnsimple assign DOMAIN NAME - can pass a subdomain name (only that record is created)
6
+
3
7
  ## v0.2.0 - 2011/5/22
4
8
 
5
9
  * If [domain, name] pair already exists then prompt for override
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Simple DNS for Engine Yard AppCloud environments
2
2
 
3
+ <img src="https://img.skitch.com/20110523-x5mhutfr8r79parhuq7r44sqma.png">
4
+
5
+
3
6
  Currently creates A records for a domain (.myapp.com and www.myapp.com) to
4
7
  point to the public IP of an AppCloud environment.
5
8
 
@@ -20,6 +23,9 @@ like the `ey` CLI itself:
20
23
 
21
24
  $ ey-dnsimple assign myapp.com -e myapp_production
22
25
 
26
+ If .myapp.com or www.myapp.com already exist you will be prompted to override them.
27
+ You can force the override with the `--override` or `-o` flag.
28
+
23
29
  ## Setup
24
30
 
25
31
  $ gem install engineyard-dnsimple
@@ -48,10 +54,14 @@ Test you have DNSimple working:
48
54
 
49
55
  ## Development
50
56
 
51
- Currently the test suite is a simple cucumber feature which shouldn't be run.
57
+ [![Build Status](http://travis-ci.org/engineyard/engineyard-dnsimple.png)](http://travis-ci.org/engineyard/engineyard-dnsimple)
58
+
59
+ The test suite is purely cucumber scenarios. No rspec tests are being used. There are credentials for http://test.dnsimple.com built into the test suite. You should not have to do anything to run the tests except:
52
60
 
53
- I have asked question https://github.com/aetrion/dnsimple-ruby/issues/4 about how to write
54
- 3rd party tests against DNSimple.
61
+ git clone git://github.com/engineyard/engineyard-dnsimple.git
62
+ cd engineyard-dnsimple
63
+ bundle
64
+ bundle exec rake
55
65
 
56
66
  ## License
57
67
 
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Dr Nic Williams"]
10
10
  s.email = ["drnicwilliams@gmail.com"]
11
- s.homepage = ""
11
+ s.homepage = "https://github.com/engineyard/engineyard-dnsimple#readme"
12
12
  s.summary = %q{Configure your Engine Yard AppCloud environment and your DNSimple domain.}
13
13
  s.description = %q{Easily configure your DNS with Engine Yard AppCloud via DNSimple.}
14
14
 
@@ -31,9 +31,9 @@ Feature: Assign DNS to environment IP address
31
31
  Fetching AppCloud environment information...
32
32
  Found AppCloud environment giblets on account main with IP 174.129.7.113
33
33
  Deleted \d+ from myapp.com
34
- Deleted \d+ from myapp.com
35
34
  Assigning myapp.com --> 174.129.7.113 (main/giblets)
36
35
  Created A record for myapp.com (id:\d+)
36
+ Deleted \d+ from myapp.com
37
37
  Assigning www.myapp.com --> 174.129.7.113 (main/giblets)
38
38
  Created A record for myapp.com (id:\d+)
39
39
  Complete!
@@ -42,5 +42,18 @@ Feature: Assign DNS to environment IP address
42
42
  www.myapp.com (A)-> 174.129.7.113 (ttl:60, id:\d+)
43
43
  """
44
44
 
45
+ Scenario: Assign subdomain A Record to an environment
46
+ When I run local executable "ey-dnsimple" with arguments "assign myapp.com staging --account main --environment giblets"
47
+ Then I should see matching
48
+ """
49
+ Fetching AppCloud environment information...
50
+ Found AppCloud environment giblets on account main with IP 174.129.7.113
51
+ Assigning staging.myapp.com --> 174.129.7.113 (main/giblets)
52
+ Created A record for myapp.com (id:\d+)
53
+ Complete!
54
+ Found 1 records for myapp.com
55
+ staging.myapp.com (A)-> 174.129.7.113 (ttl:60, id:\d+)
56
+ """
57
+
45
58
 
46
59
 
@@ -17,7 +17,8 @@ module DNSimpleHelpers
17
17
  def create_dnsimple_domain(domain)
18
18
  begin
19
19
  ::DNSimple::Commands::DeleteDomain.new.execute([domain])
20
- rescue
20
+ rescue => e
21
+ $stderr.puts e.message
21
22
  end
22
23
  ::DNSimple::Commands::CreateDomain.new.execute([domain])
23
24
  end
@@ -19,12 +19,12 @@ module EngineYard
19
19
  end
20
20
 
21
21
 
22
- desc "assign domain", "Assign domain (domain) to your AppCloud environment"
22
+ desc "assign DOMAIN [NAME]", "Assign DNS domain/tld (or name.tld) to your AppCloud environment"
23
23
  method_option :verbose, :aliases => ["-V"], :desc => "Display more output"
24
24
  method_option :environment, :aliases => ["-e"], :desc => "Environment in which to deploy this application", :type => :string
25
25
  method_option :account, :aliases => ["-c"], :desc => "Name of the account you want to deploy in"
26
26
  method_option :override, :aliases => ["-o"], :type => :boolean, :desc => "Override DNSimple records if they already exist"
27
- def assign(domain)
27
+ def assign(domain, name = "")
28
28
  say "Fetching AppCloud environment information..."; $stdout.flush
29
29
 
30
30
  environment = fetch_environment(options[:environment], options[:account])
@@ -44,8 +44,8 @@ module EngineYard
44
44
  $stdout.flush
45
45
 
46
46
  ::DNSimple::Client.load_credentials_if_necessary
47
- assign_dns(account_name, env_name, domain, public_ip, "", options[:override])
48
- assign_dns(account_name, env_name, domain, public_ip, "www", options[:override])
47
+ assign_dns(account_name, env_name, domain, public_ip, name, options[:override])
48
+ assign_dns(account_name, env_name, domain, public_ip, "www", options[:override]) if name == ""
49
49
 
50
50
  say "Complete!", :green
51
51
 
@@ -1,5 +1,5 @@
1
1
  module EngineYard
2
2
  module DNSimple
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -0,0 +1,34 @@
1
+ # Simple DNS for AppCloud with DNSimple
2
+
3
+ For me, one of the things I liked to do with a new AppCloud application is to attached a pretty domain. The default AWS EC2 URL doesn't glorify my fine efforts.
4
+
5
+ I've started using the new [DNSimple](http://dnsimple.com/) as my DNS registrar and name server, and I believe an increasing number of AppCloud customers are too.
6
+
7
+ To make setting up DNS easier with AppCloud, we've released the `ey-dnsimple` command line application.
8
+
9
+ It's really quite easy to use:
10
+
11
+ 1. Register your application's domain with [DNSimple](http://dnsimple.com/)
12
+ 2. Transfer your domain to DNSimple or change the name servers to ns1.dnsimple.com (ns2, ns3, etc)
13
+ 3. Install and run the command line application:
14
+
15
+ $ gem install engineyard-dnsimple
16
+ $ cd path/to/my/app
17
+ $ ey-dnsimple apply myapp.com
18
+ Assigning myapp.com --> 1.2.3.4 (drnic/myapp_production)
19
+ Assigning www.myapp.com --> 1.2.3.4 (drnic/myapp_production)
20
+
21
+ Found 2 records for myapp.com
22
+ .myapp.com (A)-> 1.2.3.4 (ttl:, id:12345)
23
+ www.myapp.com (A)-> 1.2.3.4 (ttl:, id:12346)
24
+
25
+ If you have previously assigned the domain records to another host, it will prompt you to change them.
26
+
27
+ If there is any confusion about which AppCloud environment is hosting your application, it will show you your options and then you can use the `--environment` and `--account` options to be more specific:
28
+
29
+ $ ey-dnsimple apply myapp.com --environment myapp_production
30
+ $ ey-dnsimple apply myapp.com staging --environment myapp_staging
31
+
32
+ Hopefully this tool makes it much easier to setup or change DNS for your AppCloud environments. Let us know in the comments or in the project's [Issues](https://github.com/engineyard/engineyard-dnsimple/issues) if you love it, find bugs or have feature requests.
33
+
34
+ The source and instructions for the project is [available on GitHub](https://github.com/engineyard/engineyard-dnsimple#readme).
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: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
8
+ - 3
9
9
  - 0
10
- version: 0.2.0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dr Nic Williams
@@ -227,9 +227,10 @@ files:
227
227
  - lib/engineyard-dnsimple.rb
228
228
  - lib/engineyard-dnsimple/cli.rb
229
229
  - lib/engineyard-dnsimple/version.rb
230
+ - posts/engineyard-2011-05-24.md
230
231
  - spec/spec_helper.rb
231
232
  has_rdoc: true
232
- homepage: ""
233
+ homepage: https://github.com/engineyard/engineyard-dnsimple#readme
233
234
  licenses: []
234
235
 
235
236
  post_install_message: