hato 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 +4 -4
- data/lib/hato/httpd.rb +6 -2
- data/lib/hato/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be9a0b36f6fec2f48e7f644fe686210ae0e4576d
|
4
|
+
data.tar.gz: a221ce148e948f3866c7fa924c7797ddd0ea5d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed8194d3d33f1c34043d80d692b3a6b7d4a13fbc0b61d42eb3ca694d7d6188e503a9531f764489a033dbbf6913ed9012a6f9ae83993adee4c8d5af5dc20d69ae
|
7
|
+
data.tar.gz: a331420e1da911ecf7933f535169875d082e4398af96991cf58cdec358f4513d455f1e4f1bf29d7f495a7fdf70b9b2dd1a90148ae29d7c376fa6d799d52eb1e1
|
data/lib/hato/httpd.rb
CHANGED
@@ -23,8 +23,8 @@ module Hato
|
|
23
23
|
class App < Sinatra::Base
|
24
24
|
enable :logging
|
25
25
|
|
26
|
-
before do
|
27
|
-
if settings.api_key != params[:api_key]
|
26
|
+
before '/.+' do
|
27
|
+
if settings.api_key && (settings.api_key != params[:api_key])
|
28
28
|
halt 403, JSON.dump(
|
29
29
|
status: :error,
|
30
30
|
message: 'API key is wrong. Confirm your API key setting of server/client.',
|
@@ -32,6 +32,10 @@ module Hato
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
get '/' do
|
36
|
+
'Hato https://github.com/kentaro/hato'
|
37
|
+
end
|
38
|
+
|
35
39
|
post "/notify" do
|
36
40
|
settings.observer.update(
|
37
41
|
tag: params[:tag],
|
data/lib/hato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kentaro Kuribayashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.0.
|
172
|
+
rubygems_version: 2.0.3
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: A Notification Management Tools
|