tinymce-rails 4.0.28 → 4.0.28.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  module TinyMCE::Rails
2
2
  class Engine < ::Rails::Engine
3
3
  config.tinymce = ActiveSupport::OrderedOptions.new
4
-
4
+
5
5
  # Set an explicit base path for TinyMCE assets (usually defaults to /assets/tinymce)
6
6
  config.tinymce.base = nil
7
7
 
@@ -20,15 +20,14 @@ module TinyMCE::Rails
20
20
  end
21
21
 
22
22
  def self.default_base
23
- File.join(Rails.application.config.action_controller.asset_host || "",
24
- relative_url_root || "",
23
+ File.join(asset_host || "", relative_url_root || "",
25
24
  Rails.application.config.assets.prefix || "/",
26
25
  "tinymce")
27
26
  end
28
-
27
+
29
28
  def self.relative_url_root
30
29
  config = Rails.application.config
31
-
30
+
32
31
  if config.respond_to?(:relative_url_root)
33
32
  config.relative_url_root
34
33
  else
@@ -36,5 +35,20 @@ module TinyMCE::Rails
36
35
  config.action_controller.relative_url_root
37
36
  end
38
37
  end
38
+
39
+ def self.asset_host
40
+ host = Rails.application.config.action_controller.asset_host
41
+
42
+ if host.respond_to?(:call)
43
+ # Callable asset hosts cannot be supported during
44
+ # precompilation as there is no request object
45
+ nil
46
+ elsif host =~ /%d/
47
+ # Load all TinyMCE assets from the first asset host
48
+ host % 0
49
+ else
50
+ host
51
+ end
52
+ end
39
53
  end
40
54
  end
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "4.0.28"
3
+ VERSION = "4.0.28.1"
4
4
  TINYMCE_VERSION = "4.0.28"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinymce-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.28
4
+ version: 4.0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-28 00:00:00.000000000 Z
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -134,7 +134,8 @@ files:
134
134
  - vendor/assets/javascripts/tinymce/tinymce.jquery.js
135
135
  - vendor/assets/javascripts/tinymce/tinymce.js
136
136
  homepage: https://github.com/spohlenz/tinymce-rails
137
- licenses: []
137
+ licenses:
138
+ - MIT
138
139
  metadata: {}
139
140
  post_install_message:
140
141
  rdoc_options: []