Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Gemify! #48

Merged
merged 4 commits into from

3 participants

@xiongchiamiov

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.

xiongchiamiov added some commits
@xiongchiamiov xiongchiamiov Delete Gemfile.lock.
Per Yehuda Katz's advice[0], ditch the specific versions of gems specified
in the Gemfile.lock so that we are forced to get the dependencies
specified correctly in our Gemfile (or future gemspec).

[0]: http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
1bb360c
@xiongchiamiov xiongchiamiov 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.
84c9127
@xiongchiamiov

I haven't published it yet. It's installed on Cominor at ~bsomers/build/bin/{feature|hotfix}.

@xiongchiamiov xiongchiamiov Update installation instructions.
Also, fix incorrect ordering of example `ln` command.
1b35f97
@danielbeardsley

Exciting!

@timothyasp timothyasp commented on the diff
lib/github.rb
@@ -1,7 +1,6 @@
require "rubygems"
require "bundler/setup"
require 'octokit'
-require 'readline'

I didn't pay enough attention to addd628; I thought that removed all uses of readline, but it only removed one. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@xiongchiamiov xiongchiamiov Re-add readline import.
I mistakenly removed it in 84c9127 because I thought it had been
replaced entirely by highline in addd628; this is not true.

Readline is part of the standard library, so there's no need to include
it in the dependency list.
70f9faf
@xiongchiamiov xiongchiamiov referenced this pull request from a commit
@xiongchiamiov xiongchiamiov 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.
0333e8a
@xiongchiamiov xiongchiamiov merged commit 70f9faf into from
@xiongchiamiov

Merged and published to RubyGems.

@danielbeardsley

Sweet!

@xiongchiamiov xiongchiamiov added the r-All label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 16, 2013
  1. @xiongchiamiov

    Delete Gemfile.lock.

    xiongchiamiov authored
    Per Yehuda Katz's advice[0], ditch the specific versions of gems specified
    in the Gemfile.lock so that we are forced to get the dependencies
    specified correctly in our Gemfile (or future gemspec).
    
    [0]: http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
  2. @xiongchiamiov

    Gemify!

    xiongchiamiov authored
    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.
  3. @xiongchiamiov

    Update installation instructions.

    xiongchiamiov authored
    Also, fix incorrect ordering of example `ln` command.
Commits on Feb 22, 2013
  1. @xiongchiamiov

    Re-add readline import.

    xiongchiamiov authored
    I mistakenly removed it in 84c9127 because I thought it had been
    replaced entirely by highline in addd628; this is not true.
    
    Readline is part of the standard library, so there's no need to include
    it in the dependency list.
This page is out of date. Refresh to see the latest.
View
2  .gitignore
@@ -0,0 +1,2 @@
+Gemfile.lock
+dist
View
4 Gemfile
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
ruby "1.9.3"
-gem "octokit", "~> 1.22.0"
-gem "highline"
+
+gemspec
View
27 Gemfile.lock
@@ -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
10 README.md
@@ -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
3  Rakefile
@@ -1,3 +1,6 @@
+require 'mg'
+MG.new 'git-scripts.gemspec'
+
desc 'Build the manual'
task :man do
require 'ronn'
View
6 feature.rb → bin/feature
@@ -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
6 hotfix.rb → bin/hotfix
@@ -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
27 git-scripts.gemspec
@@ -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
0  git.rb → lib/git.rb
File renamed without changes
View
2  github.rb → lib/github.rb
@@ -1,8 +1,8 @@
require "rubygems"
require "bundler/setup"
require 'octokit'
-require 'readline'

I didn't pay enough attention to addd628; I thought that removed all uses of readline, but it only removed one. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
require 'shellwords'
+require 'readline'
require 'highline/import'
module Github
View
0  helpers.rb → lib/helpers.rb
File renamed without changes
Something went wrong with that request. Please try again.