git_diff_lcs 0.0.3 → 0.0.4
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 +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +63 -61
- data/README.md +38 -16
- data/exe/git_diff_lcs +7 -0
- data/git_diff_lcs.gemspec +1 -0
- data/lib/git_diff_lcs.rb +1 -0
- data/lib/git_diff_lcs/cli.rb +18 -0
- data/lib/git_diff_lcs/version.rb +1 -1
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27c41ba96f0780ddde8e5fc9886468fdd2dbcb3f78b5a04abaf0e8ea8aef3d48
|
4
|
+
data.tar.gz: 500b08528232906422bb977bfbf00db547978a51cfc1b11c53ceca17e76d53a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b48c2026d3328296d85dd784a51ce28c2ff88ae1564c7070d4c1c1de34359ed1fda976401f64fce2236d29b9d4a9942f2a8b2bb2438320ccb9b0be2d7b6e495
|
7
|
+
data.tar.gz: 666690cbeb5c6b8c34c3a64075163da19090d4c1361aa79658423a016cf6825dd4d0a5eb3448b3e878f7dfb7b5165bb59572156d0129f25a70a6eacedd86ee23
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,61 +1,63 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
git_diff_lcs (0.0.
|
5
|
-
diff-lcs (= 1.4.4)
|
6
|
-
git (= 1.8.1)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
rspec-
|
26
|
-
rspec-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
git_diff_lcs (0.0.4)
|
5
|
+
diff-lcs (= 1.4.4)
|
6
|
+
git (= 1.8.1)
|
7
|
+
thor (= 1.1.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
ast (2.4.2)
|
13
|
+
diff-lcs (1.4.4)
|
14
|
+
git (1.8.1)
|
15
|
+
rchardet (~> 1.8)
|
16
|
+
parallel (1.20.1)
|
17
|
+
parser (3.0.0.0)
|
18
|
+
ast (~> 2.4.1)
|
19
|
+
rainbow (3.0.0)
|
20
|
+
rake (13.0.3)
|
21
|
+
rchardet (1.8.0)
|
22
|
+
regexp_parser (2.1.1)
|
23
|
+
rexml (3.2.4)
|
24
|
+
rspec (3.10.0)
|
25
|
+
rspec-core (~> 3.10.0)
|
26
|
+
rspec-expectations (~> 3.10.0)
|
27
|
+
rspec-mocks (~> 3.10.0)
|
28
|
+
rspec-core (3.10.1)
|
29
|
+
rspec-support (~> 3.10.0)
|
30
|
+
rspec-expectations (3.10.1)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.10.0)
|
33
|
+
rspec-mocks (3.10.2)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.10.0)
|
36
|
+
rspec-support (3.10.2)
|
37
|
+
rubocop (0.93.1)
|
38
|
+
parallel (~> 1.10)
|
39
|
+
parser (>= 2.7.1.5)
|
40
|
+
rainbow (>= 2.2.2, < 4.0)
|
41
|
+
regexp_parser (>= 1.8)
|
42
|
+
rexml
|
43
|
+
rubocop-ast (>= 0.6.0)
|
44
|
+
ruby-progressbar (~> 1.7)
|
45
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
46
|
+
rubocop-ast (1.4.1)
|
47
|
+
parser (>= 2.7.1.5)
|
48
|
+
ruby-progressbar (1.11.0)
|
49
|
+
thor (1.1.0)
|
50
|
+
unicode-display_width (1.7.0)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
x64-mingw32
|
54
|
+
x86_64-linux
|
55
|
+
|
56
|
+
DEPENDENCIES
|
57
|
+
git_diff_lcs!
|
58
|
+
rake (~> 13.0)
|
59
|
+
rspec (~> 3.0)
|
60
|
+
rubocop (~> 0.80)
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
2.2.13
|
data/README.md
CHANGED
@@ -1,16 +1,38 @@
|
|
1
|
-
# GitDiffLcs
|
2
|
-
|
3
|
-
Generally, git diff --stat does not contain modifications, so we added it to display modifications using the LCS algorithm.
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
```bash
|
7
|
-
$ gem install git_diff-lcs
|
8
|
-
```
|
9
|
-
|
10
|
-
## How to use
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
# GitDiffLcs
|
2
|
+
|
3
|
+
Generally, git diff --stat does not contain modifications, so we added it to display modifications using the LCS algorithm.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
```bash
|
7
|
+
$ gem install git_diff-lcs
|
8
|
+
```
|
9
|
+
|
10
|
+
## How to use
|
11
|
+
|
12
|
+
### diff(repo, src, dest)
|
13
|
+
|
14
|
+
src, dest is branch name or commit
|
15
|
+
|
16
|
+
example
|
17
|
+
```ruby
|
18
|
+
require 'git_diff_lcs'
|
19
|
+
|
20
|
+
GitDiffLcs.diff('https://github.com/btpink-seo/git-diff-lcs.git', 'test/src', 'test/dest')
|
21
|
+
# => 5 files changed, 13 insertions(+), 6 deletions(-), 2 modifications(!), total(21)
|
22
|
+
```
|
23
|
+
|
24
|
+
### GitDiffLcs::Stat.new(repo, src, dest)
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'git_diff_lcs'
|
28
|
+
|
29
|
+
stat = GitDiffLcs::Stat.new('https://github.com/btpink-seo/git-diff-lcs.git', 'test/src', 'test/dest')
|
30
|
+
stat.summary
|
31
|
+
# => 5 files changed, 13 insertions(+), 6 deletions(-), 2 modifications(!), total(21)
|
32
|
+
stat.insertions
|
33
|
+
# => 13
|
34
|
+
stat.deletions
|
35
|
+
# => 6
|
36
|
+
stat.modifications
|
37
|
+
# => 2
|
38
|
+
```
|
data/exe/git_diff_lcs
ADDED
data/git_diff_lcs.gemspec
CHANGED
data/lib/git_diff_lcs.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
|
5
|
+
# git diff lcs
|
6
|
+
module GitDiffLcs
|
7
|
+
# Command Line Interface
|
8
|
+
class CLI < Thor
|
9
|
+
def self.exit_on_failure?
|
10
|
+
true
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "diff GIT_REPOSITORY, SRC(BRANCH OR COMMIT), DEST(BRANCH OR COMMIT)", "get diff with LCS"
|
14
|
+
def diff(repo, src, dest)
|
15
|
+
puts GitDiffLcs.diff(repo, src, dest)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/git_diff_lcs/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_diff_lcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SEO SANG HYUN
|
@@ -38,9 +38,24 @@ dependencies:
|
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.8.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.1.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.1.0
|
41
55
|
description: Add modifications to 'git diff --shortstat' using the LCS algorithm.
|
42
56
|
email: btpink.seo@gmail.com
|
43
|
-
executables:
|
57
|
+
executables:
|
58
|
+
- git_diff_lcs
|
44
59
|
extensions: []
|
45
60
|
extra_rdoc_files: []
|
46
61
|
files:
|
@@ -55,8 +70,10 @@ files:
|
|
55
70
|
- Rakefile
|
56
71
|
- bin/console
|
57
72
|
- bin/setup
|
73
|
+
- exe/git_diff_lcs
|
58
74
|
- git_diff_lcs.gemspec
|
59
75
|
- lib/git_diff_lcs.rb
|
76
|
+
- lib/git_diff_lcs/cli.rb
|
60
77
|
- lib/git_diff_lcs/stat.rb
|
61
78
|
- lib/git_diff_lcs/version.rb
|
62
79
|
homepage: https://github.com/btpink-seo/git-diff-lcs
|