Skip to content

Instantly share code, notes, and snippets.

@cprice404
Created September 11, 2014 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cprice404/1c52924a968a83d63ee3 to your computer and use it in GitHub Desktop.
Save cprice404/1c52924a968a83d63ee3 to your computer and use it in GitHub Desktop.
foo.sh
#!/usr/bin/env bash
mkdir foo
cd foo
cat <<EOF > ./Gemfile
source ENV['GEM_SOURCE'] || "https://rubygems.org"
gem "foo", :path => File.dirname(__FILE__), :require => false
EOF
cat <<EOF > ./.gemspec
Gem::Specification.new do |s|
s.name = "foo"
version = "0.0.1"
mdata = version.match(/(\d+\.\d+\.\d+)/)
s.version = mdata ? mdata[1] : version
s.authors = ["foo"]
s.summary = "foo"
end
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment