fix-db-schema-conflicts 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b06ada16be4152262a4cc15084fec8396f63e57e
4
- data.tar.gz: 8c89d14a21ffffe10c15ce859f5a2f90676ac228
3
+ metadata.gz: 39192bd1c0fb0868396a4760665ce60c2f9e634c
4
+ data.tar.gz: bbde2547471a0b37a730f5d9518c3b5b0f190905
5
5
  SHA512:
6
- metadata.gz: d4595ed68ea9f6ab555388b62ffafb16030d67b182508a62a199643a313c5939f3241ce8d36263324335c61d7093264c75cf51493bfb5a9800aadb21188fd45e
7
- data.tar.gz: e2c890104fc73354828d6fead06931739caa82282121693d2893042d012b56fa96c3ca6aff2db340b7ea53e20aa09c90450d895ccb3a71a6c57849a828d23494
6
+ metadata.gz: c5f2a60f67b80eb1c864b0fa56c4bd47c443894f0ae6fd5d3256cc3849532bd1a908dd83177b695ee91360b88342ccfb05dbc328db97d99cff50be053cec93ea
7
+ data.tar.gz: b4e987375106468b7377f6ab11ccebc1d4592ec06d48e704b7dddab9b998dac88593cf6ea4bfa048d7dac60706e634769c1ed4f64764992c457adb5a9b828cc6
data/.rubocop_schema.yml CHANGED
@@ -15,7 +15,10 @@ Style/AlignHash:
15
15
  Style/WordArray:
16
16
  MinSize: 3
17
17
 
18
- Style/TrailingComma:
18
+ Style/TrailingCommaInLiteral:
19
+ EnforcedStyleForMultiline: 'comma'
20
+
21
+ Style/TrailingCommaInArguments:
19
22
  EnforcedStyleForMultiline: 'comma'
20
23
 
21
24
  Style/HashSyntax:
data/README.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  It prevents db/schema.rb conflicts in your Rails projects when working with multiple team members.
4
4
 
5
+ Specifically the situation that goes like this:
6
+
7
+ John is working on a feature, and adds a migration to create an `updated_at` timestamp to `Task`.
8
+ Sara is working on a different feature, and adds a migration to create a `name` column to `Task`.
9
+ They both run their migrations locally, and then get a new copy of master with the other's feature and migration.
10
+ Then when they run migrations again, John's `tasks` table looks like this:
11
+
12
+ t.timestamp :updated_at
13
+ t.string :name
14
+
15
+ And Sara's looks like this:
16
+
17
+ t.string :name
18
+ t.timestamp :updated_at
19
+
20
+ And every time they run migrations before committing new code, their `db/schema.rb` file will be showing a change, because they are flipping the order of the columns.
21
+
22
+ By using the fix-db-schema-conflicts gem, this problem goes away.
23
+
24
+ ## How it works
25
+
26
+ This gem sorts the table, index, and foreign key names before outputting them to the schema.rb file. Additionally it runs Rubocop with the auto-correct flag to ensure a consistent output format. Then it runs `sed` to cleanup additional horizontal whitespace inserted by Rails.
27
+
28
+ ## Usage
29
+
30
+ You don't have to do anything different. It should just work. Simply run `rake db:migrate` or `rake db:schema:dump` as you would before and `fix-db-schema-conflicts` will do the rest.
31
+
5
32
  ## Installation
6
33
 
7
34
  Add this line to your application's Gemfile in your development group:
@@ -14,13 +41,9 @@ And then execute:
14
41
 
15
42
  $ bundle
16
43
 
17
- ## Usage
18
-
19
- You don't have to do anything different. It should just work. Simply run `rake db:migrate` or `rake db:schema:dump` as you would before and `fix-db-schema-conflicts` will do the rest.
44
+ ## Older versions of Rubocop:
20
45
 
21
- ## How it works
22
-
23
- This gem sorts the table, index, and foreign key names before outputting them to the schema.rb file. Additionally it runs Rubocop with the auto-correct flag to ensure a consistent output format. Then it runs `sed` to cleanup additional horizontal whitespace inserted by Rails.
46
+ If you wish to use a version of Rubocop `< 0.36.0` or below, use `gem 'fix-db-schema-conflicts', '~> 1.0.2'`
24
47
 
25
48
  ## Contributing
26
49
 
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
- spec.add_dependency "rubocop", "~> 0"
24
+ spec.add_dependency "rubocop", "~> 0.36.0"
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module FixDBSchemaConflicts
2
- VERSION='1.0.2'
2
+ VERSION='1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix-db-schema-conflicts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Moffatt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2016-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.36.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 0.36.0
55
55
  description: Ensures consistent output of db/schema.rb despite local differences in
56
56
  the database
57
57
  email: