capistrano-influx 0.2.1 → 0.3.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: a46ebcf92b3d37f6ba994d5bd79230e7a07ae655
4
- data.tar.gz: 448b9f1d014866f100b9a6aee62c0b1511ec9d99
3
+ metadata.gz: a5cabbf01f1dbed5c2fa466034f6ecfdaa30efb0
4
+ data.tar.gz: 3e688025f5ec5640973cee81f6375dc4a1426b8e
5
5
  SHA512:
6
- metadata.gz: 14bfc57564ce53126c0f24a7f069a4169c1e4c2d612c07a170ec9e98aae1e5cf27a822e91555eeeb5a3f5c0d2f7cd160539a3c9e4304e0b8f4ba657daeb8eabd
7
- data.tar.gz: 5c1dfa8c6f73baa5dffe10c4cc30e45518896d70b1ea3e281e5c3ede742a2940ab01154ab8c0a7f0325571607c2c8346be3c85e4d5912f195ca34d9046da006a
6
+ metadata.gz: 81f4d110129e73f9c892b6a3791e61e738f858bd73a762220e042daf1582ba19273b3d478e515774d12ad1f06fd7c053366486028d621f43236290577fb8d195
7
+ data.tar.gz: b3e635107418b5b9de7424147b097611ff8d853a627b522eb1c83e7d1ae8ea9a932f88288fa338fdc1cbc6cd155f35a98769a56af37854afcfcb9687471eba13
@@ -33,6 +33,13 @@ module Capistrano
33
33
  conn.write_point(name, data)
34
34
  end
35
35
 
36
+ def enabled_for_stage(stage, *enabled_stages)
37
+ enabled_stages.flatten.each do |s|
38
+ return true if s == :all || stage == s
39
+ end
40
+ false
41
+ end
42
+
36
43
  def self.extended(configuration)
37
44
  configuration.load do
38
45
  after 'deploy', 'influx:store_deploy'
@@ -41,9 +48,10 @@ module Capistrano
41
48
  ENV['SSHUSER'] || `git config user.name`.chomp
42
49
  end
43
50
 
51
+
44
52
  namespace :influx do
45
53
  task :store_deploy do
46
- if fetch(:send_to_influx, false)
54
+ if enabled_for_stage fetch(:stage, 'production'), fetch(:influx_stages, '')
47
55
  influx_deploy(fetch(:application), fetch(:branch), fetch(:stage, 'production'), fetch(:deployer))
48
56
  end
49
57
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Influx
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-influx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Mack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: influxdb