Permalink
Browse files

Merge gemify (#48) into master

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...
2 parents db2993b + 70f9faf commit 0333e8ac541478a6badf811bc9d34bd092cb6b95 @xiongchiamiov xiongchiamiov committed Feb 22, 2013
View
@@ -0,0 +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,27 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- addressable (2.3.2)
- faraday (0.8.5)
- multipart-post (~> 1.1)
- faraday_middleware (0.9.0)
- faraday (>= 0.7.4, < 0.9)
- hashie (1.2.0)
- highline (1.6.13)
- multi_json (1.5.0)
- multipart-post (1.1.5)
- netrc (0.7.7)
- octokit (1.22.0)
- addressable (~> 2.2)
- faraday (~> 0.8)
- faraday_middleware (~> 0.9)
- hashie (~> 1.2)
- multi_json (~> 1.3)
- netrc (~> 0.7.7)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- highline
- octokit (~> 1.22.0)
View
@@ -4,11 +4,17 @@ User scripts for easily managing feature branches and hotfixes.
## Installation
```bash
+gem install git-scripts
+```
+
+or
+
+```bash
git clone git://github.com/iFixit/git-scripts.git
cd git-scripts
bundle install
-ln -s /path/to/bin/dir/feature ${PWD}/feature.rb
-ln -s /path/to/bin/dir/hotfix ${PWD}/hotfix.rb
+ln -s ${PWD}/bin/feature /path/to/bin/dir/
+ln -s ${PWD}/bin/hotfix /path/to/bin/dir/
```
## Branching Model
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
@@ -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
File renamed without changes.
@@ -1,8 +1,8 @@
require "rubygems"
require "bundler/setup"
require 'octokit'
-require 'readline'
require 'shellwords'
+require 'readline'
require 'highline/import'
module Github
File renamed without changes.

0 comments on commit 0333e8a

Please sign in to comment.