Permalink
Browse files

Rip out now-obsolete pieces of gemspec.

  • Loading branch information...
1 parent 8a0d036 commit 89328ff03fa4e6bf74cf0d47128b5d4134b73274 @parkr parkr committed Feb 24, 2014
Showing with 3 additions and 43 deletions.
  1. +3 −43 Rakefile
View
46 Rakefile
@@ -5,6 +5,7 @@ require 'date'
require 'yaml'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
+require 'jekyll/version'
#############################################################################
#
@@ -17,20 +18,7 @@ def name
end
def version
- line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
- line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
-end
-
-def date
- Date.today.to_s
-end
-
-def file_date
- Date.today.strftime("%F")
-end
-
-def rubyforge_project
- name
+ Jekyll::VERSION
end
def gemspec_file
@@ -263,36 +251,8 @@ task :release => :build do
sh "gem push pkg/#{name}-#{version}.gem"
end
-task :build => :gemspec do
+task :build do
sh "mkdir -p pkg"
sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg"
end
-
-task :gemspec do
- # read spec file and split out manifest section
- spec = File.read(gemspec_file)
- head, manifest, tail = spec.split(" # = MANIFEST =\n")
-
- # replace name version and date
- replace_header(head, :name)
- replace_header(head, :version)
- replace_header(head, :date)
- #comment this out if your rubyforge_project has a different name
- replace_header(head, :rubyforge_project)
-
- # determine file list from git ls-files
- files = `git ls-files`.
- split("\n").
- sort.
- reject { |file| file =~ /^\./ }.
- reject { |file| file =~ /^(rdoc|pkg|coverage)/ }.
- map { |file| " #{file}" }.
- join("\n")
-
- # piece file back together and write
- manifest = " s.files = %w[\n#{files}\n ]\n"
- spec = [head, manifest, tail].join(" # = MANIFEST =\n")
- File.open(gemspec_file, 'w') { |io| io.write(spec) }
- puts "Updated #{gemspec_file}"
-end

0 comments on commit 89328ff

Please sign in to comment.