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 +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +56 -0
- data/lib/terraforming/dnsimple/cli.rb +3 -3
- data/lib/terraforming/dnsimple/version.rb +1 -1
- data/terraforming-dnsimple.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9843a3fc461066cb521603c7a9773e94af0a390
|
4
|
+
data.tar.gz: addb30954b35abf0e85ddd6598a22e500eeda9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd6044167d0b02a7200fc72e651fbbe60bfe3f8a03c19da11df6ac27027028f8d8533c0e156d53ec8da7be17cd54fca4080cb203e86a952d629fa15f99bdf640
|
7
|
+
data.tar.gz: fbabc47adf359a0399e0b17c88a88e08f514bf23c7fc5c49497fb1a0ab9392f483eca520f08b94af42cab3f9d32ad31226e4032f049e5418a9dae990d93c49e5
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
# [v0.1.
|
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
|
[](https://travis-ci.org/dtan4/terraforming-dnsimple)
|
3
3
|
[](https://codeclimate.com/github/dtan4/terraforming-dnsimple)
|
4
4
|
[](https://codeclimate.com/github/dtan4/terraforming-dnsimple/coverage)
|
5
|
+
[](http://badge.fury.io/rb/terraforming-dnsimple)
|
6
|
+
[](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 :
|
7
|
-
option :
|
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[:
|
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
|
@@ -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{^
|
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.
|
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:
|