rake-kit 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -0
- data/lib/rake-kit.rb +4 -0
- data/lib/rake-kit/engine.rb +4 -0
- data/lib/rake-kit/railtie.rb +8 -0
- data/lib/tasks/dumps.rake +25 -0
- data/lib/tasks/reset_db.rake +9 -0
- metadata +96 -0
data/README.rdoc
ADDED
data/lib/rake-kit.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
config = Rails.application.config
|
2
|
+
database = config.database_configuration[Rails.env]["database"]
|
3
|
+
username = config.database_configuration[Rails.env]["username"]
|
4
|
+
password = config.database_configuration[Rails.env]["password"]
|
5
|
+
|
6
|
+
namespace :db do
|
7
|
+
|
8
|
+
#rake db:dump
|
9
|
+
desc "dumps the database to a sql file"
|
10
|
+
task :dump => :environment do
|
11
|
+
puts "Creating #{database}_dump.sql file."
|
12
|
+
`mysqldump -u "#{username}" --password="#{password}" "#{database}" > "#{database}"_dump.sql`
|
13
|
+
end
|
14
|
+
|
15
|
+
namespace :dump do
|
16
|
+
#rake db:dump:import - Resets the DB.
|
17
|
+
desc "imports the #{database}_dump.sql file to the current db"
|
18
|
+
|
19
|
+
# TODO add :reset as prerequisite...
|
20
|
+
task :import do
|
21
|
+
`mysql -u root --password="#{password}" "#{database}" < "#{database}"_dump.sql`
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rake-kit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.2
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- stanislaw
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-08-13 00:00:00 +03:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rake-performance
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jeweler
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *id002
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: rails
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - "="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 3.1.0.rc5
|
46
|
+
type: :development
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *id003
|
49
|
+
description: Gem for re-using common rake tasks across Rails apps
|
50
|
+
email: s.pankevich@gmail.com
|
51
|
+
executables: []
|
52
|
+
|
53
|
+
extensions: []
|
54
|
+
|
55
|
+
extra_rdoc_files:
|
56
|
+
- README.rdoc
|
57
|
+
files:
|
58
|
+
- lib/rake-kit.rb
|
59
|
+
- lib/rake-kit/engine.rb
|
60
|
+
- lib/rake-kit/railtie.rb
|
61
|
+
- lib/tasks/dumps.rake
|
62
|
+
- lib/tasks/reset_db.rake
|
63
|
+
- README.rdoc
|
64
|
+
has_rdoc: true
|
65
|
+
homepage: http://github.com/stanislaw/rake-kit
|
66
|
+
licenses:
|
67
|
+
- MIT
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: -505702243
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
version: "0"
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: "0"
|
88
|
+
requirements: []
|
89
|
+
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 1.6.2
|
92
|
+
signing_key:
|
93
|
+
specification_version: 3
|
94
|
+
summary: one-line summary of your gem
|
95
|
+
test_files: []
|
96
|
+
|