pronto-rails_migrations 0.17.1 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ccb1a7b9bde96ecc3d086d9be345f5f3503e7107831533cacc9d594ad57f0d3
4
- data.tar.gz: 994246a7bc0b318dacc6a775c07c531369a963625f5b25c3088010c321e2032c
3
+ metadata.gz: c4b981e4218b09883e77dacb1a4e609de57b7c86d52d67f69362fd93c522a5ed
4
+ data.tar.gz: f05f2c893042f6ec20f32e239d60c87421d6d243366fd5c0f6d4c68e21182169
5
5
  SHA512:
6
- metadata.gz: fe80885e05cdd29fb42512ced02c75f35a217186538fa9e03d9012021b272492991ecd741be54b5d2d229e5f0b1b3af18d88edffcba56d57a79dfd2070d0c624
7
- data.tar.gz: cb1db3938e852446a27aff0e6b117e12d2726308b3e469581037c2546496789329bc238ccead3d2d3c2ae97a48dee47e0adc6838d7408d7fc7a0fb084c07f173
6
+ metadata.gz: 2ae82431caf4a3e6bf2ca098c3e0a592017245e04ac2b7d94a17b79ef2b9cab7b209f4b0988bec7ccd108ea8d840dbde3a0cea74ca413915bc0b8cb3838097ee
7
+ data.tar.gz: 3635547ae1ad4edf0c89299607eebd90c0bb130fe8637132691a4e7d2693913d0edf7869f0e5a27b710297e23eb5c0b80e5be6b67d4cbf902251392372ebf0ad
@@ -1,3 +1,3 @@
1
1
  module Pronto
2
- RAILS_MIGRATIONS_VERSION = '0.17.1'
2
+ RAILS_MIGRATIONS_VERSION = '0.17.2'
3
3
  end
@@ -64,8 +64,10 @@ module Pronto
64
64
 
65
65
  def message(patch, text, level: :error)
66
66
  path = patch.delta.new_file[:path]
67
- line = patch.added_lines.last
68
- Message.new(path, line, level, text, nil, self.class)
67
+ line = patch.added_lines.last || patch.lines.last
68
+ commit_sha = line&.commit_sha || patch.repo.head_commit_sha
69
+
70
+ Message.new(path, line, level, text, commit_sha, self.class)
69
71
  end
70
72
 
71
73
  def structure_sql_patches
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-rails_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinted