mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
split gem into database_cleaner-core and database_cleaner metagem.
This commit is contained in:
parent
d26ffe15c4
commit
e518560541
6 changed files with 45 additions and 49 deletions
2
Gemfile
2
Gemfile
|
@ -1,3 +1,3 @@
|
|||
gemspec
|
||||
gemspec name: "database_cleaner-core"
|
||||
|
||||
gem "byebug"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
database_cleaner (2.0.0.beta)
|
||||
database_cleaner-core (2.0.0.beta)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
|
@ -84,7 +84,7 @@ DEPENDENCIES
|
|||
bundler
|
||||
byebug
|
||||
cucumber
|
||||
database_cleaner!
|
||||
database_cleaner-core!
|
||||
guard-rspec
|
||||
listen
|
||||
rake
|
||||
|
|
38
Rakefile
38
Rakefile
|
@ -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]
|
||||
|
|
30
database_cleaner-core.gemspec
Normal file
30
database_cleaner-core.gemspec
Normal file
|
@ -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 = ["ernesto@ombulabs.com"]
|
||||
|
||||
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
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
lib = File.expand_path("../lib", __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require "database_cleaner/version"
|
||||
require_relative "./lib/database_cleaner/version"
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "database_cleaner"
|
||||
|
@ -14,17 +11,5 @@ Gem::Specification.new do |spec|
|
|||
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"
|
||||
spec.add_dependency "database_cleaner-active_record"
|
||||
end
|
||||
|
|
1
lib/database_cleaner-core.rb
Normal file
1
lib/database_cleaner-core.rb
Normal file
|
@ -0,0 +1 @@
|
|||
# empty file to avoid LoadError if someone requires database_cleaner-core directly
|
Loading…
Reference in a new issue