Browse files

Add a gemspec based on the rails plugin creator

  • Loading branch information...
1 parent 1661100 commit 51f26424d16da04128a108913fb93d26dd4225d7 @Empact committed Sep 10, 2011
Showing with 144 additions and 16 deletions.
  1. +6 −1 .gitignore
  2. +11 −0 Gemfile
  3. +87 −0 Gemfile.lock
  4. +11 −0 Paperclip-Autosizer.gemspec
  5. +29 −15 Rakefile
View
7 .gitignore
@@ -1 +1,6 @@
-.DS_Store
+.bundle/
+log/*.log
+pkg/
+test/dummy/db/*.sqlite3
+test/dummy/log/*.log
+test/dummy/tmp/
View
11 Gemfile
@@ -0,0 +1,11 @@
+source "http://rubygems.org"
+
+gem 'rails', '3.1.0.rc5'
+
+# Bundle edge Rails instead:
+# gem 'rails', :git => 'git://github.com/rails/rails.git'
+
+
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
View
87 Gemfile.lock
@@ -0,0 +1,87 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ mail (~> 2.3.0)
+ actionpack (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.1)
+ rack-cache (~> 1.0.2)
+ rack-mount (~> 0.8.1)
+ rack-test (~> 0.6.0)
+ sprockets (~> 2.0.0.beta.12)
+ activemodel (3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ bcrypt-ruby (~> 2.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ arel (~> 2.1.4)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ activesupport (3.1.0.rc5)
+ multi_json (~> 1.0)
+ arel (2.1.4)
+ bcrypt-ruby (2.1.4)
+ builder (3.0.0)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ polyglot (0.3.2)
+ rack (1.3.2)
+ rack-cache (1.0.3)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.0.rc5)
+ actionmailer (= 3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ activerecord (= 3.1.0.rc5)
+ activeresource (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ bundler (~> 1.0)
+ railties (= 3.1.0.rc5)
+ railties (3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.9.4)
+ sprockets (2.0.0)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.29)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails (= 3.1.0.rc5)
View
11 Paperclip-Autosizer.gemspec
@@ -0,0 +1,11 @@
+# Provide a simple gemspec so you can easily use your
+# project in your rails apps through git.
+Gem::Specification.new do |s|
+ s.name = "Paperclip-Autosizer"
+ s.summary = "Insert PaperclipAutosizer summary."
+ s.description = "Insert PaperclipAutosizer description."
+ s.authors = ['Andrew Eisberg', 'Ben Woosley']
+ s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
+ s.test_files = Dir["test/**/*"]
+ s.version = "0.0.1"
+end
View
44 Rakefile
@@ -1,23 +1,37 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
+RDoc::Task.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'PaperclipAutosizer'
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
-desc 'Default: run unit tests.'
-task :default => :test
-desc 'Test the test plugin.'
+Bundler::GemHelper.install_tasks
+
+require 'rake/testtask'
+
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
- t.verbose = true
+ t.verbose = false
end
-desc 'Generate documentation for the test plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'Paperclip-Autosizer'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
+
+task :default => :test

0 comments on commit 51f2642

Please sign in to comment.