activeadmin_trumbowyg 0.1.1 → 0.1.3

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: 8b457a71a693b67b928ea6baa709621833deceef
4
- data.tar.gz: b8ab27c3e191c86ed895807d707550bc09fdf7c9
3
+ metadata.gz: 36e41988cfed616a2afc9daa57fbda243e9f836f
4
+ data.tar.gz: f76c69872bab48d448a87120b868007283602d67
5
5
  SHA512:
6
- metadata.gz: 76bfca81692bbad6d8e1238e43c11cc780547d5c51a91218ccbcf37e90004c2ead2ed88529db1ac25bc0420796d0d25206bbfb55a3946c564767d70482c45175
7
- data.tar.gz: a8f0f3b34e3369af746539ebf5d6ac8752ff7969cff777ac8cc95adbb4b2b18fcc90a7621daf921520431ee19e8c5559498762adf57d24cabcda866b270b79af
6
+ metadata.gz: babf60787336da6ab5db133c888f1cf6cab5cac482f0056040464865fea59c82e08785ea730fb0fa7aaab33c2ef799442d538156f1ef3da42fb38f8df2bb4c4a
7
+ data.tar.gz: d3e0e7a888123089d20ad3bedb27eccbdb41052c058eb338b39169ce46d9f249a6ba26bc03247590e7a24009bb9f735a723538c66ae84e5812bfc9baaa5a998d
data/README.md CHANGED
@@ -18,6 +18,7 @@ An Active Admin plugin to use [Trumbowyg Editor](https://alex-d.github.io/Trumbo
18
18
  //= require activeadmin/trumbowyg_input
19
19
  ```
20
20
  - Use the input with `as: :trumbowyg` in Active Admin model conf
21
+ - To fix icons in production execute the task: `rake trumbowyg:nondigest` (or `rails trumbowyg:nondigest` for Rails 5.x)
21
22
 
22
23
  Why 2 separated scripts? In this way you can include a different version of *trumbowyg editor* if you like.
23
24
 
@@ -1,6 +1,8 @@
1
1
  $(document).ready( function() {
2
2
  $('.trumbowyg-textarea').each(function () {
3
- var options = {};
3
+ var options = {
4
+ svgPath: '/assets/active_admin-trumbowyg.svg'
5
+ };
4
6
  options = $.extend({}, options, $(this).data( 'options' ));
5
7
  $(this).trumbowyg( options );
6
8
  });
@@ -1,3 +1,9 @@
1
+ @font-face
2
+ font-family: 'trumbowyg-icons'
3
+ font-weight: normal
4
+ font-style: normal
5
+ src: font-url('active_admin-trumbowyg.svg')
6
+
1
7
  body.active_admin form .trumbowyg-box
2
8
  display: inline-block
3
9
  width: calc(80% - 22px)
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module Trumbowyg
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -0,0 +1,21 @@
1
+ require 'fileutils'
2
+
3
+ namespace :trumbowyg do
4
+ desc 'Create nondigest versions of all trumbowyg digest assets'
5
+ task nondigest: :environment do
6
+ # include ActionView::Helpers::AssetUrlHelper
7
+ # p font_path( 'active_admin-trumbowyg.svg' )
8
+
9
+ fingerprint = /\-[0-9a-f]{32,64}\./
10
+ path = Rails.root.join( 'public/assets/active_admin-trumbowyg*' )
11
+
12
+ Dir[path].each do |file|
13
+ next unless file =~ fingerprint
14
+ nondigest = file.sub fingerprint, '.'
15
+
16
+ if !File.exist?(nondigest) || File.mtime(file) > File.mtime(nondigest)
17
+ FileUtils.cp file, nondigest, verbose: true, preserve: true
18
+ end
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_trumbowyg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2017-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -36,7 +36,7 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - activeadmin_trumbowyg.gemspec
39
- - app/assets/fonts/ui/icons.svg
39
+ - app/assets/fonts/active_admin-trumbowyg.svg
40
40
  - app/assets/javascripts/activeadmin/trumbowyg/langs/ar.min.js
41
41
  - app/assets/javascripts/activeadmin/trumbowyg/langs/bg.min.js
42
42
  - app/assets/javascripts/activeadmin/trumbowyg/langs/by.min.js
@@ -190,6 +190,7 @@ files:
190
190
  - lib/activeadmin/trumbowyg/version.rb
191
191
  - lib/activeadmin_trumbowyg.rb
192
192
  - lib/formtastic/inputs/trumbowyg_input.rb
193
+ - lib/tasks/trumbowyg.rake
193
194
  - screenshot.jpg
194
195
  homepage: https://github.com/blocknotes/activeadmin_trumbowyg
195
196
  licenses: