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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7df4e33aee62541f45cf35d72750e90610fb8169
4
- data.tar.gz: 351e523ea4397cb30f3bd08be5e22c5c4caac9ae
2
+ SHA256:
3
+ metadata.gz: 0caaeffb3233009f5be958ac76e97a0f1f30ff83b9029833f83129ccfb682885
4
+ data.tar.gz: 40747fe01a1698f048dc67e98b7d28f2a0d52cd9c9f37badeba47ea2bf8f2e3e
5
5
  SHA512:
6
- metadata.gz: fc3957b06a9e91ee4f532247b682084984735354815956fbcf8676b616652f0766d658e5284e2839e7dd415d10f8db2bf97afe9a87ba75f2bfe1fdb2e7cc9b0e
7
- data.tar.gz: adea8e935fb98d84e1b96bd580649db1c5295d998c6cdef530fc20a8920a7f096acefa11352a386fbce7abe7baf3dddedd05998e68e7c2f92245f3d9291ca0db
6
+ metadata.gz: 449146838c58824fb8c9a74b357a2d51ee9f90dc69a10c7e40c8cc859562accb90946114c7c090a93122d4573b9ab8ef7cc175f9543e65c5d61d9361039d97bc
7
+ data.tar.gz: 60a07492868fbbe221089b1cb5afe3887e9f7e47f3aeafe72c72271aaf6c9e30f2fbd99560bbc999194b040ab34d19c33d01652c8da2fc22a7e496cd8695c946
data/README.md CHANGED
@@ -1,24 +1,26 @@
1
1
  # gem-compare
2
2
 
3
- ## Description
3
+ gem-compare is a RubyGems plugin that compares different versions of the specified gem. It can help you to track changes in metadata through the time, see how dependencies were evolving and spot important changes in gem's files such as shebang or permissions modifications.
4
4
 
5
- *gem-compare* is a RubyGems plugin that compares different versions of the specified gem. It can help you to track changes in metadata through the time, see how dependencies were evolving and spot important changes in gem's files such as shebang or permissions modifications.
5
+ This is especially handy for:
6
+
7
+ - checking what goes into to a next gem release
8
+ - tracking dependencies and license changes before upgrades
9
+ - spotting anything suspicious and unusual
6
10
 
7
11
  ## Installation
8
12
 
9
13
  You can install `gem-compare` as a gem from RubyGems.org:
10
14
 
11
- ```
12
- gem install gem-compare
15
+ ```bash
16
+ $ gem install gem-compare
13
17
  ```
14
18
 
15
- Once it's stable I will package it for Fedora.
16
-
17
19
  ## Usage
18
20
 
19
21
  By default, `gem-compare` compares specified versions of the given gem and includes only changes in the final report. If it's supposed to compare file lists or Gemfiles it will need to download the gems, otherwise it just downloads the specs. If you want to keep the downloaded `.gem` files, use `-k` (as 'keep') option. If you want to see the full report use `-a` (as 'all') switch:
20
22
 
21
- ```
23
+ ```bash
22
24
  $ gem compare rails 3.0.0 4.0.0 -k
23
25
  Compared versions: ["3.0.0", "4.0.0"]
24
26
  DIFFERENT date:
@@ -61,7 +63,7 @@ Compared versions: ["3.0.0", "4.0.0"]
61
63
 
62
64
  You can also specify what you are interested in by using -p (as 'param') option:
63
65
 
64
- ```
66
+ ```bash
65
67
  $ gem compare activesupport 4.0.0 4.1.0 -p 'runtime_dependency'
66
68
  Compared versions: ["4.0.0", "4.1.0"]
67
69
  DIFFERENT runtime dependencies:
@@ -77,7 +79,7 @@ Compared versions: ["4.0.0", "4.1.0"]
77
79
  ```
78
80
  There are also shortcuts for favourite options. Use `--runtime` for runtime dependencies, `--gemfiles` for comparing Gemfiles or `--files` for comparing file lists:
79
81
 
80
- ```
82
+ ```bash
81
83
  $ gem compare rails 2.0.1 3.0.0 -k --files
82
84
  Compared versions: ["2.0.1", "3.0.0"]
83
85
  DIFFERENT files:
@@ -105,7 +107,7 @@ Compared versions: ["2.0.1", "3.0.0"]
105
107
 
106
108
  If you would like to see all development dependencies for `prawn` since `0.1` version, let *gem-compare* expand the versions for you (`>=0.0` won't work as RubyGems asks for the latest spec only):
107
109
 
108
- ```
110
+ ```bash
109
111
  $ gem compare prawn '>=0.1' -k -a --development
110
112
  Compared versions: ["0.1.0", "0.1.1", "0.1.2", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.3.0", "0.4.0", "0.4.1", "0.5.0.1", "0.5.1", "0.6.1", "0.6.2", "0.6.3", "0.7.1", "0.7.2", "0.8.4", "0.11.1", "0.12.0", "0.13.0", "0.13.1", "0.13.2", "0.14.0", "0.15.0", "1.0.0", "1.1.0"]
111
113
  DIFFERENT development dependencies:
@@ -138,7 +140,8 @@ Compared versions: ["0.1.0", "0.1.1", "0.1.2", "0.2.0", "0.2.1", "0.2.2", "0.2.3
138
140
 
139
141
  *gem-compare* supports querying different gem platforms via standard `--platform` option. To compare
140
142
  nokogiri gem on different platform run:
141
- ```
143
+
144
+ ```bash
142
145
  $ gem compare nokogiri 1.5.6 1.6.1 -ak --platform java # for JRuby
143
146
  $ gem compare nokogiri 1.5.6 1.6.1 -ak --platform x86-mingw32 # on Windows
144
147
  ```
@@ -152,18 +155,18 @@ If you run your own gem source server, you can override the RubyGems.org default
152
155
  ### Supported options
153
156
 
154
157
  To see all possible options run:
155
- ```
158
+
159
+ ```bash
156
160
  $ gem compare --help
157
161
  ```
158
162
 
159
163
  ## Requirements
160
164
 
161
- Currently tested against RubyGems 2.x.
162
-
163
- ## Contributions
165
+ Currently tested against RubyGems 3.x. Use the `0.0.7` release for RubyGems 2.x.
164
166
 
165
- Contributions are welcome! Please send a PR and make sure you follow the coding style.
166
167
 
167
168
  ## Copyright
168
169
 
170
+ Made by [Josef Strzibny](https://strzibny.name).
171
+
169
172
  Released under the MIT license. Feel free to contribute!
@@ -24,7 +24,7 @@ class Gem::Commands::CompareCommand < Gem::Command
24
24
  # Speficy the platform using --platform=PLATFORM
25
25
  add_platform_option
26
26
 
27
- add_option('-pPARAM', '--param PARAM', 'Compare only a given paramater') do |param, options|
27
+ add_option('-pPARAM', '--param PARAM', 'Compare only a given gemspec parameter (like "version")') do |param, options|
28
28
  options[:param] = param
29
29
  end
30
30
 
@@ -40,6 +40,11 @@ class Gem::Commands::CompareCommand < Gem::Command
40
40
  options[:param] = 'files'
41
41
  end
42
42
 
43
+ add_option('-F', '--diff', 'Diff file contents') do
44
+ options[:diff] = true
45
+ options[:param] = 'files'
46
+ end
47
+
43
48
  add_option('-g', '--gemfiles', 'Compare only Gemfiles') do
44
49
  options[:param] = 'gemfiles'
45
50
  end
@@ -19,10 +19,6 @@ class Gem::Comparator
19
19
  file_first_line(file1) == file_first_line(file2)
20
20
  end
21
21
 
22
- def self.file_permissions(file)
23
- sprintf("%o", File.stat(file).mode)
24
- end
25
-
26
22
  def self.gem_bin_file?(file)
27
23
  file =~ /(\A|.*\/)bin\/.*/
28
24
  end
@@ -50,4 +46,4 @@ class Gem::Comparator
50
46
  dirs
51
47
  end
52
48
  end
53
- end
49
+ end
@@ -15,7 +15,7 @@ class Gem::Comparator
15
15
 
16
16
  class FileListComparator < Gem::Comparator::Base
17
17
 
18
- def initialize
18
+ def initialize(ignore_group_writable=true)
19
19
  expect(:packages)
20
20
 
21
21
  # We need diff
@@ -24,6 +24,8 @@ class Gem::Comparator
24
24
  rescue Exception
25
25
  error('Calling `diff` command failed. Do you have it installed?')
26
26
  end
27
+
28
+ @ignore_group_writable = ignore_group_writable
27
29
  end
28
30
 
29
31
  ##
@@ -77,10 +79,10 @@ class Gem::Comparator
77
79
  end
78
80
  end
79
81
  # Add information about permissions, shebangs etc.
80
- report = check_added_files(param, vers, index, added, report, options[:brief])
82
+ report = check_added_files(param, vers, index, added, report, options[:brief], options[:diff])
81
83
 
82
84
  report[param][vers]['changed'].set_header '* Changed:'
83
- report = check_same_files(param, vers, index, same, report, options[:brief])
85
+ report = check_same_files(param, vers, index, same, report, options[:brief], options[:diff])
84
86
  same_files = report[param][vers]['changed'].messages.empty?
85
87
  all_same = false unless same_files
86
88
 
@@ -127,18 +129,27 @@ class Gem::Comparator
127
129
  [deleted, added]
128
130
  end
129
131
 
130
- def check_added_files(param, vers, index, files, report, brief_mode)
132
+ def check_added_files(param, vers, index, files, report, brief_mode, diff_mode)
131
133
  files.each do |file|
132
134
  added_file = File.join(unpacked_gem_dirs[@packages[index].spec.version], file)
133
135
 
134
- #line_changes = lines_changed(prev_file, curr_file)
136
+ line_changes = if diff_mode
137
+ Monitor.files_diff(nil, added_file)
138
+ else
139
+ Monitor.lines_changed(nil, added_file)
140
+ end
135
141
 
136
- changes = Monitor.new_file_permissions(added_file),
142
+ changes = Monitor.new_file_permissions(added_file, @ignore_group_writable),
137
143
  Monitor.new_file_executability(added_file),
138
144
  Monitor.new_file_shebang(added_file)
139
145
 
140
- if(!changes.join.empty? || !brief_mode)
141
- report[param][vers]['added'] << "#{file}"
146
+ if(!changes.join.empty? || (!brief_mode && !line_changes.empty?))
147
+ if diff_mode
148
+ report[param][vers]['added'][file].set_header file
149
+ report[param][vers]['added'][file] << line_changes.split("\n")
150
+ else
151
+ report[param][vers]['added'] << "#{file} #{line_changes}"
152
+ end
142
153
  end
143
154
 
144
155
  changes.each do |change|
@@ -148,22 +159,30 @@ class Gem::Comparator
148
159
  report
149
160
  end
150
161
 
151
- def check_same_files(param, vers, index, files, report, brief_mode)
162
+ def check_same_files(param, vers, index, files, report, brief_mode, diff_mode)
152
163
  files.each do |file|
153
164
  prev_file = File.join(unpacked_gem_dirs[@packages[index-1].spec.version], file)
154
165
  curr_file = File.join(unpacked_gem_dirs[@packages[index].spec.version], file)
155
166
 
156
167
  next unless check_files([prev_file, curr_file])
157
168
 
158
- line_changes = Monitor.lines_changed(prev_file, curr_file)
169
+ line_changes = if diff_mode
170
+ Monitor.files_diff(prev_file, curr_file)
171
+ else
172
+ Monitor.lines_changed(prev_file, curr_file)
173
+ end
159
174
 
160
- changes = Monitor.files_permissions_changes(prev_file, curr_file),
175
+ changes = Monitor.files_permissions_changes(prev_file, curr_file, @ignore_group_writable),
161
176
  Monitor.files_executability_changes(prev_file, curr_file),
162
177
  Monitor.files_shebang_changes(prev_file, curr_file)
163
178
 
164
179
  if(!changes.join.empty? || (!brief_mode && !line_changes.empty?))
165
- report[param][vers]['changed'] << \
166
- "#{file} #{line_changes}"
180
+ if diff_mode
181
+ report[param][vers]['changed'][file].set_header file
182
+ report[param][vers]['changed'][file] << line_changes.split("\n")
183
+ else
184
+ report[param][vers]['changed'] << "#{file} #{line_changes}"
185
+ end
167
186
  end
168
187
 
169
188
  changes.each do |change|
@@ -44,11 +44,11 @@ class Gem::Comparator
44
44
 
45
45
  report['gemfiles'][vers]['added'].section do
46
46
  set_header '* Added:'
47
- puts added.map { |x| "#{x.name} #{x.requirements_list}" } unless added.empty?
47
+ puts added.map { |x| "#{x.name} #{x.requirements_list} (#{x.type})" } unless added.empty?
48
48
  end
49
49
  report['gemfiles'][vers]['deleted'].section do
50
50
  set_header '* Deleted'
51
- puts deleted.map { |x| "#{x.name} #{x.requirements_list}" } unless deleted.empty?
51
+ puts deleted.map { |x| "#{x.name} #{x.requirements_list} (#{x.type})" } unless deleted.empty?
52
52
  end
53
53
  report['gemfiles'][vers]['updated'].section do
54
54
  set_header '* Updated'
@@ -14,6 +14,7 @@ class Gem::Comparator
14
14
  end
15
15
 
16
16
  def self.compact_files_diff(prev_file, curr_file)
17
+ prev_file = prev_file.nil? ? Tempfile.new.path : prev_file
17
18
  changes = ''
18
19
  Diffy::Diff.new(
19
20
  prev_file, curr_file, :source => 'files', :context => 0
@@ -26,25 +27,45 @@ class Gem::Comparator
26
27
  changes
27
28
  end
28
29
 
29
- def self.files_permissions_changes(prev_file, curr_file)
30
- prev_permissions = DirUtils.file_permissions(prev_file)
31
- curr_permissions = DirUtils.file_permissions(curr_file)
30
+ def self.files_diff(prev_file, curr_file)
31
+ prev_file = prev_file.nil? ? Tempfile.new.path : prev_file
32
+ changes = ''
33
+ Diffy::Diff.new(
34
+ prev_file, curr_file, :source => 'files', :context => 0, :include_diff_info => true
35
+ ).each do |line|
36
+ case line
37
+ when /^\+/ then changes << Rainbow(line).green
38
+ when /^-/ then changes << Rainbow(line).red
39
+ else changes << line
40
+ end
41
+ end
42
+ changes
43
+ end
44
+
45
+ def self.files_permissions_changes(prev_file, curr_file, ignore_group_writable=false)
46
+ prev_permissions = File.stat(prev_file).mode
47
+ curr_permissions = File.stat(curr_file).mode
32
48
 
33
- if prev_permissions != curr_permissions
49
+ diff = prev_permissions ^ curr_permissions
50
+ diff ^= 020 if ignore_group_writable
51
+
52
+ if diff != 0
34
53
  " (!) New permissions: " +
35
- "#{prev_permissions} -> #{curr_permissions}"
54
+ "#{format_permissions(prev_permissions)} -> #{format_permissions(curr_permissions)}"
36
55
  else
37
56
  ''
38
57
  end
39
58
  end
40
59
 
41
- def self.new_file_permissions(file)
42
- file_permissions = DirUtils.file_permissions(file)
60
+ def self.new_file_permissions(file, ignore_group_writable=false)
61
+ file_permissions = File.stat(file).mode
62
+ formatted_file_permissions = format_permissions(file_permissions)
43
63
 
44
- if file_permissions != '100644'
45
- unless (DirUtils.gem_bin_file?(file) && file_permissions == '100755')
46
- return " (!) Unexpected permissions: #{file_permissions}"
47
- end
64
+ file_permissions ^= 020 if ignore_group_writable
65
+
66
+ unless file_permissions == 0100644 || \
67
+ (DirUtils.gem_bin_file?(file) && file_permissions == 0100755)
68
+ return " (!) Unexpected permissions: #{formatted_file_permissions}"
48
69
  end
49
70
  ''
50
71
  end
@@ -101,5 +122,9 @@ class Gem::Comparator
101
122
  ''
102
123
  end
103
124
  end
125
+
126
+ def self.format_permissions(permissions)
127
+ sprintf("%o", permissions)
128
+ end
104
129
  end
105
130
  end
@@ -56,7 +56,7 @@ class Gem::Comparator
56
56
  end
57
57
 
58
58
  def section(&block)
59
- instance_eval &block
59
+ instance_eval(&block)
60
60
  end
61
61
 
62
62
  def set_header(message)
@@ -104,7 +104,7 @@ class Gem::Comparator
104
104
  end
105
105
 
106
106
  def lines(line_num)
107
- all_messages[line_num].data
107
+ all_messages[line_num]&.data
108
108
  end
109
109
 
110
110
  def nested_messages
@@ -122,7 +122,6 @@ class Gem::Comparator
122
122
  def set_parent(parent)
123
123
  parent.sections << self
124
124
  @level = parent.level + 1
125
- parent_section = parent
126
125
  end
127
126
 
128
127
  end
@@ -19,7 +19,6 @@ class Gem::Comparator
19
19
  email
20
20
  executables
21
21
  extensions
22
- has_rdoc
23
22
  homepage
24
23
  license
25
24
  licenses
@@ -1,3 +1,3 @@
1
1
  class Gem::Comparator
2
- VERSION = '0.0.7'
2
+ VERSION = '1.2.0'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'tmpdir'
2
2
  require 'rbconfig'
3
3
  require 'rainbow'
4
- require 'curb'
4
+ require 'uri'
5
5
  require 'json'
6
6
  require 'rubygems/package'
7
7
  require 'rubygems/dependency'
@@ -164,11 +164,11 @@ class Gem::Comparator
164
164
  expanded << version
165
165
  next
166
166
  end
167
- op, v = (version.scan /(>=|<=|~>|!=|>|<|=)\s*(.*)/).flatten
167
+ op, v = (version.scan(/(>=|<=|~>|!=|>|<|=)\s*(.*)/)).flatten
168
168
  # Supported operator and version?
169
169
  if OPERATORS.include?(op) && v =~ VERSION_REGEX
170
170
  dep = Gem::Dependency.new gem_name, version
171
- specs_and_sources, errors = Gem::SpecFetcher.fetcher.spec_for_dependency dep
171
+ specs_and_sources, _errors = Gem::SpecFetcher.fetcher.spec_for_dependency dep
172
172
  specs_and_sources.each do |s|
173
173
  expanded << s[0].version
174
174
  end
@@ -188,11 +188,8 @@ class Gem::Comparator
188
188
  end
189
189
 
190
190
  def remote_gem_versions(gem_name)
191
- client = Curl::Easy.new
192
- client.url = "https://rubygems.org/api/v1/versions/#{gem_name}.json"
193
- client.follow_location = true
194
- client.http_get
195
- json = JSON.parse(client.body_str)
191
+ body_str = URI.open("https://rubygems.org/api/v1/versions/#{gem_name}.json").read
192
+ json = JSON.parse(body_str)
196
193
  gems = json.collect { |version| version['number'] }
197
194
  info "Upstream versions: #{gems}"
198
195
  gems
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lorem.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Josef Stribny
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -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
+ module Lorem
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,7 @@
1
+ require "lorem/version"
2
+
3
+ module Lorem
4
+ def hello_world
5
+ puts 'Hello World'
6
+ end
7
+ end
@@ -0,0 +1,24 @@
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 = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = ["lorem.gemspec", "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_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ end
Binary file
@@ -0,0 +1,6 @@
1
+ lorem 0.0.2
2
+ ===========
3
+
4
+ - add changelog file
5
+ - change license to GPLv2
6
+ - add new method to lib/lorem.rb
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lorem.gemspec
4
+ gemspec
@@ -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
+ module Lorem
2
+ VERSION = "0.0.2"
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,24 @@
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 = ""
14
+ spec.license = "GPLv2"
15
+
16
+ spec.files = ["lorem.gemspec", "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_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ end
Binary file
@@ -0,0 +1,14 @@
1
+ lorem 0.0.3
2
+ ===========
3
+
4
+ - add homepage
5
+ - add some lib files
6
+ - add an executable file
7
+ - change dependencies in gemspec and Gemfile
8
+
9
+ lorem 0.0.2
10
+ ===========
11
+
12
+ - add changelog file
13
+ - change license to GPLv2
14
+ - add new method to lib/lorem.rb
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lorem.gemspec
4
+ gemspec
5
+
6
+ gem 'minitest'
7
+ gem 'appraisal'
@@ -0,0 +1,3 @@
1
+ Copyright (c) 2014 Josef Stribny
2
+
3
+ You can use this library under GPLv2 conditions.