refinement 0.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: 87c655329c601f9c86f48116dace0494bf45ec6661175a2a4ac5a64cd3a3fdb1
4
- data.tar.gz: a08fa1b1e1241dbf3556ccafba733d569b29e4c23871c69c87b90183bacf80de
3
+ metadata.gz: 339348abe3267413bcc025ca2ee4388a0db73d82b8b6b7bfaa0e8b83904ec03a
4
+ data.tar.gz: ccfee83202d1fcc99cd7f9e6db67140c0b870beeef181caac45787cf1d62fd93
5
5
  SHA512:
6
- metadata.gz: 73ab3f309ae51a604e4519210d2b3fc4c0e1f25b5f0bbe5ec7803ac6f3d22ef02695b4087756a5b34d464b4c7080477b47c0bf912101f339bb2225e724fc99a0
7
- data.tar.gz: 8089a83f61739697d9c9b710dc2c0a99d6c2b4493a79a462e86f92dc9565aedbeaaf94eb902eedaf826415db386d1f122893b7820934988dc1d9f3eeb4ae99af
6
+ metadata.gz: 7e609e8cdddb1a5e35051da8a6dd1c4686e195640d1a2c90fed11cbc6eb71e5800e9a00104a339306c9485680e4ec945c62dc2994fb6ef678095f2714162b627
7
+ data.tar.gz: aa91da6101ee759dab15c7207846145a34f475032a19b88bd25c882d37123e7638e4b32a661670d293e398c60a8695d41708251054d7a4364ea2ebd3030591f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Refinement Changes
2
2
 
3
+ ## 0.1.2 (2019-03-15)
4
+
5
+ ##### Bug Fixes
6
+
7
+ * Fix reading in current contents for a changed file in a changeset generated from a
8
+ git diff.
9
+
3
10
  ## 0.1.1 (2019-03-06)
4
11
 
5
12
  ##### Bug Fixes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -133,6 +133,9 @@ module Refinement
133
133
  # @param repository [Pathname,String]
134
134
  # @param base_revision [String]
135
135
  def self.from_git(repository:, base_revision:)
136
+ raise ArgumentError, "must be given a Pathname for repository, got #{repository.inspect}" unless repository.is_a?(Pathname)
137
+ raise ArgumentError, "must be given a String for base_revision, got #{base_revision.inspect}" unless base_revision.is_a?(String)
138
+
136
139
  merge_base = git!('merge-base', base_revision, 'HEAD', chdir: repository).strip
137
140
  diff = git!('diff', '--raw', '-z', merge_base, chdir: repository)
138
141
  modifications = parse_raw_diff(diff, repository: repository, base_revision: merge_base).freeze
@@ -187,7 +190,7 @@ module Refinement
187
190
  path: changed_path,
188
191
  type: CHANGE_CHARACTERS[change_character],
189
192
  prior_path: prior_path,
190
- contents_reader: -> { repo.join(changed_path).read },
193
+ contents_reader: -> { repository.join(changed_path).read },
191
194
  prior_contents_reader: lambda {
192
195
  git!('show', "#{base_revision}:#{prior_path || changed_path}", chdir: repository)
193
196
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinement
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Giddins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2019-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj