Skip to content

Commit 5484aad

Browse files
committed
Finish 2.2.9
2 parents d7add8d + 4bfba4b commit 5484aad

10 files changed

Lines changed: 26 additions & 15 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ follows:
360360
* <http://rubydoc.info/github/ruby-rdf/rdf/frames>
361361
* <http://github.com/ruby-rdf/rdf>
362362
* <http://rubygems.org/gems/rdf>
363-
* <http://rubyforge.org/projects/rdf/>
364363
* <http://raa.ruby-lang.org/project/rdf/>
365364
* <http://www.ohloh.net/p/rdf>
366365

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.8
1+
2.2.9

etc/doap.nq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <http://ar.to/#self> .
3232
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <http://bhuga.net/#ben> .
3333
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#documenter> <http://greggkellogg.net/foaf#me> .
34-
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <http://rubyforge.org/projects/rdf/> .
34+
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <http://rubygems.org/gems/rdf/> .
3535
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid1 .
3636
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid2 .
3737
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#helper> _:genid3 .

etc/doap.nt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/rdf11-concepts/> .
1212
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-quads/> .
1313
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#implements> <http://www.w3.org/TR/n-triples/> .
14-
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <http://rubyforge.org/projects/rdf/> .
14+
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#download-page> <http://rubygems.org/gems/rdf/> .
1515
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#bug-database> <http://github.com/ruby-rdf/rdf/issues> .
1616
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <http://ar.to/> .
1717
<http://rubygems.org/gems/rdf> <http://usefulinc.com/ns/doap#blog> <http://blog.datagraph.org/> .

etc/doap.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
doap:implements <http://www.w3.org/TR/rdf11-concepts/>,
1919
<http://www.w3.org/TR/n-quads/>,
2020
<http://www.w3.org/TR/n-triples/> ;
21-
doap:download-page <http://rubyforge.org/projects/rdf/> ;
21+
doap:download-page <http://rubygems.org/gems/rdf/> ;
2222
doap:bug-database <http://github.com/ruby-rdf/rdf/issues> ;
2323
doap:blog <http://ar.to/>, <http://blog.datagraph.org/> ;
2424
doap:vendor <http://datagraph.org/> ;

lib/rdf/cli.rb

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ def initialize(symbol: nil, on: nil, datatype: nil, control: nil,
124124
@symbol, @on, @datatype, @control, @description, @use, @callback = symbol.to_sym, Array(on), datatype, control, description, use, block
125125
end
126126

127-
def call(arg, options)
127+
def call(arg, options = {})
128128
if @callback
129129
case @callback.arity
130+
when 0 then @callback.call
130131
when 1 then @callback.call(arg)
131132
when 2 then @callback.call(arg, options)
133+
else arg
132134
end
133135
else
134136
arg
@@ -305,7 +307,7 @@ def to_hash
305307
on_args = cli_opt.on || []
306308
on_args << cli_opt.description if cli_opt.description
307309
options.on(*on_args) do |opt_arg|
308-
options.options[cli_opt.symbol] = cli_opt.call(opt_arg)
310+
options.options[cli_opt.symbol] = cli_opt.call(opt_arg, options)
309311
end
310312
end if reader
311313
arg.downcase.to_sym
@@ -327,7 +329,7 @@ def to_hash
327329
on_args = cli_opt.on || []
328330
on_args << cli_opt.description if cli_opt.description
329331
options.on(*on_args) do |opt_arg|
330-
options.options[cli_opt.symbol] = cli_opt.call(opt_arg)
332+
options.options[cli_opt.symbol] = cli_opt.call(opt_arg, options)
331333
end
332334
end if writer
333335
arg.downcase.to_sym
@@ -358,7 +360,7 @@ def self.basename() File.basename($0) end
358360
# Returns discovered options
359361
def self.options(argv, format: nil)
360362
options = OptionParser.new
361-
cli_opts = OPTIONS.dup
363+
cli_opts = OPTIONS.map(&:dup)
362364
logger = Logger.new($stderr)
363365
logger.level = Logger::WARN
364366
logger.formatter = lambda {|severity, datetime, progname, msg| "#{severity} #{msg}\n"}
@@ -428,7 +430,7 @@ def self.options(argv, format: nil)
428430

429431
##
430432
# Output usage message
431-
def self.usage(options, cmd_opts = {}, banner: nil)
433+
def self.usage(options, cmd_opts: {}, banner: nil)
432434
options.banner = banner if banner
433435
$stdout.puts options
434436
$stdout.puts "Note: available commands and options may be different depending on selected --input-format and/or --output-format."
@@ -505,6 +507,17 @@ def self.exec(args, output: $stdout, option_parser: nil, messages: {}, **options
505507
COMMANDS[command.to_sym][:lambda].call(args, output: output, **options.merge(messages: messages))
506508
end
507509

510+
# Normalize messages
511+
messages.each do |kind, term_messages|
512+
case term_messages
513+
when Hash
514+
when Array
515+
messages[kind] = {result: term_messages}
516+
else
517+
messages[kind] = {result: [term_messages]}
518+
end
519+
end
520+
508521
if options[:statistics]
509522
options[:statistics][:reader] = @readers.first unless (@readers || []).empty?
510523
options[:statistics][:count] = @repository.count

lib/rdf/model/uri.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module RDF
2323
# @see http://en.wikipedia.org/wiki/Uniform_Resource_Identifier
2424
# @see http://www.ietf.org/rfc/rfc3986.txt
2525
# @see http://www.ietf.org/rfc/rfc3987.txt
26-
# @see http://addressable.rubyforge.org/
26+
# @see http://www.rubydoc.info/gems/addressable
2727
class URI
2828
include RDF::Resource
2929

lib/rdf/ntriples.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module RDF
1313
#
1414
# An example of an RDF statement in N-Triples format:
1515
#
16-
# <http://rubyforge.org/> <http://purl.org/dc/terms/title> "RubyForge" .
16+
# <http://rubygems.org/gems/rdf> <http://purl.org/dc/terms/title> "rdf" .
1717
#
1818
# Installation
1919
# ------------

lib/rdf/util/cache.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ module RDF; module Util
99
#
1010
# While this cache is something of an internal implementation detail of
1111
# RDF.rb, some external libraries do currently make use of it as well,
12-
# including [SPARQL](http://ruby-rdf/sparql/) and
13-
# [Spira](http://spira.rubyforge.org/). Do be sure to include any changes
12+
# including [SPARQL](http://github.com/ruby-rdf/sparql/) and
13+
# [Spira](http://github.com/ruby-rdf/spira). Do be sure to include any changes
1414
# here in the RDF.rb changelog.
1515
#
1616
# @see RDF::URI.intern

rdf.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Gem::Specification.new do |gem|
1010
gem.license = 'Unlicense'
1111
gem.summary = 'A Ruby library for working with Resource Description Framework (RDF) data.'
1212
gem.description = 'RDF.rb is a pure-Ruby library for working with Resource Description Framework (RDF) data.'
13-
gem.rubyforge_project = 'rdf'
1413

1514
gem.authors = ['Arto Bendiken', 'Ben Lavender', 'Gregg Kellogg']
1615
gem.email = 'public-rdf-ruby@w3.org'

0 commit comments

Comments
 (0)