daioikachan 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/daioikachan.gemspec +3 -0
- data/lib/fluent/plugin/in_daioikachan.rb +4 -13
- data/test/plugin/test_in_daioikachan.rb +0 -1
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47150b0d6c93fcda75508f92aa41cd335e5f656c
|
4
|
+
data.tar.gz: 107674f0f8f789feb52d7b9a29b453cbd7083e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06ea59e9cbbf5e86fc1c45f1664bcfd546817cb7fcc73f4721a85b260194c79f76f5cc664e023a56f16c1ff05a53d9abbcaffdc3c8e8759bcfc5d55430bcb5c4
|
7
|
+
data.tar.gz: 4edb9ea8b4a7159ed26f2b823915a62b446cb31ba3548f408fc3b9922beae99a6dbb669688642791ac3307478b78823377ee9d824f665373ca79d599452c4114
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/daioikachan.gemspec
CHANGED
@@ -21,6 +21,9 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_dependency "puma"
|
22
22
|
gem.add_dependency "fluent-plugin-irc", ">= 0.0.7"
|
23
23
|
gem.add_dependency "fluent-plugin-slack", ">= 0.5.0"
|
24
|
+
|
24
25
|
gem.add_development_dependency "rake"
|
25
26
|
gem.add_development_dependency "test-unit"
|
27
|
+
gem.add_development_dependency "pry"
|
28
|
+
gem.add_development_dependency "pry-nav"
|
26
29
|
end
|
@@ -71,20 +71,11 @@ module Fluent
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def run(env)
|
74
|
-
|
75
|
-
method = env['REQUEST_METHOD'.freeze] # req.method
|
76
|
-
path = URI.parse(env['REQUEST_URI'.freeze]).path # req.path
|
77
|
-
# Rack::Request.new should take care of this, but it did not
|
78
|
-
if env['CONTENT_TYPE'.freeze].start_with?('multipart/form-data'.freeze)
|
79
|
-
params = Rack::Multipart.parse_multipart(env)
|
80
|
-
else
|
81
|
-
body = env['rack.input'].read # req.body.read
|
82
|
-
params = Rack::Utils.parse_query(body)
|
83
|
-
end
|
84
|
-
|
74
|
+
req = Rack::Request.new(env)
|
85
75
|
begin
|
86
|
-
if
|
87
|
-
|
76
|
+
if req.post?
|
77
|
+
params = req.params
|
78
|
+
case req.path
|
88
79
|
when '/notice'
|
89
80
|
notice(params)
|
90
81
|
when '/privmsg'
|
@@ -137,7 +137,6 @@ class DaioikachanInputTest < Test::Unit::TestCase
|
|
137
137
|
d.run do
|
138
138
|
d.expected_emits.each {|tag, time, record|
|
139
139
|
res = post_multipart("/privmsg", {command: "privmsg", channel: "channel", message: "message"})
|
140
|
-
puts res.body
|
141
140
|
assert_equal "200", res.code
|
142
141
|
}
|
143
142
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daioikachan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
@@ -108,6 +108,34 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pry-nav
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
111
139
|
description: Ikachan compatible interface with multiple backends (IRC, Slack, etc)
|
112
140
|
email: sonots@gmail.com
|
113
141
|
executables:
|