firebase 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -4
- data/VERSION +1 -1
- data/firebase.gemspec +5 -5
- data/lib/firebase.rb +7 -0
- data/lib/firebase/request.rb +4 -0
- data/spec/firebase_spec.rb +7 -0
- metadata +5 -5
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,6 +2,10 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
diff-lcs (1.1.3)
|
5
|
+
ethon (0.5.9)
|
6
|
+
ffi (~> 1.2.0)
|
7
|
+
mime-types (~> 1.18)
|
8
|
+
ffi (1.2.1)
|
5
9
|
git (1.2.5)
|
6
10
|
jeweler (1.8.3)
|
7
11
|
bundler (~> 1.0)
|
@@ -9,7 +13,7 @@ GEM
|
|
9
13
|
rake
|
10
14
|
rdoc
|
11
15
|
json (1.7.0)
|
12
|
-
mime-types (1.
|
16
|
+
mime-types (1.21)
|
13
17
|
rake (0.9.2.2)
|
14
18
|
rdoc (3.12)
|
15
19
|
json (~> 1.4)
|
@@ -21,8 +25,8 @@ GEM
|
|
21
25
|
rspec-expectations (2.9.1)
|
22
26
|
diff-lcs (~> 1.1.3)
|
23
27
|
rspec-mocks (2.9.0)
|
24
|
-
typhoeus (0.
|
25
|
-
|
28
|
+
typhoeus (0.6.1)
|
29
|
+
ethon (~> 0.5.9)
|
26
30
|
|
27
31
|
PLATFORMS
|
28
32
|
ruby
|
@@ -31,4 +35,4 @@ DEPENDENCIES
|
|
31
35
|
jeweler (~> 1.8.3)
|
32
36
|
json
|
33
37
|
rspec
|
34
|
-
typhoeus
|
38
|
+
typhoeus (>= 0.6.1)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/firebase.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "firebase"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oscar Del Ben"]
|
12
|
-
s.date = "2013-02-
|
12
|
+
s.date = "2013-02-21"
|
13
13
|
s.description = "Firebase wrapper for Ruby"
|
14
14
|
s.email = "info@oscardelben.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -42,18 +42,18 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.specification_version = 3
|
43
43
|
|
44
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
-
s.add_runtime_dependency(%q<typhoeus>, [">= 0"])
|
45
|
+
s.add_runtime_dependency(%q<typhoeus>, [">= 0.6.1"])
|
46
46
|
s.add_runtime_dependency(%q<json>, [">= 0"])
|
47
47
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
48
48
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
49
49
|
else
|
50
|
-
s.add_dependency(%q<typhoeus>, [">= 0"])
|
50
|
+
s.add_dependency(%q<typhoeus>, [">= 0.6.1"])
|
51
51
|
s.add_dependency(%q<json>, [">= 0"])
|
52
52
|
s.add_dependency(%q<rspec>, [">= 0"])
|
53
53
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
54
54
|
end
|
55
55
|
else
|
56
|
-
s.add_dependency(%q<typhoeus>, [">= 0"])
|
56
|
+
s.add_dependency(%q<typhoeus>, [">= 0.6.1"])
|
57
57
|
s.add_dependency(%q<json>, [">= 0"])
|
58
58
|
s.add_dependency(%q<rspec>, [">= 0"])
|
59
59
|
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
data/lib/firebase.rb
CHANGED
@@ -38,5 +38,12 @@ module Firebase
|
|
38
38
|
def delete(path)
|
39
39
|
Firebase::Request.delete(path)
|
40
40
|
end
|
41
|
+
|
42
|
+
# Write the data at path but does not delete ommited children. Returns the data
|
43
|
+
# Firebase.update('users/info', { 'name' => 'Oscar' }) => { 'name' => 'Oscar' }
|
44
|
+
def update(path, data)
|
45
|
+
Firebase::Request.patch(path, data)
|
46
|
+
end
|
47
|
+
|
41
48
|
end
|
42
49
|
end
|
data/lib/firebase/request.rb
CHANGED
data/spec/firebase_spec.rb
CHANGED
@@ -39,4 +39,11 @@ describe "Firebase" do
|
|
39
39
|
Firebase.delete('users/info')
|
40
40
|
end
|
41
41
|
end
|
42
|
+
|
43
|
+
describe "update" do
|
44
|
+
it "updates and returns the data" do
|
45
|
+
Firebase::Request.should_receive(:patch).with('users/info', data)
|
46
|
+
Firebase.update('users/info', data)
|
47
|
+
end
|
48
|
+
end
|
42
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 0.6.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.6.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
segments:
|
114
114
|
- 0
|
115
|
-
hash:
|
115
|
+
hash: 585717671023222954
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|