Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Hand-rolled gemspec + Bundler

  • Loading branch information...
commit ccb6a2664d8287e19dff2b30e6f53856b593805a 1 parent e7c7dd1
@aanand authored
View
3  Gemfile
@@ -0,0 +1,3 @@
+source :rubygems
+gemspec
+
View
26 Gemfile.lock
@@ -0,0 +1,26 @@
+PATH
+ remote: .
+ specs:
+ git-up (0.4.1)
+ colored (>= 1.2)
+ grit
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ colored (1.2)
+ diff-lcs (1.1.2)
+ grit (2.3.0)
+ diff-lcs (~> 1.1)
+ mime-types (~> 1.15)
+ mime-types (1.16)
+ thoughtbot-shoulda (2.11.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ colored (>= 1.2)
+ git-up!
+ grit
+ thoughtbot-shoulda
View
34 Rakefile
@@ -1,23 +1,27 @@
require 'rubygems'
require 'rake'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "git-up"
- gem.summary = %Q{git command to fetch and rebase all branches}
- gem.email = "aanand.prasad@gmail.com"
- gem.homepage = "http://github.com/aanand/git-up"
- gem.authors = ["Aanand Prasad"]
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
-
- gem.add_dependency "colored", ">= 1.2"
- gem.add_dependency "grit"
+def gemspec
+ @gemspec ||= begin
+ file = File.expand_path('../git-up.gemspec', __FILE__)
+ eval(File.read(file), binding, file)
end
- Jeweler::GemcutterTasks.new
+end
+
+begin
+ require 'rake/gempackagetask'
rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+ task(:gem) { $stderr.puts '`gem install rake` to package gems' }
+else
+ Rake::GemPackageTask.new(gemspec) do |pkg|
+ pkg.gem_spec = gemspec
+ end
+ task :gem => :gemspec
+end
+
+desc "validate the gemspec"
+task :gemspec do
+ gemspec.validate
end
require 'rake/testtask'
View
1  VERSION
@@ -1 +0,0 @@
-0.4.1
View
73 git-up.gemspec
@@ -1,62 +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 -*-
+lib = File.expand_path('../lib/', __FILE__)
+$:.unshift lib unless $:.include?(lib)
-Gem::Specification.new do |s|
- s.name = %q{git-up}
- s.version = "0.4.1"
+require 'git-up/version'
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Aanand Prasad"]
- s.date = %q{2010-10-21}
- s.default_executable = %q{git-up}
- s.email = %q{aanand.prasad@gmail.com}
- s.executables = ["git-up"]
- s.extra_rdoc_files = [
- "LICENSE",
- "README.md"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "README.md",
- "Rakefile",
- "VERSION",
- "bin/git-up",
- "git-up.gemspec",
- "lib/git-up.rb",
- "test/helper.rb",
- "test/test_git-up.rb"
- ]
- s.homepage = %q{http://github.com/aanand/git-up}
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{git command to fetch and rebase all branches}
- s.test_files = [
- "test/helper.rb",
- "test/test_git-up.rb"
- ]
+Gem::Specification.new do |s|
+ s.name = "git-up"
+ s.version = GitUp::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Aanand Prasad", "Elliot Crosby-McCullough"]
+ s.email = ["aanand.prasad@gmail.com", "elliot.cm@gmail.com"]
+ s.homepage = "http://github.com/aanand/git-up"
+ s.summary = "git command to fetch and rebase all branches"
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.add_development_dependency "thoughtbot-shoulda"
+ s.add_dependency "colored", ">= 1.2"
+ s.add_dependency "grit"
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_runtime_dependency(%q<colored>, [">= 1.2"])
- s.add_runtime_dependency(%q<grit>, [">= 0"])
- else
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_dependency(%q<colored>, [">= 1.2"])
- s.add_dependency(%q<grit>, [">= 0"])
- end
- else
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
- s.add_dependency(%q<colored>, [">= 1.2"])
- s.add_dependency(%q<grit>, [">= 0"])
- end
+ s.files = Dir.glob("{bin,lib,vendor}/**/*") + %w(LICENSE README.md)
+ s.require_path = 'lib'
+ s.executables = Dir.glob("bin/*").map(&File.method(:basename))
end
-
View
3  lib/git-up/version.rb
@@ -0,0 +1,3 @@
+class GitUp
+ VERSION = "0.4.1"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.