Skip to content

Commit

Permalink
Cleanup basic parts of the gem
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sutton committed Sep 8, 2011
1 parent 045e1c6 commit d3b966b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 39 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "http://rubygems.org"

gemspec
26 changes: 26 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
PATH
remote: .
specs:
forgery (0.4.4)
nokogiri (~> 1.4)

GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
nokogiri (1.5.0)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)

PLATFORMS
ruby

DEPENDENCIES
forgery!
rspec
38 changes: 5 additions & 33 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,12 @@
require 'rubygems'
require 'rake'
require 'rspec/core'
require 'bundler'
require 'rspec/core/rake_task'
require 'rdoc/task'
require File.expand_path('./lib/forgery/file_writer')

begin
require 'sdoc_helpers'
rescue LoadError
puts "sdoc support not enabled. Please gem install sdoc-helpers."
end

desc 'Default: run specs with rcov.'
task :default => :rcov_spec

desc 'Run the specs'
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ['--colour --format progress']
t.pattern = FileList['spec/**/*_spec.rb']
end
Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new

desc 'Run the specs with rcov'
RSpec::Core::RakeTask.new("rcov_spec") do |t|
t.pattern = FileList['spec/**/*_spec.rb']
t.rspec_opts = ['--color']
t.rcov = true
t.rcov_opts = ['--exclude', '^spec,/gems/']
end
task :default => :spec

Rake::RDocTask.new do |t|
t.rdoc_dir = 'doc'
t.rdoc_files.include('lib/**/*.rb')
t.options << '--inline-source'
t.options << '--all'
t.options << '--line-numbers'
end
require File.expand_path('./lib/forgery/file_writer')

desc %q{
Create a dictionary file from web content (xml or html).
Expand Down
5 changes: 1 addition & 4 deletions forgery.gemspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib/', __FILE__)
$:.unshift lib unless $:.include?(lib)

$:.push File.expand_path("../lib", __FILE__)
require 'forgery/version'

Gem::Specification.new do |s|
s.name = "forgery"
s.version = Forgery::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Nathan Sutton", "Brandon Arbini"]
s.email = ["nate@zencoder.com", "brandon@zencoder.com"]
s.homepage = "http://github.com/sevenwire/forgery"
Expand Down
8 changes: 6 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require 'rspec'
require File.expand_path(File.dirname(__FILE__) + '/../init')
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rubygems'
require 'bundler/setup'
require 'forgery'

ENV["TESTING_VIA_RSPEC"] = "true"

Expand Down

0 comments on commit d3b966b

Please sign in to comment.