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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cede082c4d5590b359033a018197adabe7160ef
4
- data.tar.gz: 97a83788feb34dce3e3180f98fc4a1a7fec7d84f
3
+ metadata.gz: be9a0b36f6fec2f48e7f644fe686210ae0e4576d
4
+ data.tar.gz: a221ce148e948f3866c7fa924c7797ddd0ea5d8b
5
5
  SHA512:
6
- metadata.gz: 7f08a21f559fffad23aeb1465b2809cdbbd896809c124c7c928aa80415bc49dd398f822665a4aa9dfaab78f370be3d3731df80ebc343ca7dbec5cec8e4a548f9
7
- data.tar.gz: 95b893b89b4604b315692aa576289de2c5ab5ca9d75570fee9e08ed1040790d8468db4e831f5ee61cc5a2fbb6b4688f1659fd6b9a6cac17711cac9b2b90e5283
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
@@ -1,3 +1,3 @@
1
1
  module Hato
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-09 00:00:00.000000000 Z
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.2
172
+ rubygems_version: 2.0.3
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: A Notification Management Tools