projectdx_pipeline 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -76,8 +76,15 @@ namespace :deploy do
76
76
  puts "Not cloning reference database, because the #{stage} stage is not in reference_db_stages (#{reference_db_stages})."
77
77
  end
78
78
  end
79
+
80
+ desc "Import seed data"
81
+ task :seed do
82
+ if reference_db_stages.include? stage.to_s
83
+ puts "Seeding database from db/seeds.rb"
84
+ run "cd #{release_path} && env RAILS_ENV=#{rails_env} bundle exec rake db:seed"
85
+ else
86
+ puts "Database is only seeded from db/seeds.rb for stages in reference_db_stages."
87
+ end
88
+ end
79
89
  end
80
90
  end
81
-
82
- before 'deploy:migrate', 'deploy:db:copy_database_yml'
83
- before 'deploy:migrate', 'deploy:db:create'
@@ -1,4 +1,3 @@
1
-
2
1
  Capistrano::Configuration.instance.load do
3
2
  ######################
4
3
  ## Multistage setup ##
@@ -42,11 +41,21 @@ Capistrano::Configuration.instance.load do
42
41
  #############
43
42
 
44
43
  before 'deploy:update', 'deploy:get_revision'
44
+
45
45
  after 'deploy:update_code', 'deploy:migrate'
46
46
 
47
+ before 'deploy:migrate', 'deploy:db:create'
48
+ after 'deploy:migrate', 'deploy:db:seed'
49
+
50
+ before 'deploy:db:create', 'deploy:db:copy_database_yml'
51
+
47
52
  ############################
48
53
  # Additional Files to Load #
49
54
  ############################
55
+ #
56
+ # Be aware that #load in this context is not at all the same as Kernel#load.
57
+ # Thanks, Capistrano!
58
+ #
50
59
 
51
60
  load_paths << File.expand_path(File.join(File.dirname(__FILE__), 'capistrano'))
52
61
  require 'bundler/capistrano'
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{projectdx_pipeline}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Renewable Funding"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: projectdx_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renewable Funding