gem-compare 0.0.7 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +19 -16
  3. data/lib/rubygems/commands/compare_command.rb +6 -1
  4. data/lib/rubygems/comparator/dir_utils.rb +1 -5
  5. data/lib/rubygems/comparator/file_list_comparator.rb +32 -13
  6. data/lib/rubygems/comparator/gemfile_comparator.rb +2 -2
  7. data/lib/rubygems/comparator/monitor.rb +36 -11
  8. data/lib/rubygems/comparator/report.rb +2 -3
  9. data/lib/rubygems/comparator/utils.rb +0 -1
  10. data/lib/rubygems/comparator/version.rb +1 -1
  11. data/lib/rubygems/comparator.rb +5 -8
  12. data/test/gemfiles/lorem-0.0.1/Gemfile +4 -0
  13. data/test/gemfiles/lorem-0.0.1/LICENSE.txt +22 -0
  14. data/test/gemfiles/lorem-0.0.1/README.md +29 -0
  15. data/test/gemfiles/lorem-0.0.1/Rakefile +2 -0
  16. data/test/gemfiles/lorem-0.0.1/lib/lorem/version.rb +3 -0
  17. data/test/gemfiles/lorem-0.0.1/lib/lorem.rb +7 -0
  18. data/test/gemfiles/lorem-0.0.1/lorem.gemspec +24 -0
  19. data/test/gemfiles/lorem-0.0.1.gem +0 -0
  20. data/test/gemfiles/lorem-0.0.2/CHANGELOG.md +6 -0
  21. data/test/gemfiles/lorem-0.0.2/Gemfile +4 -0
  22. data/test/gemfiles/lorem-0.0.2/LICENSE.txt +3 -0
  23. data/test/gemfiles/lorem-0.0.2/README.md +29 -0
  24. data/test/gemfiles/lorem-0.0.2/Rakefile +2 -0
  25. data/test/gemfiles/lorem-0.0.2/lib/lorem/version.rb +3 -0
  26. data/test/gemfiles/lorem-0.0.2/lib/lorem.rb +11 -0
  27. data/test/gemfiles/lorem-0.0.2/lorem.gemspec +24 -0
  28. data/test/gemfiles/lorem-0.0.2.gem +0 -0
  29. data/test/gemfiles/lorem-0.0.3/CHANGELOG.md +14 -0
  30. data/test/gemfiles/lorem-0.0.3/Gemfile +7 -0
  31. data/test/gemfiles/lorem-0.0.3/LICENSE.txt +3 -0
  32. data/test/gemfiles/lorem-0.0.3/README.md +29 -0
  33. data/test/gemfiles/lorem-0.0.3/Rakefile +2 -0
  34. data/test/gemfiles/lorem-0.0.3/bin/lorem +3 -0
  35. data/test/gemfiles/lorem-0.0.3/lib/lorem/utils.rb +7 -0
  36. data/test/gemfiles/lorem-0.0.3/lib/lorem/version.rb +3 -0
  37. data/test/gemfiles/lorem-0.0.3/lib/lorem.rb +11 -0
  38. data/test/gemfiles/lorem-0.0.3/lorem.gemspec +25 -0
  39. data/test/gemfiles/lorem-0.0.3.gem +0 -0
  40. data/test/gemfiles/lorem-0.0.4/CHANGELOG.md +21 -0
  41. data/test/gemfiles/lorem-0.0.4/Gemfile +6 -0
  42. data/test/gemfiles/lorem-0.0.4/LICENSE.txt +3 -0
  43. data/test/gemfiles/lorem-0.0.4/README.md +29 -0
  44. data/test/gemfiles/lorem-0.0.4/Rakefile +2 -0
  45. data/test/gemfiles/lorem-0.0.4/bin/lorem +3 -0
  46. data/test/gemfiles/lorem-0.0.4/lib/lorem/utils.rb +7 -0
  47. data/test/gemfiles/lorem-0.0.4/lib/lorem/version.rb +3 -0
  48. data/test/gemfiles/lorem-0.0.4/lib/lorem.rb +11 -0
  49. data/test/gemfiles/lorem-0.0.4/lorem.gemspec +25 -0
  50. data/test/gemfiles/lorem-0.0.4.gem +0 -0
  51. data/test/rubygems/comparator/test_dir_utils.rb +3 -10
  52. data/test/rubygems/comparator/test_file_list_comparator.rb +6 -5
  53. data/test/rubygems/comparator/test_gemfile_comparator.rb +1 -1
  54. data/test/rubygems/comparator/test_monitor.rb +90 -0
  55. data/test/rubygems/comparator/test_report.rb +2 -2
  56. data/test/rubygems/comparator/test_spec_comparator.rb +0 -5
  57. data/test/rubygems/comparator/test_utils.rb +2 -2
  58. data/test/rubygems/test_gem_commands_compare_command.rb +7 -2
  59. data/test/test_helper.rb +17 -3
  60. metadata +47 -24
@@ -0,0 +1,29 @@
1
+ # Lorem
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'lorem'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install lorem
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/lorem/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/ruby
2
+
3
+ puts 'Lorem Executable!'
@@ -0,0 +1,7 @@
1
+ def check_something
2
+
3
+ end
4
+
5
+ def make_something
6
+
7
+ end
@@ -0,0 +1,3 @@
1
+ module Lorem
2
+ VERSION = "0.0.3"
3
+ end
@@ -0,0 +1,11 @@
1
+ require "lorem/version"
2
+
3
+ module Lorem
4
+ def hello_world
5
+ puts 'Hello World'
6
+ end
7
+
8
+ def new_method
9
+ raise 'needs to be implemented'
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'lorem/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "lorem"
8
+ spec.version = Lorem::VERSION
9
+ spec.authors = ["Josef Stribny"]
10
+ spec.email = ["jstribny@redhat.com"]
11
+ spec.summary = "lorem is a gem for testing gem-compare"
12
+ spec.description = "lorem changes a lot so we can test gem-compare a lot"
13
+ spec.homepage = "http://lorem.lorem"
14
+ spec.license = "GPLv2"
15
+
16
+ spec.files = ["lorem.gemspec", "bin/lorem", "CHANGELOG.md", "Gemfile", "Rakefile", "LICENSE.txt", "README.md"] +
17
+ Dir.glob("lib/**/*")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "rails", ">= 4.0.0"
23
+ spec.add_development_dependency "bundler", "~> 1.0"
24
+ spec.add_development_dependency "rake", ">= 10.0.0"
25
+ end
Binary file
@@ -0,0 +1,21 @@
1
+ lorem 0.0.4
2
+ ===========
3
+
4
+ - change summary and description
5
+ - make bin/lorem really executable
6
+ - bump dependencies
7
+
8
+ lorem 0.0.3
9
+ ===========
10
+
11
+ - add homepage
12
+ - add some lib files
13
+ - add an executable file
14
+ - change dependencies in gemspec and Gemfile
15
+
16
+ lorem 0.0.2
17
+ ===========
18
+
19
+ - add changelog file
20
+ - change license to GPLv2
21
+ - add new method to lib/lorem.rb
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lorem.gemspec
4
+ gemspec
5
+
6
+ gem 'minitest', '5.0.0'
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2014 Josef Stribny
2
+
3
+ You can use this library under GPLv2 conditions.
@@ -0,0 +1,29 @@
1
+ # Lorem
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'lorem'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install lorem
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/lorem/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/ruby
2
+
3
+ puts 'Lorem Executable!'
@@ -0,0 +1,7 @@
1
+ def check_something
2
+
3
+ end
4
+
5
+ def make_something
6
+
7
+ end
@@ -0,0 +1,3 @@
1
+ module Lorem
2
+ VERSION = "0.0.4"
3
+ end
@@ -0,0 +1,11 @@
1
+ require "lorem/version"
2
+
3
+ module Lorem
4
+ def hello_world
5
+ puts 'Hello World'
6
+ end
7
+
8
+ def new_method
9
+ raise 'needs to be implemented'
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'lorem/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "lorem"
8
+ spec.version = Lorem::VERSION
9
+ spec.authors = ["Josef Stribny"]
10
+ spec.email = ["jstribny@redhat.com"]
11
+ spec.summary = "lorem is a gem for testing gem-compare plugin"
12
+ spec.description = "lorem changes a lot so we can test gem-compare plugin a lot"
13
+ spec.homepage = "http://lorem.lorem"
14
+ spec.license = "GPLv2"
15
+
16
+ spec.files = ["lorem.gemspec", "bin/lorem", "CHANGELOG.md", "Gemfile", "Rakefile", "LICENSE.txt", "README.md"] +
17
+ Dir.glob("lib/**/*")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "rails", ">= 4.1.0"
23
+ spec.add_development_dependency "bundler", "~> 1.1"
24
+ spec.add_development_dependency "rake", ">= 10.0.0"
25
+ end
Binary file
@@ -7,14 +7,14 @@ class TestDirUtils < TestGemModule
7
7
  file2 = File.join(@v002, 'bin/lorem')
8
8
  file3 = File.join(@v003, 'bin/lorem')
9
9
  assert_equal 'require "lorem/version"', Gem::Comparator::DirUtils.file_first_line(file1)
10
- assert_equal nil, Gem::Comparator::DirUtils.file_first_line(file2)
10
+ assert_nil Gem::Comparator::DirUtils.file_first_line(file2)
11
11
  assert_equal '#!/usr/bin/ruby', Gem::Comparator::DirUtils.file_first_line(file3)
12
12
  end
13
13
 
14
14
  def test_file_has_shebang?
15
15
  file1 = File.join(@v003, 'lib/lorem.rb')
16
16
  file2 = File.join(@v004, 'bin/lorem')
17
- assert_equal nil, Gem::Comparator::DirUtils.file_has_shebang?(file1)
17
+ assert_nil Gem::Comparator::DirUtils.file_has_shebang?(file1)
18
18
  assert_equal 0, Gem::Comparator::DirUtils.file_has_shebang?(file2)
19
19
  end
20
20
 
@@ -26,17 +26,10 @@ class TestDirUtils < TestGemModule
26
26
  assert_equal false, Gem::Comparator::DirUtils.files_same_first_line?(file1, file3)
27
27
  end
28
28
 
29
- def test_file_permissions
30
- file1 = File.join(@v001, 'lib/lorem.rb')
31
- file2 = File.join(@v004, 'bin/lorem')
32
- assert_equal '100664', Gem::Comparator::DirUtils.file_permissions(file1)
33
- assert_equal '100775', Gem::Comparator::DirUtils.file_permissions(file2)
34
- end
35
-
36
29
  def test_gem_bin_file
37
30
  file1 = File.join(@v001, 'lib/lorem.rb')
38
31
  file2 = File.join(@v004, 'bin/lorem')
39
- assert_equal nil, Gem::Comparator::DirUtils.gem_bin_file?(file1)
32
+ assert_nil Gem::Comparator::DirUtils.gem_bin_file?(file1)
40
33
  assert_equal 0, Gem::Comparator::DirUtils.gem_bin_file?(file2)
41
34
  end
42
35
 
@@ -5,13 +5,14 @@ class TestFileListComparator < TestGemComparator
5
5
  def test_files_comparison
6
6
  assert_equal 'DIFFERENT files:', @report['files'].header.data
7
7
  assert_equal '0.0.1->0.0.2:', @report['files'].lines(1)
8
- assert_equal "CHANGELOG.md", @report['files']['0.0.1->0.0.2']['added'].lines(1)
8
+ assert_equal "CHANGELOG.md +6/-0", @report['files']['0.0.1->0.0.2']['added'].lines(1)
9
9
  assert_equal [], @report['files']['0.0.1->0.0.2']['deleted'].messages
10
10
  assert_equal [], @report['files']['0.0.1->0.0.2']['updated'].messages
11
- assert_equal "bin/lorem", @report['files']['0.0.2->0.0.3']['added'].lines(1)
12
- assert_equal "(!) Unexpected permissions: 100664", @report['files']['0.0.2->0.0.3']['added'].lines(2).strip
13
- assert_equal "(!) File is not executable", @report['files']['0.0.2->0.0.3']['added'].lines(3).strip
14
- assert_equal "(!) Shebang found: #!/usr/bin/ruby", @report['files']['0.0.2->0.0.3']['added'].lines(4).strip
11
+ assert_equal "bin/lorem +3/-0", @report['files']['0.0.2->0.0.3']['added'].lines(1)
12
+ assert_equal "(!) File is not executable", @report['files']['0.0.2->0.0.3']['added'].lines(2).strip
13
+ assert_equal "(!) Shebang found: #!/usr/bin/ruby", @report['files']['0.0.2->0.0.3']['added'].lines(3).strip
14
+ assert_equal "lib/lorem/utils.rb +7/-0", @report['files']['0.0.2->0.0.3']['added'].lines(4).strip
15
+ assert_nil @report['files']['0.0.2->0.0.3']['added'].lines(6)
15
16
  assert_equal [], @report['files']['0.0.2->0.0.3']['deleted'].messages
16
17
  assert_equal [], @report['files']['0.0.2->0.0.3']['updated'].messages
17
18
  assert_equal [], @report['files']['0.0.3->0.0.4']['added'].messages
@@ -8,7 +8,7 @@ class TestGemfileComparator < TestGemComparator
8
8
  assert_equal [], @report['gemfiles']['0.0.2->0.0.3'].messages
9
9
  assert_equal [], @report['gemfiles']['0.0.3->0.0.4']['added'].messages
10
10
  assert_equal '* Deleted', @report['gemfiles']['0.0.3->0.0.4'].lines(1)
11
- assert_equal ['appraisal [">= 0"]'], @report['gemfiles']['0.0.3->0.0.4']['deleted'].lines(1)
11
+ assert_equal ['appraisal [">= 0"] (runtime)'], @report['gemfiles']['0.0.3->0.0.4']['deleted'].lines(1)
12
12
  assert_equal ['minitest from: [">= 0"] to: ["= 5.0.0"]'], @report['gemfiles']['0.0.3->0.0.4']['updated'].lines(1)
13
13
  end
14
14
  end
@@ -14,12 +14,82 @@ class TestMonitor < TestGemModule
14
14
  assert_equal '++++', Gem::Comparator::Monitor.compact_files_diff(file1, file2)
15
15
  end
16
16
 
17
+ def test_files_added_diff
18
+ file1 = nil
19
+ file2 = File.join(@v003, 'lib/lorem/utils.rb')
20
+ diff = Gem::Comparator::Monitor.files_diff(file1, file2)
21
+ expected_diff = <<~EOF
22
+ @@ -0,0 +1,7 @@
23
+ +def check_something
24
+ +
25
+ +end
26
+ +
27
+ +def make_something
28
+ +
29
+ +end
30
+ EOF
31
+ assert_equal expected_diff, diff.split(/\n/, 3)[2]
32
+ end
33
+
34
+ def test_files_diff
35
+ file1 = File.join(@v001, 'lib/lorem.rb')
36
+ file2 = File.join(@v002, 'lib/lorem.rb')
37
+ diff = Gem::Comparator::Monitor.files_diff(file1, file2)
38
+ expected_diff = <<~EOF
39
+ @@ -6,0 +7,4 @@
40
+ +
41
+ + def new_method
42
+ + raise 'needs to be implemented'
43
+ + end
44
+ EOF
45
+ assert_equal expected_diff, diff.split(/\n/, 3)[2]
46
+ end
47
+
17
48
  def test_files_permissions_changes
18
49
  file1 = File.join(@v003, 'bin/lorem')
19
50
  file2 = File.join(@v004, 'bin/lorem')
20
51
  assert_equal '(!) New permissions: 100664 -> 100775', Gem::Comparator::Monitor.files_permissions_changes(file1, file2).strip
21
52
  end
22
53
 
54
+ def test_files_permissions_changes_ignores_group_writable_added
55
+ file1 = Tempfile.new
56
+ file2 = Tempfile.new
57
+ begin
58
+ File.chmod(0644, file1)
59
+ File.chmod(0664, file2)
60
+ assert_equal '', Gem::Comparator::Monitor.files_permissions_changes(file1.path, file2.path, true)
61
+ ensure
62
+ file1.unlink
63
+ file2.unlink
64
+ end
65
+ end
66
+
67
+ def test_files_permissions_changes_ignores_group_writable_other_changes
68
+ file1 = Tempfile.new
69
+ file2 = Tempfile.new
70
+ begin
71
+ File.chmod(0644, file1)
72
+ File.chmod(0660, file2)
73
+ assert_equal ' (!) New permissions: 100644 -> 100660', Gem::Comparator::Monitor.files_permissions_changes(file1.path, file2.path, true)
74
+ ensure
75
+ file1.unlink
76
+ file2.unlink
77
+ end
78
+ end
79
+
80
+ def test_files_permissions_changes_ignores_group_writable_removed
81
+ file1 = Tempfile.new
82
+ file2 = Tempfile.new
83
+ begin
84
+ File.chmod(0664, file1)
85
+ File.chmod(0644, file2)
86
+ assert_equal '', Gem::Comparator::Monitor.files_permissions_changes(file1.path, file2.path, true)
87
+ ensure
88
+ file1.unlink
89
+ file2.unlink
90
+ end
91
+ end
92
+
23
93
  def test_new_file_permissions
24
94
  file1 = File.join(@v004, 'bin/lorem')
25
95
  file2 = File.join(@v004, 'lib/lorem.rb')
@@ -27,6 +97,26 @@ class TestMonitor < TestGemModule
27
97
  assert_equal '(!) Unexpected permissions: 100664', Gem::Comparator::Monitor.new_file_permissions(file2).strip
28
98
  end
29
99
 
100
+ def test_new_file_permissions_ignore_group_writable
101
+ file = Tempfile.new
102
+ begin
103
+ File.chmod(0664, file)
104
+ assert_equal '', Gem::Comparator::Monitor.new_file_permissions(file, true)
105
+ ensure
106
+ file.unlink
107
+ end
108
+ end
109
+
110
+ def test_new_file_permissions_ignore_group_writable_unreadable
111
+ file = Tempfile.new
112
+ begin
113
+ File.chmod(0660, file)
114
+ assert_equal ' (!) Unexpected permissions: 100660', Gem::Comparator::Monitor.new_file_permissions(file.path, true)
115
+ ensure
116
+ file.unlink
117
+ end
118
+ end
119
+
30
120
  def test_files_executability_changes
31
121
  file1 = File.join(@v003, 'bin/lorem')
32
122
  file2 = File.join(@v004, 'bin/lorem')
@@ -1,7 +1,7 @@
1
- require 'rubygems/test_case'
1
+ require_relative '../../test_helper'
2
2
  require 'rubygems/comparator'
3
3
 
4
- class TestGemComparatorReport < Gem::TestCase
4
+ class TestGemComparatorReport < Minitest::Test
5
5
  def setup
6
6
  super
7
7
  @report = Gem::Comparator::Report.new
@@ -140,11 +140,6 @@ class TestSpecComparator < TestGemComparator
140
140
  assert_equal 'SAME signing_key:', @report['signing_key'].lines(0)
141
141
  end
142
142
 
143
- def test_has_rdoc_comparison
144
- assert_equal 'SAME has_rdoc:', @report['has_rdoc'].header.data
145
- assert_equal 'SAME has_rdoc:', @report['has_rdoc'].lines(0)
146
- end
147
-
148
143
  def test_date_comparison
149
144
  assert_equal 'SAME date:', @report['date'].header.data
150
145
  assert_equal 'SAME date:', @report['date'].lines(0)
@@ -1,7 +1,7 @@
1
- require 'rubygems/test_case'
1
+ require_relative '../../test_helper'
2
2
  require 'rubygems/comparator'
3
3
 
4
- class TestGemComparatorUtils < Gem::TestCase
4
+ class TestGemComparatorUtils < Minitest::Test
5
5
  def setup
6
6
  super
7
7
  # This should pull in Gem::Comparator::Utils
@@ -1,11 +1,16 @@
1
- require 'rubygems/test_case'
1
+ require_relative '../test_helper'
2
+ require 'rubygems/user_interaction'
3
+ require 'rubygems/mock_gem_ui'
2
4
  require 'rubygems/commands/compare_command'
3
5
 
4
- class TestGemCommandsCompareCommand < Gem::TestCase
6
+ class TestGemCommandsCompareCommand < Minitest::Test
7
+ include Gem::DefaultUserInteraction
8
+
5
9
  def setup
6
10
  super
7
11
 
8
12
  @command = Gem::Commands::CompareCommand.new
13
+ @ui = Gem::MockGemUi.new
9
14
  end
10
15
 
11
16
  def test_execute_no_gemfile
data/test/test_helper.rb CHANGED
@@ -1,10 +1,22 @@
1
- require 'rubygems/test_case'
1
+ require 'minitest/autorun'
2
2
  require 'rubygems/comparator'
3
3
 
4
- class TestGemComparator < Gem::TestCase
4
+ # The tests expects these permissions, which isn't the case if you have
5
+ # umask 022 when cloning the repo
6
+ def setup_file_permissions
7
+ gemfiles_path = File.expand_path('gemfiles', File.dirname(__FILE__))
8
+ File.chmod(0664, File.join(gemfiles_path, 'lorem-0.0.1', 'lib', 'lorem.rb'))
9
+ File.chmod(0664, File.join(gemfiles_path, 'lorem-0.0.3', 'bin', 'lorem'))
10
+ File.chmod(0664, File.join(gemfiles_path, 'lorem-0.0.4', 'lib', 'lorem.rb'))
11
+ File.chmod(0775, File.join(gemfiles_path, 'lorem-0.0.4', 'bin', 'lorem'))
12
+ end
13
+
14
+ class TestGemComparator < Minitest::Test
5
15
  def setup
6
16
  super
7
17
 
18
+ setup_file_permissions
19
+
8
20
  options = { keep_all: true, log_all: true, no_color: true, brief_mode: false }
9
21
  versions = ['0.0.1', '0.0.2', '0.0.3', '0.0.4']
10
22
 
@@ -19,9 +31,11 @@ class TestGemComparator < Gem::TestCase
19
31
  end
20
32
  end
21
33
 
22
- class TestGemModule < Gem::TestCase
34
+ class TestGemModule < Minitest::Test
23
35
  def setup
24
36
  super
37
+ Rainbow.enabled = false
38
+ setup_file_permissions
25
39
  gemfiles_path = File.expand_path('gemfiles', File.dirname(__FILE__))
26
40
  @v001 = File.join(gemfiles_path, 'lorem-0.0.1')
27
41
  @v002 = File.join(gemfiles_path, 'lorem-0.0.2')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-compare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Stribny
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2022-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: curb
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: diffy
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -105,6 +91,45 @@ files:
105
91
  - lib/rubygems/comparator/utils.rb
106
92
  - lib/rubygems/comparator/version.rb
107
93
  - lib/rubygems_plugin.rb
94
+ - test/gemfiles/lorem-0.0.1.gem
95
+ - test/gemfiles/lorem-0.0.1/Gemfile
96
+ - test/gemfiles/lorem-0.0.1/LICENSE.txt
97
+ - test/gemfiles/lorem-0.0.1/README.md
98
+ - test/gemfiles/lorem-0.0.1/Rakefile
99
+ - test/gemfiles/lorem-0.0.1/lib/lorem.rb
100
+ - test/gemfiles/lorem-0.0.1/lib/lorem/version.rb
101
+ - test/gemfiles/lorem-0.0.1/lorem.gemspec
102
+ - test/gemfiles/lorem-0.0.2.gem
103
+ - test/gemfiles/lorem-0.0.2/CHANGELOG.md
104
+ - test/gemfiles/lorem-0.0.2/Gemfile
105
+ - test/gemfiles/lorem-0.0.2/LICENSE.txt
106
+ - test/gemfiles/lorem-0.0.2/README.md
107
+ - test/gemfiles/lorem-0.0.2/Rakefile
108
+ - test/gemfiles/lorem-0.0.2/lib/lorem.rb
109
+ - test/gemfiles/lorem-0.0.2/lib/lorem/version.rb
110
+ - test/gemfiles/lorem-0.0.2/lorem.gemspec
111
+ - test/gemfiles/lorem-0.0.3.gem
112
+ - test/gemfiles/lorem-0.0.3/CHANGELOG.md
113
+ - test/gemfiles/lorem-0.0.3/Gemfile
114
+ - test/gemfiles/lorem-0.0.3/LICENSE.txt
115
+ - test/gemfiles/lorem-0.0.3/README.md
116
+ - test/gemfiles/lorem-0.0.3/Rakefile
117
+ - test/gemfiles/lorem-0.0.3/bin/lorem
118
+ - test/gemfiles/lorem-0.0.3/lib/lorem.rb
119
+ - test/gemfiles/lorem-0.0.3/lib/lorem/utils.rb
120
+ - test/gemfiles/lorem-0.0.3/lib/lorem/version.rb
121
+ - test/gemfiles/lorem-0.0.3/lorem.gemspec
122
+ - test/gemfiles/lorem-0.0.4.gem
123
+ - test/gemfiles/lorem-0.0.4/CHANGELOG.md
124
+ - test/gemfiles/lorem-0.0.4/Gemfile
125
+ - test/gemfiles/lorem-0.0.4/LICENSE.txt
126
+ - test/gemfiles/lorem-0.0.4/README.md
127
+ - test/gemfiles/lorem-0.0.4/Rakefile
128
+ - test/gemfiles/lorem-0.0.4/bin/lorem
129
+ - test/gemfiles/lorem-0.0.4/lib/lorem.rb
130
+ - test/gemfiles/lorem-0.0.4/lib/lorem/utils.rb
131
+ - test/gemfiles/lorem-0.0.4/lib/lorem/version.rb
132
+ - test/gemfiles/lorem-0.0.4/lorem.gemspec
108
133
  - test/rubygems/comparator/test_dependency_comparator.rb
109
134
  - test/rubygems/comparator/test_dir_utils.rb
110
135
  - test/rubygems/comparator/test_file_list_comparator.rb
@@ -119,7 +144,7 @@ homepage: http://github.com/fedora-ruby/gem-compare
119
144
  licenses:
120
145
  - MIT
121
146
  metadata: {}
122
- post_install_message:
147
+ post_install_message:
123
148
  rdoc_options: []
124
149
  require_paths:
125
150
  - lib
@@ -127,17 +152,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
152
  requirements:
128
153
  - - ">="
129
154
  - !ruby/object:Gem::Version
130
- version: 2.0.0
155
+ version: 3.0.0
131
156
  required_rubygems_version: !ruby/object:Gem::Requirement
132
157
  requirements:
133
158
  - - ">="
134
159
  - !ruby/object:Gem::Version
135
- version: 2.0.0
160
+ version: 3.0.0
136
161
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 2.4.5
139
- signing_key:
162
+ rubygems_version: 3.3.7
163
+ signing_key:
140
164
  specification_version: 4
141
165
  summary: RubyGems plugin for comparing gem versions
142
166
  test_files: []
143
- has_rdoc: