vhost_writer 0.1.1 → 0.1.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.
data/README.md CHANGED
@@ -18,7 +18,7 @@ Automatically generate virtual host config files based on a directory of sites a
18
18
 
19
19
  ### Example
20
20
 
21
- vhost_writer write /srv/www/ /etc/apache2/sites-available/ /home/bok/template.erb
21
+ $ vhost_writer write /srv/www/ /etc/apache2/sites-available/ /home/bok/template.erb
22
22
 
23
23
  ### Template Example
24
24
 
@@ -8,7 +8,7 @@ module VhostWriter
8
8
  CONFIG_DIRECTORY using TEMPLATE'
9
9
  def write(sites_dir, conf_dir, template)
10
10
  writer = VhostWriter::Writer.new :sites_dir => sites_dir, :conf_dir => conf_dir
11
- writer.write_configs_using File.read template
11
+ writer.write_configs! File.read template
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module VhostWriter
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -27,7 +27,7 @@ module VhostWriter
27
27
  Writer.new :conf_dir => @conf_dir, :sites => site_whitelist - (@sites - site_whitelist)
28
28
  end
29
29
 
30
- def write_configs_using(template)
30
+ def write_configs!(template)
31
31
  @sites.each do |site|
32
32
  File.open("#{@conf_dir}#{site}", 'w') do |f|
33
33
  f.write ERB.new(template).result(binding)
File without changes
data/spec/writer_spec.rb CHANGED
@@ -59,8 +59,8 @@ describe VhostWriter::Writer do
59
59
  end
60
60
  end
61
61
 
62
- describe '#write_configs_using' do
63
- before { writer.write_configs_using template }
62
+ describe '#write_configs!' do
63
+ before { writer.write_configs! template }
64
64
  let(:results_dir_contents) { Dir.glob('spec/test/sites-available/*').map { |f| File.basename f } }
65
65
 
66
66
  it 'should write config files' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vhost_writer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-26 00:00:00.000000000 Z
12
+ date: 2014-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -65,6 +65,7 @@ files:
65
65
  - spec/cli_spec.rb
66
66
  - spec/spec_helper.rb
67
67
  - spec/test/expected/example.com
68
+ - spec/test/sites-available/.keep
68
69
  - spec/test/templates/template.erb
69
70
  - spec/test/www/example.com/.keep
70
71
  - spec/test/www/example.org/.keep
@@ -100,6 +101,7 @@ test_files:
100
101
  - spec/cli_spec.rb
101
102
  - spec/spec_helper.rb
102
103
  - spec/test/expected/example.com
104
+ - spec/test/sites-available/.keep
103
105
  - spec/test/templates/template.erb
104
106
  - spec/test/www/example.com/.keep
105
107
  - spec/test/www/example.org/.keep