summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-04-14 23:33:56 +0200
committerJakub Jirutka <jakub@jirutka.cz>2019-04-14 23:46:44 +0200
commitd10acf6d84b18ed2ad0afbf6a68d67d395dc1d9a (patch)
tree54e165eef1235a383e8e54cbdfe0d3a23980982e
parent3e6a31e9b0d0d6ed4daa44e8d6be000bbf508f77 (diff)
Update asciidoctor.js to 2.0.0
-rw-r--r--Gemfile6
-rw-r--r--README.adoc2
-rw-r--r--lib/asciidoctor/interdoc_reftext/resolver.rb11
-rw-r--r--package.json4
4 files changed, 8 insertions, 15 deletions
diff --git a/Gemfile b/Gemfile
index ea42769..3f76764 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,8 +10,10 @@ unless ENV.fetch('ASCIIDOCTOR_VERSION', '').empty?
end
group :development do
- # Keep in sync with version used for asciidoctor.js.
- gem 'opal', '~> 0.11.0'
+ # Keep in sync with version used in opal-node-runtime <- asciidoctor.js.
+ # TODO: Maybe replace with JS version after
+ # https://github.com/Mogztter/opal-node-compiler/issues/6 is resolved.
+ gem 'opal', github: 'opal/opal', ref: 'd136ea8'
end
group :ci do
diff --git a/README.adoc b/README.adoc
index a2d294c..70a4ac9 100644
--- a/README.adoc
+++ b/README.adoc
@@ -108,7 +108,7 @@ IMPORTANT: Bundler automatically _requires_ all the specified gems.
[source, js, subs="+attributes"]
----
// Load asciidoctor.js and {gem-name}.
-const asciidoctor = require('asciidoctor.js')()
+const asciidoctor = require('@asciidoctor/core')()
const interdocReftextExt = require('{gem-name}')
// See documentation at the end of this section.
diff --git a/lib/asciidoctor/interdoc_reftext/resolver.rb b/lib/asciidoctor/interdoc_reftext/resolver.rb
index cc32fd6..a5e6282 100644
--- a/lib/asciidoctor/interdoc_reftext/resolver.rb
+++ b/lib/asciidoctor/interdoc_reftext/resolver.rb
@@ -20,17 +20,8 @@ module Asciidoctor::InterdocReftext
logger ||= if defined? ::Asciidoctor::LoggerManager
::Asciidoctor::LoggerManager.logger
- elsif defined? ::Logger
- ::Logger.new(STDERR)
else
- # Fake logger for Opal.
- # TODO: Remove after update to Asciidoctor 1.5.7 or Opal with Logger.
- Object.new.tap do |o|
- # rubocop: disable MethodMissing
- def o.method_missing(_, *args)
- STDERR.puts(*args)
- end
- end
+ ::Logger.new(STDERR)
end
@document = document
diff --git a/package.json b/package.json
index a56e6e2..0dde9c4 100644
--- a/package.json
+++ b/package.json
@@ -28,9 +28,9 @@
"prepublishOnly": "bundle install && bundle exec rake build:js"
},
"devDependencies": {
- "asciidoctor.js": "~1.5.6"
+ "@asciidoctor/core": "~2.0.0"
},
"peerDependencies": {
- "asciidoctor.js": "~1.5.6"
+ "@asciidoctor/core": "~2.0.0"
}
}