terraforming-dnsimple 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa4cb01ce90227dd8695c6aaf5f86b2fc64967da
4
- data.tar.gz: d538853788863d39b9a19122fdfec768af139843
3
+ metadata.gz: b9843a3fc461066cb521603c7a9773e94af0a390
4
+ data.tar.gz: addb30954b35abf0e85ddd6598a22e500eeda9a5
5
5
  SHA512:
6
- metadata.gz: 8323d16793152f6a612f246d89a93c6be8f444741c7945e91628395594d138927e2bb06c633b531ec2faeba99a3a98cf1504f12d2b050bd88dd5f1dc9827361c
7
- data.tar.gz: 63f9c3ccdea880f372b60756fc69a40e56bebc9439a4d0b57807378c3ce6a90801e0d52971e3b0f53d8b546f145ad30a2cbbc292e63d059dc5928ed88d2b917e
6
+ metadata.gz: bd6044167d0b02a7200fc72e651fbbe60bfe3f8a03c19da11df6ac27027028f8d8533c0e156d53ec8da7be17cd54fca4080cb203e86a952d629fa15f99bdf640
7
+ data.tar.gz: fbabc47adf359a0399e0b17c88a88e08f514bf23c7fc5c49497fb1a0ab9392f483eca520f08b94af42cab3f9d32ad31226e4032f049e5418a9dae990d93c49e5
@@ -1,4 +1,11 @@
1
- # [v0.1.0](https://github.com/dtan4/terraforming-dnsimple/releases/tag/v0.0.1) (2015-05-28)
1
+ # [v0.1.1](https://github.com/dtan4/terraforming-dnsimple/releases/tag/v0.1.1) (2015-05-28)
2
+
3
+ ### Fixed
4
+
5
+ - Modify executable directory to bin/
6
+ - Shorthen CLI option names
7
+
8
+ # [v0.1.0](https://github.com/dtan4/terraforming-dnsimple/releases/tag/v0.1.0) (2015-05-28)
2
9
 
3
10
  Initial release.
4
11
 
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
  [![Build Status](https://travis-ci.org/dtan4/terraforming-dnsimple.svg?branch=master)](https://travis-ci.org/dtan4/terraforming-dnsimple)
3
3
  [![Code Climate](https://codeclimate.com/github/dtan4/terraforming-dnsimple/badges/gpa.svg)](https://codeclimate.com/github/dtan4/terraforming-dnsimple)
4
4
  [![Test Coverage](https://codeclimate.com/github/dtan4/terraforming-dnsimple/badges/coverage.svg)](https://codeclimate.com/github/dtan4/terraforming-dnsimple/coverage)
5
+ [![Gem Version](https://badge.fury.io/rb/terraforming-dnsimple.svg)](http://badge.fury.io/rb/terraforming-dnsimple)
6
+ [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
5
7
 
6
8
  [Terraforming](https://github.com/dtan4/terraforming) extension for [DNSimple](https://dnsimple.com)
7
9
 
@@ -30,6 +32,60 @@ Commands:
30
32
  terraforming-dnsimple help [COMMAND] # Describe available commands or one specific command
31
33
  ```
32
34
 
35
+ Output `.tf` style:
36
+
37
+ ```bash
38
+ $ terraforming s3 --user=<user name> --token=<api token>
39
+ ```
40
+
41
+ ```go
42
+ resource "dnsimple_record" "31-hoge-A" {
43
+ domain = "example1.com"
44
+ name = "hoge"
45
+ value = "192.168.0.1"
46
+ type = "A"
47
+ ttl = "60"
48
+ }
49
+ ```
50
+
51
+ To output `.tfstate` style, specify `--tfstate` option:
52
+
53
+ ```bash
54
+ $ terraforming s3 --tfstate --user=<user name> --token=<api token>
55
+ ```
56
+
57
+ ```json
58
+ {
59
+ "version": 1,
60
+ "serial": 1,
61
+ "modules": {
62
+ "path": [
63
+ "root"
64
+ ],
65
+ "outputs": {
66
+ },
67
+ "resources": {
68
+ "dnsimple_record.31-hoge-A": {
69
+ "type": "dnsimple_record",
70
+ "primary": {
71
+ "id": "31",
72
+ "attributes": {
73
+ "id": "31",
74
+ "value": "192.168.0.1",
75
+ "type": "A",
76
+ "ttl": "60",
77
+ "priority": "",
78
+ "domain_id": "1",
79
+ "domain": "example1.com",
80
+ "hostname": "hoge.example1.com"
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
33
89
  ## Development
34
90
 
35
91
  After checking out the repo, run `script/setup` to install dependencies. Then, run `script/console` for an interactive prompt that will allow you to experiment.
@@ -3,8 +3,8 @@ module Terraforming
3
3
  class CLI < Thor
4
4
  def self.cli_options
5
5
  option :tfstate, type: :boolean
6
- option :user_name, type: :string
7
- option :api_token, type: :string
6
+ option :user, type: :string
7
+ option :token, type: :string
8
8
  end
9
9
 
10
10
  desc "dnsr", "DNSimple Record"
@@ -16,7 +16,7 @@ module Terraforming
16
16
  private
17
17
 
18
18
  def execute(klass, options)
19
- client = Dnsimple::Client.new(username: options[:user_name], api_token: options[:api_token])
19
+ client = Dnsimple::Client.new(username: options[:user], api_token: options[:token])
20
20
  puts options[:tfstate] ? klass.tfstate(client) : klass.tf(client)
21
21
  end
22
22
  end
@@ -1,5 +1,5 @@
1
1
  module Terraforming
2
2
  module DNSimple
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.bindir = "bin"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "dnsimple", "= 2.0.0.alpha5"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraforming-dnsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daisuke Fujita
@@ -167,7 +167,8 @@ dependencies:
167
167
  description: Terraforming extension for DNSimple
168
168
  email:
169
169
  - dtanshi45@gmail.com
170
- executables: []
170
+ executables:
171
+ - terraforming-dnsimple
171
172
  extensions: []
172
173
  extra_rdoc_files: []
173
174
  files: