slack_500 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
  SHA256:
3
- metadata.gz: b6533020462a704a7238fb0a7dd6685b9c4ed0eb26b11794a7f76f8a9a673383
4
- data.tar.gz: 2f16d6b1690ba1f3391ee284a70471a77f992e5be1746f371f400050775156b9
3
+ metadata.gz: b721f344f8274b1aca00c77999bba0861d0cc13c2277fc37fd8c103cf58cb482
4
+ data.tar.gz: 5e16ca844bbc20b897d0be44d786c95d04a9ea91856946315d52bac42951da8d
5
5
  SHA512:
6
- metadata.gz: 58396be8a3ea9a2fa5a7a895025bf05866caa892d638425956f69102222d6630777cc33282b643404443c8c83fb2a7821709137f8be8a50ea14baee3a5188fbd
7
- data.tar.gz: 928758108446331aeb520db47268e7234874ebca2bf9ed09bca693540fd4a9de2d96c21b475d85f498c79cf24cc1d353585a3097678454ab00d6f165079cce6e
6
+ metadata.gz: b6713e334b1f2b606c4b974e5ec1a82e699b341c773cbe9e497f5a86223bf56f7eb8e8c7b04131182a94db9ed2de828ba6017acc19cb03cc579f0e7cc994d9af
7
+ data.tar.gz: 94af472000d7f94d19546c57583bd4539a6c5bf555eddfed589d70604c268a887d64f142d0a3347645c38951e8f7d529ac58e2e684cec592e9e648cb8b163948
@@ -1,3 +1,3 @@
1
1
  module Slack500
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,34 @@
1
+ namespace :slack_500 do
2
+ desc 'configuration slack_500'
3
+ task :config do
4
+ file = File.join(Rails.root,'config','initializers','slack_500.rb')
5
+ if File.exists?(file)
6
+ puts "#{file} esxits. overwrite? (y/n)"
7
+ s = STDIN.getc
8
+ exit unless s[0].downcase == 'y'
9
+ end
10
+ File.open(file,'w') do |file|
11
+ file.puts("require 'Slack500'")
12
+ file.puts("\nSlack500.setup do |config|")
13
+
14
+ file.puts("\n # report pretext of slack message")
15
+ file.puts(" config.pretext = 'Slack Report Title'")
16
+
17
+ file.puts("\n # report title of slack message")
18
+ file.puts(" config.title = 'Rendering 500 with exception.'")
19
+
20
+ file.puts("\n # color of slack message")
21
+ file.puts(" config.color = '#FF0000'")
22
+
23
+ file.puts("\n # footer text of slack message")
24
+ file.puts(" config.footer = 'via Slack 500 Report.'")
25
+
26
+ file.puts("\n # WebHook URL")
27
+ file.puts(" # see https://slack.com/services/new/incoming-webhook")
28
+ file.puts(" config.webhook_url = '(Your Slack WebHook URL)https://hooks.slack.com/services/xxxxxxxxx/xxxx'")
29
+
30
+ file.puts("\nend")
31
+ end
32
+ puts "Slack500:: you need edit #{file}."
33
+ end
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_500
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
  - Kazuo Matsunaga
@@ -86,7 +86,7 @@ files:
86
86
  - bin/setup
87
87
  - lib/slack_500.rb
88
88
  - lib/slack_500/version.rb
89
- - lib/task/slack_500.rake
89
+ - lib/tasks/slack_500.rake
90
90
  - slack_500.gemspec
91
91
  homepage: https://github.com/kazuomatz/Slack500
92
92
  licenses:
@@ -1,34 +0,0 @@
1
- namespace :slack_500
2
- desc 'configuration Slack500'
3
- task :config do
4
- file = File.join(Rails.root,'config','initializers','slack_500.rb')
5
- if File.exists?(file)
6
- p "#{file} esxits. overwrite? (y/n)"
7
- input = gets
8
- return unless input[0].downcase == 'y'
9
- end
10
- File.open(file,'w') do |file|
11
- file.puts("require 'Slack500'")
12
- file.puts("Slack500.setup do |config|")
13
-
14
- file.puts(" # report pretext of slack message")
15
- file.puts(" config.pretext = 'Slack Report Title'")
16
-
17
- file.puts(" # report title of slack message")
18
- file.puts(" config.title = 'Rendering 500 with exception.'")
19
-
20
- file.puts(" # color of slack message")
21
- file.puts(" config.color = '#FF0000'")
22
-
23
- file.puts(" # footer text of slack message")
24
- file.puts(" config.footer = 'via Slack 500 Report.'")
25
-
26
- file.puts(" # WebHook URL")
27
- file.puts(" # see https://slack.com/services/new/incoming-webhook")
28
- file.puts(" config.webhook_url = '(Your Slack WebHook URL)https://hooks.slack.com/services/xxxxxxxxx/xxxx'")
29
-
30
- file.puts("end")
31
- end
32
- p "Slack500:: you need edit #{file}."
33
- end
34
- end