seed_tray 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef80e15ffb083167e7d8600310664f59fb9e0885
4
- data.tar.gz: ec90a4fb0de11c68f155bfc9096d6368cf5b6b77
3
+ metadata.gz: a94c733fa4e5a27a7101a43af172e5da451cdb7d
4
+ data.tar.gz: a172568ecf8bcfb6f40412b97fdeda87a9ca03af
5
5
  SHA512:
6
- metadata.gz: 6d0ae0c0869b51aaf9d781d64567580cb35dee014da58fd9bb5d8acf228c259bdcabd71dd189f4a2bf3a35ec4820124b8311c73a9f0ee19894e3b2f8d85b2999
7
- data.tar.gz: b49eb01f934451a64d59e83d31cd141466d5d3596873c147113b81b61e7d44a552ae06850e9ec5cc922d9982b2c2ef4acdeadb8104bc231f0fad08fbcfa5a0fe
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 = <%= Rails.application.class.to_s.split('::').first %>
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
- <%= Rails.application.class.to_s.split('::').first %>.delegator = new SeedTray()
39
+ <%= app_name %>.delegator = new SeedTray()
@@ -1,3 +1,3 @@
1
1
  module SeedTray
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails