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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 824238e3e2b1461dea91636b04a94703f6c429bb345020654b2c7c074806d74c
4
- data.tar.gz: c9f2d32c3f960c6cf5b2dfcf7d21e6f70c9bf891f931e42975e140f7315cc024
3
+ metadata.gz: b34e67c2dc72ee60cee5b479e78ef56bffc0aefbc3cef46b3e2a8d8f487b70f3
4
+ data.tar.gz: cb5cccb7d7a47ffecd94642ccb7d17233f99d7a768d04e7047ef6462b0ed5666
5
5
  SHA512:
6
- metadata.gz: 274aafea9392b4a4bff76e7870ccd5cdd7e4b96ce4a582cc4022acaa1203dd6c6dc45828722977334940b3ae8d46866887cab7f468cac0b0263db42f95ff8c97
7
- data.tar.gz: 5f431ff93732317295df24a01e077dcf4a7e3355c324c5819ccd25d043f9f2f31bd9426289cd1aa4443b0e033e8a8a9e54ab3f1be596494d405fd685fb7d7e44
6
+ metadata.gz: 7ab88e2268791b8b90c6b8e628dc9faad38081ff3ef45314ea3855ee15ac14143e1ee0442ef19f49d6d9ac37d7596881de189648f6c2adbb2e6741ed3c291f8b
7
+ data.tar.gz: a7040680cfcf4d9191338fa8dcdb1a80f2e9b09061f38b9d8c82e0b08f132bceee2c8264212d438415f301c12c922fb86fe9c3fbfac63c2b943591d7ab082033
@@ -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"
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Modified
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
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.0
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