pt-osc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,23 @@
1
+ branches:
2
+ only:
3
+ - master
4
+ language: ruby
5
+ rvm:
6
+ - 1.9.3
7
+ - 2.0.0
8
+ - 2.1.2
9
+ env:
10
+ - CODECLIMATE_REPO_TOKEN=0b58d4e91bfac6ed6e48b31606f6792598a3a59c27bded19d58ef8406c09f57c
11
+ cache:
12
+ - bundler
13
+ - apt
14
+ bundler_args: --binstubs --retry=5
15
+ before_script:
16
+ - unset RAILS_ENV
17
+ - unset RACK_ENV
18
+ - bundle exec rake db:test_create
19
+ script:
20
+ - bundle exec rake test
21
+ addons:
22
+ code_climate:
23
+ repo_token: 0b58d4e91bfac6ed6e48b31606f6792598a3a59c27bded19d58ef8406c09f57c
@@ -0,0 +1,7 @@
1
+ ## 0.0.2
2
+
3
+ - fixed bug when `percona` config is not defined in `database.yml`
4
+
5
+ ## 0.0.1
6
+
7
+ - initial release
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in pt-osc.gemspec
4
4
  gemspec
5
+
6
+ group :test do
7
+ gem 'codeclimate-test-reporter', require: nil
8
+ end
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ [![Travis CI](https://travis-ci.org/steverice/pt-osc.svg)](https://travis-ci.org/steverice/pt-osc)
2
+ [![Code Climate](https://codeclimate.com/github/steverice/pt-osc.png)](https://codeclimate.com/github/steverice/pt-osc)
3
+ [![Code Coverage](https://codeclimate.com/github/steverice/pt-osc/coverage.png)](https://codeclimate.com/github/steverice/pt-osc)
4
+
1
5
  ## `pt-online-schema-change` migrations
2
6
 
3
7
  Runs regular Rails/ActiveRecord migrations via the [Percona Toolkit pt-online-schema-change tool](http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html).
@@ -33,3 +37,14 @@ environment:
33
37
 
34
38
  Additional options for the `percona` hash include:
35
39
  - `run_mode`: Specify `'execute'` to actually run `pt-online-schema-change` when the migration runs. Specify `'print'` to output the commands to run to STDOUT instead. Default is `'print'`.
40
+
41
+ ## Caveats
42
+
43
+ This gem is not considered production ready. There will be bugs.
44
+ It is tested against:
45
+ - ActiveRecord 3.2 branch
46
+ - Ruby 1.9.2
47
+ - Ruby 2.0.0
48
+ - Ruby 2.1.2
49
+
50
+ Support for other versions of Ruby or ActiveRecord is unknown and not guaranteed.
@@ -144,7 +144,7 @@ module ActiveRecord
144
144
  end
145
145
 
146
146
  def percona_config
147
- database_config[:percona]
147
+ database_config[:percona] || {}
148
148
  end
149
149
  end
150
150
  end
@@ -1,5 +1,5 @@
1
1
  module Pt
2
2
  module Osc
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -1,3 +1,6 @@
1
+ require 'codeclimate-test-reporter'
2
+ CodeClimate::TestReporter.start
3
+
1
4
  # Configure Rails Environment
2
5
  ENV['RAILS_ENV'] = 'test'
3
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt-osc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-17 00:00:00.000000000 Z
12
+ date: 2014-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -164,6 +164,8 @@ extensions: []
164
164
  extra_rdoc_files: []
165
165
  files:
166
166
  - .gitignore
167
+ - .travis.yml
168
+ - CHANGELOG.md
167
169
  - Gemfile
168
170
  - README.md
169
171
  - Rakefile
@@ -225,12 +227,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
227
  - - ! '>='
226
228
  - !ruby/object:Gem::Version
227
229
  version: '0'
230
+ segments:
231
+ - 0
232
+ hash: 109718066691379397
228
233
  required_rubygems_version: !ruby/object:Gem::Requirement
229
234
  none: false
230
235
  requirements:
231
236
  - - ! '>='
232
237
  - !ruby/object:Gem::Version
233
238
  version: '0'
239
+ segments:
240
+ - 0
241
+ hash: 109718066691379397
234
242
  requirements: []
235
243
  rubyforge_project:
236
244
  rubygems_version: 1.8.23