filemanager 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/CHANGELOG +5 -1
  2. data/MIT-LICENSE +0 -0
  3. data/README +1 -1
  4. data/README.zh_CN +1 -1
  5. data/Rakefile +2 -2
  6. data/filemanager/app/controllers/fm/filemanager_controller.rb +0 -0
  7. data/filemanager/app/views/fm/filemanager/index.html.erb +0 -0
  8. data/filemanager/app/views/fm/filemanager/view.html.erb +0 -0
  9. data/filemanager/filemanager.yml +0 -0
  10. data/filemanager/public/filemanager/images/avi.gif +0 -0
  11. data/filemanager/public/filemanager/images/box.gif +0 -0
  12. data/filemanager/public/filemanager/images/bullet.gif +0 -0
  13. data/filemanager/public/filemanager/images/close.gif +0 -0
  14. data/filemanager/public/filemanager/images/closelabel.gif +0 -0
  15. data/filemanager/public/filemanager/images/doc.gif +0 -0
  16. data/filemanager/public/filemanager/images/donate-button.gif +0 -0
  17. data/filemanager/public/filemanager/images/download-icon.gif +0 -0
  18. data/filemanager/public/filemanager/images/folder.gif +0 -0
  19. data/filemanager/public/filemanager/images/gif.gif +0 -0
  20. data/filemanager/public/filemanager/images/htm.gif +0 -0
  21. data/filemanager/public/filemanager/images/html.gif +0 -0
  22. data/filemanager/public/filemanager/images/image-1.jpg +0 -0
  23. data/filemanager/public/filemanager/images/image.gif +0 -0
  24. data/filemanager/public/filemanager/images/jpg.gif +0 -0
  25. data/filemanager/public/filemanager/images/loading.gif +0 -0
  26. data/filemanager/public/filemanager/images/mov.gif +0 -0
  27. data/filemanager/public/filemanager/images/nextlabel.gif +0 -0
  28. data/filemanager/public/filemanager/images/pdf.gif +0 -0
  29. data/filemanager/public/filemanager/images/png.gif +0 -0
  30. data/filemanager/public/filemanager/images/ppt.gif +0 -0
  31. data/filemanager/public/filemanager/images/prevlabel.gif +0 -0
  32. data/filemanager/public/filemanager/images/rar.gif +0 -0
  33. data/filemanager/public/filemanager/images/rm.gif +0 -0
  34. data/filemanager/public/filemanager/images/rmvb.gif +0 -0
  35. data/filemanager/public/filemanager/images/separator.gif +0 -0
  36. data/filemanager/public/filemanager/images/spacer.gif +0 -0
  37. data/filemanager/public/filemanager/images/swf.gif +0 -0
  38. data/filemanager/public/filemanager/images/thumb-1.jpg +0 -0
  39. data/filemanager/public/filemanager/images/tool_copy.gif +0 -0
  40. data/filemanager/public/filemanager/images/tool_cut.gif +0 -0
  41. data/filemanager/public/filemanager/images/tool_del.gif +0 -0
  42. data/filemanager/public/filemanager/images/tool_folder.gif +0 -0
  43. data/filemanager/public/filemanager/images/tool_imagemanager.gif +0 -0
  44. data/filemanager/public/filemanager/images/tool_new.gif +0 -0
  45. data/filemanager/public/filemanager/images/tool_paste.gif +0 -0
  46. data/filemanager/public/filemanager/images/tool_props.gif +0 -0
  47. data/filemanager/public/filemanager/images/tool_refresh.gif +0 -0
  48. data/filemanager/public/filemanager/images/tool_unzip.gif +0 -0
  49. data/filemanager/public/filemanager/images/tool_upload.gif +0 -0
  50. data/filemanager/public/filemanager/images/tool_zip.gif +0 -0
  51. data/filemanager/public/filemanager/images/txt.gif +0 -0
  52. data/filemanager/public/filemanager/images/unknown.gif +0 -0
  53. data/filemanager/public/filemanager/images/wmv.gif +0 -0
  54. data/filemanager/public/filemanager/images/xls.gif +0 -0
  55. data/filemanager/public/filemanager/images/zip.gif +0 -0
  56. data/filemanager/public/filemanager/javascripts/builder.js +0 -0
  57. data/filemanager/public/filemanager/javascripts/effects.js +0 -0
  58. data/filemanager/public/filemanager/javascripts/filemanager.js +0 -0
  59. data/filemanager/public/filemanager/javascripts/lang/en.js +0 -0
  60. data/filemanager/public/filemanager/javascripts/lang/zh_CN.js +0 -0
  61. data/filemanager/public/filemanager/javascripts/lightbox.js +0 -0
  62. data/filemanager/public/filemanager/javascripts/prototype.js +0 -0
  63. data/filemanager/public/filemanager/javascripts/prototype_ext.js +0 -0
  64. data/filemanager/public/filemanager/javascripts/scriptaculous.js +0 -0
  65. data/filemanager/public/filemanager/javascripts/translate.js +0 -0
  66. data/filemanager/public/filemanager/resources/resources.txt +0 -0
  67. data/filemanager/public/filemanager/stylesheets/filelist.css +0 -0
  68. data/filemanager/public/filemanager/stylesheets/general.css +0 -0
  69. data/filemanager/public/filemanager/stylesheets/lightbox.css +0 -0
  70. data/filemanager/temp/temp +0 -0
  71. data/lib/filemanager.rb +101 -84
  72. data/lib/filemanager/controller.rb +0 -0
  73. data/lib/locale.rb +0 -0
  74. data/lib/locale/base.rb +0 -0
  75. data/lib/locale/cgi.rb +0 -0
  76. data/lib/locale/jruby.rb +0 -0
  77. data/lib/locale/object.rb +0 -0
  78. data/lib/locale/posix.rb +0 -0
  79. data/lib/locale/win32.rb +0 -0
  80. data/lib/locale/win32_table.rb +0 -0
  81. 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
@@ -1,4 +1,4 @@
1
- Filemanager, release 0.2.0 (May. 2008)
1
+ Filemanager, release 0.2.1 (JUL. 2008)
2
2
  A online file manager for rails project
3
3
 
4
4
  Feature
data/README.zh_CN CHANGED
@@ -1,4 +1,4 @@
1
- Filemanager, release 0.2.0 (May. 2008)
1
+ Filemanager, release 0.2.1 (JUL. 2008)
2
2
  Rails��Ŀ�������ļ�������
3
3
 
4
4
  ����
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.0"
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
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/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
- require 'action_controller/routing'
10
- require 'fileutils'
11
- FM_ID = 'filemanager'
12
- FM_ROOT = File.join(RAILS_ROOT, 'vendor', FM_ID)
13
- FM_PATH_CONTROLLER = File.join(FM_ROOT, 'app', 'controllers')
14
- FM_PATH_VIEW = File.join(FM_ROOT, 'app', 'views')
15
- FM_PATH_PUBLIC = File.join(FM_ROOT, 'public')
16
-
17
- if $FM_OVERWRITE || ! File.exist?(FM_ROOT)
18
- fm_rails_path = File.dirname(File.dirname(__FILE__)) + "/#{FM_ID}"
19
- FileUtils.cp_r(fm_rails_path, File.join(RAILS_ROOT, 'vendor'))
20
- FileUtils.cp_r(FM_PATH_PUBLIC, RAILS_ROOT)
21
- FileUtils.rm_rf(FM_PATH_PUBLIC)
22
- end
23
-
24
- ActionController::Routing::RouteSet.class_eval do
25
-
26
- def fm_load_routes!
27
- fm_old_load_routes!
28
- map = ActionController::Routing::RouteSet::Mapper.new(self)
29
- map.namespace :fm do |f|
30
- f.resources :filemanager
31
- end
32
- end
33
-
34
- alias_method :fm_old_load_routes!, :load_routes!
35
- alias_method :load_routes!, :fm_load_routes!
36
-
37
- end
38
-
39
- Rails::Initializer.class_eval do
40
-
41
- def fm_set_load_path
42
- configuration.load_paths << FM_PATH_CONTROLLER
43
- fm_old_set_load_path
44
- end
45
-
46
- def fm_initialize_framework_views
47
- fm_old_initialize_framework_views
48
- ActionController::Base.view_paths << FM_PATH_VIEW
49
- configuration.controller_paths << FM_PATH_CONTROLLER
50
- end
51
-
52
- alias_method :fm_old_initialize_framework_views, :initialize_framework_views
53
- alias_method :initialize_framework_views, :fm_initialize_framework_views
54
- alias_method :fm_old_set_load_path, :set_load_path
55
- alias_method :set_load_path, :fm_set_load_path
56
-
57
- end
58
-
59
- require "erb"
60
- require "yaml"
61
- $FM_PROPERTIES = YAML::load(ERB.new(IO.read(File.join(FM_ROOT, 'filemanager.yml'))).result)
62
-
63
- FM_IMAGE_TYPES = $FM_PROPERTIES['image.type'].split(' ')
64
- FM_FLASH_TYPES = $FM_PROPERTIES['flash.type'].split(' ')
65
- FM_MOVIE_TYPES = $FM_PROPERTIES['movie.type'].split(' ')
66
- FM_RM_TYPES = $FM_PROPERTIES['rm.type'].split(' ')
67
- FM_OFFICE_TYPES = $FM_PROPERTIES['office.type'].split(' ')
68
- FM_EXCEL_TYPES = $FM_PROPERTIES['excel.type'].split(' ')
69
- FM_WORD_TYPES = $FM_PROPERTIES['word.type'].split(' ')
70
- FM_PPT_TYPES = $FM_PROPERTIES['ppt.type'].split(' ')
71
- FM_HELP_TYPES = $FM_PROPERTIES['help.type'].split(' ')
72
- FM_PLAIN_TYPES = $FM_PROPERTIES['plain.type'].split(' ')
73
- FM_NONE_TYPES = $FM_PROPERTIES['none.type'].split(' ')
74
- FM_SUPPORT_TYPES = FM_IMAGE_TYPES + FM_FLASH_TYPES + FM_MOVIE_TYPES + FM_RM_TYPES + FM_OFFICE_TYPES + FM_HELP_TYPES + FM_PLAIN_TYPES
75
- FM_UNKNOWN_TYPE = 'unknown'
76
-
77
- FM_RESOURCES_PATH= $FM_PROPERTIES['resources.path']
78
- FM_LOCK_PATH = $FM_PROPERTIES['resources.url']
79
- FM_ENCODING_TO = $FM_PROPERTIES['encoding.to']
80
- FM_ENCODING_FROM = $FM_PROPERTIES['encoding.from'].nil? ? '' : $FM_PROPERTIES['encoding.from']
81
-
82
- FM_TEMP_DIR = $FM_PROPERTIES['temp.dir'].nil? ? File.join(FM_ROOT, 'temp') : $FM_PROPERTIES['temp.dir']
83
-
84
- FileUtils.rm_rf(Dir.glob("#{FM_TEMP_DIR}/*"))
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
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.0
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-05-20 00:00:00 +08:00
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.0.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