jibe 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bdd84d7feae05580d1c69afcc28d953030ec5f8
4
- data.tar.gz: 10308c8778b8996cfed0f8a5de829bce160016a1
3
+ metadata.gz: 778a48530eaa3bbd17f4041dbad31fa693cf3a05
4
+ data.tar.gz: d64fc3edf87179cc9cb8b5426fcf89a376346597
5
5
  SHA512:
6
- metadata.gz: 5e8c3b2caa25986d945356b19f4b634cbf0010655b1af33b1484c537cdb8fe2f14c323ff7d1f7f46b6203d98f6ad503a1cf1ce43bb260891ccce418750c9ced2
7
- data.tar.gz: bba8e8d2f366636f09b2bfc6038ac224af5b95121a137fb13c804000221d6bc5f3132ab2e0fcc57f396d02461dc3e79c596f7bcfd5bd0cc754c6a76755b94ff5
6
+ metadata.gz: 5c5318eb0e5f047600f8353eb894e0aee6e3ac394d373b7585c3fb8aa0dce2afe7f2ffb844eeb92bc0d579048c1678f36f47bec39ae9d3bdbf637e745b37d999
7
+ data.tar.gz: 0b12a9c6130b15acd0311520ca2fadc2f7c317def282efab86596cbcccf27ed326c0da8a93119ec464e931969fc8a3d0d77532eb6dc952012810f29fa5836922
data/README.md CHANGED
@@ -4,6 +4,8 @@ Jibe keeps simple data 'n sync with very little setup. For now, it relies on Pus
4
4
 
5
5
  ## Installation
6
6
 
7
+ Looking for a quick video of what Jibe can do? [http://youtu.be/KbFczIFprts](http://youtu.be/KbFczIFprts)
8
+
7
9
  First, Add `gem 'jibe'` to your application's Gemfile and `bundle`.
8
10
 
9
11
  Then, [Set up Pusher.](https://github.com/pusher/pusher-gem)
@@ -20,7 +20,7 @@ Jibe.compareScopeWithData = (scope, data) ->
20
20
  $.each scope, (index, s) ->
21
21
  s_split = s.split("=")
22
22
  if s_split.length
23
- if "#{data.data[s_split[0]]}" == "#{s_split[1]}" || "#{data.data.data[s_split[0]]}" == "#{s_split[1]}"
23
+ if "#{data.data[s_split[0]]}" == "#{s_split[1]}"
24
24
  scope_passes += 1
25
25
  else
26
26
  scope_passes += 1
@@ -1,3 +1,3 @@
1
1
  module Jibe
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -8,8 +8,16 @@ module Jibe
8
8
  restrict_to = args.try(:last)[:restrict_to]
9
9
  partial = args.try(:partial)
10
10
  end
11
-
12
- resource = "#{args.first.class.to_s.split("::").first}".downcase.pluralize
11
+
12
+ if args.first.is_a? String
13
+ resource = args.first
14
+ else
15
+ begin
16
+ resource = args.first.table_name
17
+ rescue
18
+ resource = args.first.first.class.name.downcase.pluralize
19
+ end
20
+ end
13
21
 
14
22
  data = {}
15
23
  data[:resource] = resource
@@ -35,7 +43,7 @@ module Jibe
35
43
 
36
44
  data[:silent] = true if args.first.nil?
37
45
  html = content_tag :script, nil, type: "x-jibe", data: data
38
- html += render *args unless args.first.nil?
46
+ html += render *args if !args.first.nil? && !args.first.is_a?(String)
39
47
  html.html_safe
40
48
  end
41
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jibe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dallas Read
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-26 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler