Skip to content

Commit

Permalink
Merge gemify (#48) into master
Browse files Browse the repository at this point in the history
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
xiongchiamiov committed Feb 22, 2013
2 parents db2993b + 70f9faf commit 0333e8a
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Gemfile.lock
dist
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
ruby "1.9.3"
gem "octokit", "~> 1.22.0"
gem "highline"

gemspec
27 changes: 0 additions & 27 deletions Gemfile.lock

This file was deleted.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
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
Expand Down
3 changes: 3 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
require 'mg'
MG.new 'git-scripts.gemspec'

desc 'Build the manual'
task :man do
require 'ronn'
Expand Down
6 changes: 3 additions & 3 deletions feature.rb → bin/feature
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions hotfix.rb → bin/hotfix
Original file line number Diff line number Diff line change
@@ -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-"
Expand Down
27 changes: 27 additions & 0 deletions git-scripts.gemspec
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion github.rb → lib/github.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "rubygems"
require "bundler/setup"
require 'octokit'
require 'readline'
require 'shellwords'
require 'readline'
require 'highline/import'

module Github
Expand Down
File renamed without changes.

0 comments on commit 0333e8a

Please sign in to comment.