xmigra 1.7.1 → 1.7.2

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: 5bb7f3c0d919cad77388a4068703578605c1db43
4
- data.tar.gz: 516b05df5c5e2eca101239ad6ac674c32f4eb23c
3
+ metadata.gz: 16f83be4f63c7d9cddec772164eb318447e4703b
4
+ data.tar.gz: 9a3c0dc01f24880947285d935112471ca8b81e88
5
5
  SHA512:
6
- metadata.gz: 9ab6106dc64c496340c9c1708df3b07bb07074bbac0f5f6d73e83656e6342548513dfaf7540bbee21c0e9546946c9dfbec6333aee056c49bf704b520efd90e67
7
- data.tar.gz: 16106a3ddc6857c356e370472d837de62995a9104cf1e16dc00fb1f53b3a2276f521f61b125b72ee8fe0f4f705297ddd0173fb3431969643a91da1c248db333f
6
+ metadata.gz: dc6dbad80b535f5428f37cbfcf842e6aa7a819c233bca333796e3fd3a29de8f6016265319ecd7842a9668da6343bb85bb136c1d66a105f38f542896d1ba687ee
7
+ data.tar.gz: 9b83b2aac9231ab1b67f5ec181393b16bdf3157d2dddc375b5d58f9e1b29d4986038acf4d5b800bbabc0b934c36be9987354344d23c20cc331b42adfd15bd720
@@ -197,19 +197,19 @@ module XMigra
197
197
 
198
198
  git_fetch_master_branch
199
199
  migrations.each do |m|
200
- # Check that the migration has not changed in the currently checked-out branch
200
+ # Check that the migration in the working tree is the same as in head of the central master branch
201
201
  fpath = m.file_path
202
-
203
- history = git(:log, %w{--format=%H --}, fpath).split
204
- if history[1]
205
- raise VersionControlError, "'#{fpath}' has been modified in the current branch of the repository since its introduction"
202
+ unless git(:diff, '--exit-code', self.git_master_local_branch, '--', fpath, check_exit: true)
203
+ master_url, remote_branch = self.git_master_head.split('#', 2)
204
+ raise VersionControlError, "'#{fpath}' is different locally than on '#{remote_branch}' in #{master_url}"
206
205
  end
207
206
  end
208
207
 
209
208
  # Since a production script was requested, warn if we are not generating
210
209
  # from a production branch
211
210
  if branch_use != :production
212
- raise VersionControlError, "The working tree is not a commit in the master history."
211
+ master_url, remote_branch = self.git_master_head.split('#', 2)
212
+ raise VersionControlError, "The working tree is not a commit in the history of '#{remote_branch}' in #{master_url}"
213
213
  end
214
214
  end
215
215
 
@@ -1,3 +1,3 @@
1
1
  module XMigra
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmigra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Next IT Corporation
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-19 00:00:00.000000000 Z
12
+ date: 2019-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.2.1
122
+ rubygems_version: 2.4.8
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Toolkit for managing database schema evolution with version control.