Permalink
Browse files

Cleanup basic parts of the gem

  • Loading branch information...
1 parent 045e1c6 commit d3b966bc3a30bd3c49c326df8a8e99f27fc2ba32 @nate nate committed Sep 8, 2011
Showing with 41 additions and 39 deletions.
  1. +3 −0 Gemfile
  2. +26 −0 Gemfile.lock
  3. +5 −33 Rakefile
  4. +1 −4 forgery.gemspec
  5. +6 −2 spec/spec_helper.rb
View
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gemspec
View
@@ -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
View
@@ -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).
View
@@ -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"
View
@@ -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"

0 comments on commit d3b966b

Please sign in to comment.