From 256198b5d2cfacac1987b003c8e9d325ff4a7c4a Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:22:58 -0700 Subject: [PATCH 1/7] Restrict overly broad gem dependencies. --- ronn.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ronn.gemspec b/ronn.gemspec index 973a9b6..66e8ebf 100644 --- a/ronn.gemspec +++ b/ronn.gemspec @@ -85,9 +85,9 @@ Gem::Specification.new do |s| s.test_files = s.files.select { |path| path =~ /^test\/.*_test.rb/ } s.extra_rdoc_files = %w[COPYING AUTHORS] - s.add_dependency 'hpricot', '>= 0.8.2' - s.add_dependency 'rdiscount', '>= 1.5.8' - s.add_dependency 'mustache', '>= 0.7.0' + s.add_dependency 'hpricot', '~> 0.8', '>= 0.8.2' + s.add_dependency 'rdiscount', '~> 1.5', '>= 1.5.8' + s.add_dependency 'mustache', '~> 0.7', '>= 0.7.0' s.has_rdoc = true s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ronn"] From 877d77dbc96bc6f6031bda9053dc1ddf4d8180c7 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:24:02 -0700 Subject: [PATCH 2/7] Remove 'rubygems_version', since RubyGems overrides this anyways. --- ronn.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/ronn.gemspec b/ronn.gemspec index 66e8ebf..69a16c9 100644 --- a/ronn.gemspec +++ b/ronn.gemspec @@ -92,5 +92,4 @@ Gem::Specification.new do |s| s.has_rdoc = true s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ronn"] s.require_paths = %w[lib] - s.rubygems_version = '1.1.1' end From e5a7378c9e5c631bee882e3be499012bbcbccc21 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:25:06 -0700 Subject: [PATCH 3/7] Removed 'date' from the gemspec, since RubyGems populates this. --- ronn.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/ronn.gemspec b/ronn.gemspec index 69a16c9..9403085 100644 --- a/ronn.gemspec +++ b/ronn.gemspec @@ -1,7 +1,6 @@ Gem::Specification.new do |s| s.name = 'ronn' s.version = '0.7.3' - s.date = '2010-06-24' s.description = "Builds manuals" s.summary = "Builds manuals" From 9fc7e78450bb5cb7fbd23e8358681710b7bbc09e Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:26:34 -0700 Subject: [PATCH 4/7] Silence the summary and description are identical warnings. --- ronn.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ronn.gemspec b/ronn.gemspec index 9403085..9eedc08 100644 --- a/ronn.gemspec +++ b/ronn.gemspec @@ -2,8 +2,8 @@ Gem::Specification.new do |s| s.name = 'ronn' s.version = '0.7.3' - s.description = "Builds manuals" s.summary = "Builds manuals" + s.description = "Ronn builds manuals. It converts simple, human readable textfiles to roff for terminal display, and also to HTML for the web." s.homepage = "http://rtomayko.github.com/ronn" s.authors = ["Ryan Tomayko"] From 4938d921fa3544d384502d0a5108ca0d21725881 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:28:17 -0700 Subject: [PATCH 5/7] No longer rewrite the date within the gemspec. --- Rakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index b4d1b90..670fa38 100644 --- a/Rakefile +++ b/Rakefile @@ -123,9 +123,8 @@ file 'ronn.gemspec' => FileList['{lib,test,bin}/**','Rakefile'] do |f| # read spec file and split out manifest section spec = File.read(f.name) head, manifest, tail = spec.split(" # = MANIFEST =\n") - # replace version and date + # replace version head.sub!(/\.version = '.*'/, ".version = '#{source_version}'") - head.sub!(/\.date = '.*'/, ".date = '#{Date.today.to_s}'") # determine file list from git ls-files files = `git ls-files`. split("\n"). From d2b69fd3b0a434e5b244ddddc3dd1e3e33b33b94 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:28:55 -0700 Subject: [PATCH 6/7] Make sure this works on Windows. --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 670fa38..2d1b00a 100644 --- a/Rakefile +++ b/Rakefile @@ -127,7 +127,7 @@ file 'ronn.gemspec' => FileList['{lib,test,bin}/**','Rakefile'] do |f| head.sub!(/\.version = '.*'/, ".version = '#{source_version}'") # determine file list from git ls-files files = `git ls-files`. - split("\n"). + split($\). sort. reject{ |file| file =~ /^\./ }. reject { |file| file =~ /^doc/ }. From b0a3a8dae4e97090303046308792cb962608f2f5 Mon Sep 17 00:00:00 2001 From: Postmodern Date: Thu, 17 May 2012 20:29:52 -0700 Subject: [PATCH 7/7] Use less regexp --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 2d1b00a..590dabb 100644 --- a/Rakefile +++ b/Rakefile @@ -129,8 +129,8 @@ file 'ronn.gemspec' => FileList['{lib,test,bin}/**','Rakefile'] do |f| files = `git ls-files`. split($\). sort. - reject{ |file| file =~ /^\./ }. - reject { |file| file =~ /^doc/ }. + reject{ |file| file.start_with?('.') }. + reject{ |file| file.start_with?('doc') }. map{ |file| " #{file}" }. join("\n") # piece file back together and write...