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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/fire-model.gemspec +2 -2
  4. data/lib/fire-model.rb +20 -11
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f20e6ee2e52181a1490b86b89ac6fd856ef625d
4
- data.tar.gz: 47ed6a3f6a15e509dcd8a0be087b45fd2b0d10a0
3
+ metadata.gz: 4809220eb2a1cc5481b34b214b9d6ec19da5c9fb
4
+ data.tar.gz: efb51d7f87f3203404f0f030c588451e6089f4e9
5
5
  SHA512:
6
- metadata.gz: b39771a4764b4ac5c23bf893092a1504c4db6813b119bb6868af7e4a25aa02abe276a89fec772157b787778a601e61391db08c61b425f1db9728c1d05cfb2507
7
- data.tar.gz: dee861d2c31ed08b12b4ce2bc0a31bd37678c8e644e1be37c90c7b322cfd1a2564c88aecf7292852dc4bcbd752311cb01cecc5687ac0a6514889c94cc9b6de1f
6
+ metadata.gz: a8381e70908de5fc46da08be6fca3f412cd4b738b36fc354820c1f821abf9354f0e8203ef5f0932527c855d16c97a2d4504b6c4cc1f1e6757f5c21e5c508a59a
7
+ data.tar.gz: 6a58ce0cda46cb96135db5393710cc5ba84151f04ac46d99141727d1003e40e36472acc2e49ad998ee433047125e0740f5de21c36885e6ff994699e4d26ce472
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
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.11 ruby lib
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.11"
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
- def self.config
16
- @config
17
- end
16
+ class << self
18
17
 
19
- def self.drop!
20
- connection.delete(?/)
21
- end
18
+ def config
19
+ @config
20
+ end
22
21
 
23
- def self.tree
24
- connection.get(?/).body
25
- end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fire-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Tarasenko