git-newline-at-eof 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: dd5dd7c517be2933e1143a21879be905a6ad65b7
4
- data.tar.gz: a76a8975224580b3c2ebd781314319e33dc4e210
3
+ metadata.gz: e320c92b47957332054b0dcccd4d2346b6277bd0
4
+ data.tar.gz: 763404dd4c659ae5aaed5f7bcba7b9b11f6528f4
5
5
  SHA512:
6
- metadata.gz: c0d316358ffb6199da8e0d1304476494bb2b0a1e5490b663ae66fa8327102305b0242f2af91b9a09b47b4eddfd7296379d06946679b8f4763b95806fc0b51efd
7
- data.tar.gz: 5973ba66b1a17fb4faf87478b5b066cb0525f6e0cca9cbd87f6c646794cc5ef4ce3a78afb495b7a1776ab7548814f71060eea4995933fc676518a8d88e003103
6
+ metadata.gz: da14cff0d8199ce71dfa84621fc2d167ab2673adfd9118a5980d6efa0de64d6c196ccaad73c3ca6f839127cd6f64c54019fe33ae07c5bfb9b2127f0b58ac4ef9
7
+ data.tar.gz: a8014c11ab8038f9fff0f5142989262109f15e80282d6811ab0f108f657792ada4b94161fcd9b37a390c54ac745ab960cfc6928a1e35086bfaa6ec03ac8a0d8c
@@ -5,7 +5,6 @@ require 'shellwords'
5
5
  module GitNewlineAtEof
6
6
  class Application
7
7
  def initialize(argv)
8
- @files = files
9
8
  @options = {}
10
9
  @options[:feed_last_line] = false
11
10
  @options[:discard_last_newline] = false
@@ -82,6 +81,12 @@ module GitNewlineAtEof
82
81
  puts @opt.help
83
82
  0
84
83
  end
84
+ IO.popen('git rev-parse', :err => [:child, :out])
85
+ if $? != 0
86
+ puts 'Here is not Git dir.'
87
+ exit(128)
88
+ end
89
+ @files = files
85
90
  if @options[:check_all]
86
91
  check_all
87
92
  elsif @options[:treat_all]
@@ -1,3 +1,3 @@
1
1
  module GitNewlineAtEof
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-newline-at-eof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Ass
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.5.2
98
+ rubygems_version: 2.6.8
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Check and fix newline at end of file in Git respository.