filemanager 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -1
- data/MIT-LICENSE +0 -0
- data/README +1 -1
- data/README.zh_CN +1 -1
- data/Rakefile +2 -2
- data/filemanager/app/controllers/fm/filemanager_controller.rb +0 -0
- data/filemanager/app/views/fm/filemanager/index.html.erb +0 -0
- data/filemanager/app/views/fm/filemanager/view.html.erb +0 -0
- data/filemanager/filemanager.yml +0 -0
- data/filemanager/public/filemanager/images/avi.gif +0 -0
- data/filemanager/public/filemanager/images/box.gif +0 -0
- data/filemanager/public/filemanager/images/bullet.gif +0 -0
- data/filemanager/public/filemanager/images/close.gif +0 -0
- data/filemanager/public/filemanager/images/closelabel.gif +0 -0
- data/filemanager/public/filemanager/images/doc.gif +0 -0
- data/filemanager/public/filemanager/images/donate-button.gif +0 -0
- data/filemanager/public/filemanager/images/download-icon.gif +0 -0
- data/filemanager/public/filemanager/images/folder.gif +0 -0
- data/filemanager/public/filemanager/images/gif.gif +0 -0
- data/filemanager/public/filemanager/images/htm.gif +0 -0
- data/filemanager/public/filemanager/images/html.gif +0 -0
- data/filemanager/public/filemanager/images/image-1.jpg +0 -0
- data/filemanager/public/filemanager/images/image.gif +0 -0
- data/filemanager/public/filemanager/images/jpg.gif +0 -0
- data/filemanager/public/filemanager/images/loading.gif +0 -0
- data/filemanager/public/filemanager/images/mov.gif +0 -0
- data/filemanager/public/filemanager/images/nextlabel.gif +0 -0
- data/filemanager/public/filemanager/images/pdf.gif +0 -0
- data/filemanager/public/filemanager/images/png.gif +0 -0
- data/filemanager/public/filemanager/images/ppt.gif +0 -0
- data/filemanager/public/filemanager/images/prevlabel.gif +0 -0
- data/filemanager/public/filemanager/images/rar.gif +0 -0
- data/filemanager/public/filemanager/images/rm.gif +0 -0
- data/filemanager/public/filemanager/images/rmvb.gif +0 -0
- data/filemanager/public/filemanager/images/separator.gif +0 -0
- data/filemanager/public/filemanager/images/spacer.gif +0 -0
- data/filemanager/public/filemanager/images/swf.gif +0 -0
- data/filemanager/public/filemanager/images/thumb-1.jpg +0 -0
- data/filemanager/public/filemanager/images/tool_copy.gif +0 -0
- data/filemanager/public/filemanager/images/tool_cut.gif +0 -0
- data/filemanager/public/filemanager/images/tool_del.gif +0 -0
- data/filemanager/public/filemanager/images/tool_folder.gif +0 -0
- data/filemanager/public/filemanager/images/tool_imagemanager.gif +0 -0
- data/filemanager/public/filemanager/images/tool_new.gif +0 -0
- data/filemanager/public/filemanager/images/tool_paste.gif +0 -0
- data/filemanager/public/filemanager/images/tool_props.gif +0 -0
- data/filemanager/public/filemanager/images/tool_refresh.gif +0 -0
- data/filemanager/public/filemanager/images/tool_unzip.gif +0 -0
- data/filemanager/public/filemanager/images/tool_upload.gif +0 -0
- data/filemanager/public/filemanager/images/tool_zip.gif +0 -0
- data/filemanager/public/filemanager/images/txt.gif +0 -0
- data/filemanager/public/filemanager/images/unknown.gif +0 -0
- data/filemanager/public/filemanager/images/wmv.gif +0 -0
- data/filemanager/public/filemanager/images/xls.gif +0 -0
- data/filemanager/public/filemanager/images/zip.gif +0 -0
- data/filemanager/public/filemanager/javascripts/builder.js +0 -0
- data/filemanager/public/filemanager/javascripts/effects.js +0 -0
- data/filemanager/public/filemanager/javascripts/filemanager.js +0 -0
- data/filemanager/public/filemanager/javascripts/lang/en.js +0 -0
- data/filemanager/public/filemanager/javascripts/lang/zh_CN.js +0 -0
- data/filemanager/public/filemanager/javascripts/lightbox.js +0 -0
- data/filemanager/public/filemanager/javascripts/prototype.js +0 -0
- data/filemanager/public/filemanager/javascripts/prototype_ext.js +0 -0
- data/filemanager/public/filemanager/javascripts/scriptaculous.js +0 -0
- data/filemanager/public/filemanager/javascripts/translate.js +0 -0
- data/filemanager/public/filemanager/resources/resources.txt +0 -0
- data/filemanager/public/filemanager/stylesheets/filelist.css +0 -0
- data/filemanager/public/filemanager/stylesheets/general.css +0 -0
- data/filemanager/public/filemanager/stylesheets/lightbox.css +0 -0
- data/filemanager/temp/temp +0 -0
- data/lib/filemanager.rb +101 -84
- data/lib/filemanager/controller.rb +0 -0
- data/lib/locale.rb +0 -0
- data/lib/locale/base.rb +0 -0
- data/lib/locale/cgi.rb +0 -0
- data/lib/locale/jruby.rb +0 -0
- data/lib/locale/object.rb +0 -0
- data/lib/locale/posix.rb +0 -0
- data/lib/locale/win32.rb +0 -0
- data/lib/locale/win32_table.rb +0 -0
- metadata +4 -7
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
Changes in version 0.2.1 (2008-07-10)
|
2
|
+
-------------------------------------
|
3
|
+
support rails 2.1
|
4
|
+
|
1
5
|
Changes in version 0.2.0 (2008-05-20)
|
2
6
|
-------------------------------------
|
3
7
|
refactory for folder structure, don't copy files to app
|
@@ -8,4 +12,4 @@ fix a bug about sub-directories' number
|
|
8
12
|
|
9
13
|
Changes in version 0.1.0 (2008-05-18)
|
10
14
|
-------------------------------------
|
11
|
-
initial release
|
15
|
+
initial release
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/README
CHANGED
data/README.zh_CN
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake/gempackagetask'
|
3
3
|
PKG_NAME = "filemanager"
|
4
|
-
PKG_VERSION = "0.2.
|
4
|
+
PKG_VERSION = "0.2.1"
|
5
5
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
6
6
|
PKG_FILES = FileList[
|
7
7
|
'[A-Z]*',
|
@@ -27,4 +27,4 @@ end
|
|
27
27
|
Rake::GemPackageTask.new(spec) do |pkg|
|
28
28
|
pkg.need_zip = true
|
29
29
|
pkg.need_tar = true
|
30
|
-
end
|
30
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
data/filemanager/filemanager.yml
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/filemanager/temp/temp
CHANGED
File without changes
|
data/lib/filemanager.rb
CHANGED
@@ -1,84 +1,101 @@
|
|
1
|
-
=begin
|
2
|
-
filemanager.rb
|
3
|
-
Copyright (C) 2008 Leon Li
|
4
|
-
|
5
|
-
You may redistribute it and/or modify it under the same
|
6
|
-
license terms as Ruby.
|
7
|
-
=end
|
8
|
-
|
9
|
-
|
10
|
-
require '
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
1
|
+
=begin
|
2
|
+
filemanager.rb
|
3
|
+
Copyright (C) 2008 Leon Li
|
4
|
+
|
5
|
+
You may redistribute it and/or modify it under the same
|
6
|
+
license terms as Ruby.
|
7
|
+
=end
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'action_controller/polymorphic_routes'
|
11
|
+
require 'action_controller/routing/optimisations'
|
12
|
+
require 'action_controller/routing/routing_ext'
|
13
|
+
require 'action_controller/routing/route'
|
14
|
+
require 'action_controller/routing/segments'
|
15
|
+
require 'action_controller/routing/builder'
|
16
|
+
require 'action_controller/routing/route_set'
|
17
|
+
require 'action_controller/routing/recognition_optimisation'
|
18
|
+
rescue
|
19
|
+
require 'action_controller/routing'
|
20
|
+
end
|
21
|
+
require 'fileutils'
|
22
|
+
FM_ID = 'filemanager'
|
23
|
+
FM_ROOT = File.join(RAILS_ROOT, 'vendor', FM_ID)
|
24
|
+
FM_PATH_CONTROLLER = File.join(FM_ROOT, 'app', 'controllers')
|
25
|
+
FM_PATH_VIEW = File.join(FM_ROOT, 'app', 'views')
|
26
|
+
FM_PATH_PUBLIC = File.join(FM_ROOT, 'public')
|
27
|
+
|
28
|
+
if $FM_OVERWRITE || ! File.exist?(FM_ROOT)
|
29
|
+
fm_rails_path = File.dirname(File.dirname(__FILE__)) + "/#{FM_ID}"
|
30
|
+
FileUtils.cp_r(fm_rails_path, File.join(RAILS_ROOT, 'vendor'))
|
31
|
+
FileUtils.cp_r(FM_PATH_PUBLIC, RAILS_ROOT)
|
32
|
+
FileUtils.rm_rf(FM_PATH_PUBLIC)
|
33
|
+
end
|
34
|
+
|
35
|
+
ActionController::Routing::RouteSet.class_eval do
|
36
|
+
|
37
|
+
def fm_load_routes!
|
38
|
+
fm_old_load_routes!
|
39
|
+
map = ActionController::Routing::RouteSet::Mapper.new(self)
|
40
|
+
map.namespace :fm do |f|
|
41
|
+
f.resources :filemanager
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
alias_method :fm_old_load_routes!, :load_routes!
|
46
|
+
alias_method :load_routes!, :fm_load_routes!
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
Rails::Initializer.class_eval do
|
51
|
+
|
52
|
+
def fm_set_load_path
|
53
|
+
configuration.load_paths << FM_PATH_CONTROLLER
|
54
|
+
fm_old_set_load_path
|
55
|
+
end
|
56
|
+
|
57
|
+
def fm_initialize_framework_views
|
58
|
+
fm_old_initialize_framework_views
|
59
|
+
|
60
|
+
if ActionController::Base.respond_to?(:append_view_path)
|
61
|
+
ActionController::Base.append_view_path(FM_PATH_VIEW)
|
62
|
+
else
|
63
|
+
ActionController::Base.view_paths << FM_PATH_VIEW
|
64
|
+
end
|
65
|
+
configuration.controller_paths << FM_PATH_CONTROLLER
|
66
|
+
end
|
67
|
+
|
68
|
+
alias_method :fm_old_initialize_framework_views, :initialize_framework_views
|
69
|
+
alias_method :initialize_framework_views, :fm_initialize_framework_views
|
70
|
+
alias_method :fm_old_set_load_path, :set_load_path
|
71
|
+
alias_method :set_load_path, :fm_set_load_path
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
require "erb"
|
76
|
+
require "yaml"
|
77
|
+
$FM_PROPERTIES = YAML::load(ERB.new(IO.read(File.join(FM_ROOT, 'filemanager.yml'))).result)
|
78
|
+
|
79
|
+
FM_IMAGE_TYPES = $FM_PROPERTIES['image.type'].split(' ')
|
80
|
+
FM_FLASH_TYPES = $FM_PROPERTIES['flash.type'].split(' ')
|
81
|
+
FM_MOVIE_TYPES = $FM_PROPERTIES['movie.type'].split(' ')
|
82
|
+
FM_RM_TYPES = $FM_PROPERTIES['rm.type'].split(' ')
|
83
|
+
FM_OFFICE_TYPES = $FM_PROPERTIES['office.type'].split(' ')
|
84
|
+
FM_EXCEL_TYPES = $FM_PROPERTIES['excel.type'].split(' ')
|
85
|
+
FM_WORD_TYPES = $FM_PROPERTIES['word.type'].split(' ')
|
86
|
+
FM_PPT_TYPES = $FM_PROPERTIES['ppt.type'].split(' ')
|
87
|
+
FM_HELP_TYPES = $FM_PROPERTIES['help.type'].split(' ')
|
88
|
+
FM_PLAIN_TYPES = $FM_PROPERTIES['plain.type'].split(' ')
|
89
|
+
FM_NONE_TYPES = $FM_PROPERTIES['none.type'].split(' ')
|
90
|
+
FM_SUPPORT_TYPES = FM_IMAGE_TYPES + FM_FLASH_TYPES + FM_MOVIE_TYPES + FM_RM_TYPES + FM_OFFICE_TYPES + FM_HELP_TYPES + FM_PLAIN_TYPES
|
91
|
+
FM_UNKNOWN_TYPE = 'unknown'
|
92
|
+
|
93
|
+
FM_RESOURCES_PATH= $FM_PROPERTIES['resources.path']
|
94
|
+
FM_LOCK_PATH = $FM_PROPERTIES['resources.url']
|
95
|
+
FM_ENCODING_TO = $FM_PROPERTIES['encoding.to']
|
96
|
+
FM_ENCODING_FROM = $FM_PROPERTIES['encoding.from'].nil? ? '' : $FM_PROPERTIES['encoding.from']
|
97
|
+
|
98
|
+
FM_TEMP_DIR = $FM_PROPERTIES['temp.dir'].nil? ? File.join(FM_ROOT, 'temp') : $FM_PROPERTIES['temp.dir']
|
99
|
+
|
100
|
+
FileUtils.rm_rf(Dir.glob("#{FM_TEMP_DIR}/*"))
|
101
|
+
|
File without changes
|
data/lib/locale.rb
CHANGED
File without changes
|
data/lib/locale/base.rb
CHANGED
File without changes
|
data/lib/locale/cgi.rb
CHANGED
File without changes
|
data/lib/locale/jruby.rb
CHANGED
File without changes
|
data/lib/locale/object.rb
CHANGED
File without changes
|
data/lib/locale/posix.rb
CHANGED
File without changes
|
data/lib/locale/win32.rb
CHANGED
File without changes
|
data/lib/locale/win32_table.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Li
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-07-11 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,10 +23,7 @@ extra_rdoc_files: []
|
|
23
23
|
|
24
24
|
files:
|
25
25
|
- CHANGELOG
|
26
|
-
- filemanager
|
27
|
-
- lib
|
28
26
|
- MIT-LICENSE
|
29
|
-
- pkg
|
30
27
|
- Rakefile
|
31
28
|
- README
|
32
29
|
- README.zh_CN
|
@@ -55,6 +52,7 @@ files:
|
|
55
52
|
- filemanager/public
|
56
53
|
- filemanager/public/filemanager
|
57
54
|
- filemanager/public/filemanager/images
|
55
|
+
- filemanager/public/filemanager/images/loading.gif
|
58
56
|
- filemanager/public/filemanager/images/avi.gif
|
59
57
|
- filemanager/public/filemanager/images/box.gif
|
60
58
|
- filemanager/public/filemanager/images/bullet.gif
|
@@ -70,7 +68,6 @@ files:
|
|
70
68
|
- filemanager/public/filemanager/images/image-1.jpg
|
71
69
|
- filemanager/public/filemanager/images/image.gif
|
72
70
|
- filemanager/public/filemanager/images/jpg.gif
|
73
|
-
- filemanager/public/filemanager/images/loading.gif
|
74
71
|
- filemanager/public/filemanager/images/mov.gif
|
75
72
|
- filemanager/public/filemanager/images/nextlabel.gif
|
76
73
|
- filemanager/public/filemanager/images/pdf.gif
|
@@ -143,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
140
|
requirements: []
|
144
141
|
|
145
142
|
rubyforge_project: Filemanager
|
146
|
-
rubygems_version: 1.
|
143
|
+
rubygems_version: 1.1.1
|
147
144
|
signing_key:
|
148
145
|
specification_version: 2
|
149
146
|
summary: A online file manager for rails project
|