Permalink
Browse files

Gemify!

Write a simple gemspec, move things into their appropriate directories,
and add a little Rake task to make it easier to generate a gem, install
it, publish it, etc.

Fixes #43.
  • Loading branch information...
1 parent 1bb360c commit 84c9127501103f61e10d5be57c3e4a3b1c58d368 @xiongchiamiov xiongchiamiov committed Feb 16, 2013
View
@@ -1 +1,2 @@
Gemfile.lock
+dist
View
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
ruby "1.9.3"
-gem "octokit", "~> 1.22.0"
-gem "highline"
+
+gemspec
View
@@ -1,3 +1,6 @@
+require 'mg'
+MG.new 'git-scripts.gemspec'
+
desc 'Build the manual'
task :man do
require 'ronn'
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-require_relative 'github.rb'
-require_relative 'git.rb'
-require_relative 'helpers.rb'
+require_relative '../lib/github.rb'
+require_relative '../lib/git.rb'
+require_relative '../lib/helpers.rb'
command=ARGV.first
View
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-require_relative 'github.rb'
-require_relative 'git.rb'
-require_relative 'helpers.rb'
+require_relative '../lib/github.rb'
+require_relative '../lib/git.rb'
+require_relative '../lib/helpers.rb'
command=ARGV.first
BRANCH_PREFIX = "hotfix-"
View
@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+# Reference: http://docs.rubygems.org/read/chapter/20
+
+Gem::Specification.new do |s|
+ s.name = 'git-scripts'
+ s.version = "0.1.0"
+ s.date = Time.now.strftime('%Y-%m-%d')
+
+ s.authors = ['Daniel Beardsley', 'James Pearson', 'Tim Asp']
+ s.email = ['daniel@ifixit.com', 'james@ifixit.com', 'tim@ifixit.com']
+
+ s.add_dependency 'bundler'
+ s.add_dependency 'octokit', '~> 1.22.0'
+ s.add_dependency 'highline'
+
+ s.files = %w( COPYING Rakefile README.md bash_completion.sh )
+ s.files += Dir.glob 'bin/*'
+ s.files += Dir.glob 'lib/*'
+ s.files += Dir.glob 'man/*'
+
+ s.executables = ['feature', 'hotfix']
+ s.extra_rdoc_files = ['COPYING', 'README.md']
+
+ s.summary = %q{User scripts for managing feature branches and hotfixes.}
+ s.homepage = 'http://ifixit.github.com/git-scripts/'
+ s.description = s.summary
+end
View
File renamed without changes.
@@ -1,7 +1,6 @@
require "rubygems"
require "bundler/setup"
require 'octokit'
-require 'readline'
require 'shellwords'
require 'highline/import'
File renamed without changes.

0 comments on commit 84c9127

Please sign in to comment.