seed_tray 0.2.0 → 0.2.1
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/app/assets/javascripts/seed_tray.js.coffee.erb +6 -4
- data/lib/seed_tray/version.rb +1 -1
- 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: a94c733fa4e5a27a7101a43af172e5da451cdb7d
|
4
|
+
data.tar.gz: a172568ecf8bcfb6f40412b97fdeda87a9ca03af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b171f00f62d897b99f026932fc70d6b02206c65d9a05d5c214f615de5f1c4e20ac732ff035c58bacc0d534a76fd60953f42ec73bf8f21e2f63207edbe70b3f
|
7
|
+
data.tar.gz: fc8441c78fb5cc31bfcdba2c3e79e6ffbfb2c4f6c1ce0d1ef29939d6ec05f5f70d1ce1bb8ee21411c147b025904167f1cbdd7912d17978951d2524bf0422e476
|
@@ -1,10 +1,12 @@
|
|
1
|
+
<% app_name = Rails.application.class.to_s.split('::').first %>
|
2
|
+
|
1
3
|
class SeedTray
|
2
4
|
constructor: () ->
|
3
5
|
if window.Turbolinks != undefined
|
4
6
|
$(window).on "page:change", => @ready()
|
5
7
|
else
|
6
8
|
$(@ready)
|
7
|
-
@root = <%=
|
9
|
+
@root = <%= app_name %>
|
8
10
|
|
9
11
|
# Dynamically delegate ready to controller#action specific ready methods
|
10
12
|
ready: =>
|
@@ -18,12 +20,12 @@ class SeedTray
|
|
18
20
|
controller = $("[data-controller]").data("controller")
|
19
21
|
action = $("[data-action").data("action")
|
20
22
|
|
21
|
-
if @root[controller] && ready_defined(@root[controller])
|
23
|
+
if @root[controller] && @ready_defined(@root[controller])
|
22
24
|
@root[controller].ready()
|
23
25
|
else
|
24
26
|
console.info "Skipped #{@root.name}.#{controller}.ready()."
|
25
27
|
|
26
|
-
if @root[controller] && @root[controller][action] && ready_defined(@root[controller][action])
|
28
|
+
if @root[controller] && @root[controller][action] && @ready_defined(@root[controller][action])
|
27
29
|
@root[controller][action].ready()
|
28
30
|
console.info "Executed #{@root.name}.#{controller}.#{action}.ready()."
|
29
31
|
else
|
@@ -34,4 +36,4 @@ class SeedTray
|
|
34
36
|
|
35
37
|
site_wide_ready: ->
|
36
38
|
|
37
|
-
<%=
|
39
|
+
<%= app_name %>.delegator = new SeedTray()
|
data/lib/seed_tray/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seed_tray
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey Guenther
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|