Permalink
Browse files

[adhoc] Make use of bundler for gem management

* Drop use of jeweler
* Update rvmrc to specify smurf as the gemset and create it
  • Loading branch information...
1 parent b72d96e commit dc2900b2c85e628e35400857b55c8f258a25d2ba @gus gus committed Aug 2, 2011
Showing with 27 additions and 97 deletions.
  1. +1 −4 Gemfile
  2. +6 −24 Rakefile
  3. +4 −0 lib/smurf/version.rb
  4. +16 −69 smurf.gemspec
View
@@ -1,7 +1,4 @@
source :rubygems
-group :test do
- gem "rails", "3.0.3"
- gem "riot", "0.12.0"
-end
+gemspec
View
@@ -1,32 +1,14 @@
-require 'rake'
+require 'bundler'
+Bundler::GemHelper.install_tasks
+
require 'rake/testtask'
-require 'rake/rdoctask'
-desc 'Default: run unit tests.'
-task :default => :test
+task :default => ["test"]
-desc 'Test the smurf plugin.'
-Rake::TestTask.new(:test) do |t|
+desc 'Test the smurf plugin'
+Rake::TestTask.new("test") do |t|
t.libs += ['test']
t.pattern = 'test/**/*_test.rb'
t.verbose = false # Verbose is just dumb
end
-#
-# Some monks like diamonds. I like gems.
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "smurf"
- gem.summary = "Rails plugin to automatically minify JS and CSS when their bundles get cached"
- gem.description = "Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!"
- gem.email = "gus@thumblemonks.com"
- gem.homepage = "http://github.com/thumblemonks/smurf"
- gem.authors = ["Justin 'Gus' Knowlden"]
- gem.add_development_dependency "riot"
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
-end
View
@@ -0,0 +1,4 @@
+module Smurf
+ VERSION = "1.0.7"
+end
+
View
@@ -1,76 +1,23 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
+$:.unshift(File.expand_path("../lib", __FILE__))
+require "smurf/version"
Gem::Specification.new do |s|
- s.name = %q{smurf}
- s.version = "1.0.6"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Justin 'Gus' Knowlden"]
- s.date = %q{2011-02-10}
- s.description = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!}
- s.email = %q{gus@thumblemonks.com}
- s.extra_rdoc_files = [
- "README.markdown"
- ]
- s.files = [
- "Gemfile",
- "MIT-LICENSE",
- "README.markdown",
- "Rakefile",
- "VERSION",
- "lib/smurf.rb",
- "lib/smurf/javascript.rb",
- "lib/smurf/noop.rb",
- "lib/smurf/stylesheet.rb",
- "smurf.gemspec",
- "test/integration_test.rb",
- "test/javascript_test.rb",
- "test/rails/app/controllers/application.rb",
- "test/rails/config/application.rb",
- "test/rails/config/boot.rb",
- "test/rails/config/environment.rb",
- "test/rails/config/environments/test.rb",
- "test/rails/config/routes.rb",
- "test/rails/public/javascripts/cache/expected.js",
- "test/rails/public/javascripts/projwcss/jscss.css",
- "test/rails/public/javascripts/testing.js",
- "test/rails/public/stylesheets/bar.css",
- "test/rails/public/stylesheets/cache/expected-basic.css",
- "test/rails/public/stylesheets/foo.css",
- "test/stylesheet_test.rb",
- "test/test_helper.rb"
- ]
- s.homepage = %q{http://github.com/thumblemonks/smurf}
+ s.name = %q{smurf}
+ s.version = Smurf::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Justin 'Gus' Knowlden"]
+ s.summary = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached.}
+ s.description = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!}
+ s.email = %q{gus@gusg.us}
+ s.files = `git ls-files`.split("\n")
+ s.homepage = %q{http://github.com/thumblemonks/smurf}
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Rails plugin to automatically minify JS and CSS when their bundles get cached}
- s.test_files = [
- "test/integration_test.rb",
- "test/javascript_test.rb",
- "test/rails/app/controllers/application.rb",
- "test/rails/config/application.rb",
- "test/rails/config/boot.rb",
- "test/rails/config/environment.rb",
- "test/rails/config/environments/test.rb",
- "test/rails/config/routes.rb",
- "test/stylesheet_test.rb",
- "test/test_helper.rb"
- ]
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.extra_rdoc_files = ["README.markdown"]
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_development_dependency(%q<riot>, [">= 0"])
- else
- s.add_dependency(%q<riot>, [">= 0"])
- end
- else
- s.add_dependency(%q<riot>, [">= 0"])
- end
+ s.add_dependency 'rails', '3.0.3'
@ledermann

ledermann Aug 2, 2011

Hm, this disables the support for Rails 2.3.x. Is this intended?

@francocatena

francocatena Aug 3, 2011

I know is probably well tested with 3.0.3, but be so "hard" is really necesary? could be only '>= 3.0.3' or '~> 3.0'?

@gus

gus Aug 14, 2011

Owner

You're both right. I actually meant to add this as a test dependency to mimic what we had in the Gemfile. Sorry.

+ s.add_dependency 'riot', '>=0.12.0'
end
+

0 comments on commit dc2900b

Please sign in to comment.