Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated to custom gemspec/rakefile and added license.

  • Loading branch information...
commit 18274c32b6cc736afb9d72b8e249f035e89fc783 1 parent 11a094d
John Nunemaker jnunemaker authored
Showing with 60 additions and 102 deletions.
  1. +20 −0 LICENSE
  2. +21 −28 Rakefile
  3. +19 −74 joint.gemspec
20 LICENSE
View
@@ -0,0 +1,20 @@
+Copyright (c) 2010 John Nunemaker
+
+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.
49 Rakefile
View
@@ -1,38 +1,31 @@
require 'rubygems'
require 'rake'
-require 'jeweler'
require 'rake/testtask'
+require File.expand_path('../lib/joint/version', __FILE__)
-require File.join(File.dirname(__FILE__), 'lib', 'joint', 'version')
+Rake::TestTask.new do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/test_*.rb'
+ test.ruby_opts = ['-rubygems']
+ test.verbose = true
+end
-Jeweler::Tasks.new do |gem|
- gem.name = "joint"
- gem.summary = %Q{MongoMapper and GridFS joined in file upload love.}
- gem.description = %Q{MongoMapper and GridFS joined in file upload love.}
- gem.email = "nunemaker@gmail.com"
- gem.homepage = "http://github.com/jnunemaker/joint"
- gem.authors = ["John Nunemaker"]
- gem.version = Joint::Version
- gem.files = FileList['lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
- gem.test_files = FileList['test/**/*'].to_a
-
- gem.add_dependency 'wand', '>= 0.2.1'
- gem.add_dependency 'mime-types'
- gem.add_dependency 'mongo_mapper', '>= 0.7.4'
+task :default => :test
- gem.add_development_dependency 'jeweler'
- gem.add_development_dependency 'shoulda'
- gem.add_development_dependency 'mocha'
- gem.add_development_dependency 'jnunemaker-matchy'
+desc 'Builds the gem'
+task :build do
+ sh "gem build joint.gemspec"
end
-Jeweler::GemcutterTasks.new
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
- test.ruby_opts << '-rubygems'
- test.pattern = 'test/**/test_*.rb'
- test.verbose = true
+desc 'Builds and installs the gem'
+task :install => :build do
+ sh "gem install joint-#{Joint::Version}"
end
-task :test => :check_dependencies
-task :default => :test
+desc 'Tags version, pushes to remote, and pushes gem'
+task :release => :build do
+ sh "git tag v#{Joint::Version}"
+ sh "git push origin master"
+ sh "git push origin v#{Joint::Version}"
+ sh "gem push joint-#{Joint::Version}.gem"
+end
93 joint.gemspec
View
@@ -1,78 +1,23 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
-# -*- encoding: utf-8 -*-
+# encoding: UTF-8
+require File.expand_path('../lib/joint/version', __FILE__)
Gem::Specification.new do |s|
- s.name = %q{joint}
- s.version = "0.3.2"
+ s.name = "joint"
+ s.summary = %Q{MongoMapper and GridFS joined in file upload love.}
+ s.description = %Q{MongoMapper and GridFS joined in file upload love.}
+ s.email = "nunemaker@gmail.com"
+ s.homepage = "http://github.com/jnunemaker/joint"
+ s.require_path = 'lib'
+ s.authors = ["John Nunemaker"]
+ s.version = Joint::Version
+ s.files = Dir.glob("{lib,test}/**/*") + %w[LICENSE README.rdoc]
+ s.test_files = FileList['test/**/*'].to_a
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["John Nunemaker"]
- s.date = %q{2010-04-18}
- s.description = %q{MongoMapper and GridFS joined in file upload love.}
- s.email = %q{nunemaker@gmail.com}
- s.extra_rdoc_files = [
- "README.rdoc"
- ]
- s.files = [
- "README.rdoc",
- "Rakefile",
- "lib/joint.rb",
- "lib/joint/version.rb",
- "test/fixtures/harmony.png",
- "test/fixtures/mr_t.jpg",
- "test/fixtures/test1.txt",
- "test/fixtures/test2.txt",
- "test/fixtures/unixref.pdf",
- "test/helper.rb",
- "test/test_joint.rb"
- ]
- s.homepage = %q{http://github.com/jnunemaker/joint}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.6}
- s.summary = %q{MongoMapper and GridFS joined in file upload love.}
- s.test_files = [
- "test/fixtures",
- "test/fixtures/harmony.png",
- "test/fixtures/mr_t.jpg",
- "test/fixtures/test1.txt",
- "test/fixtures/test2.txt",
- "test/fixtures/unixref.pdf",
- "test/helper.rb",
- "test/test_joint.rb"
- ]
-
- 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
- s.add_runtime_dependency(%q<wand>, [">= 0.2.1"])
- s.add_runtime_dependency(%q<mime-types>, [">= 0"])
- s.add_runtime_dependency(%q<mongo_mapper>, [">= 0.7.4"])
- s.add_development_dependency(%q<jeweler>, [">= 0"])
- s.add_development_dependency(%q<shoulda>, [">= 0"])
- s.add_development_dependency(%q<mocha>, [">= 0"])
- s.add_development_dependency(%q<jnunemaker-matchy>, [">= 0"])
- else
- s.add_dependency(%q<wand>, [">= 0.2.1"])
- s.add_dependency(%q<mime-types>, [">= 0"])
- s.add_dependency(%q<mongo_mapper>, [">= 0.7.4"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- s.add_dependency(%q<jnunemaker-matchy>, [">= 0"])
- end
- else
- s.add_dependency(%q<wand>, [">= 0.2.1"])
- s.add_dependency(%q<mime-types>, [">= 0"])
- s.add_dependency(%q<mongo_mapper>, [">= 0.7.4"])
- s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0"])
- s.add_dependency(%q<jnunemaker-matchy>, [">= 0"])
- end
-end
+ s.add_dependency 'wand', '>= 0.2.1'
+ s.add_dependency 'mime-types'
+ s.add_dependency 'mongo_mapper', '>= 0.7.4'
+ s.add_development_dependency 'shoulda'
+ s.add_development_dependency 'mocha'
+ s.add_development_dependency 'jnunemaker-matchy'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.