Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 50e7043

Browse files
author
Patrick McKenna
committed
Merge pull request #9 from github/normalize-setup-scripts
Record dependencies and provide install script
2 parents c24d233 + 911f81e commit 50e7043

File tree

6 files changed

+45
-5
lines changed

6 files changed

+45
-5
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pinboard-backup-matthew.sh
2-
pinboard-backup-matthew
1+
/.bundle/
2+
/vendor/gems

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'octokit'

Gemfile.lock

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.3.8)
5+
faraday (0.9.2)
6+
multipart-post (>= 1.2, < 3)
7+
multipart-post (2.0.0)
8+
octokit (4.2.0)
9+
sawyer (~> 0.6.0, >= 0.5.3)
10+
sawyer (0.6.0)
11+
addressable (~> 2.3.5)
12+
faraday (~> 0.8, < 0.10)
13+
14+
PLATFORMS
15+
ruby
16+
17+
DEPENDENCIES
18+
octokit
19+
20+
BUNDLED WITH
21+
1.11.2

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This is a package of git- and github-training scripts into an easily-installed p
44

55
## Installation
66

7-
If you have Ruby installed, you can install these scripts into a directory in your path by running:
7+
If you have Ruby >= 1.9 installed, you can install these scripts into a directory in your `$PATH` by running:
88

99
```
10-
$ rake
10+
$ script/bootstrap
1111
```
1212

1313
## Usage

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ task :install do
1818
end
1919

2020
def ask_for_target_dir
21-
puts "Directory to install? (needs to be in your $PATH, /usr/local/bin is the default) "
21+
puts "Directory to install? (needs to be in your $PATH; /usr/local/bin is the default, hit enter to use that)"
2222
answer = STDIN.gets.chomp
2323
(answer unless answer == "") || "/usr/local/bin"
2424
end

script/bootstrap

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# resolves all dependencies that the application requires to run
4+
5+
set -e
6+
7+
cd "$(dirname "$0")/.."
8+
9+
# make sure bundler installed
10+
which bundler 2>&1 >/dev/null || gem install bundler
11+
12+
# make sure needed gems installed
13+
bundle check --path vendor/gems 2>&1 >/dev/null || bundle install --path vendor/gems --quiet
14+
15+
# install scripts
16+
rake

0 commit comments

Comments
 (0)