-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
53 lines (43 loc) · 1.05 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require 'rubygems'
gem 'echoe'
require 'echoe'
Echoe.new("db_essentials") do |p|
p.author = "palmade"
p.project = "palmade"
p.summary = "Database essential extentions"
p.dependencies = [ ]
p.need_tar_gz = false
p.need_tgz = true
p.clean_pattern += [ "pkg", "lib/*.bundle", "*.gem", ".config" ]
p.rdoc_pattern = [ 'README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc' ]
end
gem 'rspec'
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new do |t|
t.spec_opts.push("-f s")
end
task :default => [ :spec ]
task :test => [ :spec ]
task :test_prepare do
FileUtils.mkpath('config')
FileUtils.mkpath('log')
FileUtils.touch('log/development.log')
FileUtils.touch('log/test.log')
CONFIG_DATABASE_YML_TEMPLATE = <<CDYT
development: &dev
username: root
password:
host: 127.0.0.1
port: 3306
database: db_essentials_development
encoding: utf8
pool: 5
adapter: mysql
test: &test
database: db_essentials_test
<<: *dev
CDYT
File.open('config/database.yml', 'w') do |f|
f.write(CONFIG_DATABASE_YML_TEMPLATE)
end
end