lib/firebase/firebase.rb in motion-firebase-3.1.4 vs lib/firebase/firebase.rb in motion-firebase-3.1.5
- old
+ new
@@ -33,11 +33,11 @@
url = "https://#{url}"
end
# should we support `Firebase.url = 'myapp/path/to/child/'` ? I'm gonna say
# NO for now...
- unless url.include?('.firebaseio.com/')
+ unless url.include?('.firebaseio.com/') || url.include?('.firebaseio-demo.com/')
after_scheme = url.index('//') + 2
if url[after_scheme..-1].include?('/')
raise "Invalid URL #{url.inspect} in #{__method__}: URL does not include 'firebaseio.com'"
end
url = "#{url}.firebaseio.com/"
@@ -86,20 +86,22 @@
self.root['.info/connected']
end
end
def self.offline!
- Firebase.new.offline!
+ Firebase.goOffline
end
+
def offline!
- self.goOffline
+ Firebase.goOffline
end
def self.online!
- Firebase.new.online!
+ Firebase.goOnline
end
+
def online!
- self.goOnline
+ Firebase.goOnline
end
def transaction(options={}, &transaction)
transaction = transaction || options[:transaction]
completion_block = options[:completion]