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 +4 -4
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/lib/refinement/changeset.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 339348abe3267413bcc025ca2ee4388a0db73d82b8b6b7bfaa0e8b83904ec03a
|
4
|
+
data.tar.gz: ccfee83202d1fcc99cd7f9e6db67140c0b870beeef181caac45787cf1d62fd93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e609e8cdddb1a5e35051da8a6dd1c4686e195640d1a2c90fed11cbc6eb71e5800e9a00104a339306c9485680e4ec945c62dc2994fb6ef678095f2714162b627
|
7
|
+
data.tar.gz: aa91da6101ee759dab15c7207846145a34f475032a19b88bd25c882d37123e7638e4b32a661670d293e398c60a8695d41708251054d7a4364ea2ebd3030591f4
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/refinement/changeset.rb
CHANGED
@@ -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: -> {
|
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.
|
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-
|
11
|
+
date: 2019-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|