git-merge-structure-sql 1.0.0 → 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
  SHA256:
3
- metadata.gz: 106ff7bb28c70bd2a3ddab8ada1e1055cd3018acc97bfc7b51163c72033c69bf
4
- data.tar.gz: 8b3c3484f05e9419128172bc743457580a7b23f280295a5769c99d61366fdb33
3
+ metadata.gz: 84da2722a1dae47932ee39b2b8fab2afe1cf3e45f44dc13a47b2827b31a8ead7
4
+ data.tar.gz: ef4564d98915f1d3793ceed52293dc842c2ea7b360a0ef510e9cbfda1752ed02
5
5
  SHA512:
6
- metadata.gz: ef8055e769b186b91c73278f4a5f50670999a33615b2b059b6c7e6d7d187d1d1a7ef80605473057837daa33f2e2a3fbb32503eee3828600861ec942315ffc0be
7
- data.tar.gz: 80003f7b2921cdc9cd2923a6670cc9a125c27209ec7fc72cb8870cd282dbfa4eb8bcdf62f0782580c2cf320566c3d8eeed70184cfc3cb2f86a0309b7e383a753
6
+ metadata.gz: 7e6460ea9caf2df665e595714a2d47dce362bb6aadfab4a3a176e0591c88ac5b00695ddbc0bef567c8c1661832e85bbca1d65fa64f797153e65d9e6468cb45d5
7
+ data.tar.gz: 38663df90de6dff046713ca93b5836a62ad5c0f96f377425ff2d6ff0adc8e18c29dc1d5d93607bb56b9f389a6a6de6fc206cb5644f915ce239112e524d596491
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ Gemfile.lock
2
+
1
3
  /.bundle/
2
4
  /.yardoc
3
5
  /_yardoc/
@@ -6,3 +8,6 @@
6
8
  /pkg/
7
9
  /spec/reports/
8
10
  /tmp/
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ ## 1.0.0 (2018-11-29)
4
+
5
+ - Initial release
6
+
7
+ ## 1.1.0 (2018-11-30)
8
+
9
+ - Add support for the latest MySQL dump format
10
+ - Mention support for the SQLite3 dump format
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2018 Akinori MUSHA
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions
7
+ are met:
8
+ 1. Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+ 2. Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24
+ SUCH DAMAGE.
data/README.md CHANGED
@@ -3,7 +3,8 @@
3
3
  This is a merge driver for Git that resolves trivial parts of
4
4
  merge conflicts in a db/structure.sql file of Rails.
5
5
 
6
- Currently only PostgreSQL and MySQL dump formats are supported.
6
+ Currently only PostgreSQL, MySQL and SQLite3 dump formats are
7
+ supported.
7
8
 
8
9
  ## Installation
9
10
 
@@ -26,6 +27,16 @@ files.
26
27
  Once enabled, Git should call this driver as necessary when it needs
27
28
  to merge changes made in structure.sql.
28
29
 
29
- ## Contributing
30
+ ## History
30
31
 
31
- Bug reports and pull requests are welcome on GitHub at https://github.com/knu/git-merge-structure-sql.
32
+ See `CHANGELOG.md` for the version history.
33
+
34
+ ## Author
35
+
36
+ Copyright (c) 2018 Akinori MUSHA.
37
+
38
+ Licensed under the 2-clause BSD license. See `LICENSE.txt` for
39
+ details.
40
+
41
+ Visit the [GitHub Repository](https://github.com/knu/sidetiq-timezone)
42
+ for the latest information.
data/Rakefile CHANGED
@@ -1,10 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
- require "rake/testtask"
2
+ require "rspec/core/rake_task"
3
3
 
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
4
+ RSpec::Core::RakeTask.new(:spec)
9
5
 
10
- task :default => :test
6
+ task :default => :spec
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "git/merge/structure/sql"
4
+ require "git-merge-structure-sql"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = StructureSqlMergeDriver::VERSION
9
9
  spec.authors = ["Akinori MUSHA"]
10
10
  spec.email = ["knu@idaemons.org"]
11
+ spec.license = "BSD-2-Clause"
11
12
 
12
13
  spec.summary = %q{git merge driver for db/structure.sql in a Rails project}
13
14
  spec.homepage = "https://github.com/knu/git-merge-structure-sql"
@@ -29,5 +30,5 @@ Gem::Specification.new do |spec|
29
30
 
30
31
  spec.add_development_dependency "bundler", "~> 1.16"
31
32
  spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "minitest", "~> 5.0"
33
+ spec.add_development_dependency "rspec", "~> 3.0"
33
34
  end
@@ -33,12 +33,12 @@
33
33
  #
34
34
 
35
35
  class StructureSqlMergeDriver
36
- VERSION = '1.0.0'
36
+ VERSION = '1.1.0'
37
37
  VARIANTS = []
38
38
 
39
- module PostgreSQL
39
+ module Default # This covers PostgreSQL, SQLite and newer MySQL formats.
40
40
  RE_VERSION = /^\('(\d+)'\)[,;]\n/
41
- RE_VERSIONS = /^INSERT INTO "schema_migrations" \(version\) VALUES\n\K#{RE_VERSION}+/
41
+ RE_VERSIONS = /^INSERT INTO (?<q>["`])schema_migrations\k<q> \(version\) VALUES\n\K#{RE_VERSION}+/
42
42
 
43
43
  class << self
44
44
  def match?(content)
@@ -68,7 +68,7 @@ class StructureSqlMergeDriver
68
68
  end
69
69
  end
70
70
 
71
- VARIANTS << self
71
+ VARIANTS.unshift self
72
72
  end
73
73
 
74
74
  module MySQL
@@ -125,7 +125,7 @@ class StructureSqlMergeDriver
125
125
  end
126
126
  end
127
127
 
128
- VARIANTS << self
128
+ VARIANTS.unshift self
129
129
  end
130
130
 
131
131
  def system!(*args)
@@ -144,6 +144,7 @@ class StructureSqlMergeDriver
144
144
 
145
145
  usage: #{myname} <current-file> <base-file> <other-file>
146
146
  #{myname} --install
147
+
147
148
  EOF
148
149
 
149
150
  install = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-merge-structure-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-29 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: minitest
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '3.0'
48
48
  type: :development
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: '5.0'
54
+ version: '3.0'
55
55
  description:
56
56
  email:
57
57
  - knu@idaemons.org
@@ -61,8 +61,11 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
+ - ".rspec"
64
65
  - ".travis.yml"
66
+ - CHANGELOG.md
65
67
  - Gemfile
68
+ - LICENSE.txt
66
69
  - README.md
67
70
  - Rakefile
68
71
  - bin/console
@@ -71,7 +74,8 @@ files:
71
74
  - git-merge-structure-sql.gemspec
72
75
  - lib/git-merge-structure-sql.rb
73
76
  homepage: https://github.com/knu/git-merge-structure-sql
74
- licenses: []
77
+ licenses:
78
+ - BSD-2-Clause
75
79
  metadata:
76
80
  homepage_uri: https://github.com/knu/git-merge-structure-sql
77
81
  source_code_uri: https://github.com/knu/git-merge-structure-sql