lolita-file-upload 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4b55a583846c741e9a422004046034dd113be46
4
- data.tar.gz: 38377ec221d29ddc9e79c319b1efcf889b24a64f
3
+ metadata.gz: f7c85ce47fe94aa2b5f5092c1c3446505a5486b8
4
+ data.tar.gz: d097e298a429b4109f6d75c51e569d6671e28dff
5
5
  SHA512:
6
- metadata.gz: 8668c8bccc272eb99db7d2ea27a9b9e1ff1855cad2d7044fb80caa030e1b9cee081399b38e1b06174a4c08ad3ef3299fb823fe7aa7abd7515268c8b81e5457a8
7
- data.tar.gz: fcb1f167cdea749270b3bd5196db8c2f886bdf27b22dd3f28d36522b90c9902b7af9dd686f3ee802fe405701518ffa04f0c4419d2a4f0e6f628a7c25f342c892
6
+ metadata.gz: aa18d5a7d61c298b9fe8cad6a3a8e9aa02c607e2fd95b0c24845535294c77352e1348c0e8a130c8973efc6b8a707a3d32e0f1fe399f19d92ba085ed0359fecae
7
+ data.tar.gz: 717af3cd13e9613ce580644f7a6ce9bdb2ef3a5339d368669a6afad40785c23e6f177e9f628c5ab0b9a7c105f38eaf123d174e82a45d6c9d36e7101e05ee4478
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lolita-file-upload (1.0.1)
4
+ lolita-file-upload (1.0.2)
5
5
  carrierwave (~> 0.6)
6
6
  lolita (>= 3.2)
7
7
  mini_magick (~> 3.6)
@@ -0,0 +1,7 @@
1
+ module Lolita::FileUpload
2
+ class Engine < ::Rails::Engine
3
+ initializer 'precompile', group: :all do |app|
4
+ app.config.assets.precompile += %w(tinymce/plugins/lolita_gallery/plugin.js)
5
+ end
6
+ end
7
+ end
@@ -1,18 +1,18 @@
1
- #TODO add exception if lolita not found, show exception and msg that user should install this gem
1
+ # TODO add exception if lolita not found, show exception and msg that user should install this gem
2
2
  # if files tab is defined, but there no tab for that, maybe check that through gem.
3
- if !defined?(Lolita)
4
- require "lolita"
3
+ unless defined?(Lolita)
4
+ require 'lolita'
5
5
  end
6
- $: << File.dirname(__FILE__) unless $:.include?(File.dirname(__FILE__))
7
6
 
8
- I18n.load_path += Dir[File.expand_path("config/locales")+"/**/*.yml"] if defined?(I18n)
7
+ require 'lolita-file-upload/rails/engine'
8
+ I18n.load_path += Dir[File.expand_path('config/locales') + '/**/*.yml'] if defined?(I18n)
9
9
 
10
10
  module Lolita
11
11
  module FileUpload
12
12
  class << self
13
13
  def get_available_file_icons
14
14
  @available_file_icons ||= {}.tap do |results|
15
- Dir.entries(::File.dirname(__FILE__) + "/../app/assets/images/lolita/file-icons").each do |item|
15
+ Dir.entries(::File.dirname(__FILE__) + '/../app/assets/images/lolita/file-icons').each do |item|
16
16
  if ::File.extname(item) == '.png'
17
17
  results[::File.basename(item, '.png')] =
18
18
  ActionController::Base.helpers.asset_path(::File.join('lolita/file-icons', ::File.basename(item)))
@@ -23,23 +23,23 @@ module Lolita
23
23
  end
24
24
  end
25
25
  module Support
26
- autoload :Bytes, "support/bytes"
26
+ autoload :Bytes, 'support/bytes'
27
27
  end
28
-
28
+
29
29
  module Configuration
30
30
  module Tab
31
- autoload :Files, "lolita-file-upload/configuration/tab/files"
31
+ autoload :Files, 'lolita-file-upload/configuration/tab/files'
32
32
  end
33
33
  module Field
34
- autoload :File, "lolita-file-upload/configuration/field/file"
34
+ autoload :File, 'lolita-file-upload/configuration/field/file'
35
35
  end
36
36
  end
37
37
  end
38
38
 
39
39
  Lolita::Hooks.component(:"/lolita/configuration/tab/form").around do
40
- tab = self.component_locals[:tab]
40
+ tab = component_locals[:tab]
41
41
  if tab.is_a?(Lolita::Configuration::Tab::Files)
42
- self.render_component(*tab.build)
42
+ render_component(*tab.build)
43
43
  else
44
44
  let_content
45
45
  end
@@ -48,17 +48,17 @@ end
48
48
  require 'lolita-file-upload/module'
49
49
 
50
50
  if defined?(Rails)
51
- require "lolita-file-upload/rails"
51
+ require 'lolita-file-upload/rails'
52
52
  end
53
53
 
54
- Lolita.after_setup do
55
- Lolita.application.assets << "lolita/file-upload/application_vendor.css"
56
- Lolita.application.assets << "lolita/file-upload/application_vendor.js"
57
- Lolita.application.assets << "lolita/file-upload/application.css"
58
- Lolita.application.assets << "lolita/file-upload/application.js"
54
+ Lolita.after_setup do
55
+ Lolita.application.assets << 'lolita/file-upload/application_vendor.css'
56
+ Lolita.application.assets << 'lolita/file-upload/application_vendor.js'
57
+ Lolita.application.assets << 'lolita/file-upload/application.css'
58
+ Lolita.application.assets << 'lolita/file-upload/application.js'
59
59
  end
60
60
 
61
61
  # How to connect multimedia engine with lolita resources
62
- # Detecting from tabs will not be very good idea because it will load many thing
62
+ # Detecting from tabs will not be very good idea because it will load many thing
63
63
  # There should be the way to connect it on demand when realy multimedia tab is used for resource like
64
64
  # lolita/posts/files/new[create,destroy,update, index]
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "lolita-file-upload"
6
- s.version = "1.0.2"
6
+ s.version = "1.0.3"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["ITHouse (Latvia)", "Arturs Meisters", "Gatis Tomsons"]
9
9
  s.description = "File upload gem for Lolita with with fulll integration - models, controller, views"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita-file-upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITHouse (Latvia)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-01-09 00:00:00.000000000 Z
13
+ date: 2015-01-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: lolita
@@ -149,6 +149,7 @@ files:
149
149
  - lib/lolita-file-upload/configuration/tab/files.rb
150
150
  - lib/lolita-file-upload/module.rb
151
151
  - lib/lolita-file-upload/rails.rb
152
+ - lib/lolita-file-upload/rails/engine.rb
152
153
  - lib/lolita-file-upload/rails/file_upload_routes.rb
153
154
  - lib/support/bytes.rb
154
155
  - lolita-file-upload.gemspec