Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Converted to use Hoe

  • Loading branch information...
commit 41e951a7bbe868b1c607c3909c87a6bad196d33e 1 parent 25eb31a
@jnicklas jnicklas authored
View
21 CHANGELOG.md → History.txt
@@ -1,4 +1,4 @@
-# Version 0.3.2
+=== Version 0.3.2 2009-07-18
Incremental upgrade
@@ -7,7 +7,7 @@ Incremental upgrade
* [fixed] Performance issues with S3 support
* [fixed] Sequel support for newer verions of Sequel (thanks Pavel!)
-# Version 0.3.1
+=== Version 0.3.1 2009-07-01
A bugfix release. Drop in compatible with 0.3.0.
@@ -15,7 +15,7 @@ A bugfix release. Drop in compatible with 0.3.0.
* [fixed] The file returned by S3 storage now has the path set to the full store path
* [added] File returned by S3 storage now responds to S3 specific methods
-# Version 0.3
+=== 0.3 2009-06-20
This is a stabilization release. Most features are now working as expected and
most bugs should be fixed.
@@ -25,23 +25,20 @@ most bugs should be fixed.
* [added] Ability to super to any Mount method
* [fixed] Sequel support should now work as expected
* [fixed] ActiveRecord no longer saves the record twice
-
-# Version 0.2.5
-
* [added] Added convenient macro style class methods to rmagick processing
-# Version 0.2.4
+=== 0.2.4 2009-06-11
* [added] `resize_to_limit` method for rmagick
* [added] Now deletes files from Amazon S3 when record is destroyed
-# Version 0.2.2
+=== 0.2.3 2009-05-13
* [changed] Mount now no longer returns nil if there is no stored file, it returns a blank uploader instead
* [added] Possibility to specify a default path
* [added] Paperclip compatibility module
-# Version 0.2.1
+=== 0.2.1 2009-05-01
* [changed] Url method now optionally takes versions as parameters (like Paperclip)
* [added] A field which allows files to be removed with a checkbox in mount
@@ -50,7 +47,7 @@ most bugs should be fixed.
* [added] Option to not copy files to cache dir, to prevent writes on read only fs systems (this is a workaround and needs a better solution)
-# Version 0.2
+=== 0.2 2009-04-15
* [changed] The version is no longer stored in the store dir. This will break the paths for files uploaded with 0.1
* [changed] CarrierWave::Uploader is now a module, not a class, so you need to include it, not inherit from it.
@@ -61,6 +58,6 @@ most bugs should be fixed.
* [added] Support for Sequel
* [added] CarrierWave::Uploader#read to read the contents of the uploaded files
-# Version 0.1
+=== 0.1 2009-03-12
-This is a very experimental release that has not been well tested. All of the major features are in place though. Please note that there currently is a bug with load paths in Merb, which means you need to manually require uploaders.
+This is a very experimental release that has not been well tested. All of the major features are in place though. Please note that there currently is a bug with load paths in Merb, which means you need to manually require uploaders.
View
88 Manifest.txt
@@ -0,0 +1,88 @@
+Generators
+History.txt
+LICENSE
+Manifest.txt
+README.rdoc
+Rakefile
+carrierwave.gemspec
+cucumber.yml
+features/caching.feature
+features/file_storage.feature
+features/file_storage_overridden_filename.feature
+features/file_storage_overridden_store_dir.feature
+features/file_storage_reversing_processor.feature
+features/fixtures/bork.txt
+features/fixtures/monkey.txt
+features/mount_activerecord.feature
+features/mount_datamapper.feature
+features/step_definitions/activerecord_steps.rb
+features/step_definitions/caching_steps.rb
+features/step_definitions/datamapper_steps.rb
+features/step_definitions/file_steps.rb
+features/step_definitions/general_steps.rb
+features/step_definitions/mount_steps.rb
+features/step_definitions/store_steps.rb
+features/support/activerecord.rb
+features/support/datamapper.rb
+features/support/env.rb
+features/versions_basics.feature
+features/versions_nested_versions.feature
+features/versions_overridden_filename.feature
+features/versions_overriden_store_dir.feature
+lib/carrierwave.rb
+lib/carrierwave/compatibility/paperclip.rb
+lib/carrierwave/core_ext/blank.rb
+lib/carrierwave/core_ext/inheritable_attributes.rb
+lib/carrierwave/core_ext/module_setup.rb
+lib/carrierwave/mount.rb
+lib/carrierwave/orm/activerecord.rb
+lib/carrierwave/orm/datamapper.rb
+lib/carrierwave/orm/sequel.rb
+lib/carrierwave/processing/image_science.rb
+lib/carrierwave/processing/rmagick.rb
+lib/carrierwave/sanitized_file.rb
+lib/carrierwave/storage/abstract.rb
+lib/carrierwave/storage/file.rb
+lib/carrierwave/storage/s3.rb
+lib/carrierwave/test/matchers.rb
+lib/carrierwave/uploader.rb
+lib/carrierwave/uploader/cache.rb
+lib/carrierwave/uploader/callbacks.rb
+lib/carrierwave/uploader/default_path.rb
+lib/carrierwave/uploader/extension_whitelist.rb
+lib/carrierwave/uploader/mountable.rb
+lib/carrierwave/uploader/paths.rb
+lib/carrierwave/uploader/processing.rb
+lib/carrierwave/uploader/proxy.rb
+lib/carrierwave/uploader/remove.rb
+lib/carrierwave/uploader/store.rb
+lib/carrierwave/uploader/url.rb
+lib/carrierwave/uploader/versions.rb
+lib/generators/uploader_generator.rb
+rails_generators/uploader/USAGE
+rails_generators/uploader/templates/uploader.rb
+rails_generators/uploader/uploader_generator.rb
+script/console
+script/destroy
+script/generate
+spec/compatibility/paperclip_spec.rb
+spec/fixtures/bork.txt
+spec/fixtures/test.jpeg
+spec/fixtures/test.jpg
+spec/mount_spec.rb
+spec/orm/activerecord_spec.rb
+spec/orm/datamapper_spec.rb
+spec/orm/sequel_spec.rb
+spec/sanitized_file_spec.rb
+spec/spec_helper.rb
+spec/uploader/cache_spec.rb
+spec/uploader/default_path_spec.rb
+spec/uploader/extension_whitelist_spec.rb
+spec/uploader/mountable_spec.rb
+spec/uploader/paths_spec.rb
+spec/uploader/processing_spec.rb
+spec/uploader/proxy_spec.rb
+spec/uploader/remove_spec.rb
+spec/uploader/store_spec.rb
+spec/uploader/url_spec.rb
+spec/uploader/versions_spec.rb
View
6 README.rdoc
@@ -1,8 +1,14 @@
= CarrierWave
+http://carrierwave.rubyforge.org
+
+== Summary
+
This plugin for Merb and Rails provides a simple and extremely flexible way to
upload files.
+== Description
+
* RDoc Documentation {available at Rubyforge}[http://carrierwave.rubyforge.org/].
* Source code {hosted at GitHub}[http://github.com/jnicklas/carrierwave]
* Please {report any issues}[http://github.com/jnicklas/carrierwave/issues] on GitHub
View
144 Rakefile
@@ -1,115 +1,29 @@
-require 'rubygems'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-gem 'rdoc', '>=2.4.0'
-require 'rdoc'
-begin
- require 'sdoc'
-rescue LoadError
-end
-
-require 'spec/rake/spectask'
-require 'spec/rake/verify_rcov'
-require 'cucumber/rake/task'
-
-NAME = "carrierwave"
-GEM_VERSION = "0.3.2"
-AUTHOR = "Jonas Nicklas"
-EMAIL = "jonas.nicklas@gmail.com"
-HOMEPAGE = "http://www.example.com"
-SUMMARY = "Simple and powerful uploads for Merb and Rails"
-
-spec = Gem::Specification.new do |s|
- s.rubyforge_project = 'carrierwave'
- s.name = NAME
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
- s.summary = SUMMARY
- s.description = s.summary
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
- s.require_path = 'lib'
- s.files = %w(LICENSE Generators README.rdoc Rakefile TODO) + Dir.glob("{lib,spec,rails_generators}/**/*")
-
-end
-
-# Try these:
-#
-# rake features
-# rake features PROFILE=html
-Cucumber::Rake::Task.new do |t|
- profile = ENV['PROFILE'] || 'default'
- t.cucumber_opts = "--profile #{profile}"
-end
-
-Rake::RDocTask.new do |rd|
- rd.main = "README.rdoc"
- rd.title = "CarrierWave"
- rd.template = 'direct'
- rd.options << "--diagram" if ENV["DIAGRAM"]
- rd.rdoc_dir = File.join(File.dirname(__FILE__), 'doc')
- rd.rdoc_files.include("README.rdoc", "LICENSE", "TODO", 'lib/carrierwave/**/*.rb')
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
-
-desc "install the plugin locally"
-task :install => [:package] do
- sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
-end
-
-desc "create a gemspec file"
-task :make_spec do
- File.open("#{NAME}.gemspec", "w") do |file|
- file.puts spec.to_ruby
- end
-end
-
-namespace :jruby do
-
- desc "Run :package and install the resulting .gem with jruby"
- task :install => :package do
- sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
- end
-
-end
-
-file_list = FileList['spec/**/*_spec.rb']
-
-desc "Run all examples"
-Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_files = file_list
-end
-
-RCov::VerifyTask.new(:verify_coverage => "spec:rcov") do |t|
- t.threshold = 95.64
- t.index_html = 'doc/coverage/index.html'
-end
-
-namespace :spec do
- desc "Run all examples with RCov"
- Spec::Rake::SpecTask.new('rcov') do |t|
- t.spec_files = file_list
- t.rcov = true
- t.rcov_dir = "doc/coverage"
- t.rcov_opts = ['--exclude', 'spec,features,lib/generators,gems/*']
- end
-
- desc "Generate an html report"
- Spec::Rake::SpecTask.new('report') do |t|
- t.spec_files = file_list
- t.spec_opts = ["--format", "html:doc/reports/specs.html"]
- t.fail_on_error = false
- end
-
-end
-
-task :superspec => [:spec, :features]
-
-desc 'Default: run unit tests and features.'
-task :default => 'superspec'
+require 'rubygems'
+gem 'hoe', '>= 2.1.0'
+require 'hoe'
+require 'fileutils'
+require './lib/carrierwave'
+
+Hoe.plugin :newgem
+# Hoe.plugin :website
+Hoe.plugin :cucumberfeatures
+
+$hoe = Hoe.spec 'carrierwave' do
+ self.developer 'Jonas Nicklas', 'jonas.nicklas@gmail.com'
+ self.rubyforge_name = self.name
+ self.readme_file = 'README.rdoc'
+ self.version = CarrierWave::VERSION
+ self.extra_dev_deps << ['rspec', '>=1.2.8']
+ self.extra_dev_deps << ['cucumber', '>=0.3.96']
+ self.extra_dev_deps << ['activerecord', '>=2.3.3']
+ self.extra_dev_deps << ['dm-core', '>=0.9.11']
+ self.extra_dev_deps << ['sequel', '>=3.2.0']
+ self.extra_dev_deps << ['rmagick', '>=2.10.0']
+ self.extra_rdoc_files << 'README.rdoc'
+ self.extra_rdoc_files << 'LICENSE'
+end
+
+require 'newgem/tasks'
+Dir['tasks/**/*.rake'].each { |t| load t }
+
+task :default => [:spec, :features]
View
0  TODO
No changes.
View
3  lib/carrierwave.rb
@@ -6,6 +6,9 @@
require 'carrierwave/core_ext/inheritable_attributes'
module CarrierWave
+
+ VERSION = "0.3.2"
+
class << self
attr_accessor :config, :logger
View
10 lib/carrierwave/storage/abstract.rb
@@ -14,19 +14,19 @@ class Abstract
def initialize(uploader)
@uploader = uploader
end
-
+
def self.setup!; end
-
+
def identifier
uploader.filename
end
-
+
def store!(file)
end
-
+
def retrieve!(identifier)
end
-
+
end # Abstract
end # Storage
end # CarrierWave
View
10 script/console
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+# File: script/console
+irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
+
+libs = " -r irb/completion"
+# Perhaps use a console_lib to store any extra methods I may want available in the cosole
+# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
+libs << " -r #{File.dirname(__FILE__) + '/../lib/carrierwave.rb'}"
+puts "Loading carrierwave gem"
+exec "#{irb} #{libs} --simple-prompt"
View
14 script/destroy
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+
+begin
+ require 'rubigen'
+rescue LoadError
+ require 'rubygems'
+ require 'rubigen'
+end
+require 'rubigen/scripts/destroy'
+
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
+RubiGen::Scripts::Destroy.new.run(ARGV)
View
14 script/generate
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+
+begin
+ require 'rubigen'
+rescue LoadError
+ require 'rubygems'
+ require 'rubigen'
+end
+require 'rubigen/scripts/generate'
+
+ARGV.shift if ['--help', '-h'].include?(ARGV[0])
+RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
+RubiGen::Scripts::Generate.new.run(ARGV)

3 comments on commit 41e951a

@josevalim

Hoe? What about Joe (http://github.com/djanowski/joe/tree/master)? Or jeweler (http://github.com/technicalpickles/jeweler/tree/master)? BTW, you can use jeweler with thor. :)

@jnicklas
Owner

Anything wrong with hoe? Joe is too much manual work, imho, and I've had some bad experience with Jeweler.

@josevalim

Ha! :) I had bad experiences with Hoe, couldn't make it work properly for a long time.

Please sign in to comment.
Something went wrong with that request. Please try again.