Permalink
Browse files

Port of rdf-portal to start Linter.

  • Loading branch information...
1 parent 479f575 commit 0187ea320f2dcbdf42807587087a6a4d2a24ee4f @gkellogg gkellogg committed Jun 30, 2011
View
@@ -0,0 +1,30 @@
+#!/usr/bin/env ruby -rubygems
+# -*- encoding: utf-8 -*-
+
+GEMSPEC = Gem::Specification.new do |gem|
+ gem.version = File.read('VERSION').chomp
+ gem.date = File.mtime('VERSION').strftime('%Y-%m-%d')
+
+ gem.name = 'linter'
+ gem.homepage = '--fixme--'
+# gem.license = 'Public Domain' if gem.respond_to?(:license=)
+ gem.summary = 'Extract and validate embedded RDF markup in HTML and other formats.'
+ gem.description = gem.summary
+
+ gem.authors = ['Gregg Kellogg', 'Stéphane Corlosquet']
+# gem.email = 'public-rdf-ruby@w3.org'
+
+ gem.platform = Gem::Platform::RUBY
+ gem.files = %w(AUTHORS README.md VERSION) + Dir.glob('lib/**/*.rb')
+ gem.require_paths = %w(lib)
+ gem.has_rdoc = false
+
+ gem.required_ruby_version = '>= 1.8.7'
+ gem.requirements = []
+ gem.add_runtime_dependency 'sinatra', '>= 1.2.1'
+ gem.add_runtime_dependency 'sinatra-linkeddata', '>= 0.3.1'
+ gem.add_runtime_dependency 'erubis', '>= 2.6.6'
+ gem.add_development_dependency 'yard' , '>= 0.6.7'
+ gem.add_development_dependency 'shotgun', '>= 0.9'
+ gem.post_install_message = nil
+end
View
@@ -0,0 +1,9 @@
+--title "RDF Linter"
+--output-dir doc/yard
+--protected
+--no-private
+--hide-void-return
+--markup markdown
+--readme README.md
+-
+VERSION
View
26 Gemfile
@@ -0,0 +1,26 @@
+source 'http://rubygems.org'
+
+# Include non-released gems first
+gem 'addressable', '2.2.4'
+gem 'rdf', :git => "git://github.com/gkellogg/rdf.git", :branch => "type-check-mixin"
+gem 'linkeddata', :git => "git://github.com/gkellogg/linkeddata.git", :branch => "0.4.x"
+gem 'rack-linkeddata', :git => "git://github.com/gkellogg/rack-linkeddata.git", :branch => "0.4.x", :require => "rack/linkeddata"
+gem 'rdf-json', :git => "git://github.com/gkellogg/rdf-json.git", :branch => "0.4.x", :require => 'rdf/json'
+gem 'rdf-trix', :git => "git://github.com/gkellogg/rdf-trix.git", :branch => "0.4.x", :require => 'rdf/trix'
+gem 'rdf-microdata', '>= 0.1.0', :require => "rdf/microdata"
+gem 'rdf-n3', '>= 0.3.3', :require => "rdf/n3"
+gem 'rdf-rdfa', '>= 0.3.3', :require => "rdf/rdfa"
+gem 'rdf-rdfxml', '>= 0.3.3', :require => "rdf/rdfxml"
+gem 'json-ld', '>= 0.0.4', :require => 'json/ld'
+
+gem 'sinatra', '>= 1.2.1'
+gem 'sinatra-linkeddata', :git => "git://github.com/gkellogg/sinatra-linkeddata.git", :branch => "0.4.x", :require => "sinatra/linkeddata"
+gem 'erubis', '>= 2.6.6'
+gem 'haml', '>= 3.0.0'
+
+# Bundle gems for the local environment. Make sure to
+# put test-only gems in this group so their generators
+# and rake tasks are available in development mode:
+group :development, :test do
+ gem 'shotgun'
+end
View
@@ -0,0 +1,115 @@
+GIT
+ remote: git://github.com/gkellogg/linkeddata.git
+ revision: 79e2d7e36585594a2d3c13af1af1e4a9046e22ca
+ branch: 0.4.x
+ specs:
+ linkeddata (0.3.2)
+ rdf (>= 0.3.3)
+ rdf-isomorphic (>= 0.3.1)
+ rdf-json (>= 0.3.1)
+ rdf-n3 (>= 0.3.3)
+ rdf-rdfa (>= 0.3.3)
+ rdf-rdfxml (>= 0.3.3)
+ rdf-trix (>= 0.3.1)
+
+GIT
+ remote: git://github.com/gkellogg/rack-linkeddata.git
+ revision: ca319da881c3bbb73d7dfdad0ec3af6aa08059f0
+ branch: 0.4.x
+ specs:
+ rack-linkeddata (0.3.1)
+ linkeddata (~> 0.3.2)
+ rack (>= 1.0)
+
+GIT
+ remote: git://github.com/gkellogg/rdf-json.git
+ revision: 0a4decbe783d601eff5de426a4a8cf218209a132
+ branch: 0.4.x
+ specs:
+ rdf-json (0.3.1)
+ json_pure (>= 1.5.1)
+ rdf (>= 0.3.3)
+
+GIT
+ remote: git://github.com/gkellogg/rdf-trix.git
+ revision: 67f84af0657160dd8d1f0d974fd554d8f47ba65a
+ branch: 0.4.x
+ specs:
+ rdf-trix (0.3.1)
+ rdf (>= 0.3.3)
+
+GIT
+ remote: git://github.com/gkellogg/rdf.git
+ revision: f7bf3fbb7bf9dba939db1c7fbedb7930fa63ba80
+ branch: type-check-mixin
+ specs:
+ rdf (0.4.0)
+ addressable (= 2.2.4)
+
+GIT
+ remote: git://github.com/gkellogg/sinatra-linkeddata.git
+ revision: a2d77588c12554b2ba4ee00d236cef72aad6bb88
+ branch: 0.4.x
+ specs:
+ sinatra-linkeddata (0.3.1)
+ rack-linkeddata (>= 0.3.1)
+ sinatra (>= 1.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ addressable (2.2.4)
+ erubis (2.7.0)
+ haml (3.1.2)
+ json (1.5.3)
+ json-ld (0.0.4)
+ json (>= 1.5.1)
+ rdf (>= 0.3.3)
+ json_pure (1.5.3)
+ nokogiri (1.4.6)
+ rack (1.3.0)
+ rdf-isomorphic (0.3.4)
+ rdf (>= 0.2.3)
+ rdf-microdata (0.1.0)
+ nokogiri (>= 1.4.4)
+ rdf (>= 0.3.3)
+ rdf-n3 (0.3.3.1)
+ rdf (>= 0.3.3)
+ rdf-rdfa (0.3.4)
+ addressable (= 2.2.4)
+ haml (>= 3.0.0)
+ haml (>= 3.0.0)
+ nokogiri (>= 1.3.3)
+ nokogiri (>= 1.4.4)
+ rdf
+ rdf (>= 0.3.3)
+ rdf-rdfxml (0.3.3.1)
+ nokogiri (>= 1.4.4)
+ rdf (>= 0.3.3)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.2.6)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ tilt (1.3.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ addressable (= 2.2.4)
+ erubis (>= 2.6.6)
+ haml (>= 3.0.0)
+ json-ld (>= 0.0.4)
+ linkeddata!
+ rack-linkeddata!
+ rdf!
+ rdf-json!
+ rdf-microdata (>= 0.1.0)
+ rdf-n3 (>= 0.3.3)
+ rdf-rdfa (>= 0.3.3)
+ rdf-rdfxml (>= 0.3.3)
+ rdf-trix!
+ shotgun
+ sinatra (>= 1.2.1)
+ sinatra-linkeddata!
View
@@ -0,0 +1,54 @@
+# RDF Linter
+
+Extract and validate embedded RDF markup in HTML and other formats.
+
+## DESCRIPTION
+
+## FEATURES
+Distills between formats supported in [Linked Data][linkeddata].
+
+* Includes [N-Triples][] support using [RDF.rb][].
+* Includes [RDF/XML][] support using the [RDF::RDFXML][] gem.
+* Includes [Turtle][] and [Notation3][] support using the [RDF::N3][] gem.
+* Includes [RDFa][] support using the [RDF::RDFa][] gem.
+* Includes [RDF/JSON][] support using the [RDF::JSON][] gem.
+* Includes [TriX][] support using the [RDF::TriX][] gem.
+* Includes [Microdata][] support using the [RDF::Microdata][] gem.
+* Includes [JSON-LD][] support using the [JSON::LD][] gem.
+
+## Dependencies
+* [RDF.rb](http://rubygems.org/gems/rdf) (>= 0.3.3)
+* [Linked Data](http://rubygems.org/gems/linkeddata) (>= 0.3.2)
+* [Linked Data for Rack](http://rubygems.org/gems/rack-linkeddata) (>= 0.3.1)
+* [Linked Data for Sinatra](http://rubygems.org/gems/sinatra-linkeddata) (>= 0.3.1)
+* [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.4.4)
+* [RDF::JSON](http://rubygems.org/gems/rdf-json) (>= 0.3.1)
+* [RDF::Microdata](http://rubygems.org/gems/rdf-microdata) (>= 0.1.0)
+* [RDF::N3](http://rubygems.org/gems/rdf-n3) (>= 0.3.3)
+* [RDF::RDFa](http://rubygems.org/gems/rdf-rdfa) (>= 0.3.3)
+* [RDF::RDFXML](http://rubygems.org/gems/rdf-rdfxml) (>= 0.3.3)
+* [RDF::TriX](http://rubygems.org/gems/rdf-trix) (>= 0.3.1)
+* [JSON::LD](http://rubygems.org/gems/json-ld) (>= 0.0.4)
+
+## AUTHOR
+* [Gregg Kellogg](http://github.com/gkellogg) - <http://kellogg-assoc.com/>
+* Stéphane Corlosquet
+
+## Setup notes
+* public/.htaccess
+* Bundle installed using:
+
+ bundle install --path vendor/bundler
+
+## FEEDBACK
+
+[JSON-LD]: http://json-ld.org/spec/latest/
+[linkeddata]: {file:linkeddata-README}
+[Microdata]: http://dev.w3.org/html5/md/
+[N-Triples]: http://en.wikipedia.org/wiki/N-Triples
+[Notation3]: http://en.wikipedia.org/wiki/Notation3
+[RDF/JSON]: http://n2.talis.com/wiki/RDF_JSON_Specification
+[RDF/XML]: http://www.w3.org/TR/rdf-syntax-grammar/
+[RDFa]: http://en.wikipedia.org/wiki/RDFa
+[TriX]: http://en.wikipedia.org/wiki/TriX_(syntax)
+[Turtle]: http://en.wikipedia.org/wiki/Turtle_(syntax)
View
@@ -0,0 +1,34 @@
+require 'rubygems'
+require 'fileutils'
+
+require 'yard'
+
+
+YARD::Rake::YardocTask.new do |y|
+ y.files = Dir.glob("lib/**/*.rb") +
+ Dir.glob("vendor/bundler/**/rdf*/lib/**/*.rb") +
+ Dir.glob("vendor/bundler/**/json-ld/lib/**/*.rb") +
+ Dir.glob("vendor/bundler/**/sparql*/lib/**/*.rb") +
+ Dir.glob("vendor/bundler/**/spira*/lib/**/*.rb") +
+ Dir.glob("vendor/bundler/**/sxp*/lib/**/*.rb") +
+ ["-"] +
+ Dir.glob("*-README")
+end
+
+desc "Clean documentation"
+task :clean_doc do
+ FileUtils.rm_rf 'doc'
+end
+
+desc "Create README links"
+task :readme do
+ Dir.glob("*-README").each {|d| FileUtils.rm d}
+ Dir.glob('vendor/bundler/**/README').each do |path|
+ d = path.split('/')[-2]
+ next unless d
+ d.sub!(/-([a-z0-9]{12})$/, '')
+ d.sub!(/-\d+\.\d+(?:\.\d+)$/, '')
+ puts "link #{path} to #{d}-README"
+ FileUtils.ln_s path, "#{d}-README" unless File.exist?("#{d}-README")
+ end
+end
View
@@ -0,0 +1,26 @@
+#!/usr/bin/env rackup
+$:.unshift(File.expand_path('../lib', __FILE__))
+
+ENV['GEM_PATH'] = "/home/kellogg/gems:/usr/lib/ruby/gems/1.8"
+#ENV['GEM_HOME'] = "/home/kellogg/gems"
+
+require 'rubygems' || Gem.clear_paths
+require 'bundler'
+Bundler.setup
+
+require 'rdf/linter'
+
+set :environment, (ENV['RACK_ENV'] || 'production').to_sym
+
+if settings.environment == :production
+ puts "Mode set to #{settings.environment.inspect}, logging to sinatra.log"
+ log = File.new('sinatra.log', 'a')
+ STDOUT.reopen(log)
+ STDERR.reopen(log)
+else
+ puts "Mode set to #{settings.environment.inspect}, logging to console"
+end
+
+disable :run, :reload
+
+run RDF::Linter::Application
Oops, something went wrong.

0 comments on commit 0187ea3

Please sign in to comment.