nymphia 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.ruby-version +1 -1
- data/.travis.yml +7 -1
- data/README.md +13 -7
- data/examples/result.example +1 -1
- data/lib/nymphia/cli.rb +3 -1
- data/lib/nymphia/dsl/context/default_params.rb +0 -3
- data/lib/nymphia/dsl/context/host.rb +0 -3
- data/lib/nymphia/dsl/context/host_context_methods.rb +7 -1
- data/lib/nymphia/ssh_config_template.erb +1 -0
- data/lib/nymphia/version.rb +1 -1
- data/nymphia.gemspec +1 -2
- data/tmp/.keep +0 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d02e3f927f6d4e7cdf4505b72a1fbaa1760342a
|
4
|
+
data.tar.gz: db1ae7d917cf15c3800a2ba3be7d7720faf076ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45a19907f3dac299fb5ff4e926c061867232c86a2d34c426b3e7b363a2492f51d485c56ccf9141add987bd39ecf5a9dff6b2edab2f5480f52411e6ae2c7fc65c
|
7
|
+
data.tar.gz: 777918ccfd4faa833c96a556aef1d624852ca652b98db4a48e6ea0cfe1c6ac4b56b79d2d8d81712c76b5d05e3e856b5cb0c85486157e04110004d1ceda96ff1f
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.1
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# Nymphia
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/mozamimy/nymphia.svg?branch=master)](https://travis-ci.org/mozamimy/nymphia)
|
4
|
+
|
3
5
|
Nymphia is a DSL to generate a ssh config file more structurally.
|
4
6
|
You can use full Ruby syntax and useful methods provided by Nymphia.
|
5
7
|
|
8
|
+
There is a Vim syntax ([nymphia.vim](https://github.com/mozamimy/nymphia.vim)) if you want to edit colorfully in Vim.
|
9
|
+
|
6
10
|
## Installation
|
7
11
|
|
8
12
|
Just type gem command,
|
@@ -43,7 +47,7 @@ Following ssh config file is generated after the code is compiled.
|
|
43
47
|
|
44
48
|
```
|
45
49
|
#
|
46
|
-
# This config is generated by Nymphia 0.1.
|
50
|
+
# This config is generated by Nymphia 0.1.1
|
47
51
|
#
|
48
52
|
|
49
53
|
# my server on VPS
|
@@ -108,7 +112,7 @@ Following ssh config file is generated after the code is compiled.
|
|
108
112
|
|
109
113
|
```
|
110
114
|
#
|
111
|
-
# This config is generated by Nymphia 0.1.
|
115
|
+
# This config is generated by Nymphia 0.1.1
|
112
116
|
#
|
113
117
|
|
114
118
|
Host awsproxy.company.apne1
|
@@ -161,7 +165,7 @@ Following ssh config file is generated after the code is compiled.
|
|
161
165
|
```
|
162
166
|
|
163
167
|
#
|
164
|
-
# This config is generated by Nymphia 0.1.
|
168
|
+
# This config is generated by Nymphia 0.1.1
|
165
169
|
#
|
166
170
|
|
167
171
|
Host company.gateway
|
@@ -193,11 +197,15 @@ Method `gateway` is almost same to `host`, but it can be used in a group by `use
|
|
193
197
|
|
194
198
|
Method `default_params` defines default parameters of hosts in the group including `default_params`. In this example, `host '*.apne.aws.example.com'` has no parameters, but `Host *.apne.aws.example.com` in result is filled by default parameters. The default parameters can be overide like `host 'alice.apne.aws.example.com'`.
|
195
199
|
|
200
|
+
## Vim syntax
|
201
|
+
|
202
|
+
https://github.com/mozamimy/nymphia.vim
|
203
|
+
|
196
204
|
## Todo
|
197
205
|
|
198
|
-
- [
|
206
|
+
- [x] vim syntax
|
199
207
|
- [ ] Test code
|
200
|
-
- [
|
208
|
+
- [x] CI
|
201
209
|
|
202
210
|
## Development
|
203
211
|
|
@@ -207,8 +215,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
207
215
|
|
208
216
|
Bug reports and pull requests are welcome on GitHub at https://github.com/mozamimy/nymphia.
|
209
217
|
|
210
|
-
|
211
218
|
## License
|
212
219
|
|
213
220
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
214
|
-
|
data/examples/result.example
CHANGED
data/lib/nymphia/cli.rb
CHANGED
@@ -10,7 +10,7 @@ module Nymphia::DSL::Context::HostContextMethods
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def method_missing(method, *params)
|
13
|
-
key = method.to_s
|
13
|
+
key = camelize(method.to_s)
|
14
14
|
|
15
15
|
if @default_params && @default_params[key]
|
16
16
|
@result[:contents][key] = Array(params[0])
|
@@ -23,4 +23,10 @@ module Nymphia::DSL::Context::HostContextMethods
|
|
23
23
|
@result[:contents][key] = Array(params[0])
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def camelize(str)
|
30
|
+
str.split('_').collect(&:capitalize).join
|
31
|
+
end
|
26
32
|
end
|
data/lib/nymphia/version.rb
CHANGED
data/nymphia.gemspec
CHANGED
@@ -24,6 +24,5 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
26
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
-
|
28
|
-
spec.add_dependency 'activesupport', '~> 5.0.0.1'
|
27
|
+
spec.add_development_dependency 'timecop', '~> 0.8.0'
|
29
28
|
end
|
data/tmp/.keep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nymphia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mozamimy (Moza USANE)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: timecop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
61
|
+
version: 0.8.0
|
62
|
+
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.8.0
|
69
69
|
description: Create your SSH config without any pain.
|
70
70
|
email:
|
71
71
|
- mozamimy@quellencode.org
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/nymphia/ssh_config_template.erb
|
104
104
|
- lib/nymphia/version.rb
|
105
105
|
- nymphia.gemspec
|
106
|
+
- tmp/.keep
|
106
107
|
homepage: https://github.com/mozamimy/nymphia
|
107
108
|
licenses:
|
108
109
|
- MIT
|
@@ -123,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
124
|
version: '0'
|
124
125
|
requirements: []
|
125
126
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.6.11
|
127
128
|
signing_key:
|
128
129
|
specification_version: 4
|
129
130
|
summary: Create your SSH config without any pain.
|