resque-cloudwatch-monitor 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODQ4YjM3MGE0ZTNhNDgwYTY3YzRiYjExNmU2NWIxZDE3YTZiMTkzZg==
4
+ NTVhYWZhNWY0OGRhOWU5NTZiMzczNGI3ZWVlOGE0YjM5NzhjM2VhMQ==
5
5
  data.tar.gz: !binary |-
6
- MzIzOTE1ODVlN2VhYTJhY2VkNzIyNWI4YTE3ZTZhZWI4YWU1Mzg4MA==
6
+ ZWU3Njc2MjBlNTJhOTY5NGI5MDU4NzVmNmEwNDVlN2I2NTM5NGJjYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2IwNzBmMGQ5NGZmMTNiZjg1NDFkODgwZTdlZTNlYzI0MzdmZmM3ZjY1MGVl
10
- OTNjNGVjMzM5NjczMmQ5NzFjYTQ4YWRjM2M1ZDViMjNkNTVlMDFlN2JhYmQy
11
- YTU4Y2ZjNDBkNjgyODZhYzc0NTFiY2I0ZjhlZWIzZTE2M2RiOTg=
9
+ NjY3MDgzM2RkYTNjMjQ1NGI5M2Q5NDRjZjBiNmEzM2M5MTA2NTNhOGNiYjZi
10
+ NTc2Mzc4ODJjNDRiYzMwOTUxMDJkMGFhOGY2Zjk0NzEzNjNkYzBlNGIxMzdj
11
+ NDBiNWYzZTg3OGM3M2FiMThiZjk5MThhMzRkZWY3ZmY3N2FlYTE=
12
12
  data.tar.gz: !binary |-
13
- ZTg0NTU3ZTUxYzU4MmVlNDdlMDdlMzQ5MzNiMmQ2YjQ5NTg5MDg2ZDBlYzc1
14
- ODk1MjgzZGUwODZlNGEwMGVjYzQ0ZmQzZmQwYzZiYjQ1NDM3MDNmZjVmNzZi
15
- MDUwNjQ1ZmZkOWM0N2I1OTBiNWFkMjg1MTdlYmMyM2E0ZTRkNjA=
13
+ NzM2OTAzNGNkNTIzYTA2MDFhMWQzYTVjYmRhMjI5NGQ1ZjlkMzI5NDA3ZGQx
14
+ ODc2NTlhNjg1YTFhODYxY2EyMWI4OGEzNzA3YTVmMjliN2UwMjA2NmMzNzA1
15
+ ZTE0ZDQ4OWZlYmEyYzU4MDgwNGFhODc4ZjZhZWFlNDllNjU3Y2Q=
@@ -55,17 +55,19 @@ module Resque
55
55
  end
56
56
 
57
57
  private
58
- def report(report_namespace, metric_name, dimensions)
58
+ def report(report_namespace, metric_name, report_dimensions)
59
+ report_dimensions ||= []
60
+ report_dimensions.delete_if{|key| key[:value].nil? || key[:name].nil? }
59
61
  metric_data = {
60
62
  metric_name: metric_name.to_s,
61
- dimensions: dimensions,
63
+ dimensions: report_dimensions,
62
64
  timestamp: timestamp,
63
65
  value: value,
64
66
  unit: unit.to_s
65
67
  }
66
68
  report_namespace ||= namespace
67
69
  #Send to metrics. One general of the queue and another one with dimensions if custom dimensions
68
- metrics_to_send = dimensions.empty? ? [metric_data] : [metric_data, metric_data.merge(dimensions: [])]
70
+ metrics_to_send = report_dimensions.empty? ? [metric_data] : [metric_data, metric_data.merge(dimensions: [])]
69
71
 
70
72
  Configuration.cloudwatch_client.put_metric_data(namespace: report_namespace, metric_data: metrics_to_send)
71
73
  end
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module CloudwatchMonitor
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
6
6
  end
7
7
  end
@@ -5,12 +5,12 @@ Gem::Specification.new do |s|
5
5
  s.version = Resque::Plugins::CloudwatchMonitor::VERSION
6
6
  s.date = Time.now.strftime('%Y-%m-%d')
7
7
  s.summary = 'Send Resque Failures To AWS CloudWatch'
8
- s.email = 'avichay@yotpo.com'
8
+ s.email = 'avichay@yotpo.com, vlad@yotpo.com'
9
9
  s.homepage = 'https://github.com/YotpoLtd/resque-cloudwatch-monitor'
10
10
  s.description = 'Allows reporting failures of resque jobs to Amazon CloudWatch'
11
11
  s.has_rdoc = false
12
12
  s.require_paths = ['lib']
13
- s.authors = ['Yotpo/avichay@yotpo']
13
+ s.authors = ['Yotpo/avichay@yotpo, Yotpo/vlad@yotpo.com']
14
14
  s.files = ['README.md', 'resque-cloudwatch-monitor.gemspec', 'LICENSE']
15
15
  s.files += Dir['**/*.rb']
16
16
  s.license = 'MIT'
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency 'resque', '~> 1.25'
19
19
  s.add_development_dependency 'rake', '~> 10.3'
20
20
  s.add_development_dependency 'aws-sdk', '~> 1.11.1'
21
- s.add_development_dependency 'rspec'
22
- s.add_development_dependency 'timecop'
21
+ s.add_development_dependency 'rspec', '~> 3.3.0'
22
+ s.add_development_dependency 'timecop', '~> 0.8.0'
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-cloudwatch-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - Yotpo/avichay@yotpo
7
+ - Yotpo/avichay@yotpo, Yotpo/vlad@yotpo.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque
@@ -56,32 +56,32 @@ dependencies:
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 3.3.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 3.3.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: timecop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.8.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.8.0
83
83
  description: Allows reporting failures of resque jobs to Amazon CloudWatch
84
- email: avichay@yotpo.com
84
+ email: avichay@yotpo.com, vlad@yotpo.com
85
85
  executables: []
86
86
  extensions: []
87
87
  extra_rdoc_files: []