seed_tray 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/seed_tray.js.coffee.erb +8 -3
- data/lib/seed_tray/version.rb +1 -1
- data/lib/seed_tray.rb +16 -0
- 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: bbe817d57146676d5669c84a0d18cb746caa8f93
|
4
|
+
data.tar.gz: 0b438f917a2521ec2a81279ebae4a1d956d69396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97ef7a8c03bc082cb61c41788bb963526349c627ba0235d49d61e8a512cd89b37b270dbf1ebf6314248fa2430bfe27c92dca6a23c9ccda2d8ed50b79f373faf2
|
7
|
+
data.tar.gz: cf21df6cd3cb586ddeab8441351d8e51b378a998650d7615d844174e4dd89d30f9be7f24f38627e880ed27d9f78fab4dd1a552b7570e7c851c1445aebc4eaf62
|
@@ -20,19 +20,24 @@ class SeedTray
|
|
20
20
|
@site_wide_render()
|
21
21
|
|
22
22
|
delegate_render: =>
|
23
|
+
suppress_console = <%= SeedTray.configuration.suppress_console %>
|
23
24
|
controller = $("[data-controller]").data("controller")
|
24
25
|
action = $("[data-action]").data("action")
|
25
26
|
|
26
27
|
if @root[controller] && @render_defined(@root[controller])
|
27
28
|
@root[controller].render()
|
28
29
|
else
|
29
|
-
|
30
|
+
unless suppress_console
|
31
|
+
console.info "Skipped #{@root.name}.#{controller}.render()."
|
30
32
|
|
31
33
|
if @root[controller] && @root[controller][action] && @render_defined(@root[controller][action])
|
32
34
|
@root[controller][action].render()
|
33
|
-
|
35
|
+
unless suppress_console
|
36
|
+
console.info "Executed #{@root.name}.#{controller}.#{action}.render()."
|
37
|
+
|
34
38
|
else
|
35
|
-
|
39
|
+
unless suppress_console
|
40
|
+
console.info "Skipped #{@root.name}.#{controller}.#{action}.render()."
|
36
41
|
|
37
42
|
render_defined: (object) ->
|
38
43
|
object.render != undefined
|
data/lib/seed_tray/version.rb
CHANGED
data/lib/seed_tray.rb
CHANGED
@@ -2,4 +2,20 @@ require "seed_tray/version"
|
|
2
2
|
|
3
3
|
module SeedTray
|
4
4
|
require 'seed_tray/engine' if defined?(Rails)
|
5
|
+
class << self
|
6
|
+
attr_accessor :configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.configure
|
10
|
+
self.configuration ||= Configuration.new
|
11
|
+
yield(configuration)
|
12
|
+
end
|
13
|
+
|
14
|
+
class Configuration
|
15
|
+
attr_accessor :suppress_console
|
16
|
+
end
|
17
|
+
|
18
|
+
self.configure do |config|
|
19
|
+
config.suppress_console = false
|
20
|
+
end
|
5
21
|
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.4.
|
4
|
+
version: 0.4.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-04-
|
11
|
+
date: 2016-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|