phrasing 3.0.8 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,7 +90,7 @@ var editor = (function() {
90
90
 
91
91
  var selection = window.getSelection();
92
92
 
93
- if (event.target.className === "url-input" || event.target.classList.contains( "url")) {
93
+ if (event.target.className === "url-input" || (typeof event.target.classList !== 'undefined' && event.target.classList.contains("url"))) {
94
94
  currentNodeList = findNodes( selection.focusNode );
95
95
  updateBubbleStates();
96
96
  return;
data/lib/phrasing.rb CHANGED
@@ -23,9 +23,18 @@ module Phrasing
23
23
  mattr_accessor :allow_update_on_all_models_and_attributes
24
24
  mattr_accessor :route
25
25
  mattr_accessor :staging_server_endpoint
26
-
26
+
27
27
  @@route = 'phrasing'
28
28
 
29
+ def self.log
30
+ @@log
31
+ end
32
+
33
+ def self.log=(log_value)
34
+ @@log = log_value
35
+ suppress_log if log_value == false
36
+ end
37
+
29
38
  def self.setup
30
39
  yield self
31
40
  end
@@ -48,4 +57,23 @@ module Phrasing
48
57
  allow_update_on_all_models_and_attributes == true or whitelist.include? "#{klass}.#{attribute}"
49
58
  end
50
59
 
60
+ private
61
+
62
+ def self.suppress_log
63
+ logger_class = defined?(ActiveSupport::Logger) ? ActiveSupport::Logger::SimpleFormatter : Logger::SimpleFormatter
64
+
65
+ logger_class.class_eval do
66
+
67
+ alias_method :old_call, :call
68
+
69
+ def call(severity, timestamp, progname, msg)
70
+ unless (msg.include? "SELECT" and (msg.include? "phrasing_phrases" or msg.include? "phrasing_phrase_versions"))
71
+ old_call(severity, timestamp, progname, msg)
72
+ end
73
+ end
74
+
75
+ end
76
+ end
77
+
78
+
51
79
  end
@@ -1,3 +1,3 @@
1
1
  module Phrasing
2
- VERSION = "3.0.8"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phrasing
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-12-17 00:00:00.000000000 Z
13
+ date: 2014-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails