-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split gem into database_cleaner-core and database_cleaner metagem.
- Loading branch information
1 parent
22192c8
commit 0b3491b
Showing
6 changed files
with
45 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gemspec | ||
gemspec name: "database_cleaner-core" | ||
|
||
gem "byebug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,12 @@ | ||
require "rubygems" | ||
require "bundler" | ||
require "bundler/gem_tasks" | ||
Bundler.setup | ||
|
||
require 'rake' | ||
require 'rspec/core' | ||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new(:spec) do |spec| | ||
spec.pattern = FileList['spec/**/*_spec.rb'] | ||
end | ||
|
||
RSpec::Core::RakeTask.new(:rcov) do |spec| | ||
spec.pattern = 'spec/**/*_spec.rb' | ||
spec.rcov = true | ||
end | ||
|
||
# testing | ||
require "rspec/core/rake_task" | ||
RSpec::Core::RakeTask.new(:spec) | ||
task :default => :spec | ||
|
||
desc "Cleans the project of any tmp file that should not be included in the gemspec." | ||
task :clean do | ||
["examples/config/database.yml", "examples/db/activerecord_one.db", "examples/db/activerecord_two.db", "examples/db/datamapper_default.db", | ||
"examples/db/datamapper_one.db", "examples/db/datamapper_two.db"].each do |f| | ||
FileUtils.rm_f(f) | ||
end | ||
%w[*.sqlite3 *.log #* *.swp *.swo].each do |pattern| | ||
`find . -name "#{pattern}" -delete` | ||
end | ||
end | ||
# releasing | ||
require "rake/clean" | ||
CLOBBER.include "pkg" | ||
require "bundler/gem_helper" | ||
Bundler::GemHelper.install_tasks name: :database_cleaner | ||
Bundler::GemHelper.install_tasks name: :"database_cleaner-core" | ||
|
||
desc "Cleans the dir and builds the gem" | ||
task :prep => [:clean, :gemspec, :build] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
lib = File.expand_path("../lib", __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require "database_cleaner/version" | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "database_cleaner-core" | ||
spec.version = DatabaseCleaner::VERSION | ||
spec.authors = ["Ben Mabey", "Ernesto Tagwerker"] | ||
spec.email = ["[email protected]"] | ||
|
||
spec.summary = "Strategies for cleaning databases. Can be used to ensure a clean slate for testing." | ||
spec.description = "Strategies for cleaning databases. Can be used to ensure a clean slate for testing." | ||
spec.homepage = "https://github.com/DatabaseCleaner/database_cleaner" | ||
spec.license = "MIT" | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^(test|spec|features)/}) | ||
end | ||
spec.bindir = "exe" | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
|
||
spec.add_development_dependency "rake" | ||
spec.add_development_dependency "bundler" | ||
spec.add_development_dependency 'guard-rspec' | ||
spec.add_development_dependency "listen" | ||
spec.add_development_dependency "rspec" | ||
spec.add_development_dependency "cucumber" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# empty file to avoid LoadError if someone requires database_cleaner-core directly |