Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add plugin structure

git-svn-id: https://mimetype-fu.googlecode.com/svn/trunk@3 9b4a08d8-d032-0410-955b-215827cc34ef
  • Loading branch information...
commit 64113d7428cc4c73459aa34e9437c788ed373435 1 parent 505d086
mattAimonetti authored
View
20 MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2007 [name of plugin creator]
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
20 README
@@ -0,0 +1,20 @@
+MimetypeFu
+==========
+
+Some great Rails plugins like attachment_fu use the content type/mime type of a file to validate the instance of an object.
+The plugin usually gets the mime type using the CGI request, however, if the file is already in the system, this approach won't work.
+Adobe Flash is also known not to send the proper mime type.
+As an alternative, I wrote mimetype_fu, a simple plugin which will try to guess the mimetype of a file based on its extension.
+
+Note that mimetype_fu only looks at the extension to define its mime type!
+
+
+
+Example
+=======
+
+Example goes here.
+
+http://code.google.com/p/mimetype-fu/
+
+Copyright (c) 2007 Matt Aimonetti, released under the MIT license
View
22 Rakefile
@@ -0,0 +1,22 @@
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+
+desc 'Default: run unit tests.'
+task :default => :test
+
+desc 'Test the mimetype_fu plugin.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+desc 'Generate documentation for the mimetype_fu plugin.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'MimetypeFu'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
View
1  init.rb
@@ -0,0 +1 @@
+# Include hook code here
View
1  install.rb
@@ -0,0 +1 @@
+# Install hook code here
View
1  lib/mimetype_fu.rb
@@ -0,0 +1 @@
+# MimetypeFu
View
4 tasks/mimetype_fu_tasks.rake
@@ -0,0 +1,4 @@
+# desc "Explaining what the task does"
+# task :mimetype_fu do
+# # Task goes here
+# end
View
8 test/mimetype_fu_test.rb
@@ -0,0 +1,8 @@
+require 'test/unit'
+
+class MimetypeFuTest < Test::Unit::TestCase
+ # Replace this with your real tests.
+ def test_this_plugin
+ flunk
+ end
+end
View
1  uninstall.rb
@@ -0,0 +1 @@
+# Uninstall hook code here
Please sign in to comment.
Something went wrong with that request. Please try again.