Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Jul 3, 2024
1 parent f87016b commit 2951b5c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
17 changes: 5 additions & 12 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,13 @@ Or install it yourself as:

== Usage

=== Configuration

Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `RelatonBib.configure` block.
=== Create bibliographic item

[source,ruby]
----
require 'relaton_bib'
=> true
RelatonBib.configure do |config|
config.logger.level = Logger::DEBUG
end
----

=== Create bibliographic item

[source,ruby]
----
hash = YAML.load_file "spec/examples/bib_item.yml"
=> {"id"=>"ISOTC211",
"fetched"=>"2022-05-02",
Expand Down Expand Up @@ -304,6 +293,10 @@ item.to_bibxml
</reference>"
----

=== Logging

RelatonBib uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.

== Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down
1 change: 0 additions & 1 deletion lib/relaton_bib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require "htmlentities"
require "relaton_bib/version"
require "relaton_bib/deep_dup"
require "relaton_bib/config"
require "relaton_bib/util"
require "relaton_bib/localized_string"
require "relaton_bib/forename"
Expand Down
2 changes: 1 addition & 1 deletion lib/relaton_bib/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RelatonBib
VERSION = "1.18.5".freeze
VERSION = "1.19.0".freeze
end
2 changes: 1 addition & 1 deletion relaton-bib.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
spec.add_dependency "htmlentities"
spec.add_dependency "iso639"
spec.add_dependency "nokogiri", "~> 1.16"
spec.add_dependency "relaton-logger", "~> 0.1.0"
spec.add_dependency "relaton-logger", "~> 0.2.0"
end
7 changes: 0 additions & 7 deletions spec/relaton_bib/config_spec.rb

This file was deleted.

0 comments on commit 2951b5c

Please sign in to comment.