fraggle 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/fraggle/response.rb +16 -8
  2. metadata +2 -2
@@ -14,20 +14,28 @@ module Fraggle
14
14
  Dir = -2
15
15
  Dummy = -3
16
16
 
17
+ Refused = -1
18
+
17
19
  # CAS
18
20
  def missing? ; cas == Missing ; end
19
21
  def dir? ; cas == Dir ; end
20
22
  def dummy? ; cas == Dummy ; end
21
23
 
24
+ def del? ; missing? ; end
25
+ def set? ; !del? ; end
26
+
22
27
  # ERR
23
- def ok? ; error_code != 0 ; end
24
- def other? ; error_code == Err::OTHER ; end
25
- def unknown_verb? ; error_code == Err::UNKNOWN_VERB ; end
26
- def redirect? ; error_code == Err::REDIRECT ; end
27
- def invalid_snap? ; error_code == Err::INVALID_SNAP ; end
28
- def mismatch? ; error_code == Err::CAS_MISMATCH ; end
29
- def not_dir? ; error_code == Err::NOT_DIR ; end
30
- def is_dir? ; error_code == Err::ISDIR ; end
28
+ def ok? ; err_code != 0 ; end
29
+ def other? ; err_code == Err::OTHER ; end
30
+ def unknown_verb? ; err_code == Err::UNKNOWN_VERB ; end
31
+ def redirect? ; err_code == Err::REDIRECT ; end
32
+ def invalid_snap? ; err_code == Err::INVALID_SNAP ; end
33
+ def mismatch? ; err_code == Err::CAS_MISMATCH ; end
34
+ def not_dir? ; err_code == Err::NOT_DIR ; end
35
+ def is_dir? ; err_code == Err::ISDIR ; end
36
+
37
+ # Custom
38
+ def disconnected? ; err_code == Errno::ECONNREFUSED::Errno ; end
31
39
  end
32
40
 
33
41
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Blake Mizerany