git_diff 0.4.0 → 0.4.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
  SHA1:
3
- metadata.gz: 880459816cc9946e902a423f2ced95ad11c507a7
4
- data.tar.gz: 6d9541ae1bd4303750cb9d14d2968053dccad910
3
+ metadata.gz: 672b777fb8790a44f2e6b01556af296002a51951
4
+ data.tar.gz: 9b3070e4bdc69fbae0f2d037bc6523f899ff2f41
5
5
  SHA512:
6
- metadata.gz: 5357077be7040cba74dd3b16387ff1508120e33109f2e06ab63d719a61da7d9d8dafc8a035ac67187da854d920667759a816564beba776779187213401baf526
7
- data.tar.gz: 8a4b2b47b2b1a726c4963b5be45f16b0bb40fa190ccbcb063fc42a99256b94ea3d5fb6e691f22845ba6fd1daa9633fdb7286ca0deb7aa19018f392f54846ca24
6
+ metadata.gz: 72bb72337221cee7f29073f6d4d4902858558413b86792cea4ed09cedf20db2ed51cd859ad32a0819020b3640000727a43a502d1dfeb0c46156d0488968c8d5c
7
+ data.tar.gz: 43b3bb333a718a2c56f5ddb671ef6b10daaf2dd7c314689b5b8d7d34e3e613ec0a08a80eb2c033df5638d6d5a602cf8c1c38a202f6626e5eaef0db6a04cd7cae
data/.travis.yml CHANGED
@@ -1,8 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.10
6
- - 2.2.7
7
- - 2.3.4
8
- - 2.4.1
3
+ - 2.2.9
4
+ - 2.3.6
5
+ - 2.4.2
@@ -6,7 +6,7 @@ module GitDiff
6
6
  new(*string.split(","))
7
7
  end
8
8
 
9
- def initialize(start = 0, number_of_lines = 0)
9
+ def initialize(start = 0, number_of_lines = 1)
10
10
  @start = start.to_i
11
11
  @number_of_lines = number_of_lines.to_i
12
12
  end
@@ -1,3 +1,3 @@
1
1
  module GitDiff
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -6,7 +6,7 @@ class LineNumberRangeTest < Minitest::Test
6
6
  range = GitDiff::LineNumberRange.from_string("")
7
7
 
8
8
  assert_equal 0, range.start
9
- assert_equal 0, range.number_of_lines
9
+ assert_equal 1, range.number_of_lines
10
10
  end
11
11
 
12
12
  def test_from_string_with_not_empty_string
@@ -16,6 +16,13 @@ class LineNumberRangeTest < Minitest::Test
16
16
  assert_equal 7, range.number_of_lines
17
17
  end
18
18
 
19
+ def test_from_string_with_start_no_count
20
+ range = GitDiff::LineNumberRange.from_string("180")
21
+
22
+ assert_equal 180, range.start
23
+ assert_equal 1, range.number_of_lines
24
+ end
25
+
19
26
  def test_to_s
20
27
  range = GitDiff::LineNumberRange.from_string("180,7")
21
28
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Olson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-24 00:00:00.000000000 Z
11
+ date: 2018-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.6.13
122
+ rubygems_version: 2.6.14
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A Ruby library for parsing git diffs.