biola_deploy 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84232a1fbd9b6cba390e6a8f0259d967cc7b6767
4
- data.tar.gz: 8ca53e700dec01f64b9dc2f3e33b1e6ab8ba8852
3
+ metadata.gz: 6e3b3b3c51a5d3c015a46269e8be6e36bf0999ef
4
+ data.tar.gz: 6357b10b89b76dfb74d3f0aef1acb940488d38e5
5
5
  SHA512:
6
- metadata.gz: 904bf0f30fd8cb781499a0ad832640e603a4fb55c867d2836c7562847485eb6ab8bac3e42fd4ae3a9d007f86da65687d703f473b69350f15ccabf10cba935043
7
- data.tar.gz: 525ff29fececc1009b88a3bde6dfd513d9c3017968d69a71726833f8f17fe40daf59e518e505f743a73e6fee7962cf6e4dd438661f316db6114df44f3e62d40d
6
+ metadata.gz: 16c978112262b2902e185fad5aac81d575a88a50a4d7156781f3c1c0b57c65dce8947a62ddd51aecd66ea5a4c742170034484cf8dcb2f1c9e09a50f750d54fa5
7
+ data.tar.gz: d338fa9681eed9a1af47126734b553103d54133cf6a22eb339bd02707879f91839ea14a73ec04e8d4fcebb8aa385a01caf5577baa01178cd95d4d61cfe1ecd5e
@@ -1,3 +1,3 @@
1
1
  module BiolaDeploy
2
- VERSION = '0.6.2'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -1,6 +1,28 @@
1
1
  require 'fileutils'
2
2
 
3
3
  namespace :deploy do
4
+ desc 'Run chef-client'
5
+ task :chef_client do
6
+ require 'open3'
7
+
8
+ cmd = 'sudo --non-interactive chef-client'
9
+
10
+ error_out = []
11
+ Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
12
+ while line = stdout.gets
13
+ puts line
14
+ end
15
+
16
+ while line = stderr.gets
17
+ error_out << line
18
+ end
19
+ end
20
+
21
+ if error_out.any?
22
+ puts %[Erorr when running chef-client: #{error_out.join("\n")}]
23
+ end
24
+ end
25
+
4
26
  desc 'Run the database migrations'
5
27
  task :migrate_db do
6
28
  if_rails_loads 'database migration' do
@@ -38,13 +60,17 @@ namespace :deploy do
38
60
  require 'new_relic/cli/command'
39
61
  require 'new_relic/cli/commands/deployments'
40
62
 
41
- version = if defined? Version
42
- Version.current
63
+ if NewRelic::Agent.config[:license_key].present?
64
+ version = if defined? Version
65
+ Version.current
66
+ else
67
+ `git log -1 --format=%h`.chomp # abbreviated hash of latest git commit
68
+ end
69
+
70
+ NewRelic::Cli::Deployments.new(revision: version).run
43
71
  else
44
- `git log -1 --format=%h`.chomp # abbreviated hash of latest git commit
72
+ puts 'Canceling NewRelic deployment because: no license key set'
45
73
  end
46
-
47
- NewRelic::Cli::Deployments.new(revision: version).run
48
74
  else
49
75
  puts 'Canceling NewRelic deployment because: not production environment'
50
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biola_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Crownoble
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-08 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Designed to automate deployment of Rails applications using rake tasks
14
14
  email: adam.crownoble@biola.edu
@@ -47,3 +47,4 @@ signing_key:
47
47
  specification_version: 4
48
48
  summary: Easy deployment for Rails applications
49
49
  test_files: []
50
+ has_rdoc: