Skip to content

Commit 5ee57d6

Browse files
author
John D'Agostino
committed
initial commit
0 parents  commit 5ee57d6

13 files changed

+137
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/.bundle/
2+
/.yardoc
3+
/Gemfile.lock
4+
/_yardoc/
5+
/coverage/
6+
/doc/
7+
/pkg/
8+
/spec/reports/
9+
/tmp/

.rspec

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--format documentation
2+
--color

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: ruby
2+
rvm:
3+
- 2.1.3

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
# Specify your gem's dependencies in patches.gemspec
4+
gemspec

README.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Patches
2+
3+
Data Patches
4+
5+
## Installation
6+
7+
Add this line to your application's Gemfile:
8+
9+
```ruby
10+
gem 'patches'
11+
```
12+
13+
And then execute:
14+
15+
$ bundle
16+
17+
Or install it yourself as:
18+
19+
$ gem install patches
20+
21+
## Usage
22+
23+
mkdir db/patches
24+
25+
```ruby
26+
class PreferenceUpdate < Patches::Patch
27+
def perform
28+
end
29+
end
30+
```
31+
32+
```bash
33+
bundle exec rake db:patch
34+
```
35+
36+
## Development
37+
38+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
39+
40+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec 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).
41+
42+
## Contributing
43+
44+
1. Fork it ( https://github.com/[my-github-username]/patches/fork )
45+
2. Create your feature branch (`git checkout -b my-new-feature`)
46+
3. Commit your changes (`git commit -am 'Add some feature'`)
47+
4. Push to the branch (`git push origin my-new-feature`)
48+
5. Create a new Pull Request

Rakefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require "bundler/gem_tasks"
2+

bin/console

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env ruby
2+
3+
require "bundler/setup"
4+
require "patches"
5+
6+
# You can add fixtures and/or initialization code here to make experimenting
7+
# with your gem easier. You can also use a different console, if you like.
8+
9+
# (If you use this, don't forget to add pry to your Gemfile!)
10+
# require "pry"
11+
# Pry.start
12+
13+
require "irb"
14+
IRB.start

bin/setup

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
5+
bundle install
6+
7+
# Do any other automated setup that you need to do here

lib/patches.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require "patches/version"
2+
3+
module Patches
4+
# Your code goes here...
5+
end

lib/patches/version.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Patches
2+
VERSION = "0.1.0"
3+
end

patches.gemspec

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding: utf-8
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'patches/version'
5+
6+
Gem::Specification.new do |spec|
7+
spec.name = "patches"
8+
spec.version = Patches::VERSION
9+
spec.authors = ["John D'Agostino"]
10+
spec.email = ["[email protected]"]
11+
12+
spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
13+
spec.description = %q{TODO: Write a longer description or delete this line.}
14+
spec.homepage = "TODO: Put your gem's website or public repo URL here."
15+
16+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17+
spec.bindir = "exe"
18+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19+
spec.require_paths = ["lib"]
20+
21+
if spec.respond_to?(:metadata)
22+
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
23+
end
24+
25+
spec.add_development_dependency "bundler", "~> 1.8"
26+
spec.add_development_dependency "rake", "~> 10.0"
27+
end

spec/patches_spec.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
require 'spec_helper'
2+
3+
describe Patches do
4+
it 'has a version number' do
5+
expect(Patches::VERSION).not_to be nil
6+
end
7+
8+
it 'does something useful' do
9+
expect(false).to eq(true)
10+
end
11+
end

spec/spec_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2+
require 'patches'

0 commit comments

Comments
 (0)