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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0901167f6870b1a1dfa4497ba4632e3a78cf8595
4
- data.tar.gz: 8044a5947c3db1c18f7d2a96421dff2b1a6ef863
3
+ metadata.gz: 2d02e3f927f6d4e7cdf4505b72a1fbaa1760342a
4
+ data.tar.gz: db1ae7d917cf15c3800a2ba3be7d7720faf076ce
5
5
  SHA512:
6
- metadata.gz: 6d5ae88bc59bee4102157fcf695fe9a50eb890278f10c561dbda98b83a521caa04d15e9b738a571f50958561783ab445529744f57c56da697d119e25b2bb6893
7
- data.tar.gz: d57e09495f3ae00bf19e84514a81a94875f6f3953b3463a0b357725a874d21c62fe5f0c4fb036a97d0eb6809875df3dfc1534b70e3c34283c0e88ddb66719d15
6
+ metadata.gz: 45a19907f3dac299fb5ff4e926c061867232c86a2d34c426b3e7b363a2492f51d485c56ccf9141add987bd39ecf5a9dff6b2edab2f5480f52411e6ae2c7fc65c
7
+ data.tar.gz: 777918ccfd4faa833c96a556aef1d624852ca652b98db4a48e6ea0cfe1c6ac4b56b79d2d8d81712c76b5d05e3e856b5cb0c85486157e04110004d1ceda96ff1f
data/.gitignore CHANGED
@@ -6,4 +6,5 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/*
10
+ !.keep
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.1
data/.travis.yml CHANGED
@@ -1,5 +1,11 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.1
4
+ - 2.2.7
5
+ - 2.3.4
6
+ - 2.4.1
5
7
  before_install: gem install bundler -v 1.13.6
8
+ notifications:
9
+ on_success: change
10
+ on_failure: change
11
+ on_start: false
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.0
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.0
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.0
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
- - [ ] vim syntax
206
+ - [x] vim syntax
199
207
  - [ ] Test code
200
- - [ ] CI
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
-
@@ -1,5 +1,5 @@
1
1
  #
2
- # This config is generated by Nymphia 0.1.0
2
+ # This config is generated by Nymphia 0.1.1
3
3
  #
4
4
 
5
5
  # my server on VPS
data/lib/nymphia/cli.rb CHANGED
@@ -23,7 +23,9 @@ class Nymphia::CLI
23
23
  dsl.compile
24
24
 
25
25
  if @output_file_path
26
- dsl.render(File.open(@output_file_path, 'w'))
26
+ File.open(@output_file_path, 'w') do |file|
27
+ dsl.render(file)
28
+ end
27
29
  else
28
30
  dsl.render(STDOUT)
29
31
  end
@@ -1,6 +1,3 @@
1
- require 'active_support'
2
- require 'active_support/core_ext'
3
-
4
1
  class Nymphia::DSL::Context::DefaultParams
5
2
  include Nymphia::DSL::Context::HostContextMethods
6
3
 
@@ -1,6 +1,3 @@
1
- require 'active_support'
2
- require 'active_support/core_ext'
3
-
4
1
  class Nymphia::DSL::Context::Host
5
2
  include Nymphia::DSL::Context::HostContextMethods
6
3
 
@@ -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.camelize
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
@@ -1,5 +1,6 @@
1
1
  #
2
2
  # This config is generated by Nymphia <%= Nymphia::VERSION %>
3
+ # @ <%= Time.now.iso8601 %>
3
4
  #
4
5
 
5
6
  <%- @result[:hosts].each do |host| -%>
@@ -1,3 +1,3 @@
1
1
  module Nymphia
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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: 2016-11-13 00:00:00.000000000 Z
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: activesupport
56
+ name: timecop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 5.0.0.1
62
- type: :runtime
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: 5.0.0.1
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.5.1
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.