nanoc 4.1.0b1 → 4.1.0rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -115,6 +115,27 @@ class Nanoc::Int::ItemRepTest < Nanoc::TestCase
115
115
  assert_equal 'pre!', rep.compiled_content(snapshot: :pre)
116
116
  end
117
117
 
118
+ def test_compiled_content_with_multiple_pre_snapshots
119
+ # Create rep
120
+ item = Nanoc::Int::Item.new(
121
+ 'blah blah', {}, '/'
122
+ )
123
+ rep = Nanoc::Int::ItemRep.new(item, nil)
124
+ rep.expects(:compiled?).returns(false)
125
+ rep.snapshot_defs = [
126
+ Nanoc::Int::SnapshotDef.new(:pre, false),
127
+ Nanoc::Int::SnapshotDef.new(:pre, true),
128
+ ]
129
+ rep.snapshot_contents = {
130
+ pre: Nanoc::Int::TextualContent.new('pre!'),
131
+ post: Nanoc::Int::TextualContent.new('post!'),
132
+ last: Nanoc::Int::TextualContent.new('last!'),
133
+ }
134
+
135
+ # Check
136
+ assert_equal 'pre!', rep.compiled_content(snapshot: :pre)
137
+ end
138
+
118
139
  def test_access_compiled_content_of_binary_item
119
140
  content = Nanoc::Int::BinaryContent.new(File.expand_path('content/somefile.dat'))
120
141
  item = Nanoc::Int::Item.new(content, {}, '/somefile/')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0b1
4
+ version: 4.1.0rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2015-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -250,6 +250,7 @@ files:
250
250
  - lib/nanoc/rule_dsl/rules_loader.rb
251
251
  - lib/nanoc/version.rb
252
252
  - nanoc.gemspec
253
+ - tags
253
254
  - tasks/doc.rake
254
255
  - tasks/rubocop.rake
255
256
  - tasks/test.rake
@@ -375,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
376
  version: 1.3.1
376
377
  requirements: []
377
378
  rubyforge_project:
378
- rubygems_version: 2.5.1
379
+ rubygems_version: 2.4.5.1
379
380
  signing_key:
380
381
  specification_version: 4
381
382
  summary: A static-site generator with a focus on flexibility.