seed_tray 0.1.2 → 0.2.0

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: 5ea20ed43b5f7549df58563f5fbe0808eff3de78
4
- data.tar.gz: 86d0f807e05626874d004dba8728d12710a452dc
3
+ metadata.gz: ef80e15ffb083167e7d8600310664f59fb9e0885
4
+ data.tar.gz: ec90a4fb0de11c68f155bfc9096d6368cf5b6b77
5
5
  SHA512:
6
- metadata.gz: 62521c2a404967eadc4c9731affb84ccf182a1049a057752d32a6136e458b61a05051ccb4b0bf9c087d114f00040bed2046006cc6ce7f7ad224be64be9f508a5
7
- data.tar.gz: 0f82a2b01f3b471d565354c4e806bd9e30288f66ed2c5a6e4a7e1d82cad22e5b748fc792c726f737a1ed8e4cdd01fbe50250d18cebaa5e347a82a35e4512282f
6
+ metadata.gz: 6d0ae0c0869b51aaf9d781d64567580cb35dee014da58fd9bb5d8acf228c259bdcabd71dd189f4a2bf3a35ec4820124b8311c73a9f0ee19894e3b2f8d85b2999
7
+ data.tar.gz: b49eb01f934451a64d59e83d31cd141466d5d3596873c147113b81b61e7d44a552ae06850e9ec5cc922d9982b2c2ef4acdeadb8104bc231f0fad08fbcfa5a0fe
@@ -18,16 +18,19 @@ class SeedTray
18
18
  controller = $("[data-controller]").data("controller")
19
19
  action = $("[data-action").data("action")
20
20
 
21
- if @root[controller]
21
+ if @root[controller] && ready_defined(@root[controller])
22
22
  @root[controller].ready()
23
23
  else
24
- console.error "Couldn't find #{@root.name}.#{controller}.ready()."
24
+ console.info "Skipped #{@root.name}.#{controller}.ready()."
25
25
 
26
- if @root[controller][action]
26
+ if @root[controller] && @root[controller][action] && ready_defined(@root[controller][action])
27
27
  @root[controller][action].ready()
28
28
  console.info "Executed #{@root.name}.#{controller}.#{action}.ready()."
29
29
  else
30
- console.error "Couldn't find #{@root.name}.#{controller}.#{action}.ready()."
30
+ console.info "Skipped #{@root.name}.#{controller}.#{action}.ready()."
31
+
32
+ ready_defined: (object) ->
33
+ object.ready != undefined
31
34
 
32
35
  site_wide_ready: ->
33
36
 
@@ -1,3 +1,3 @@
1
1
  module SeedTray
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
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.1.2
4
+ version: 0.2.0
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-09 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails