ops_tasks 0.3.0 → 0.3.2

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: befcd3a34d35b3135cd31a592fef6638d3da37e9
4
- data.tar.gz: 0b76d581ebf5a7cb009463e2ceecc86dde03b24a
3
+ metadata.gz: 1843f4bdb5bbd8d540208e8ef84d711fcf65b96b
4
+ data.tar.gz: 158663fc5a4b252102ebc5752ed11f0d3f01981d
5
5
  SHA512:
6
- metadata.gz: f9e979ef040817397cb2e4a2053d53c39b47d928706f75b0fa8fe567db7d13dd308f3a7b6f7b7063d00c0c561c90f7f799b95cac9efb5de7cb1c4e609e8aac19
7
- data.tar.gz: a57ec4d202c09c4728818d78b637c029cce8ba9b777fbb6e2379445ffbfd5e33f5f8f5814e16eef15e55e3a688310c2b6db609c102468ce81b1945cb73a394c7
6
+ metadata.gz: 489f67b26443045fe896fa318d70ac1b0d25c83f625b9408e8c577683cc32cd73beb66040ec5f384b2a8b63616c7ac0fa30841b553db1668363a55dc2cec56f3
7
+ data.tar.gz: 175565adba3cdb65285df6396612f26eeeafb70f8faa28b1bbc144c4727b2b863325a25133167da0d441e0ae708e7b21c542e322c1ec99bcaa9eb57e74356537
@@ -44,6 +44,9 @@ module OpsTasks
44
44
  return id
45
45
  end
46
46
 
47
+ def notifications_disabled?
48
+ ENV["#{@project}_room_notifications"] == 'false'
49
+ end
47
50
 
48
51
  def status(deployment_id)
49
52
  @client.describe_deployments(:deployment_ids => [deployment_id])[:deployments].first[:status]
@@ -52,12 +55,12 @@ module OpsTasks
52
55
  def wait_for_completion(deployment_id, task="deployment")
53
56
  print "#{@project}: Running... "
54
57
  status = @client.describe_deployments(:deployment_ids => [deployment_id])[:deployments].first[:status]
55
- "Chef".says("#{@project} #{task} #{status}").to_channel(@slack_channel)
58
+ "Chef".says("#{@project} #{task} #{status}").to_channel(@slack_channel) unless notifications_disabled?
56
59
  until status != "running"
57
60
  status = @client.describe_deployments(:deployment_ids => [deployment_id])[:deployments].first[:status]
58
61
  end
59
62
  puts status
60
- "Chef".says("#{@project} #{task} #{status}").to_channel(@slack_channel)
63
+ "Chef".says("#{@project} #{task} #{status}").to_channel(@slack_channel) unless notifications_disabled?
61
64
  end
62
65
  end
63
66
  end
@@ -1,3 +1,3 @@
1
1
  module OpsTasks
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Prokesch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-29 00:00:00.000000000 Z
11
+ date: 2015-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.4.7
104
+ rubygems_version: 2.4.5
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Opsworks Rake Tasks for Deployment