tinymce-rails 4.9.11 → 4.9.11.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
  SHA256:
3
- metadata.gz: 2d4a9e6b463099f136b4a76925e428f4adbdc905d04d316a97b1ea3508a10ddf
4
- data.tar.gz: 103162d595c1bd4948ef0f41c101a5388a77d521737855a076c4c077d7b92038
3
+ metadata.gz: 9119c17e2bcb3d33ab9b959c0c6c41c8d529106e51ab483f338d1e64423481d4
4
+ data.tar.gz: 7e358486b6a0f1db1794349cfeb7413538208df73d14bc3b6d221d2069222c91
5
5
  SHA512:
6
- metadata.gz: 80ed2f75eb71bab2b14c5d380d6c8c9400079f253baa34471102fd71afa3019a3931f1843375a00f47d0398e43eb672568a2c6960bb6cf06ce62a2f00bbc28c6
7
- data.tar.gz: cbc4371630d008d8b2d308ad0cd9687b43487bfbdf9e6f1d15f0bff8295ea5c41a03fa213a3d1e488103ae234600cce3660993c411718d4bedf70ac6fe62ac14
6
+ metadata.gz: 5222c58b96aabcf11ea4e41328be95d4f6461aaab3406dc148b5cff078b5d4f2b12c96ca01c5f3c5c83d8c6a9730667afd57640e6c54b4a3e7ef27d57af28bfa
7
+ data.tar.gz: ec2c6ed08479406cbc7829e702557b9ea9a754f5ab091e9119d216150b463fcfcc061dd83f6d2e8b719aa203dd9b68cd24c4117c3370b4aafd4158cf1604c911
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  Rails Integration for TinyMCE
2
2
  =============================
3
3
 
4
- The `tinymce-rails` gem integrates the [TinyMCE](http://www.tinymce.com/) editor with the Rails asset pipeline.
4
+ The `tinymce-rails` gem integrates the [TinyMCE](https://www.tiny.cloud/) editor with the Rails asset pipeline.
5
5
 
6
- This gem is compatible with Rails 3.1.1 and higher (including Rails 4).
6
+ This gem is compatible with Rails 5.0 and higher.
7
7
 
8
- This is the branch for TinyMCE 4. For TinyMCE 5, please see the [master branch](https://github.com/spohlenz/tinymce-rails), and for TinyMCE 3.5.x, please see the [tinymce-3 branch](https://github.com/spohlenz/tinymce-rails/tree/tinymce-3).
8
+ This is the branch for TinyMCE 4. Please see the [`main`](https://github.com/spohlenz/tinymce-rails) branch for TinyMCE 7, and alternate branches for [TinyMCE 6](https://github.com/spohlenz/tinymce-rails/tree/tinymce-6), [TinyMCE 5](https://github.com/spohlenz/tinymce-rails/tree/tinymce-5) & [TinyMCE 3.5.x](https://github.com/spohlenz/tinymce-rails/tree/tinymce-3).
9
9
 
10
- [![Build Status](https://travis-ci.org/spohlenz/tinymce-rails.png?branch=master)](https://travis-ci.org/spohlenz/tinymce-rails)
10
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/spohlenz/tinymce-rails/rspec.yml?branch=tinymce-4)](https://github.com/spohlenz/tinymce-rails/actions?query=branch%3Atinymce-4)
11
11
 
12
12
  **New in 3.5.11, 4.1.10 and 4.2.1:** Alternative asset installation methods (copy vs compile/symlink). See the [Asset Compilation](#asset-compilation) section below for details.
13
13
 
@@ -52,7 +52,7 @@ alternate:
52
52
  - table
53
53
  ```
54
54
 
55
- See the [TinyMCE 4 Documentation](https://www.tinymce.com/docs/configure/) for a full list of configuration options.
55
+ See the [TinyMCE 4 Documentation](https://www.tiny.cloud/docs-4x/configure/) for a full list of configuration options.
56
56
 
57
57
 
58
58
  **3. Include the TinyMCE assets**
@@ -24,14 +24,14 @@ module TinyMCE
24
24
  def symlink_asset(src, dest)
25
25
  with_asset(src, dest) do |src, dest|
26
26
  create_symlink(src, dest)
27
- create_symlink("#{src}.gz", "#{dest}.gz") if File.exists?("#{src}.gz")
27
+ create_symlink("#{src}.gz", "#{dest}.gz") if File.exist?("#{src}.gz")
28
28
  end
29
29
  end
30
30
 
31
31
  def create_symlink(src, dest)
32
32
  target = File.basename(src)
33
33
 
34
- unless File.exists?(dest) && File.symlink?(dest) && File.readlink(dest) == target
34
+ unless File.exist?(dest) && File.symlink?(dest) && File.readlink(dest) == target
35
35
  logger.info "Creating symlink #{dest}"
36
36
  FileUtils.ln_s(target, dest, :force => true)
37
37
  else
@@ -56,7 +56,7 @@ module TinyMCE
56
56
  src = File.join(@target, src)
57
57
  dest = File.join(@target, dest)
58
58
 
59
- yield src, dest if File.exists?(src)
59
+ yield src, dest if File.exist?(src)
60
60
  end
61
61
  end
62
62
  end
@@ -6,6 +6,7 @@ module TinyMCE
6
6
  def self.load(manifest_path)
7
7
  JsonManifest.try(manifest_path, ".sprockets-manifest*.json") ||
8
8
  JsonManifest.try(manifest_path, "manifest*.json") ||
9
+ JsonManifest.try(manifest_path) ||
9
10
  YamlManifest.try(manifest_path) ||
10
11
  NullManifest.new
11
12
  end
@@ -37,7 +38,7 @@ module TinyMCE
37
38
  class YamlManifest < AssetManifest
38
39
  def self.try(manifest_path)
39
40
  yaml_file = File.join(manifest_path, "manifest.yml")
40
- new(yaml_file) if File.exists?(yaml_file)
41
+ new(yaml_file) if File.exist?(yaml_file)
41
42
  end
42
43
 
43
44
  def initialize(file)
@@ -75,9 +76,13 @@ module TinyMCE
75
76
  end
76
77
 
77
78
  class JsonManifest < AssetManifest
78
- def self.try(manifest_path, pattern)
79
- paths = Dir[File.join(manifest_path, pattern)]
80
- new(paths.first) if paths.any?
79
+ def self.try(manifest_path, pattern=nil)
80
+ if pattern
81
+ paths = Dir[File.join(manifest_path, pattern)]
82
+ new(paths.first) if paths.any?
83
+ elsif File.file?(manifest_path)
84
+ new(manifest_path)
85
+ end
81
86
  end
82
87
 
83
88
  def initialize(file)
@@ -14,7 +14,7 @@ module TinyMCE::Rails
14
14
  }
15
15
  end
16
16
 
17
- FUNCTION_REGEX = /^function\s*\(/
17
+ FUNCTION_REGEX = /^function\s*\(([\w\d\s_,]*)\)\s*\{([^}]*)\}|\(([\w\d\s_,]*)\)\s*=>\s*\{([^}]*)\}/
18
18
  RELATIVE_PATH_REGEX = /^(\/|\.{1,2})\S*/
19
19
 
20
20
  COMMA = ",".freeze
@@ -47,7 +47,7 @@ module TinyMCE::Rails
47
47
  # Check for files provided in the content_css option to replace them with their actual path.
48
48
  # If no corresponding stylesheet is found for a file, it will remain unchanged.
49
49
  "content_css" => ->(value) {
50
- helpers = ActionView::Base.new(ActionView::LookupContext.new([]))
50
+ helpers = ActionView::Base.new(ActionView::LookupContext.new([]), {}, nil)
51
51
  separator = OPTION_SEPARATORS["content_css"]
52
52
 
53
53
  value.split(separator).map { |file|
@@ -25,13 +25,13 @@ module TinyMCE::Rails
25
25
  end
26
26
 
27
27
  def last_updated
28
- File.exists?(path) && File.mtime(path)
28
+ File.exist?(path) && File.mtime(path)
29
29
  end
30
30
 
31
31
  def load_configuration
32
32
  @last_loaded = last_updated
33
33
 
34
- return Configuration.new_with_defaults if !File.exists?(path)
34
+ return Configuration.new_with_defaults if !File.exist?(path)
35
35
 
36
36
  options = load_yaml(path)
37
37
 
@@ -43,7 +43,8 @@ module TinyMCE::Rails
43
43
  end
44
44
 
45
45
  def load_yaml(path)
46
- YAML::load(ERB.new(IO.read(path)).result)
46
+ result = ERB.new(IO.read(path)).result
47
+ YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(result) : YAML.load(result)
47
48
  end
48
49
  end
49
50
  end
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "4.9.11"
3
+ VERSION = "4.9.11.1"
4
4
  TINYMCE_VERSION = "4.9.11"
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.9.11
4
+ version: 4.9.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-14 00:00:00.000000000 Z
11
+ date: 2024-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -145,7 +145,7 @@ homepage: https://github.com/spohlenz/tinymce-rails
145
145
  licenses:
146
146
  - MIT
147
147
  metadata: {}
148
- post_install_message:
148
+ post_install_message:
149
149
  rdoc_options: []
150
150
  require_paths:
151
151
  - lib
@@ -160,8 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 3.0.8
164
- signing_key:
163
+ rubygems_version: 3.5.9
164
+ signing_key:
165
165
  specification_version: 4
166
166
  summary: Rails asset pipeline integration for TinyMCE.
167
167
  test_files: []