Skip to content

Commit 41e951a

Browse files
committedAug 18, 2009
Converted to use Hoe
1 parent 25eb31a commit 41e951a

File tree

10 files changed

+178
-132
lines changed

10 files changed

+178
-132
lines changed
 

‎CHANGELOG.md ‎History.txt

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version 0.3.2
1+
=== Version 0.3.2 2009-07-18
22

33
Incremental upgrade
44

@@ -7,15 +7,15 @@ Incremental upgrade
77
* [fixed] Performance issues with S3 support
88
* [fixed] Sequel support for newer verions of Sequel (thanks Pavel!)
99

10-
# Version 0.3.1
10+
=== Version 0.3.1 2009-07-01
1111

1212
A bugfix release. Drop in compatible with 0.3.0.
1313

1414
* [fixed] Saving a record with a mounted Uploader no longer removes uploaded file
1515
* [fixed] The file returned by S3 storage now has the path set to the full store path
1616
* [added] File returned by S3 storage now responds to S3 specific methods
1717

18-
# Version 0.3
18+
=== 0.3 2009-06-20
1919

2020
This is a stabilization release. Most features are now working as expected and
2121
most bugs should be fixed.
@@ -25,23 +25,20 @@ most bugs should be fixed.
2525
* [added] Ability to super to any Mount method
2626
* [fixed] Sequel support should now work as expected
2727
* [fixed] ActiveRecord no longer saves the record twice
28-
29-
# Version 0.2.5
30-
3128
* [added] Added convenient macro style class methods to rmagick processing
3229

33-
# Version 0.2.4
30+
=== 0.2.4 2009-06-11
3431

3532
* [added] `resize_to_limit` method for rmagick
3633
* [added] Now deletes files from Amazon S3 when record is destroyed
3734

38-
# Version 0.2.2
35+
=== 0.2.3 2009-05-13
3936

4037
* [changed] Mount now no longer returns nil if there is no stored file, it returns a blank uploader instead
4138
* [added] Possibility to specify a default path
4239
* [added] Paperclip compatibility module
4340

44-
# Version 0.2.1
41+
=== 0.2.1 2009-05-01
4542

4643
* [changed] Url method now optionally takes versions as parameters (like Paperclip)
4744
* [added] A field which allows files to be removed with a checkbox in mount
@@ -50,7 +47,7 @@ most bugs should be fixed.
5047
* [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)
5148

5249

53-
# Version 0.2
50+
=== 0.2 2009-04-15
5451

5552
* [changed] The version is no longer stored in the store dir. This will break the paths for files uploaded with 0.1
5653
* [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.
6158
* [added] Support for Sequel
6259
* [added] CarrierWave::Uploader#read to read the contents of the uploaded files
6360

64-
# Version 0.1
61+
=== 0.1 2009-03-12
6562

66-
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.
63+
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.

‎Manifest.txt

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Generators
2+
History.txt
3+
LICENSE
4+
Manifest.txt
5+
README.rdoc
6+
Rakefile
7+
carrierwave.gemspec
8+
cucumber.yml
9+
features/caching.feature
10+
features/file_storage.feature
11+
features/file_storage_overridden_filename.feature
12+
features/file_storage_overridden_store_dir.feature
13+
features/file_storage_reversing_processor.feature
14+
features/fixtures/bork.txt
15+
features/fixtures/monkey.txt
16+
features/mount_activerecord.feature
17+
features/mount_datamapper.feature
18+
features/step_definitions/activerecord_steps.rb
19+
features/step_definitions/caching_steps.rb
20+
features/step_definitions/datamapper_steps.rb
21+
features/step_definitions/file_steps.rb
22+
features/step_definitions/general_steps.rb
23+
features/step_definitions/mount_steps.rb
24+
features/step_definitions/store_steps.rb
25+
features/support/activerecord.rb
26+
features/support/datamapper.rb
27+
features/support/env.rb
28+
features/versions_basics.feature
29+
features/versions_nested_versions.feature
30+
features/versions_overridden_filename.feature
31+
features/versions_overriden_store_dir.feature
32+
lib/carrierwave.rb
33+
lib/carrierwave/compatibility/paperclip.rb
34+
lib/carrierwave/core_ext/blank.rb
35+
lib/carrierwave/core_ext/inheritable_attributes.rb
36+
lib/carrierwave/core_ext/module_setup.rb
37+
lib/carrierwave/mount.rb
38+
lib/carrierwave/orm/activerecord.rb
39+
lib/carrierwave/orm/datamapper.rb
40+
lib/carrierwave/orm/sequel.rb
41+
lib/carrierwave/processing/image_science.rb
42+
lib/carrierwave/processing/rmagick.rb
43+
lib/carrierwave/sanitized_file.rb
44+
lib/carrierwave/storage/abstract.rb
45+
lib/carrierwave/storage/file.rb
46+
lib/carrierwave/storage/s3.rb
47+
lib/carrierwave/test/matchers.rb
48+
lib/carrierwave/uploader.rb
49+
lib/carrierwave/uploader/cache.rb
50+
lib/carrierwave/uploader/callbacks.rb
51+
lib/carrierwave/uploader/default_path.rb
52+
lib/carrierwave/uploader/extension_whitelist.rb
53+
lib/carrierwave/uploader/mountable.rb
54+
lib/carrierwave/uploader/paths.rb
55+
lib/carrierwave/uploader/processing.rb
56+
lib/carrierwave/uploader/proxy.rb
57+
lib/carrierwave/uploader/remove.rb
58+
lib/carrierwave/uploader/store.rb
59+
lib/carrierwave/uploader/url.rb
60+
lib/carrierwave/uploader/versions.rb
61+
lib/generators/uploader_generator.rb
62+
rails_generators/uploader/USAGE
63+
rails_generators/uploader/templates/uploader.rb
64+
rails_generators/uploader/uploader_generator.rb
65+
script/console
66+
script/destroy
67+
script/generate
68+
spec/compatibility/paperclip_spec.rb
69+
spec/fixtures/bork.txt
70+
spec/fixtures/test.jpeg
71+
spec/fixtures/test.jpg
72+
spec/mount_spec.rb
73+
spec/orm/activerecord_spec.rb
74+
spec/orm/datamapper_spec.rb
75+
spec/orm/sequel_spec.rb
76+
spec/sanitized_file_spec.rb
77+
spec/spec_helper.rb
78+
spec/uploader/cache_spec.rb
79+
spec/uploader/default_path_spec.rb
80+
spec/uploader/extension_whitelist_spec.rb
81+
spec/uploader/mountable_spec.rb
82+
spec/uploader/paths_spec.rb
83+
spec/uploader/processing_spec.rb
84+
spec/uploader/proxy_spec.rb
85+
spec/uploader/remove_spec.rb
86+
spec/uploader/store_spec.rb
87+
spec/uploader/url_spec.rb
88+
spec/uploader/versions_spec.rb

‎README.rdoc

+6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
= CarrierWave
22

3+
http://carrierwave.rubyforge.org
4+
5+
== Summary
6+
37
This plugin for Merb and Rails provides a simple and extremely flexible way to
48
upload files.
59

10+
== Description
11+
612
* RDoc Documentation {available at Rubyforge}[http://carrierwave.rubyforge.org/].
713
* Source code {hosted at GitHub}[http://github.com/jnicklas/carrierwave]
814
* Please {report any issues}[http://github.com/jnicklas/carrierwave/issues] on GitHub

‎Rakefile

+29-115
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,29 @@
1-
require 'rubygems'
2-
require 'rake/gempackagetask'
3-
require 'rake/rdoctask'
4-
gem 'rdoc', '>=2.4.0'
5-
require 'rdoc'
6-
begin
7-
require 'sdoc'
8-
rescue LoadError
9-
end
10-
11-
require 'spec/rake/spectask'
12-
require 'spec/rake/verify_rcov'
13-
require 'cucumber/rake/task'
14-
15-
NAME = "carrierwave"
16-
GEM_VERSION = "0.3.2"
17-
AUTHOR = "Jonas Nicklas"
18-
EMAIL = "jonas.nicklas@gmail.com"
19-
HOMEPAGE = "http://www.example.com"
20-
SUMMARY = "Simple and powerful uploads for Merb and Rails"
21-
22-
spec = Gem::Specification.new do |s|
23-
s.rubyforge_project = 'carrierwave'
24-
s.name = NAME
25-
s.version = GEM_VERSION
26-
s.platform = Gem::Platform::RUBY
27-
s.has_rdoc = true
28-
s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
29-
s.summary = SUMMARY
30-
s.description = s.summary
31-
s.author = AUTHOR
32-
s.email = EMAIL
33-
s.homepage = HOMEPAGE
34-
s.require_path = 'lib'
35-
s.files = %w(LICENSE Generators README.rdoc Rakefile TODO) + Dir.glob("{lib,spec,rails_generators}/**/*")
36-
37-
end
38-
39-
# Try these:
40-
#
41-
# rake features
42-
# rake features PROFILE=html
43-
Cucumber::Rake::Task.new do |t|
44-
profile = ENV['PROFILE'] || 'default'
45-
t.cucumber_opts = "--profile #{profile}"
46-
end
47-
48-
Rake::RDocTask.new do |rd|
49-
rd.main = "README.rdoc"
50-
rd.title = "CarrierWave"
51-
rd.template = 'direct'
52-
rd.options << "--diagram" if ENV["DIAGRAM"]
53-
rd.rdoc_dir = File.join(File.dirname(__FILE__), 'doc')
54-
rd.rdoc_files.include("README.rdoc", "LICENSE", "TODO", 'lib/carrierwave/**/*.rb')
55-
end
56-
57-
Rake::GemPackageTask.new(spec) do |pkg|
58-
pkg.gem_spec = spec
59-
end
60-
61-
desc "install the plugin locally"
62-
task :install => [:package] do
63-
sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
64-
end
65-
66-
desc "create a gemspec file"
67-
task :make_spec do
68-
File.open("#{NAME}.gemspec", "w") do |file|
69-
file.puts spec.to_ruby
70-
end
71-
end
72-
73-
namespace :jruby do
74-
75-
desc "Run :package and install the resulting .gem with jruby"
76-
task :install => :package do
77-
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
78-
end
79-
80-
end
81-
82-
file_list = FileList['spec/**/*_spec.rb']
83-
84-
desc "Run all examples"
85-
Spec::Rake::SpecTask.new('spec') do |t|
86-
t.spec_files = file_list
87-
end
88-
89-
RCov::VerifyTask.new(:verify_coverage => "spec:rcov") do |t|
90-
t.threshold = 95.64
91-
t.index_html = 'doc/coverage/index.html'
92-
end
93-
94-
namespace :spec do
95-
desc "Run all examples with RCov"
96-
Spec::Rake::SpecTask.new('rcov') do |t|
97-
t.spec_files = file_list
98-
t.rcov = true
99-
t.rcov_dir = "doc/coverage"
100-
t.rcov_opts = ['--exclude', 'spec,features,lib/generators,gems/*']
101-
end
102-
103-
desc "Generate an html report"
104-
Spec::Rake::SpecTask.new('report') do |t|
105-
t.spec_files = file_list
106-
t.spec_opts = ["--format", "html:doc/reports/specs.html"]
107-
t.fail_on_error = false
108-
end
109-
110-
end
111-
112-
task :superspec => [:spec, :features]
113-
114-
desc 'Default: run unit tests and features.'
115-
task :default => 'superspec'
1+
require 'rubygems'
2+
gem 'hoe', '>= 2.1.0'
3+
require 'hoe'
4+
require 'fileutils'
5+
require './lib/carrierwave'
6+
7+
Hoe.plugin :newgem
8+
# Hoe.plugin :website
9+
Hoe.plugin :cucumberfeatures
10+
11+
$hoe = Hoe.spec 'carrierwave' do
12+
self.developer 'Jonas Nicklas', 'jonas.nicklas@gmail.com'
13+
self.rubyforge_name = self.name
14+
self.readme_file = 'README.rdoc'
15+
self.version = CarrierWave::VERSION
16+
self.extra_dev_deps << ['rspec', '>=1.2.8']
17+
self.extra_dev_deps << ['cucumber', '>=0.3.96']
18+
self.extra_dev_deps << ['activerecord', '>=2.3.3']
19+
self.extra_dev_deps << ['dm-core', '>=0.9.11']
20+
self.extra_dev_deps << ['sequel', '>=3.2.0']
21+
self.extra_dev_deps << ['rmagick', '>=2.10.0']
22+
self.extra_rdoc_files << 'README.rdoc'
23+
self.extra_rdoc_files << 'LICENSE'
24+
end
25+
26+
require 'newgem/tasks'
27+
Dir['tasks/**/*.rake'].each { |t| load t }
28+
29+
task :default => [:spec, :features]

‎TODO

Whitespace-only changes.

‎lib/carrierwave.rb

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
require 'carrierwave/core_ext/inheritable_attributes'
77

88
module CarrierWave
9+
10+
VERSION = "0.3.2"
11+
912
class << self
1013
attr_accessor :config, :logger
1114

‎lib/carrierwave/storage/abstract.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ class Abstract
1414
def initialize(uploader)
1515
@uploader = uploader
1616
end
17-
17+
1818
def self.setup!; end
19-
19+
2020
def identifier
2121
uploader.filename
2222
end
23-
23+
2424
def store!(file)
2525
end
26-
26+
2727
def retrieve!(identifier)
2828
end
29-
29+
3030
end # Abstract
3131
end # Storage
3232
end # CarrierWave

‎script/console

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env ruby
2+
# File: script/console
3+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4+
5+
libs = " -r irb/completion"
6+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
7+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8+
libs << " -r #{File.dirname(__FILE__) + '/../lib/carrierwave.rb'}"
9+
puts "Loading carrierwave gem"
10+
exec "#{irb} #{libs} --simple-prompt"

‎script/destroy

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3+
4+
begin
5+
require 'rubigen'
6+
rescue LoadError
7+
require 'rubygems'
8+
require 'rubigen'
9+
end
10+
require 'rubigen/scripts/destroy'
11+
12+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14+
RubiGen::Scripts::Destroy.new.run(ARGV)

‎script/generate

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3+
4+
begin
5+
require 'rubigen'
6+
rescue LoadError
7+
require 'rubygems'
8+
require 'rubigen'
9+
end
10+
require 'rubigen/scripts/generate'
11+
12+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14+
RubiGen::Scripts::Generate.new.run(ARGV)

0 commit comments

Comments
 (0)
Please sign in to comment.