Skip to content

Commit

Permalink
Finish 3.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed May 2, 2023
2 parents 0786a2e + c34c461 commit 570aaf5
Show file tree
Hide file tree
Showing 57 changed files with 10,658 additions and 31,210 deletions.
50 changes: 50 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,50 @@
---
require:
- rubocop-performance
- rubocop-rspec

AllCops:
DisplayCopNames: true
NewCops: enable
TargetRubyVersion: 2.6

Layout/ArgumentAlignment:
# https://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Layout/ArgumentAlignment
EnforcedStyle: with_fixed_indentation
Layout/CaseIndentation:
EnforcedStyle: end
Layout/EndAlignment:
# https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Layout/EndAlignment
EnforcedStyleAlignWith: variable
Layout/FirstArgumentIndentation:
# https://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Layout/FirstArgumentIndentation
Enabled: false
Layout/HashAlignment:
EnforcedLastArgumentHashStyle: ignore_implicit
Layout/LineLength:
Max: 120
Layout/MultilineMethodCallIndentation:
# https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Layout/MultilineMethodCallIndentation
EnforcedStyle: indented
Lint/AmbiguousBlockAssociation:
AllowedMethods: ['change']

Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 20

Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/MutableConstant:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/StringConcatenation:
Enabled: false

73 changes: 39 additions & 34 deletions Gemfile
@@ -1,48 +1,53 @@
# frozen_string_literal: true

source "https://rubygems.org"
gem "nokogiri", '~> 1.13', '>= 1.13.4'
gem "nokogiri", '~> 1.13', '>= 1.13.4'

gemspec
gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"
gem 'json-canonicalization',git: "https://github.com/dryruby/json-canonicalization",branch: "develop"
gem 'json-canonicalization', git: "https://github.com/dryruby/json-canonicalization", branch: "develop"
gem 'rdf', git: "https://github.com/ruby-rdf/rdf", branch: "develop"

group :development do
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
gem 'json-ld-preloaded', github: "ruby-rdf/json-ld-preloaded", branch: "develop"
gem 'ld-patch', github: "ruby-rdf/ld-patch", branch: "develop"
gem 'linkeddata', git: "https://github.com/ruby-rdf/linkeddata", branch: "develop"
gem 'rack-linkeddata', git: "https://github.com/ruby-rdf/rack-linkeddata", branch: "develop"
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
gem 'rdf-isomorphic', git: "https://github.com/ruby-rdf/rdf-isomorphic", branch: "develop"
gem 'rdf-json', github: "ruby-rdf/rdf-json", branch: "develop"
gem 'rdf-microdata', git: "https://github.com/ruby-rdf/rdf-microdata", branch: "develop"
gem 'rdf-n3', github: "ruby-rdf/rdf-n3", branch: "develop"
gem 'rdf-normalize', github: "ruby-rdf/rdf-normalize", branch: "develop"
gem 'rdf-rdfa', git: "https://github.com/ruby-rdf/rdf-rdfa", branch: "develop"
gem 'rdf-rdfxml', git: "https://github.com/ruby-rdf/rdf-rdfxml", branch: "develop"
gem 'rdf-reasoner', github: "ruby-rdf/rdf-reasoner", branch: "develop"
gem 'rdf-spec', git: "https://github.com/ruby-rdf/rdf-spec", branch: "develop"
gem 'rdf-tabular', github: "ruby-rdf/rdf-tabular", branch: "develop"
gem 'rdf-trig', git: "https://github.com/ruby-rdf/rdf-trig", branch: "develop"
gem 'rdf-trix', github: "ruby-rdf/rdf-trix", branch: "develop"
gem 'rdf-turtle', git: "https://github.com/ruby-rdf/rdf-turtle", branch: "develop"
gem 'rdf-vocab', git: "https://github.com/ruby-rdf/rdf-vocab", branch: "develop"
gem 'rdf-xsd', git: "https://github.com/ruby-rdf/rdf-xsd", branch: "develop"
gem 'sinatra-linkeddata', git: "https://github.com/ruby-rdf/sinatra-linkeddata", branch: "develop"
gem 'shex', github: "ruby-rdf/shex", branch: "develop"
gem 'sparql', git: "https://github.com/ruby-rdf/sparql", branch: "develop"
gem 'sparql-client', git: "https://github.com/ruby-rdf/sparql-client", branch: "develop"
gem 'sxp', git: "https://github.com/dryruby/sxp.rb", branch: "develop"
gem 'fasterer'
gem 'earl-report'
gem 'ruby-prof', platforms: :mri
gem 'ebnf', git: "https://github.com/dryruby/ebnf", branch: "develop"
gem 'fasterer'
gem 'json-ld-preloaded', github: "ruby-rdf/json-ld-preloaded", branch: "develop"
gem 'ld-patch', github: "ruby-rdf/ld-patch", branch: "develop"
gem 'linkeddata', git: "https://github.com/ruby-rdf/linkeddata", branch: "develop"
gem 'rack-linkeddata', git: "https://github.com/ruby-rdf/rack-linkeddata", branch: "develop"
gem 'rdf-aggregate-repo', git: "https://github.com/ruby-rdf/rdf-aggregate-repo", branch: "develop"
gem 'rdf-isomorphic', git: "https://github.com/ruby-rdf/rdf-isomorphic", branch: "develop"
gem 'rdf-json', github: "ruby-rdf/rdf-json", branch: "develop"
gem 'rdf-microdata', git: "https://github.com/ruby-rdf/rdf-microdata", branch: "develop"
gem 'rdf-n3', github: "ruby-rdf/rdf-n3", branch: "develop"
gem 'rdf-normalize', github: "ruby-rdf/rdf-normalize", branch: "develop"
gem 'rdf-rdfa', git: "https://github.com/ruby-rdf/rdf-rdfa", branch: "develop"
gem 'rdf-rdfxml', git: "https://github.com/ruby-rdf/rdf-rdfxml", branch: "develop"
gem 'rdf-reasoner', github: "ruby-rdf/rdf-reasoner", branch: "develop"
gem 'rdf-spec', git: "https://github.com/ruby-rdf/rdf-spec", branch: "develop"
gem 'rdf-tabular', github: "ruby-rdf/rdf-tabular", branch: "develop"
gem 'rdf-trig', git: "https://github.com/ruby-rdf/rdf-trig", branch: "develop"
gem 'rdf-trix', github: "ruby-rdf/rdf-trix", branch: "develop"
gem 'rdf-turtle', git: "https://github.com/ruby-rdf/rdf-turtle", branch: "develop"
gem 'rdf-vocab', git: "https://github.com/ruby-rdf/rdf-vocab", branch: "develop"
gem 'rdf-xsd', git: "https://github.com/ruby-rdf/rdf-xsd", branch: "develop"
gem 'ruby-prof', platforms: :mri
gem 'shex', github: "ruby-rdf/shex", branch: "develop"
gem 'sinatra-linkeddata', git: "https://github.com/ruby-rdf/sinatra-linkeddata", branch: "develop"
gem 'sparql', git: "https://github.com/ruby-rdf/sparql", branch: "develop"
gem 'sparql-client', git: "https://github.com/ruby-rdf/sparql-client", branch: "develop"
gem 'sxp', git: "https://github.com/dryruby/sxp.rb", branch: "develop"
end

group :development, :test do
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
gem 'psych', platforms: [:mri, :rbx]
gem 'benchmark-ips'
gem 'psych', platforms: %i[mri rbx]
gem 'rake'
gem 'rubocop'
gem 'rubocop-performance'
gem 'rubocop-rspec'
gem 'simplecov', '~> 0.21', platforms: :mri
gem 'simplecov-lcov', '~> 0.8', platforms: :mri
end

group :debug do
Expand Down
71 changes: 39 additions & 32 deletions Rakefile
@@ -1,6 +1,8 @@
# frozen_string_literal: true

require 'rubygems'

task default: [ :spec ]
task default: [:spec]

namespace :gem do
desc "Build the json-ld-#{File.read('VERSION').chomp}.gem file"
Expand All @@ -17,18 +19,18 @@ end
require 'rspec/core/rake_task'
desc 'Run specifications'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = %w(--options spec/spec.opts) if File.exists?('spec/spec.opts')
spec.rspec_opts = %w[--options spec/spec.opts] if File.exist?('spec/spec.opts')
end

desc "Generate schema.org context"
task :schema_context do
%x(
`
script/gen_context https://schema.org/docs/schema_org_rdfa.html \
--vocab http://schema.org/ \
--prefix 'schema http://schema.org/' \
--body --hier \
--o etc/schema.org.jsonld
)
`
end

desc "Create concatenated test manifests"
Expand All @@ -37,68 +39,73 @@ file "etc/manifests.nt" do
require 'json/ld'
require 'rdf/ntriples'
graph = RDF::Graph.new do |g|
%w( https://w3c.github.io/json-ld-api/tests/compact-manifest.jsonld
%w[ https://w3c.github.io/json-ld-api/tests/compact-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/expand-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/flatten-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/fromRdf-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/html-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/remote-doc-manifest.jsonld
https://w3c.github.io/json-ld-api/tests/toRdf-manifest.jsonld
https://w3c.github.io/json-ld-framing/tests/frame-manifest.jsonld
).each do |man|
https://w3c.github.io/json-ld-framing/tests/frame-manifest.jsonld].each do |man|
puts "load #{man}"
g.load(man, unique_bnodes: true)
end
end
puts "write"
RDF::NTriples::Writer.open("etc/manifests.nt", unique_bnodes: true, validate: false) {|w| w << graph}
RDF::NTriples::Writer.open("etc/manifests.nt", unique_bnodes: true, validate: false) { |w| w << graph }
end

# Presentation building
namespace :presentation do
desc "Clean presentation files"
task :clean do
FileUtils.rm %w(compacted expanded framed).map {|f| "presentation/dbpedia/#{f}.jsonld"}
FileUtils.rm %w[compacted expanded framed].map { |f| "presentation/dbpedia/#{f}.jsonld" }
end

desc "Build presentation files"
task build: %w(
task build: %w[
presentation/dbpedia/expanded.jsonld
presentation/dbpedia/compacted.jsonld
presentation/dbpedia/framed.jsonld
)
]

desc "Build expanded example"
file "presentation/dbpedia/expanded.jsonld" => %w(
file "presentation/dbpedia/expanded.jsonld" => %w[
presentation/dbpedia/orig.jsonld
presentation/dbpedia/expanded-context.jsonld) do
system(%w(
script/parse
--expand presentation/dbpedia/orig.jsonld
--context presentation/dbpedia/expanded-context.jsonld
-o presentation/dbpedia/expanded.jsonld).join(" "))
presentation/dbpedia/expanded-context.jsonld
] do
system(%w[
script/parse
--expand presentation/dbpedia/orig.jsonld
--context presentation/dbpedia/expanded-context.jsonld
-o presentation/dbpedia/expanded.jsonld
].join(" "))
end

desc "Build compacted example"
file "presentation/dbpedia/compacted.jsonld" => %w(
file "presentation/dbpedia/compacted.jsonld" => %w[
presentation/dbpedia/expanded.jsonld
presentation/dbpedia/compact-context.jsonld) do
system(%w(
script/parse
--compact presentation/dbpedia/expanded.jsonld
--context presentation/dbpedia/compact-context.jsonld
-o presentation/dbpedia/compacted.jsonld).join(" "))
presentation/dbpedia/compact-context.jsonld
] do
system(%w[
script/parse
--compact presentation/dbpedia/expanded.jsonld
--context presentation/dbpedia/compact-context.jsonld
-o presentation/dbpedia/compacted.jsonld
].join(" "))
end

desc "Build framed example"
file "presentation/dbpedia/framed.jsonld" => %w(
file "presentation/dbpedia/framed.jsonld" => %w[
presentation/dbpedia/expanded.jsonld
presentation/dbpedia/frame.jsonld) do
system(%w(
script/parse
--frame presentation/dbpedia/frame.jsonld
presentation/dbpedia/expanded.jsonld
-o presentation/dbpedia/framed.jsonld).join(" "))
presentation/dbpedia/frame.jsonld
] do
system(%w[
script/parse
--frame presentation/dbpedia/frame.jsonld
presentation/dbpedia/expanded.jsonld
-o presentation/dbpedia/framed.jsonld
].join(" "))
end
end

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.2.4
3.2.5

0 comments on commit 570aaf5

Please sign in to comment.