git-patch-patch 0.0.1 → 0.0.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.
- data/lib/git-patch-patch/patch_patcher.rb +12 -10
- data/lib/git-patch-patch/version.rb +1 -1
- metadata +19 -3
@@ -1,12 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
# from stdlib
|
4
|
-
require 'pathname'
|
5
|
-
require 'forwardable'
|
4
|
+
#~ require 'pathname'
|
6
5
|
|
7
6
|
# from me
|
8
7
|
require 'git-trifle'
|
9
|
-
require '
|
8
|
+
require 'pedlar'
|
9
|
+
require 'pathstring'
|
10
10
|
|
11
11
|
# this class knows how make a diff and
|
12
12
|
# write it to a retrievable patch
|
@@ -118,12 +118,12 @@ module Git
|
|
118
118
|
# unique patch filename for a given sha and a given local repo'
|
119
119
|
def patch_file_for(commit)
|
120
120
|
@patch_dir.join 'git-patch-patch',
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
121
|
+
# horrendous but necessary to ensure unicity
|
122
|
+
# of path, without having an absolute path
|
123
|
+
# that 'join' doesn't like
|
124
|
+
Pathname(@t.directory).realpath.to_s.sub('/',''),
|
125
|
+
commit.to_s,
|
126
|
+
'patch'
|
127
127
|
end
|
128
128
|
|
129
129
|
end
|
@@ -133,8 +133,9 @@ module Git
|
|
133
133
|
class PatchPatch < String
|
134
134
|
|
135
135
|
# file handling
|
136
|
-
extend
|
136
|
+
extend Pedlar
|
137
137
|
|
138
|
+
peddles Pathstring, :path
|
138
139
|
path_accessor :file
|
139
140
|
attr_accessor :first_commit, :second_commit, :work, :error
|
140
141
|
|
@@ -171,6 +172,7 @@ module Git
|
|
171
172
|
def initialize(string, attributes=nil)
|
172
173
|
# instance attributes in one line
|
173
174
|
(attributes ||= {}).each { |k, v| send "#{k}=", v }
|
175
|
+
file_with attributes[:file].to_s if attributes[:file]
|
174
176
|
|
175
177
|
# job done ? ok then...
|
176
178
|
if @work == true || @work == :done
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-patch-patch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: getopt
|
@@ -44,7 +44,23 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: pedlar
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: pathstring
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|
49
65
|
none: false
|
50
66
|
requirements:
|