diff-lcs 1.4 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -11
- data/lib/diff/lcs.rb +1 -1
- data/lib/diff/lcs/block.rb +1 -1
- data/spec/issues_spec.rb +10 -0
- data/spec/ldiff_spec.rb +8 -6
- 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: e25465dc42f53e6fbecbb5f1d5fb9507b4e8687aee1b5bd010b456ca409b559d
|
4
|
+
data.tar.gz: 0c5618a13890bc917f81b9f52053945f3aa0a8c5e2c1d07bb47559f5dd0b1e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07578eb0c1c939b9f45a0b8dbc53576d13a04f72c4ecccf52d79fe5d984d41c1f8cdf58471de228bc76af6898bc1ed6ebddc58df04068c901653600b6670f003'
|
7
|
+
data.tar.gz: d4ace7d0c9b03c518a2ce1b7537da8c767f1cfd3f3d025a7bf5206df61b6c44863239a8cbf4601f5464a3a35115a4891bca665b1792f1cb860b2cde3103b43bb
|
data/Rakefile
CHANGED
@@ -24,22 +24,11 @@ _spec = Hoe.spec 'diff-lcs' do
|
|
24
24
|
extra_dev_deps << ['hoe-gemspec2', '~> 1.1']
|
25
25
|
extra_dev_deps << ['hoe-git', '~> 1.6']
|
26
26
|
extra_dev_deps << ['hoe-rubygems', '~> 1.0']
|
27
|
-
extra_dev_deps << ['hoe-travis', '~> 1.2']
|
28
27
|
extra_dev_deps << ['rspec', '>= 2.0', '< 4']
|
29
28
|
extra_dev_deps << ['rake', '>= 10.0', '< 14']
|
30
29
|
extra_dev_deps << ['rdoc', '>= 0']
|
31
30
|
end
|
32
31
|
|
33
|
-
require "rspec/core/rake_task"
|
34
|
-
|
35
|
-
desc "Run all specifications"
|
36
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
37
|
-
rspec_dirs = %w(spec lib)
|
38
|
-
t.rspec_opts = []
|
39
|
-
t.rspec_opts << "-I#{rspec_dirs.join(":")}" unless rspec_dirs.empty?
|
40
|
-
end
|
41
|
-
task :default => :spec
|
42
|
-
|
43
32
|
if RUBY_VERSION >= '2.0' && RUBY_ENGINE == 'ruby'
|
44
33
|
namespace :spec do
|
45
34
|
desc "Runs test coverage. Only works Ruby 2.0+ and assumes 'simplecov' is installed."
|
data/lib/diff/lcs.rb
CHANGED
data/lib/diff/lcs/block.rb
CHANGED
data/spec/issues_spec.rb
CHANGED
@@ -54,4 +54,14 @@ describe 'Diff::LCS Issues' do
|
|
54
54
|
]
|
55
55
|
end
|
56
56
|
end
|
57
|
+
|
58
|
+
describe "issue #57" do
|
59
|
+
it 'should fail with a correct error' do
|
60
|
+
expect {
|
61
|
+
actual = {:category=>"app.rack.request"}
|
62
|
+
expected = {:category=>"rack.middleware", :title=>"Anonymous Middleware"}
|
63
|
+
expect(actual).to eq(expected)
|
64
|
+
}.to raise_error(RSpec::Expectations::ExpectationNotMetError)
|
65
|
+
end
|
66
|
+
end
|
57
67
|
end
|
data/spec/ldiff_spec.rb
CHANGED
@@ -36,12 +36,14 @@ RSpec.describe 'bin/ldiff' do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def clean_data(data, flag)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
data =
|
40
|
+
case flag
|
41
|
+
when '-c', '-u'
|
42
|
+
clean_output_timestamp(data)
|
43
|
+
else
|
44
|
+
data
|
45
|
+
end
|
46
|
+
data.gsub(/\r\n?/, "\n")
|
45
47
|
end
|
46
48
|
|
47
49
|
def clean_output_timestamp(data)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diff-lcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austin Ziegler
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: hoe-travis
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.2'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.2'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rspec
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|