tiny_mce 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tiny_mce.rb +19 -2
- data/tiny_mce.gemspec +1 -1
- metadata +4 -4
data/lib/tiny_mce.rb
CHANGED
@@ -137,8 +137,25 @@ module TinyMCE
|
|
137
137
|
def self.install
|
138
138
|
return unless File.directory?(self.assets_path)
|
139
139
|
require 'fileutils'
|
140
|
-
|
141
|
-
|
140
|
+
|
141
|
+
# public/javascripts/tiny_mce/plugins/imageselector/editor_plugin.js
|
142
|
+
assests_plugins_path = File.join(self.assets_path, 'plugins')
|
143
|
+
|
144
|
+
# check if plugin subdirectory is the same as already under tiny_mce/plugins
|
145
|
+
plugin_source_path = Dir[File.join(self.assets_path, 'plugins', '*')][0]
|
146
|
+
plugin_directory_name = File.basename(plugin_source_path)
|
147
|
+
destination_source_path = File.join(Rails.root.to_s,
|
148
|
+
'public',
|
149
|
+
'javascripts',
|
150
|
+
'tiny_mce',
|
151
|
+
'plugins',
|
152
|
+
plugin_directory_name)
|
153
|
+
|
154
|
+
# diff will return differences if there are any or empty string if not
|
155
|
+
if !File.exist?(destination_source_path) || `diff -r #{plugin_source_path} #{destination_source_path}`.present?
|
156
|
+
puts "Installing #{self.name} plugin assets from #{self.assets_path}"
|
157
|
+
FileUtils.cp_r "#{self.assets_path}/.", File.join(Rails.root.to_s, 'public', 'javascripts', 'tiny_mce')
|
158
|
+
end
|
142
159
|
end
|
143
160
|
end
|
144
161
|
end
|
data/tiny_mce.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = "tiny_mce"
|
4
|
-
s.version = "0.1.
|
4
|
+
s.version = "0.1.8"
|
5
5
|
s.authors = ["Blake Watters", "Kieran Pilkington", "Sergio Cambra", "Alexander Semyonov", "Marian Theisen", "Walter McGinnis", "Frederico Macedo de Assunção", "Josh Proehl", "Sasha Gerrand"]
|
6
6
|
s.email = "kete@katipo.co.nz"
|
7
7
|
s.homepage = "http://github.com/kete/tiny_mce"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_mce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Blake Watters
|
@@ -23,7 +23,7 @@ autorequire:
|
|
23
23
|
bindir: bin
|
24
24
|
cert_chain: []
|
25
25
|
|
26
|
-
date: 2011-09-
|
26
|
+
date: 2011-09-28 00:00:00 +13:00
|
27
27
|
default_executable:
|
28
28
|
dependencies: []
|
29
29
|
|