Browse files

Convert to a Rails Engine.

  • Loading branch information...
1 parent 6e159ec commit 2919f62a14481695e53d821cbad471e4e0b82082 @kenmazaika committed Apr 1, 2012
Showing with 86 additions and 123 deletions.
  1. +1 −6 Gemfile
  2. +64 −12 Gemfile.lock
  3. +0 −20 LICENSE.txt
  4. 0 README
  5. +0 −19 README.rdoc
  6. +11 −14 Rakefile
  7. +0 −1 VERSION
  8. +7 −47 file_upload_cache.gemspec
  9. 0 lib/{file_upload_cache → app/models}/cached_file.rb
  10. +3 −4 lib/file_upload_cache.rb
View
7 Gemfile
@@ -1,10 +1,5 @@
source "http://rubygems.org"
gem 'uuid'
-gem 'activesupport'
+gem "rails", "3.0.12"
-group :development do
- gem "minitest"
- gem "bundler"
- gem 'jeweler'
-end
View
76 Gemfile.lock
@@ -1,30 +1,82 @@
GEM
remote: http://rubygems.org/
specs:
- activesupport (3.0.0)
- git (1.2.5)
- jeweler (1.8.3)
- bundler (~> 1.0)
- git (>= 1.2.5)
- rake
- rdoc
+ abstract (1.0.0)
+ actionmailer (3.0.12)
+ actionpack (= 3.0.12)
+ mail (~> 2.2.19)
+ actionpack (3.0.12)
+ activemodel (= 3.0.12)
+ activesupport (= 3.0.12)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.5)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.12)
+ activesupport (= 3.0.12)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.12)
+ activemodel (= 3.0.12)
+ activesupport (= 3.0.12)
+ arel (~> 2.0.10)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.12)
+ activemodel (= 3.0.12)
+ activesupport (= 3.0.12)
+ activesupport (3.0.12)
+ arel (2.0.10)
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
json (1.6.6)
macaddr (1.5.0)
systemu (>= 2.4.0)
- minitest (2.11.4)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.18)
+ polyglot (0.3.3)
+ rack (1.2.5)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.12)
+ actionmailer (= 3.0.12)
+ actionpack (= 3.0.12)
+ activerecord (= 3.0.12)
+ activeresource (= 3.0.12)
+ activesupport (= 3.0.12)
+ bundler (~> 1.0)
+ railties (= 3.0.12)
+ railties (3.0.12)
+ actionpack (= 3.0.12)
+ activesupport (= 3.0.12)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.4)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
systemu (2.5.0)
+ thor (0.14.6)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.32)
uuid (2.3.5)
macaddr (~> 1.0)
PLATFORMS
ruby
DEPENDENCIES
- activesupport
- bundler
- jeweler
- minitest
+ rails (= 3.0.12)
uuid
View
20 LICENSE.txt
@@ -1,20 +0,0 @@
-Copyright (c) 2012 Ken Mazaika
-
-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
0 README
No changes.
View
19 README.rdoc
@@ -1,19 +0,0 @@
-= file_upload_cache
-
-Description goes here.
-
-== Contributing to file_upload_cache
-
-* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
-* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
-* Fork the project.
-* Start a feature/bugfix branch.
-* Commit and push until you are happy with your contribution.
-* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
-* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
-
-== Copyright
-
-Copyright (c) 2012 Ken Mazaika. See LICENSE.txt for
-further details.
-
View
25 Rakefile
@@ -1,24 +1,21 @@
-# encoding: utf-8
-
+# encoding: UTF-8
require 'rubygems'
-require 'bundler'
-
begin
- Bundler.setup(:default, :development)
-rescue Bundler::BundlerError => e
- $stderr.puts e.message
- $stderr.puts "Run `bundle install` to install missing gems"
- exit e.status_code
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
+
require 'rake'
require 'rake/testtask'
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.pattern = 'test/**/*_test.rb'
- test.verbose = true
+
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.libs << 'test'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = false
end
task :default => :test
-
View
1 VERSION
@@ -1 +0,0 @@
-0.0.0
View
54 file_upload_cache.gemspec
@@ -1,49 +1,9 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
-
+# Provide a simple gemspec so you can easily use your enginex
+# project in your rails apps through git.
Gem::Specification.new do |s|
s.name = "file_upload_cache"
- s.version = "0.0.0"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Ken Mazaika"]
- s.date = "2012-04-01"
- s.description = "File Upload Cache."
- s.email = "kmazaika@gmail.com"
- s.extra_rdoc_files = [
- "LICENSE.txt",
- "README",
- "README.rdoc"
- ]
- s.files = [
- "Gemfile.lock",
- "LICENSE.txt",
- "README.rdoc",
- "lib/file_upload_cache.rb"
- ]
- s.homepage = "http://kenmazaika.com/"
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.11"
- s.summary = "File Upload Cache"
-
- if s.respond_to? :specification_version then
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<minitest>, [">= 0"])
- s.add_development_dependency(%q<bundler>, [">= 0"])
- s.add_development_dependency(%q<jeweler>, [">= 0"])
- else
- s.add_dependency(%q<minitest>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- end
- else
- s.add_dependency(%q<minitest>, [">= 0"])
- s.add_dependency(%q<bundler>, [">= 0"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- end
-end
-
+ s.summary = "Insert FileUploadCache summary."
+ s.description = "Insert FileUploadCache description."
+ s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.rdoc"]
+ s.version = "0.0.1"
+end
View
0 lib/file_upload_cache/cached_file.rb → lib/app/models/cached_file.rb
File renamed without changes.
View
7 lib/file_upload_cache.rb
@@ -1,8 +1,6 @@
-require 'uuid'
require 'active_support/core_ext/module/attribute_accessors.rb'
-
-require 'file_upload_cache/cached_file'
-
+require 'app/models/cached_file.rb'
+require 'uuid'
module FileUploadCache
mattr_accessor :cache
@@ -18,3 +16,4 @@ def self.file_cache
end
end
+

0 comments on commit 2919f62

Please sign in to comment.