vagrant-ssh-config-ttl 0.0.1 → 0.0.2

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: f5d8dbd02089b88bf1c8c1c85c0664e7806814df
4
- data.tar.gz: c0be64bc93d24b0c32aa3ca57c467a70dee5532e
3
+ metadata.gz: b319a6effbd574bea32f176c88bc9fdec61c3e5e
4
+ data.tar.gz: ed86fd90dd8a95ef374dfa075fec171c0f508617
5
5
  SHA512:
6
- metadata.gz: 3ba91e4e0ed039d6b0057be25d6ca34d0dfb62a059bdee9bc24f20aa1e77772c56258dfbe8f925e1ae754de2e50e45286313a9ccaea7757389400d036ea392e8
7
- data.tar.gz: 89f24a10fdd2546b96517d7792fbc90af4ad78cfdd60f664b0bf1980b9e45426e8f4e03460bb6a589c03b019868fb2c1737614f296312c53470997632b87df69
6
+ metadata.gz: 5edcc06d99458125d0196c944a0175bdac9ee8c0033db9107e769543e283481046c474ad7c146fae51e295cadcb1fcf98ad024efba03599308a8487885ad4447
7
+ data.tar.gz: 9173bd11bb00755b85471aa5226fff29b1ba45567d8b58b6b8cb3ada5bcadbb66e994ae0a637a9bd65f9753105f8f851d2f0844bafcce7527e6e235f1d0632f5
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -14,7 +14,24 @@ vagrant plugin install vagrant-ssh-config-ttl
14
14
  ## Usage
15
15
 
16
16
  ```
17
- $ vagrant ssh-config-ttl
17
+ C:\path\to\vagrantfile> vagrant ssh-config-ttl > connect.ttl
18
+ ```
19
+
20
+ or
21
+
22
+ ```
23
+ C:/path/to/vagrantproject>vagrant ssh-config-ttl
24
+ HOSTADDR = '127.0.0.1'
25
+ PORT = '2222'
26
+ USERNAME = 'vagrant'
27
+ COMMAND = HOSTADDR
28
+ strconcat COMMAND ':'
29
+ strconcat COMMAND PORT
30
+ strconcat COMMAND ' /ssh /2 /auth=publickey /nosecuritywarning /user='
31
+ strconcat COMMAND USERNAME
32
+ strconcat COMMAND ' /keyfile="C:/path/to/vagrantproject/.vagrant/machines/default/virtualbox/private_key"'
33
+ connect COMMAND
34
+ end
18
35
  ```
19
36
 
20
37
  ## Contributing
@@ -1,8 +1,10 @@
1
1
  require "vagrant-ssh-config-ttl/version"
2
2
  require "vagrant-ssh-config-ttl/plugin"
3
3
 
4
- #module VagrantPlugins
5
- # module CommandSSHConfigTTL
6
- # # Your code goes here...
7
- # end
8
- #end
4
+ module VagrantPlugins
5
+ module CommandSSHConfigTTL
6
+ def self.root
7
+ File.dirname __dir__
8
+ end
9
+ end
10
+ end
@@ -33,6 +33,7 @@ module VagrantPlugins
33
33
  raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
34
34
 
35
35
  variables = {
36
+ template_root: File.join(VagrantPlugins::CommandSSHConfigTTL.root, "templates"),
36
37
  host_key: options[:host] || machine.name || "vagrant",
37
38
  ssh_host: ssh_info[:host],
38
39
  ssh_port: ssh_info[:port],
@@ -45,7 +46,7 @@ module VagrantPlugins
45
46
  }
46
47
 
47
48
  # Render the template and output directly to STDOUT
48
- template = "vagrant-ssh-config-ttl/tera_term_language_template"
49
+ template = "tera_term_language_template"
49
50
  safe_puts(Vagrant::Util::TemplateRenderer.render(template, variables))
50
51
  safe_puts
51
52
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module CommandSSHConfigTTL
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -4,11 +4,10 @@ USERNAME = '<%= ssh_user %>'
4
4
  COMMAND = HOSTADDR
5
5
  strconcat COMMAND ':'
6
6
  strconcat COMMAND PORT
7
- strconcat COMMAND ' /ssh /2 /auth=publickey /user='
7
+ strconcat COMMAND ' /ssh /2 /auth=publickey /nosecuritywarning /user='
8
8
  strconcat COMMAND USERNAME
9
9
  <% private_key_path.each do |path| %>
10
10
  strconcat COMMAND ' /keyfile="<%= path %>"'
11
- strconcat COMMAND KEY_FILE
12
11
  <% end -%>
13
12
  connect COMMAND
14
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-ssh-config-ttl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wataru Noguchi
@@ -54,8 +54,8 @@ files:
54
54
  - lib/vagrant-ssh-config-ttl.rb
55
55
  - lib/vagrant-ssh-config-ttl/command.rb
56
56
  - lib/vagrant-ssh-config-ttl/plugin.rb
57
- - lib/vagrant-ssh-config-ttl/tera_term_language_template.erb
58
57
  - lib/vagrant-ssh-config-ttl/version.rb
58
+ - templates/tera_term_language_template.erb
59
59
  - vagrant-ssh-config-ttl.gemspec
60
60
  homepage: https://github.com/wnoguchi/vagrant-ssh-config-ttl
61
61
  licenses: