git-modified 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/git-modified.gemspec +0 -2
- data/lib/git/modified.rb +0 -9
- data/lib/git/modified/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b34e67c2dc72ee60cee5b479e78ef56bffc0aefbc3cef46b3e2a8d8f487b70f3
|
4
|
+
data.tar.gz: cb5cccb7d7a47ffecd94642ccb7d17233f99d7a768d04e7047ef6462b0ed5666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ab88e2268791b8b90c6b8e628dc9faad38081ff3ef45314ea3855ee15ac14143e1ee0442ef19f49d6d9ac37d7596881de189648f6c2adbb2e6741ed3c291f8b
|
7
|
+
data.tar.gz: a7040680cfcf4d9191338fa8dcdb1a80f2e9b09061f38b9d8c82e0b08f132bceee2c8264212d438415f301c12c922fb86fe9c3fbfac63c2b943591d7ab082033
|
data/git-modified.gemspec
CHANGED
@@ -19,8 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "contracts", "~> 0.7"
|
23
|
-
|
24
22
|
spec.add_development_dependency "bundler"
|
25
23
|
spec.add_development_dependency "rake"
|
26
24
|
spec.add_development_dependency "rspec"
|
data/lib/git/modified.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
require "git/modified/version"
|
2
|
-
require 'contracts'
|
3
2
|
|
4
3
|
module Git
|
5
4
|
module Modified
|
6
|
-
include Contracts
|
7
|
-
|
8
|
-
Contract Maybe[String] => nil
|
9
5
|
def self.run
|
10
6
|
case ARGV.first
|
11
7
|
when '-v', '--version'
|
@@ -15,12 +11,10 @@ module Git
|
|
15
11
|
end
|
16
12
|
end
|
17
13
|
|
18
|
-
Contract String => nil
|
19
14
|
def self.version
|
20
15
|
puts Git::Modified::VERSION
|
21
16
|
end
|
22
17
|
|
23
|
-
Contract Maybe[String] => nil
|
24
18
|
def self.modified(hash = nil)
|
25
19
|
if hash.nil?
|
26
20
|
show_modified_files_on_working_tree
|
@@ -29,7 +23,6 @@ module Git
|
|
29
23
|
end
|
30
24
|
end
|
31
25
|
|
32
|
-
Contract nil => nil
|
33
26
|
def self.show_modified_files_on_working_tree
|
34
27
|
puts `git status --short` \
|
35
28
|
.each_line \
|
@@ -38,7 +31,6 @@ module Git
|
|
38
31
|
.map { |line| if line[0] == 'R' then line.split(' ')[-1] else line[3..-1] end }
|
39
32
|
end
|
40
33
|
|
41
|
-
Contract Maybe[String] => nil
|
42
34
|
def self.show_modified_files_on_commit(hash)
|
43
35
|
hashes = `git show --summary --format="%P" #{hash} | head -n 1`.split ' '
|
44
36
|
|
@@ -49,7 +41,6 @@ module Git
|
|
49
41
|
end
|
50
42
|
end
|
51
43
|
|
52
|
-
Contract nil => String
|
53
44
|
def self.latest_hash
|
54
45
|
`git log --pretty=format:'%h' -n 1`
|
55
46
|
end
|
data/lib/git/modified/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-modified
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Hasegawa
|
@@ -10,20 +10,6 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: contracts
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.7'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.7'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|