Skip to content

Commit

Permalink
Merge pull request #1 from Fingertips/v2
Browse files Browse the repository at this point in the history
Merge work
  • Loading branch information
Manfred committed Jun 3, 2014
2 parents b01cb5d + 2c7da6e commit 1d61279
Show file tree
Hide file tree
Showing 38 changed files with 1,840 additions and 543 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test/db
test/tmp
test/log
html
.svn
19 changes: 19 additions & 0 deletions .kick
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
recipe :ruby

process do |files|
tests = files.take_and_map do |file|
case file
when /^lib\/.*?(\w+)\.rb$/
"test/#{$1}_test.rb"
end
end

Ruby.run_tests tests
end

# FIXME!
# options.on "-d", "--rdoc", "Re-generates documentation" do
# process do |files|
# execute "rake docs:generate"
# end
# end
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem 'rails'
gem 'rake'
gem 'sqlite3'
gem 'peck'
gem 'mocha'
93 changes: 93 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
mail (~> 2.5.4)
actionpack (4.1.1)
actionview (= 4.1.1)
activesupport (= 4.1.1)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
activerecord (4.1.1)
activemodel (= 4.1.1)
activesupport (= 4.1.1)
arel (~> 5.0.0)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
builder (3.2.2)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.4)
mime-types (1.25.1)
minitest (5.3.4)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.10.1)
peck (0.5.3)
polyglot (0.3.5)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.1)
actionmailer (= 4.1.1)
actionpack (= 4.1.1)
actionview (= 4.1.1)
activemodel (= 4.1.1)
activerecord (= 4.1.1)
activesupport (= 4.1.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1)
sprockets-rails (~> 2.0)
railties (4.1.1)
actionpack (= 4.1.1)
activesupport (= 4.1.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
sprockets (2.12.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (1.2.1)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
mocha
peck
rails
rake
sqlite3
30 changes: 3 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
Copyright (c) 2008 Manfred Stienstra, Fingertips <manfred@fngtps.com>

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.

--------------------------------------------------------------------------------

Some parts of attachment-san were originally included in ‘attachment_fu’ and
‘acts_as_attachment’ under the following license:

Copyright (c) 2005 Rick Olson

Unless noted specifically, all plugins in this repository are MIT licensed:
Copyright (c) 2008-2009 Fingertips,
* Manfred Stienstra <manfred@fngtps.com>
* Eloy Duran <eloy@fngtps.com>

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
Expand Down
10 changes: 0 additions & 10 deletions README

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AttachmentSan

An attachment extension for your Rails models, it tries to be as flexible as possible. See the AttachmentSan docs for information.

## Testing

include AttachmentSan::UploadHelpers
42 changes: 19 additions & 23 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
require 'rake/rdoctask'
require 'rake/testtask'

desc "Run all specs by default"
task :default => :spec
desc "Run all tests by default"
task :default => :test

desc "Run all specs"
task :spec do
Dir[File.dirname(__FILE__) + '/test/**/*_spec.rb'].each do |file|
load file
end
end

namespace :gem do
desc "Build the gem"
task :build do
sh 'gem build nap.gemspec'
end

task :install => :build do
sh 'sudo gem install nap-*.gem'
end
Rake::TestTask.new do |t|
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end

namespace :docs do
Rake::RDocTask.new(:generate) do |rd|
rd.main = "README"
rd.rdoc_files.include("README", "LICENSE", "lib/**/*.rb")
rd.options << "--all" << "--charset" << "utf-8"
begin
require 'rubygems'
gem 'rdoc', '>= 2'
require 'rdoc/task'

Rake::RDocTask.new(:generate) do |rdoc|
rdoc.title = "AttachmentSan"
rdoc.main = "README"
rdoc.rdoc_files.include("README", "LICENSE", "lib/**/*.rb")
rdoc.options << "--all" << "--charset=utf-8" << "--format=darkfish"
end
rescue LoadError
puts "[!] In order to generate docs, please install the `rdoc 2.x.x' and `darkfish-rdoc' gems."
end
end
4 changes: 4 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Allow the user to override any of the attachment_san_options on the dynamically created attachment subclasses.
* Do we need to sanitize the original filename, eg lowercase.
* Make :filename_scheme => :record_identifier also use nesting under parent resources. Eg /resources/1/images/2/filename
* The *might* have multiple attachment base classes. Not needed yet though.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
34 changes: 34 additions & 0 deletions attachment-san.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Gem::Specification.new do |s|
s.name = %q{attachment-san}
s.version = "1.0.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Eloy Duran", "Manfred Stienstra"]
s.date = %q{2014-06-03}
s.description = %q{Rails plugin for easy and rich attachment manipulation.}
s.email = ["eloy@fngtps.com", "manfred@fngtps.com"]
s.extra_rdoc_files = ["LICENSE"]
s.files = [
"LICENSE",
"README.md",
"TODO",
"VERSION"
] + Dir.glob('lib/**/*.rb')
s.homepage = %q{http://github.com/Fingertips/attachment-san}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.5}
s.summary = %q{Rails plugin for easy and rich attachment manipulation. It allows you to treat attachments as associations with file variants.}
s.license = 'MIT'

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
end

3 changes: 0 additions & 3 deletions init.rb

This file was deleted.

56 changes: 0 additions & 56 deletions lib/active_record/attachment_san.rb

This file was deleted.

Loading

0 comments on commit 1d61279

Please sign in to comment.