delayed_job_slack_notification 0.1.2 → 0.1.3

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: 4c96265ea65df722db6573b04b86dc8a52c4e969
4
- data.tar.gz: 9f910c23e00507302e2d1aa58a890a0e542ebb26
3
+ metadata.gz: 1c5c7e52d96277813eff8f31c10f264bfec4842d
4
+ data.tar.gz: 1f4b39c2a16b024197de2607c3940fdf2673acd9
5
5
  SHA512:
6
- metadata.gz: 49c053038acc07e57a4728541fd29e3d0b760477f506c29d806fda35fd80c7154caf49d0e4c7c4bc40eb2c966ec1b32166cd6f5f43b738a46dda68094b6721e1
7
- data.tar.gz: 74142c070b92b68243f473c729eaa1681e689d34105b9902811162c6c51aa3a73df47203b08aa87352a521e7b7d534de0cb1e933cdfff14f300177db7b6ac04b
6
+ metadata.gz: f65c35d2fd3fb27fb1feb4614cf6615e500000190c8a3dfba4cd70ee97f415c7620c2efd2e533473b1bdb80bd874ca806c24726521a82787d283c94e95c94238
7
+ data.tar.gz: 324bb958fb8f53eac33b2210033087e6fbf62fc21ca8585dbd85a56f81011fade29ed259f6d1e061218231dcc03d17df2aa56772dc7a773a87cb1b4e72e24cdb
@@ -1,3 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.0
3
+ - 2.0.0
4
+ - 2.1.6
5
+ - 2.2.2
6
+ - ruby-head
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << "test"
6
+ t.test_files = FileList['test/test_*.rb']
7
+ end
8
+
9
+ task(default: :test)
@@ -23,4 +23,6 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "minitest"
27
+ spec.add_development_dependency "webmock"
26
28
  end
@@ -1,5 +1,6 @@
1
1
  require "delayed_job_slack_notification/version"
2
2
 
3
+ require 'delayed_job_active_record'
3
4
  require 'active_support/all'
4
5
 
5
6
  module DelayedJobSlackNotification
@@ -1,3 +1,3 @@
1
1
  module DelayedJobSlackNotification
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -1,4 +1,3 @@
1
- require 'delayed_job_active_record'
2
1
  require 'net/http'
3
2
  require 'json'
4
3
 
@@ -17,7 +16,14 @@ namespace :jobs do
17
16
 
18
17
  if alert && icon
19
18
  uri = URI.parse(DelayedJobSlackNotification.webhook_url)
20
- params = {'payload' => {"channel" => DelayedJobSlackNotification.channel, "username" => DelayedJobSlackNotification.username, "text" => alert, "icon_emoji" => icon}.to_json}
19
+ params = {
20
+ payload: {
21
+ channel: DelayedJobSlackNotification.channel,
22
+ username: DelayedJobSlackNotification.username,
23
+ text: alert,
24
+ icon_emoji: icon
25
+ }.to_json
26
+ }
21
27
  Net::HTTP.post_form(uri, params)
22
28
  end
23
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_slack_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  description: Slack notifier for pending jobs of Delayed Job.
70
98
  email:
71
99
  - hsbt@ruby-lang.org