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 +4 -4
- data/lib/slack_500/version.rb +1 -1
- data/lib/tasks/slack_500.rake +34 -0
- metadata +2 -2
- data/lib/task/slack_500.rake +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b721f344f8274b1aca00c77999bba0861d0cc13c2277fc37fd8c103cf58cb482
|
4
|
+
data.tar.gz: 5e16ca844bbc20b897d0be44d786c95d04a9ea91856946315d52bac42951da8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6713e334b1f2b606c4b974e5ec1a82e699b341c773cbe9e497f5a86223bf56f7eb8e8c7b04131182a94db9ed2de828ba6017acc19cb03cc579f0e7cc994d9af
|
7
|
+
data.tar.gz: 94af472000d7f94d19546c57583bd4539a6c5bf555eddfed589d70604c268a887d64f142d0a3347645c38951e8f7d529ac58e2e684cec592e9e648cb8b163948
|
data/lib/slack_500/version.rb
CHANGED
@@ -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.
|
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/
|
89
|
+
- lib/tasks/slack_500.rake
|
90
90
|
- slack_500.gemspec
|
91
91
|
homepage: https://github.com/kazuomatz/Slack500
|
92
92
|
licenses:
|
data/lib/task/slack_500.rake
DELETED
@@ -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
|