nanoc-oo 0.0.2 → 0.0.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.
@@ -1,3 +1,3 @@
1
1
  module NanocOO
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/nanoc-oo.rb CHANGED
@@ -18,7 +18,7 @@ module NanocOO
18
18
  end
19
19
 
20
20
  def delete_content dir
21
- rm_r File.join(dir,'content')
21
+ rm_r Dir.glob File.join(dir,'content','*')
22
22
  end
23
23
 
24
24
  extend self
data/spec/cli/all_spec.rb CHANGED
@@ -15,19 +15,20 @@ describe NanocOO do
15
15
  it 'creates site with nanoc' do
16
16
  `nanoc-oo #{site}`
17
17
  File.should exist join(site,'Rules')
18
- Dir[join(site,'content')].count.should > 0
18
+ content_files.count.should > 0
19
19
  end
20
20
 
21
21
  it 'creates site with nanoc (w/o cli)' do
22
22
  NanocOO.create_site site
23
23
  File.should exist join(site,'Rules')
24
- Dir[join(site,'content')].count.should > 0
24
+ content_files.count.should > 0
25
25
  end
26
26
 
27
27
  it 'creates site without content if --blank specified' do
28
28
  `nanoc-oo #{site} --blank`
29
29
  File.should exist join(site,'Rules')
30
- Dir[join(site,'content')].count.should == 0
30
+ content_files.count.should == 0
31
+ Dir.should exist join(site,'content')
31
32
  end
32
33
 
33
34
  describe 'created site' do
@@ -54,4 +55,7 @@ BEGIN{
54
55
  def read *a
55
56
  File.read *a
56
57
  end
58
+ def content_files
59
+ Dir[join(site,'content','*')]
60
+ end
57
61
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-oo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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: 2012-12-06 00:00:00.000000000 Z
12
+ date: 2012-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec