From 346fd038d1dbef82b9ae280075ecfb0037696a00 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 26 Feb 2015 11:19:12 +0530 Subject: [PATCH 1/3] Wrap into a gem --- .gitignore | 3 +++ Gemfile | 4 ++++ README.md | 8 ++++++-- Rakefile | 1 + git-game => bin/git-game | 0 git-game.gemspec | 15 +++++++++++++++ 6 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 Rakefile rename git-game => bin/git-game (100%) create mode 100644 git-game.gemspec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc30425 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.bundle/ +Gemfile.lock +pkg diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..8791f12 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in git-game.gemspec +gemspec diff --git a/README.md b/README.md index 531d264..9f350ba 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,15 @@ The goal is to get the longest streak! (It's harder than you think...) ## How do I play? -- [Download the `git-game` executable](https://github.com/jsomers/git-game/releases/tag/1.1) -- Put it somewhere on your PATH (like /usr/local/bin) +- `gem install git-game` (or perform [manual installation](#manual-installation). - Then, in any git repository, run `git game` - (If you'd like, you can select a subset of commits, for example, `git game --after={2014-08-08}`. For more options, see [http://gitref.org/inspect/](http://gitref.org/inspect/).) +### Manual Installation + +- [Download the `git-game` executable](https://github.com/jsomers/git-game/releases/tag/1.1) +- Put it somewhere on your PATH (like /usr/local/bin) + ## Requirements - Requires Ruby >1.8 diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..2995527 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/git-game b/bin/git-game similarity index 100% rename from git-game rename to bin/git-game diff --git a/git-game.gemspec b/git-game.gemspec new file mode 100644 index 0000000..f72de04 --- /dev/null +++ b/git-game.gemspec @@ -0,0 +1,15 @@ +# coding: utf-8 + +Gem::Specification.new do |spec| + spec.name = "git-game" + spec.version = 1.1 + spec.authors = ["jsomers"] + spec.summary = %q{The git committer guessing game!} + spec.homepage = "https://github.com/jsomers/git-game" + spec.license = "MIT" + + spec.executables = 'git-game' + + spec.add_development_dependency "bundler", "~> 1.7" + spec.add_development_dependency "rake", "~> 10.0" +end From fc00b383933d785b61268763bf1dfad49d9b88aa Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sun, 1 Mar 2015 14:26:16 +0530 Subject: [PATCH 2/3] Document steps required for releasing a new version --- Development.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Development.md diff --git a/Development.md b/Development.md new file mode 100644 index 0000000..fadad77 --- /dev/null +++ b/Development.md @@ -0,0 +1,8 @@ +## Releasing a new version + +1. On release a new version, update the version number in `git-game.spec` + and commit your changes. + +2. Run `rake release` to create a git tag for the version, push git + commits and tags, and push the `.gem` file to + [rubygems.org](https://rubygems.org). From 93fc218607b3dedff724d747a621e1e93b1c0929 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sun, 1 Mar 2015 14:30:39 +0530 Subject: [PATCH 3/3] Development.md: Fix grammar --- Development.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Development.md b/Development.md index fadad77..a2a4cae 100644 --- a/Development.md +++ b/Development.md @@ -1,8 +1,8 @@ ## Releasing a new version -1. On release a new version, update the version number in `git-game.spec` - and commit your changes. +1. To release a new version, update the version number in + `git-game.spec` and commit your changes. -2. Run `rake release` to create a git tag for the version, push git - commits and tags, and push the `.gem` file to +2. Run `rake release`. This will create a git tag for the version, + push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).