Skip to content

Commit

Permalink
Finish 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jan 14, 2018
2 parents 80d6c70 + 7d5ced5 commit 5c83570
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/spec.html
Gemfile.lock
/.rbx/
/.byebug_history
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
language: ruby
bundler_args: --without debug
script: "bundle exec rspec spec"
before_install: "gem update --system"

env:
- CI=true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- jruby-9
- rbx-3
cache: bundler
Expand Down
5 changes: 0 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,3 @@ end
group :debug do
gem "byebug", platform: :mri
end

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubinius', '~> 2.0'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ http://www.w3.org/2000/10/swap/grammar/n3.n3 (along with bnf-rules.n3) using cwm
* Create equivalent to `--think` to iterate on solutions.

## Dependencies
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 2.0)
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 3.0)

## Documentation
Full documentation available on [RubyDoc.info](http://rubydoc.info/github/ruby-rdf/rdf-n3/frames)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
3.0.0
2 changes: 2 additions & 0 deletions example-files/back-slash.nt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a> <b> "string with \\ char" .
<a> <b> "string with \\ char\n" .
2 changes: 1 addition & 1 deletion lib/rdf/n3/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def reset
# @return [String]
def quoted(string)
if string.to_s.match(/[\t\n\r]/)
string = string.gsub('\\', '\\\\').gsub('"""', '\\"""')
string = string.gsub('\\', '\\\\\\\\').gsub('"""', '\\"""')
%("""#{string}""")
else
"\"#{escaped(string)}\""
Expand Down
17 changes: 7 additions & 10 deletions rdf-n3.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = '>= 2.2.2'
gem.requirements = []

#gem.add_dependency 'rdf', '~> 2.0'
gem.add_runtime_dependency 'rdf', '>= 2.2', '< 4.0'
gem.add_dependency 'rdf', '~> 3.0'
gem.add_development_dependency 'open-uri-cached', '~> 0.0', '>= 0.0.5'
#gem.add_development_dependency 'json-ld', '~> 2.0'
gem.add_development_dependency 'json-ld', '>= 2.1', '< 4.0'
gem.add_development_dependency 'rspec', '~> 3.4'
#gem.add_development_dependency 'json-ld', '~> 3.0'
gem.add_development_dependency 'json-ld', '>= 2.2', '< 4.0'
gem.add_development_dependency 'rspec', '~> 3.7'
gem.add_development_dependency 'rspec-its', '~> 1.2'
#gem.add_development_dependency 'rdf-spec', '~> 2.0'
#gem.add_development_dependency 'rdf-isomorphic', '~> 2.0'
gem.add_development_dependency 'rdf-spec', '>= 2.2', '< 4.0'
gem.add_development_dependency 'rdf-isomorphic', '>= 2.0', '< 4.0'
gem.add_development_dependency 'yard' , '~> 0.8'
gem.add_development_dependency 'rdf-spec', '~> 3.0'
gem.add_development_dependency 'rdf-isomorphic', '~> 3.0'
gem.add_development_dependency 'yard' , '~> 0.9.12'

gem.post_install_message = nil
end
Expand Down
2 changes: 0 additions & 2 deletions script/parse
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ require "bundler/setup"
require 'logger'
require 'rdf/n3'
require 'rdf/ntriples'
require 'rdf/rdfxml'
require 'rdf/rdfa'
require 'getoptlong'
require 'open-uri'

Expand Down
11 changes: 11 additions & 0 deletions spec/writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,17 @@
n3 = %(:a :b """string with " escaped quote marks""" .)
serialize(n3, nil, [/string with \\" escaped quote mark/])
end

it "encodes embedded \\" do
n3 = %(:a :b """string with \\\\ escaped quote marks""" .)
serialize(n3, nil, [/string with \\\\ escaped quote mark/])
end

it "encodes embedded \\ multi-line" do
n3 = %(:a :b """string with \\\\ escaped quote marks
""" .)
serialize(n3, nil, [/string with \\\\ escaped quote mark/])
end
end

describe "with language" do
Expand Down

0 comments on commit 5c83570

Please sign in to comment.