nanoc 4.7.14 → 4.8.0

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
2
  SHA1:
3
- metadata.gz: 95f87711482fb7881b63a2a4d0a7fca8fecede30
4
- data.tar.gz: 6d5b0673fa14f07f4081cc473e24bdd0d558b481
3
+ metadata.gz: ab3b0e2a49c31a0e5209b914287d56489eb2e119
4
+ data.tar.gz: 63ed26c7176937deef06fc01a2c7a831983b96ff
5
5
  SHA512:
6
- metadata.gz: 1ea685c54608f0c56af24542324c2cc2f3a4c7f84718c22d3abfde40288695290b45c83106283570be844b5183b12ca82c9a9239fefe34c47b8e73d9414755ad
7
- data.tar.gz: cd48b21ea8577192f94e990a462d5237a81ea8a54bf3e60012e8552c69344b43abedafe5d70824d7f3732e95b7963542d59b55a2c331cb1df3e137475d6f89a5
6
+ metadata.gz: 7294e06953f7be8c6331578429f229b3ff6ca06ba1ac9339de20eb77788f60f45dc5310ee9e212f2d0d375171cbd9b7ad86950d5f57bdbd4c4b84a2fc1ffd569
7
+ data.tar.gz: 7dd6820592b64f3e1a84fb655d2e6682d094752c80ac9133bb59aea639379a930d1a72388b9c4038fd414d90fed44058ed1d59f2b61a60bf47304620aa213405
data/Gemfile CHANGED
@@ -32,6 +32,7 @@ end
32
32
 
33
33
  group :plugins do
34
34
  gem 'adsf'
35
+ gem 'asciidoctor'
35
36
  gem 'bluecloth', platforms: :ruby
36
37
  gem 'builder'
37
38
  gem 'coderay'
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.8.0 (2017-07-17)
4
+
5
+ Featured:
6
+
7
+ * Added `asciidoctor` filter (#1199)
8
+
3
9
  ## 4.7.14 (2017-07-16)
4
10
 
5
11
  Enhancements:
@@ -90,5 +90,3 @@ module Nanoc
90
90
  end
91
91
  end
92
92
  end
93
-
94
- Nanoc::Feature.define('profiler', version: '4.7')
@@ -5,14 +5,12 @@ summary 'compile items of this site'
5
5
  description <<~EOS
6
6
  Compile all items of the current site.
7
7
  EOS
8
- flag nil, :profile, 'profile compilation' if Nanoc::Feature.enabled?(Nanoc::Feature::PROFILER)
9
8
  flag nil, :diff, 'generate diff'
10
9
 
11
10
  require_relative 'compile_listeners/abstract'
12
11
  require_relative 'compile_listeners/debug_printer'
13
12
  require_relative 'compile_listeners/diff_generator'
14
13
  require_relative 'compile_listeners/file_action_printer'
15
- require_relative 'compile_listeners/stack_prof_profiler'
16
14
  require_relative 'compile_listeners/timing_recorder'
17
15
 
18
16
  module Nanoc::CLI::Commands
@@ -43,7 +41,6 @@ module Nanoc::CLI::Commands
43
41
 
44
42
  def default_listener_classes
45
43
  [
46
- Nanoc::CLI::Commands::CompileListeners::StackProfProfiler,
47
44
  Nanoc::CLI::Commands::CompileListeners::DiffGenerator,
48
45
  Nanoc::CLI::Commands::CompileListeners::DebugPrinter,
49
46
  Nanoc::CLI::Commands::CompileListeners::TimingRecorder,
data/lib/nanoc/filters.rb CHANGED
@@ -5,6 +5,7 @@ module Nanoc::Filters
5
5
  end
6
6
 
7
7
  require_relative 'filters/asciidoc'
8
+ require_relative 'filters/asciidoctor'
8
9
  require_relative 'filters/bluecloth'
9
10
  require_relative 'filters/colorize_syntax'
10
11
  require_relative 'filters/coffeescript'
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nanoc::Filters
4
+ class Asciidoctor < Nanoc::Filter
5
+ identifier :asciidoctor
6
+
7
+ requires 'asciidoctor'
8
+
9
+ def run(content, params = {})
10
+ ::Asciidoctor.render(content, params)
11
+ end
12
+ end
13
+ end
data/lib/nanoc/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Nanoc
4
4
  # The current Nanoc version.
5
- VERSION = '4.7.14'
5
+ VERSION = '4.8.0'
6
6
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe Nanoc::Filters::Asciidoctor do
4
+ subject { filter.setup_and_run(input, params) }
5
+
6
+ let(:filter) { described_class.new }
7
+
8
+ let(:input) { '== Blah blah' }
9
+ let(:params) { {} }
10
+
11
+ it { is_expected.to match(%r{<h2 id="_blah_blah">Blah blah</h2>}) }
12
+ end
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.7.14
4
+ version: 4.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-16 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri
@@ -281,7 +281,6 @@ files:
281
281
  - lib/nanoc/cli/commands/compile_listeners/debug_printer.rb
282
282
  - lib/nanoc/cli/commands/compile_listeners/diff_generator.rb
283
283
  - lib/nanoc/cli/commands/compile_listeners/file_action_printer.rb
284
- - lib/nanoc/cli/commands/compile_listeners/stack_prof_profiler.rb
285
284
  - lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb
286
285
  - lib/nanoc/cli/commands/create-site.rb
287
286
  - lib/nanoc/cli/commands/deploy.rb
@@ -318,6 +317,7 @@ files:
318
317
  - lib/nanoc/extra/piper.rb
319
318
  - lib/nanoc/filters.rb
320
319
  - lib/nanoc/filters/asciidoc.rb
320
+ - lib/nanoc/filters/asciidoctor.rb
321
321
  - lib/nanoc/filters/bluecloth.rb
322
322
  - lib/nanoc/filters/coffeescript.rb
323
323
  - lib/nanoc/filters/colorize_syntax.rb
@@ -468,6 +468,7 @@ files:
468
468
  - spec/nanoc/deploying/fog_spec.rb
469
469
  - spec/nanoc/deploying/git_spec.rb
470
470
  - spec/nanoc/extra/parallel_collection_spec.rb
471
+ - spec/nanoc/filters/asciidoctor_spec.rb
471
472
  - spec/nanoc/filters/colorize_syntax/rouge_spec.rb
472
473
  - spec/nanoc/filters/less_spec.rb
473
474
  - spec/nanoc/helpers/blogging_spec.rb
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Nanoc::CLI::Commands::CompileListeners
4
- class StackProfProfiler < Abstract
5
- PROFILE_FILE = 'tmp/stackprof_profile'
6
-
7
- # @see Listener#enable_for?
8
- def self.enable_for?(command_runner)
9
- command_runner.options.fetch(:profile, false)
10
- end
11
-
12
- # @see Listener#start
13
- def start
14
- require 'stackprof'
15
- StackProf.start(mode: :cpu)
16
- end
17
-
18
- # @see Listener#stop
19
- def stop
20
- StackProf.stop
21
- StackProf.results(PROFILE_FILE)
22
- end
23
- end
24
- end