vagrant-ghost 0.2.1 → 0.2.3

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: 77ac651aed50d276bf475c442e00de6e1bef21da
4
- data.tar.gz: 0c2317d1ac3695c1e68d7c3af80d21c88694fb0f
3
+ metadata.gz: c1a8b6bdc092ea97fddd084f8c90387e92e04cc0
4
+ data.tar.gz: 5be44d19425e7558cf80aabe142334c67003c910
5
5
  SHA512:
6
- metadata.gz: 5f2baf72dcc0b8a13ea1b1a29fe98ea3e1cbd1c6fd77940c682ecc8aec9e3d24ce11247da134200ea2263964a9b4b2193262e737291f93a29f5a1c868daa8ef4
7
- data.tar.gz: 6612d2b84f9df9e1eb781f1c4f7bbd7c2f3804780147f06ed3d6195dac2c560d744caabd5ddaf084ce5599f60585a8e5412a2578ae1c50d96061e8baccbea5fc
6
+ metadata.gz: eac2571d79a0aeb509e4ee77dcc42eb2259993453515c140578a844d08ec7738af55566f8c2935d674dbfe313d8163450d2ad420164fcdb0433f676a29f424ef
7
+ data.tar.gz: 9e524f0459bd42347d47c3cfca326216e0afb912fe1e9f54aed9b2abf3815427627ed9aa12d9219510139f2466496fc1bc0001a62084d75b7aee2dd1a8cbaad5
data/README.md CHANGED
@@ -27,9 +27,22 @@ At the moment, the only things you need, are the hostname and a :private_network
27
27
  This ip and the hostname will be used for the entry in the /etc/hosts file.
28
28
 
29
29
  Additional aliases can be added by creating an `/aliases` file at the root of the Vagrant machine installation with one host alias per line. This file will be re-imported whenever Vagrant Ghost updates the hostsfile.
30
-
30
+
31
+ You may change the name of the aliases file by setting the `hosts_files` configuration option in your Vagrantfile:
32
+
33
+ config.ghost.hosts_files = "hosts_aliases" # Could be anything, e.g. "hosts", or whatever
34
+
35
+ This will scan the vagrant directory for any file with the name you configured and will use each line as a URI to add to your hosts file pointing to that vagrant instance.
36
+
31
37
  ## Changelog
32
38
 
39
+ ### 0.2.3
40
+ * Fixed allowed_push_host setting to allow pushing to rubygems.org
41
+
42
+ ### 0.2.2
43
+ * Only parse files for host names, not directories
44
+ * Add a configuration option `hosts_files` to change the name of the file that holds aliases
45
+
33
46
  ### 0.2.1
34
47
  * Make the search for `aliases` target the VM's root directory
35
48
 
@@ -61,4 +74,4 @@ Additional aliases can be added by creating an `/aliases` file at the root of th
61
74
  ## Credits
62
75
 
63
76
  This is a fork of [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater).
64
- ```
77
+ ```
@@ -25,11 +25,15 @@ module VagrantPlugins
25
25
  def getHostnames
26
26
  hostnames = Array(@machine.config.vm.hostname)
27
27
 
28
+ hosts_files = @machine.config.ghost.hosts_files || 'aliases'
29
+
28
30
  # Regenerate hosts from aliases file
29
- paths = Dir[File.join( @machine.env.root_path.to_s, '**', 'aliases' )]
31
+ paths = Dir[File.join( @machine.env.root_path.to_s, '**', hosts_files )]
30
32
  aliases = paths.map do |path|
31
- lines = File.readlines(path).map(&:chomp)
32
- lines.grep(/\A[^#]/)
33
+ if File.file?(path)
34
+ lines = File.readlines(path).map(&:chomp)
35
+ lines.grep(/\A[^#]/)
36
+ end
33
37
  end.flatten.uniq
34
38
 
35
39
  # Concat with the local hostname
@@ -4,6 +4,7 @@ module VagrantPlugins
4
4
  module Ghost
5
5
  class Config < Vagrant.plugin("2", :config)
6
6
  attr_accessor :hosts
7
+ attr_accessor :hosts_files
7
8
  attr_accessor :id
8
9
  end
9
10
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Ghost
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["john.bloch@10up.com","eric.mann@10up.com"]
11
11
 
12
12
  if spec.respond_to?(:metadata)
13
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
13
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
14
14
  end
15
15
 
16
16
  spec.summary = "Update Hosts"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-ghost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John P Bloch
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-05-27 00:00:00.000000000 Z
12
+ date: 2016-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.7'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.7'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '10.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  description: Update hosts
@@ -47,7 +47,7 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - .gitignore
50
+ - ".gitignore"
51
51
  - Gemfile
52
52
  - LICENSE.txt
53
53
  - README.md
@@ -66,25 +66,24 @@ homepage: https://github.com/10up/vagrant-ghost
66
66
  licenses:
67
67
  - MIT
68
68
  metadata:
69
- allowed_push_host: 'TODO: Set to ''http://mygemserver.com'' to prevent pushes to
70
- rubygems.org, or delete to allow pushes to any server.'
69
+ allowed_push_host: https://rubygems.org
71
70
  post_install_message:
72
71
  rdoc_options: []
73
72
  require_paths:
74
73
  - lib
75
74
  required_ruby_version: !ruby/object:Gem::Requirement
76
75
  requirements:
77
- - - '>='
76
+ - - ">="
78
77
  - !ruby/object:Gem::Version
79
78
  version: '0'
80
79
  required_rubygems_version: !ruby/object:Gem::Requirement
81
80
  requirements:
82
- - - '>='
81
+ - - ">="
83
82
  - !ruby/object:Gem::Version
84
83
  version: '0'
85
84
  requirements: []
86
85
  rubyforge_project:
87
- rubygems_version: 2.0.14
86
+ rubygems_version: 2.4.5.1
88
87
  signing_key:
89
88
  specification_version: 4
90
89
  summary: Update Hosts