gbdev-common_project_tasks 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/examples/app_vars.yml +2 -0
- data/lib/common_project_tasks/app.rake +7 -3
- metadata +4 -3
data/examples/app_vars.yml
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
app_vars: &app_vars
|
|
2
2
|
rebuild_database: true
|
|
3
|
+
run_db_migrate: true
|
|
3
4
|
load_fixtures: true
|
|
4
5
|
fixtures: 'states,users,permissions'
|
|
5
6
|
# post_fixture_tasks: some_rake_task_to_run
|
|
6
7
|
# load_sql_file: 'db/sql/roar_production_data_only-2008-07-25.sql'
|
|
8
|
+
# update_git_submodules: false
|
|
7
9
|
|
|
8
10
|
development:
|
|
9
11
|
load_sql_file: '/db/sql/roar_production_data_only-2008-07-25.sql'
|
|
@@ -10,15 +10,19 @@ namespace :app do
|
|
|
10
10
|
database = YAML::load(ERB.new(IO.read(file)).result)
|
|
11
11
|
|
|
12
12
|
# update git submodules in case new ones were added
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if !app_vars[ENV['RAILS_ENV']]['update_git_submodules'].nil? and app_vars[ENV['RAILS_ENV']]['update_git_submodules'] == true
|
|
14
|
+
system('git submodule init')
|
|
15
|
+
system('git submodule update')
|
|
16
|
+
end
|
|
15
17
|
|
|
16
18
|
if !app_vars[ENV['RAILS_ENV']]['rebuild_database'].nil? and app_vars[ENV['RAILS_ENV']]['rebuild_database'] == true
|
|
17
19
|
Rake::Task['db:drop'].invoke
|
|
18
20
|
Rake::Task['db:create'].invoke
|
|
19
21
|
end
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
if !app_vars[ENV['RAILS_ENV']]['run_db_migrate'].nil? and app_vars[ENV['RAILS_ENV']]['run_db_migrate'] == true
|
|
24
|
+
Rake::Task['db:migrate'].invoke
|
|
25
|
+
end
|
|
22
26
|
|
|
23
27
|
if !app_vars[ENV['RAILS_ENV']]['load_fixtures'].nil? and app_vars[ENV['RAILS_ENV']]['load_fixtures'] == true
|
|
24
28
|
ENV['FIXTURES'] = app_vars[ENV['RAILS_ENV']]['fixtures']
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gbdev-common_project_tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Wes Hays
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2009-
|
|
13
|
+
date: 2009-05-16 00:00:00 -07:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -40,6 +40,7 @@ files:
|
|
|
40
40
|
- examples/app_vars.yml
|
|
41
41
|
has_rdoc: true
|
|
42
42
|
homepage: http://github.com/gbdev/common_project_tasks
|
|
43
|
+
licenses:
|
|
43
44
|
post_install_message:
|
|
44
45
|
rdoc_options:
|
|
45
46
|
- --title
|
|
@@ -64,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
64
65
|
requirements: []
|
|
65
66
|
|
|
66
67
|
rubyforge_project: Project on www.github.com
|
|
67
|
-
rubygems_version: 1.
|
|
68
|
+
rubygems_version: 1.3.5
|
|
68
69
|
signing_key:
|
|
69
70
|
specification_version: 2
|
|
70
71
|
summary: Rails gem/plugin to load common project tasks.
|