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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/lolita-file-upload/rails/engine.rb +7 -0
- data/lib/lolita-file-upload.rb +19 -19
- data/lolita-file-upload.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7c85ce47fe94aa2b5f5092c1c3446505a5486b8
|
4
|
+
data.tar.gz: d097e298a429b4109f6d75c51e569d6671e28dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa18d5a7d61c298b9fe8cad6a3a8e9aa02c607e2fd95b0c24845535294c77352e1348c0e8a130c8973efc6b8a707a3d32e0f1fe399f19d92ba085ed0359fecae
|
7
|
+
data.tar.gz: 717af3cd13e9613ce580644f7a6ce9bdb2ef3a5339d368669a6afad40785c23e6f177e9f628c5ab0b9a7c105f38eaf123d174e82a45d6c9d36e7101e05ee4478
|
data/Gemfile.lock
CHANGED
data/lib/lolita-file-upload.rb
CHANGED
@@ -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
|
-
|
4
|
-
require
|
3
|
+
unless defined?(Lolita)
|
4
|
+
require 'lolita'
|
5
5
|
end
|
6
|
-
$: << File.dirname(__FILE__) unless $:.include?(File.dirname(__FILE__))
|
7
6
|
|
8
|
-
|
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__) +
|
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,
|
26
|
+
autoload :Bytes, 'support/bytes'
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
module Configuration
|
30
30
|
module Tab
|
31
|
-
|
31
|
+
autoload :Files, 'lolita-file-upload/configuration/tab/files'
|
32
32
|
end
|
33
33
|
module Field
|
34
|
-
autoload :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 =
|
40
|
+
tab = component_locals[:tab]
|
41
41
|
if tab.is_a?(Lolita::Configuration::Tab::Files)
|
42
|
-
|
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
|
-
|
51
|
+
require 'lolita-file-upload/rails'
|
52
52
|
end
|
53
53
|
|
54
|
-
Lolita.after_setup do
|
55
|
-
Lolita.application.assets <<
|
56
|
-
Lolita.application.assets <<
|
57
|
-
Lolita.application.assets <<
|
58
|
-
Lolita.application.assets <<
|
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]
|
data/lolita-file-upload.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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
|