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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac3be306c998f05111f32601b7aca15fa6730e72
4
- data.tar.gz: ffce0ca76a0027e36b3232b3a157b490a41aecee
3
+ metadata.gz: bbe817d57146676d5669c84a0d18cb746caa8f93
4
+ data.tar.gz: 0b438f917a2521ec2a81279ebae4a1d956d69396
5
5
  SHA512:
6
- metadata.gz: ff28957dafc6dbb40853f0b3d33deeaea9107e3595a8054708c193245e8d29178b91042361a5d8b97bd0c809797a4b6081c770dd1ee70a48ab190ebd0a0e6743
7
- data.tar.gz: e27892161895450b6ee9ec29087846cbaea6250a0c0a82a1b07cf3e0cbd54908227f45ad7958c7104a3968e425ed8502395a51dcc999d4e90b053d0dbbb09173
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
- console.info "Skipped #{@root.name}.#{controller}.render()."
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
- console.info "Executed #{@root.name}.#{controller}.#{action}.render()."
35
+ unless suppress_console
36
+ console.info "Executed #{@root.name}.#{controller}.#{action}.render()."
37
+
34
38
  else
35
- console.info "Skipped #{@root.name}.#{controller}.#{action}.render()."
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
@@ -1,3 +1,3 @@
1
1
  module SeedTray
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
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.0
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-15 00:00:00.000000000 Z
11
+ date: 2016-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails