sana 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sana.rb +5 -9
- data/sana.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8524d0fab5fb4eaf97aca5a3bf035732283ebaa1
|
4
|
+
data.tar.gz: ebd601b88ff131e4995abd233e9846d75b561605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecbca400a0ab57abba4f50bcc1548f3654f0addb8e069204e2bca03c8d17e15da9729ed9a3746a675630d8e5800f8d41dbd213081ab433c62e3bb50417368686
|
7
|
+
data.tar.gz: af241eb66695dc31ecc7094e88b6b984416ebe59027a995b8c05290455f619f5e9dad4ab16e159e12b236259b99a0dc930e23b21b64617ba8c41dff82d1b87f5
|
data/lib/sana.rb
CHANGED
@@ -23,18 +23,12 @@ class Sana
|
|
23
23
|
# @param [String] dirpath the ghost/master directory path
|
24
24
|
def load(dirpath)
|
25
25
|
@dirpath = dirpath
|
26
|
-
|
27
|
-
events.public_send(:_load, dirpath)
|
28
|
-
rescue NoMethodError
|
29
|
-
end
|
26
|
+
events.public_send(:_load, dirpath)
|
30
27
|
end
|
31
28
|
|
32
29
|
# SHIORI unload()
|
33
30
|
def unload
|
34
|
-
|
35
|
-
events.public_send(:_unload)
|
36
|
-
rescue NoMethodError
|
37
|
-
end
|
31
|
+
events.public_send(:_unload)
|
38
32
|
end
|
39
33
|
|
40
34
|
# SHIORI request()
|
@@ -47,7 +41,8 @@ class Sana
|
|
47
41
|
end
|
48
42
|
begin
|
49
43
|
response = events.public_send(request.ID, request)
|
50
|
-
rescue
|
44
|
+
rescue => error
|
45
|
+
raise unless error.is_a?(NoMethodError) && error.name.to_s == request.ID
|
51
46
|
end
|
52
47
|
case response
|
53
48
|
when OpenStruct
|
@@ -67,6 +62,7 @@ class Sana
|
|
67
62
|
private
|
68
63
|
def build_response(response)
|
69
64
|
response.version ||= '3.0'
|
65
|
+
response.code ||= response.Value.to_s.empty? ? 204 : 200
|
70
66
|
response.Charset = response.Charset || charset
|
71
67
|
response.Sender = response.Sender || sender
|
72
68
|
Shioruby.build_response(response)
|
data/sana.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Narazaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|