Permalink
Browse files

removed legacy structure

  • Loading branch information...
1 parent 8d6bd48 commit d29604e7ad3cbde5418d8b89676c4503587e0695 @inukshuk committed Jul 9, 2012
Showing 699 changed files with 124 additions and 60,652 deletions.
View
@@ -0,0 +1,4 @@
+lib/**/*.rb
+-
+AGPL
+README.md
View
@@ -1,3 +1,7 @@
Gemfile.lock
.DS_Store
doc
+.yardoc
+.rbx
+*.rbc
+coverage
View
3 .rspec
@@ -1,4 +1,3 @@
--color
---require ./spec/spec_helper.rb
--format progress
---format html --out ./doc/spec.html
+--require spec_helper.rb
View
@@ -0,0 +1,2 @@
+SimpleCov.start do
+end
View
@@ -0,0 +1,2 @@
+--no-private
+--document
View
17 Gemfile
@@ -1,11 +1,16 @@
source :rubygems
-
gemspec
-group :development do
- gem 'debugger', :platforms => [:ruby_19]
- gem 'ruby-debug', :platforms => [:ruby_18]
+group :debug do
+ gem 'debugger', '~>1.1.3', :platform => :mri_19
+end
+
+group :optional do
+ gem 'simplecov', '~>0.6.4'
end
-gem 'json', :platforms => [:ruby_18]
-gem 'unicode_utils', :platforms => [:ruby_19]
+group :extra do
+ gem 'oniguruma', '~>1.1.0', :platform => :mri_18
+ gem 'yard', '~>0.8', :platforms => [:mri_19]
+ gem 'redcarpet', '~>2.1', :platforms => [:mri_19]
+end
View
@@ -1,7 +1,7 @@
CiteProc-Ruby
=============
-CiteProc-Ruby is a CSL 1.0.1 ([Citation Style Language](http://citationstyles.org/))
-cite processor written in pure Ruby.
+CiteProc-Ruby is a [Citation Style Language](http://citationstyles.org/) (CSL)
+1.0.1 cite processor written in pure Ruby.
Development
View
@@ -1,57 +1,38 @@
-# -*- ruby -*-
-$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
-
-require 'rubygems'
-require 'rake'
-require 'rake/clean'
-require 'rake/rdoctask'
-
-require 'citeproc/version'
-
-task :default => []
+# encoding: utf-8
+require 'bundler'
begin
- require 'rspec/core/rake_task'
-rescue LoadError
- puts 'To use rspec-2 for testing you must install the rspec-2 gem:\n\t\tgem install rspec'
- exit(0)
+ Bundler.setup
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
end
+$:.unshift(File.join(File.dirname(__FILE__), './lib'))
+require 'citeproc/ruby/version'
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.rspec_opts = ['--color', '--format progress', '-r ./spec/spec_helper.rb']
-end
-namespace :spec do
- desc "Run the citeproc-test suite"
- RSpec::Core::RakeTask.new(:test) do |t|
- t.rspec_opts = ['--color', '--format progress', '--format documentation --out doc/tests.txt', '-r ./spec/spec_helper.rb']
- t.pattern = 'spec/citeproc/citeproc_spec.rb'
- end
-
- desc "Run all RSpec code examples"
- task :all => [:citeproc, :csl]
-
- RSpec::Core::RakeTask.new(:citeproc) do |t|
- t.rspec_opts = ['--color', '--format progress', '--format documentation --out doc/citeproc_spec.txt --no-color', '-r ./spec/spec_helper.rb']
- t.pattern = 'spec/citeproc/**/*_spec.rb'
- end
-
- RSpec::Core::RakeTask.new(:csl) do |t|
- t.rspec_opts = ['--color', '--format progress', '--format documentation --out doc/csl_spec.txt --no-color', '-r ./spec/spec_helper.rb']
- t.pattern = 'spec/csl/**/*_spec.rb'
- end
-end
+desc 'Run an IRB session with CiteProc-Ruby loaded'
+task :console, [:script] do |t,args|
+ ARGV.clear
+ require 'irb'
+ require 'citeproc/ruby'
+
+ IRB.conf[:SCRIPT] = args.script
+ IRB.start
+end
-Rake::RDocTask.new(:rdoc_task) do |rd|
- rd.main = 'README.md'
- rd.title = "CiteProc-Ruby Documentation"
- rd.rdoc_files.include('README.md','LICENSE',"lib/**/*.rb")
- rd.rdoc_dir = "doc/html"
- rd.options << '--webcvs=http://github.com/inukshuk/citeproc-ruby/tree/master/'
+require 'rspec/core'
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
end
-CLEAN.include('doc/html')
+require 'cucumber/rake/task'
+Cucumber::Rake::Task.new(:cucumber) do |t|
+ t.profile = 'default'
+end
-# vim: syntax=ruby
+task :default => [:spec, :cucumber]
View
@@ -1,31 +1,39 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/citeproc/version', __FILE__)
+lib = File.expand_path('../lib/', __FILE__)
+$:.unshift lib unless $:.include?(lib)
+
+require 'citeproc/ruby/version'
Gem::Specification.new do |s|
- s.name = 'citeproc-ruby'
- s.version = CiteProc::VERSION.dup
- s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version=
- s.authors = ['Sylvester Keil']
- s.description = %q{A CSL (Citation Style Language) Processor}
- s.email = ['http://sylvester.keil.or.at']
- s.homepage = 'http://github.com/inukshuk/citeproc-ruby'
- s.require_paths = ['lib']
- s.summary = %q{A CSL 1.0 (Citation Style Language) Processor}
- s.executables = [] # `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }
- s.files = `git ls-files -- {lib,spec}/* resource/{locale,schema,style}`.split("\n")
- s.test_files = `git ls-files -- {spec}/*`.split("\n")
+ s.name = 'citeproc-ruby'
+ s.version = CiteProc::Ruby::VERSION.dup
+ s.platform = Gem::Platform::RUBY
+ s.authors = ['Sylvester Keil']
+ s.email = ['http://sylvester.keil.or.at']
+
+ s.homepage = 'https://github.com/inukshuk/citeproc-ruby'
+ s.summary = 'A Citation Style Language (CSL) cite processor'
+ s.description =
+ """
+ CiteProc-Ruby is a Citation Style Language (CSL) 1.0.1 compatible cite
+ processor implementation written in pure Ruby.
+ """
+ s.license = 'AGPL'
+ s.date = Time.now.strftime('%Y-%m-%d')
+
+ s.add_runtime_dependency('citeproc', '~> 0.0.8')
+ s.add_runtime_dependency('csl-ruby', '~> 1.0.0-pre1')
- s.rdoc_options = %w{--charset=UTF-8 --line-numbers --inline-source --title "CiteProc-Ruby\ Documentation" --main README.md --webcvs=http://github.com/inukshuk/citeproc-ruby/tree/master/}
- s.extra_rdoc_files = %w{README.md}
+ s.add_development_dependency('cucumber', ['~>1.1'])
+ s.add_development_dependency('rspec', ['~>2.7'])
+ s.add_development_dependency('rake', ['~>0.9'])
- s.add_runtime_dependency('logging', '~> 1.5')
- s.add_runtime_dependency('nokogiri', '~> 1.5')
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = []
+ s.require_path = 'lib'
- s.add_development_dependency('bundler', '~> 1.1')
- s.add_development_dependency('rdoc')
- s.add_development_dependency('rake', '~> 0.9')
- s.add_development_dependency('rspec', '~> 2.9')
- s.add_development_dependency('cucumber', '~> 1.1')
+ s.has_rdoc = 'yard'
end
# vim: syntax=ruby
@@ -1,70 +0,0 @@
-Feature: Bibsection include
-
- @citeproc-test @bibliography @v1.0 @bibsection
- Scenario: include
- Given a CSL processor
- And the CSL style
- """
- <style
- xmlns="http://purl.org/net/xbiblio/csl"
- class="note"
- version="1.0">
- <info>
- <id />
- <title />
- <updated>2009-08-10T04:49:00+09:00</updated>
- </info>
- <citation>
- <layout>
- <text value="Oops"/>
- </layout>
- </citation>
- <bibliography>
- <sort>
- <key variable="title" />
- </sort>
- <layout>
- <text variable="title" />
- </layout>
- </bibliography>
- </style>
- """
- And the following items
- """
- [
- {
- "id": "ITEM-1",
- "title": "Book C",
- "type": "book"
- },
- {
- "id": "ITEM-2",
- "title": "Article B",
- "type": "article-journal"
- },
- {
- "id": "ITEM-3",
- "title": "Book A",
- "type": "book"
- }
- ]
-
- """
- When I generate a bibliography with the argument
- """
- {
- "include": [
- {
- "field": "type",
- "value": "book"
- }
- ]
- }
- """
- Then the result should be
- """
- <div class="csl-bib-body">
- <div class="csl-entry">Book A</div>
- <div class="csl-entry">Book C</div>
- </div>
- """
@@ -1,81 +0,0 @@
-Feature: Condition is numeric
-
- @citeproc-test @citation @v1.0
- Scenario: is numeric
- Given a CSL processor
- And the following items
- """
- [
- {
- "id": "ITEM-1",
- "title": "Work 1",
- "volume": "Volume 2",
- "type": "book"
- },
- {
- "id": "ITEM-2",
- "title": "Work 2",
- "volume": "2nd volume",
- "type": "book"
- },
- {
- "id": "ITEM-3",
- "title": "Work 3",
- "volume": "Second volume",
- "type": "book"
- }
- ]
- """
- And the CSL style
- """
- <style
- xmlns="http://purl.org/net/xbiblio/csl"
- class="note"
- version="1.0">
- <info>
- <id />
- <title />
- <updated>2009-08-10T04:49:00+09:00</updated>
- </info>
- <citation>
- <layout>
- <choose>
- <if is-numeric="volume">
- <text value="Numeric true:" suffix=" "/>
- <number variable="volume"/>
- </if>
- <else>
- <text value="Numeric false:" suffix=" "/>
- <number variable="volume"/>
- </else>
- </choose>
- </layout>
- </citation>
- </style>
- """
- When I process the citation items
- """
- [
- [
- {
- "id": "ITEM-1"
- }
- ],
- [
- {
- "id": "ITEM-2"
- }
- ],
- [
- {
- "id": "ITEM-3"
- }
- ]
- ]
- """
- Then the result should be
- """
- Numeric true: 2
- Numeric true: 2
- Numeric false: Second volume
- """
Oops, something went wrong.

0 comments on commit d29604e

Please sign in to comment.