Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Create Rake task to generate gemspec for github; Ignore some files

Signed-off-by: Ryan Grove <ryan@wonko.com>
  • Loading branch information...
commit b80bf2adb172e0ada8b61566866025bac13cd8ca 1 parent 3987eda
Patrick Reagan authored February 21, 2009 rgrove committed August 11, 2009
3  .gitignore
... ...
@@ -0,0 +1,3 @@
  1
+/pkg/
  2
+/*.gem
  3
+
7  Rakefile
@@ -56,3 +56,10 @@ Rake::RDocTask.new do |rd|
56 56
 
57 57
   rd.options << '--line-numbers' << '--inline-source'
58 58
 end
  59
+
  60
+desc 'Generate the gemspec to serve this Gem from Github'
  61
+task :github do
  62
+  file = File.dirname(__FILE__) + "/#{gemspec.name}.gemspec"
  63
+  File.open(file, 'w') {|f| f << gemspec.to_ruby }
  64
+  puts "Created gemspec: #{file}"
  65
+end
28  jsmin.gemspec
... ...
@@ -0,0 +1,28 @@
  1
+# -*- encoding: utf-8 -*-
  2
+
  3
+Gem::Specification.new do |s|
  4
+  s.name = %q{jsmin}
  5
+  s.version = "1.0.1"
  6
+
  7
+  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  8
+  s.authors = ["Ryan Grove"]
  9
+  s.date = %q{2009-02-20}
  10
+  s.email = %q{ryan@wonko.com}
  11
+  s.files = ["HISTORY", "lib/jsmin.rb"]
  12
+  s.has_rdoc = true
  13
+  s.homepage = %q{http://github.com/rgrove/jsmin/}
  14
+  s.require_paths = ["lib"]
  15
+  s.required_ruby_version = Gem::Requirement.new(">= 1.8.6")
  16
+  s.rubygems_version = %q{1.3.1}
  17
+  s.summary = %q{Ruby implementation of Douglas Crockford's JSMin JavaScript minifier.}
  18
+
  19
+  if s.respond_to? :specification_version then
  20
+    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
  21
+    s.specification_version = 2
  22
+
  23
+    if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
  24
+    else
  25
+    end
  26
+  else
  27
+  end
  28
+end

0 notes on commit b80bf2a

Please sign in to comment.
Something went wrong with that request. Please try again.