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 +4 -4
- data/README.md +2 -0
- data/app/assets/javascript/jibe.js.coffee +1 -1
- data/lib/jibe/version.rb +1 -1
- data/lib/jibe/view_helpers.rb +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 778a48530eaa3bbd17f4041dbad31fa693cf3a05
|
|
4
|
+
data.tar.gz: d64fc3edf87179cc9cb8b5426fcf89a376346597
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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]}"
|
|
23
|
+
if "#{data.data[s_split[0]]}" == "#{s_split[1]}"
|
|
24
24
|
scope_passes += 1
|
|
25
25
|
else
|
|
26
26
|
scope_passes += 1
|
data/lib/jibe/version.rb
CHANGED
data/lib/jibe/view_helpers.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
+
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-
|
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|