bard 0.29.0 → 0.30.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2680eef24b5d9b45721ae0ba983117087f585943
4
- data.tar.gz: 4f2611c48f1f7c4456239ae5434fccaca9222f50
3
+ metadata.gz: 719e47d893872fefe3cfd4dfe73ddb4f68d10ad9
4
+ data.tar.gz: a3b3e76ac8fc203fe45d517b7655b5e2bbaab062
5
5
  SHA512:
6
- metadata.gz: a252cb91d17cc6eee7eb17205462dae8bb2f4cc76da1cdc53742adf684255b30977337c76d7016ca2f83d1fc0c925eeeff80bc2e407b6c09681b54813e092902
7
- data.tar.gz: 5ea4d06fbd9611c81d90471320a78ddcb143abcf553e3bc596d6983e1abc05676d716c4d967d25b193c094026f76b579ff6675e101e29835c9f5facb4cd1e3d3
6
+ metadata.gz: 2a2924218f5827b6b65b28005d5268cab74cefc234ef6b52f08b28d15ea3314cf003a54179c233c86893136f49c847980b48588711f20c7eb0ce0c3c7adc146c
7
+ data.tar.gz: 7bc7b1940e0984957315ee22845f363cd3657bb172cb12cae68c22befcdf6486a533901a76a086482b6d01b05e0df00824c477cc642d7f13720e2d2a5ad0c72f
@@ -25,6 +25,10 @@ class Bard::CLI < Thor
25
25
  method_options %w( verbose -v ) => :boolean
26
26
  desc "stage", "pushes current branch, and stages it"
27
27
  def stage
28
+ unless File.read("Capfile").include?("role :production")
29
+ raise Thor::Error.new("`bard stage` is disabled until a production server is defined. Until then, please use `bard deploy` to deploy to the staging server.")
30
+ end
31
+
28
32
  branch = Git.current_branch
29
33
 
30
34
  run_crucial "git push -u origin #{branch}", true
@@ -16,8 +16,6 @@ Capistrano::Configuration.instance(:must_exist).load do
16
16
  namespace "pull" do
17
17
  desc "pull data"
18
18
  task "default" do
19
- exec "heroku db:pull --confirm #{project_name}" if heroku?(ENV["ROLES"])
20
-
21
19
  run "cd #{application} && bundle exec rake db:dump && gzip -9f db/data.sql"
22
20
  transfer :down, "#{application}/db/data.sql.gz", "db/data.sql.gz"
23
21
  system "gunzip -f db/data.sql.gz && bundle exec rake db:load"
@@ -63,32 +61,19 @@ Capistrano::Configuration.instance(:must_exist).load do
63
61
 
64
62
  desc "push app to production"
65
63
  task :deploy do
66
- if heroku? "production"
67
- system "git push production master"
68
- system "heroku run rake bootstrap:production:post"
69
- else
70
- ENV["ROLES"] = "production"
71
- find_and_execute_task "rvm:install_ruby"
72
- system "git push github" if `git remote` =~ /\bgithub\b/
73
- run "cd #{application} && git pull origin master && bin/setup", :roles => :production
74
- end
64
+ deploy_roles = roles.keys.include?(:production) ? :production : :staging
65
+ ENV["ROLES"] = deploy_roles.to_s
66
+ find_and_execute_task "rvm:install_ruby"
67
+ system "git push github" if `git remote` =~ /\bgithub\b/
68
+ run "cd #{application} && git pull origin master && bin/setup", roles: deploy_roles
75
69
  end
76
70
 
77
71
  desc "push app to staging"
78
72
  task :stage do
79
- if heroku? "staging"
80
- system "git push -f staging master"
81
- system "heroku run rake bootstrap:production:post"
82
- else
83
- ENV["ROLES"] = "staging"
84
- find_and_execute_task "rvm:install_ruby"
85
- branch = ENV.fetch("BRANCH")
86
- run "cd #{application} && git fetch && git checkout -f origin/#{branch} && bin/setup", :roles => :staging
87
- end
88
- end
89
-
90
- def heroku? role
91
- `git remote -v`.include? "#{role}\tgit@heroku.com:"
73
+ ENV["ROLES"] = "staging"
74
+ find_and_execute_task "rvm:install_ruby"
75
+ branch = ENV.fetch("BRANCH")
76
+ run "cd #{application} && git fetch && git checkout -f origin/#{branch} && bin/setup", :roles => :staging
92
77
  end
93
78
 
94
79
  desc "log in via ssh"
@@ -1,4 +1,4 @@
1
1
  module Bard
2
- VERSION = "0.29.0"
2
+ VERSION = "0.30.0"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.0
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-23 00:00:00.000000000 Z
11
+ date: 2018-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor