awestruct 0.6.0.alpha1 → 0.6.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6c6be05537489d0dde74527315af3f2490df09a9
4
- data.tar.gz: ac53c8b5c359f8214743bddab97e0af09fbe13da
2
+ SHA256:
3
+ metadata.gz: f4d8fb9e5ada0854f2b36987d7d5c7e7f65aefb977efb17ce6d94a964d3449b9
4
+ data.tar.gz: 818e50d79bad2d65fb9927c54dfb86c27fb1d0ddd2eaafc233c7b758ea48076a
5
5
  SHA512:
6
- metadata.gz: 3aef7394e9c084710473ad3537f3ce9b0211e9defa04174341d4c14010c1a71bd1ece132c28516a0e8bc09e88aa53778d46a200c9782cd08e7b94b96bec3e6ed
7
- data.tar.gz: 36508eb8d76bf9c6c94306242ffe822affadebae953490d683241595946c48e152899084405fcbed6efa8034f12f270c8ebd8b468e664b20680ad2b5401df439
6
+ metadata.gz: 7eac386ac58acc6316f0e037393a818f9e8b186d0720539931ead71c8d95ed7a972d7b9c166604b7b8d0484c2f46dc11e0cf20ec64e009ab9372e626a514d46f
7
+ data.tar.gz: 14fb03bd96ef61cb1cdecc3e7450fc4a3bebaac21d2cea92190607e7e00bf44edefd55fe08163d26e5bac36eac81bc9081abfc7058fca29d6e34faf29a519348
@@ -4,7 +4,7 @@ require 'awestruct/version'
4
4
  spec = Gem::Specification.new do |s|
5
5
  s.name = 'awestruct'
6
6
  s.version = Awestruct::VERSION
7
- s.date = '2018-03-24'
7
+ s.date = '2019-08-19'
8
8
 
9
9
  s.authors = ['Bob McWhirter', 'Jason Porter', 'Lance Ball', 'Dan Allen', 'Torsten Curdt', 'other contributors']
10
10
  s.email = ['bob@mcwhirter.org', 'lightguard.jp@gmail.com', 'lball@redhat.com', 'dan.j.allen@gmail.com', 'tcurdt@vafer.org']
@@ -23,7 +23,7 @@ spec = Gem::Specification.new do |s|
23
23
  s.rdoc_options = ['--charset=UTF-8']
24
24
  s.extra_rdoc_files = 'README.md'
25
25
 
26
- s.files = `git ls-files -z -- {lib,man,spec}/* {README,LICENSE}* *{.gemspec,file}`.split("\0")
26
+ s.files = `git ls-files -z -- lib/* man/* spec/* README* LICENSE* *.gemspec *file`.split("\0")
27
27
  s.test_files = s.files.select { |path| path =~ /^spec\/.*_spec\.rb/ }
28
28
  s.executables = `git ls-files -z -- bin/*`.split("\0").map {|f| File.basename f }
29
29
  s.require_paths = ['lib']
@@ -435,6 +435,7 @@ module Awestruct
435
435
  end
436
436
  rescue Exception => e
437
437
  Awestruct::ExceptionHelper.log_building_error e, page.relative_source_path
438
+ return Awestruct::ExceptionHelper::EXITCODES[:generation_error]
438
439
  ensure
439
440
  return Awestruct::ExceptionHelper::EXITCODES[:generation_error] if c.include? 'Backtrace:'
440
441
  end
@@ -1,3 +1,3 @@
1
1
  module Awestruct
2
- VERSION = '0.6.0.alpha1'
2
+ VERSION = '0.6.0.alpha3'
3
3
  end
@@ -217,6 +217,34 @@ describe Awestruct::Engine do
217
217
  end
218
218
  end
219
219
 
220
+ it "should exit unsuccessfully if page syntax is invalid, using threads" do
221
+ output_dir = Dir.mktmpdir 'engine-generate-with-errors'
222
+
223
+ begin
224
+ Logging.init :trace, :debug, :verbose, :info, :warn, :error, :fatal
225
+ $LOG = Logging.logger.new 'awestruct'
226
+ $LOG.add_appenders(
227
+ Logging.appenders.string_io({level: :info, layout: Logging.layouts.pattern(pattern: "%m\n"),
228
+ color_scheme: :default})
229
+ )
230
+ $LOG.level = :debug
231
+
232
+ opts = Awestruct::CLI::Options.new
233
+ opts.source_dir = test_data_dir 'engine-generate-syntax-errors'
234
+ opts.output_dir = output_dir
235
+ config = Awestruct::Config.new( opts )
236
+ engine = Awestruct::Engine.new(config)
237
+ begin
238
+ engine.run('development', 'http://localhost:4242', 'http://localhost:4242')
239
+ fail('Expected generation error')
240
+ rescue SystemExit => e
241
+ e.status.should eql Awestruct::ExceptionHelper::EXITCODES[:generation_error]
242
+ end
243
+ ensure
244
+ FileUtils.remove_entry_secure output_dir, true
245
+ end
246
+ end
247
+
220
248
  it "should exit unsuccessfully if generate page output fails, using processes" do
221
249
  output_dir = Dir.mktmpdir 'engine-generate-with-errors'
222
250
 
@@ -0,0 +1,26 @@
1
+ profiles:
2
+ development:
3
+ show_drafts: false
4
+ cook: microwave
5
+ base_url: http://localhost:4242
6
+ production:
7
+ show_drafts: true
8
+ cook: oven
9
+ asciidoctor:
10
+ :eruby: erb
11
+ :attributes:
12
+ imagesdir: /img
13
+ staging:
14
+ compass_line_comments: off
15
+ compass_output_style: :compact
16
+ base_url: http://stage.example.com
17
+
18
+ title: Awestruction!
19
+ intl_name: Internéšnl
20
+
21
+ asciidoctor:
22
+ :safe: 0
23
+ :eruby: erubis
24
+ :attributes:
25
+ imagesdir: /assets/images
26
+ idprefix: ''
@@ -0,0 +1,8 @@
1
+ require 'awestruct/extensions/pipeline'
2
+
3
+ Awestruct::Extensions::Pipeline.new do
4
+ # extension Awestruct::Extensions::Posts.new '/news'
5
+ # extension Awestruct::Extensions::Indexifier.new
6
+ # Indexifier *must* come before Atomizer
7
+ # extension Awestruct::Extensions::Atomizer.new :posts, '/feed.atom'
8
+ end
@@ -0,0 +1,6 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title Hello
5
+ body
6
+ = content
@@ -0,0 +1,7 @@
1
+ ---
2
+ layout: base
3
+ ---
4
+ p#intentional-syntax-error
5
+ - if 2 > 4:
6
+ = 'hi'
7
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awestruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.alpha1
4
+ version: 0.6.0.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob McWhirter
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-03-24 00:00:00.000000000 Z
16
+ date: 2019-08-19 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: haml
@@ -511,6 +511,10 @@ files:
511
511
  - spec/support/test-data/engine-generate-no-errors/_ext/pipeline.rb
512
512
  - spec/support/test-data/engine-generate-no-errors/_layouts/base.html.slim
513
513
  - spec/support/test-data/engine-generate-no-errors/index.html.slim
514
+ - spec/support/test-data/engine-generate-syntax-errors/_config/site.yml
515
+ - spec/support/test-data/engine-generate-syntax-errors/_ext/pipeline.rb
516
+ - spec/support/test-data/engine-generate-syntax-errors/_layouts/base.html.slim
517
+ - spec/support/test-data/engine-generate-syntax-errors/index.html.slim
514
518
  - spec/support/test-data/engine-generate-with-errors/_config/site.yml
515
519
  - spec/support/test-data/engine-generate-with-errors/_ext/pipeline.rb
516
520
  - spec/support/test-data/engine-generate-with-errors/_layouts/base.html.slim
@@ -624,7 +628,7 @@ requirements:
624
628
  Haml and Markdown filters are touchy things. Redcarpet or Rdiscount work well if you're running on MRI. JRuby should be using haml 4.0.0+ with Kramdown.
625
629
  Compass and sass are no longer hard dependencies. You'll need too add them on your own should you want them. We also should be able to work with sassc.
626
630
  rubyforge_project: awestruct
627
- rubygems_version: 2.6.14.1
631
+ rubygems_version: 2.7.9
628
632
  signing_key:
629
633
  specification_version: 4
630
634
  summary: Static site baking and publishing tool