fire-model 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/fire-model.gemspec +2 -2
- data/lib/fire-model.rb +20 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4809220eb2a1cc5481b34b214b9d6ec19da5c9fb
|
4
|
+
data.tar.gz: efb51d7f87f3203404f0f030c588451e6089f4e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8381e70908de5fc46da08be6fca3f412cd4b738b36fc354820c1f821abf9354f0e8203ef5f0932527c855d16c97a2d4504b6c4cc1f1e6757f5c21e5c508a59a
|
7
|
+
data.tar.gz: 6a58ce0cda46cb96135db5393710cc5ba84151f04ac46d99141727d1003e40e36472acc2e49ad998ee433047125e0740f5de21c36885e6ff994699e4d26ce472
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
data/fire-model.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: fire-model 0.0.
|
5
|
+
# stub: fire-model 0.0.12 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "fire-model"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.12"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/fire-model.rb
CHANGED
@@ -4,6 +4,7 @@ module Fire
|
|
4
4
|
require 'model/base'
|
5
5
|
|
6
6
|
require 'ostruct'
|
7
|
+
ROOT = ?/
|
7
8
|
|
8
9
|
def self.setup(options)
|
9
10
|
configuration = {}
|
@@ -12,20 +13,28 @@ module Fire
|
|
12
13
|
@config = OpenStruct.new(configuration)
|
13
14
|
end
|
14
15
|
|
15
|
-
|
16
|
-
@config
|
17
|
-
end
|
16
|
+
class << self
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
def config
|
19
|
+
@config
|
20
|
+
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
def connection
|
23
|
+
Fire::Connection::Request.new
|
24
|
+
end
|
25
|
+
|
26
|
+
def drop!
|
27
|
+
connection.delete(ROOT)
|
28
|
+
end
|
29
|
+
|
30
|
+
def tree
|
31
|
+
connection.get(ROOT).body
|
32
|
+
end
|
33
|
+
|
34
|
+
def reset_tree!(data=nil)
|
35
|
+
connection.set(ROOT, data)
|
36
|
+
end
|
26
37
|
|
27
|
-
def self.connection
|
28
|
-
Fire::Connection::Request.new
|
29
38
|
end
|
30
39
|
|
31
40
|
private
|