Skip to content
Browse files

Make Gemfile and qu.gemspec automatically ignore new plugins

  • Loading branch information...
1 parent 15c4a1d commit f76bf116c02cdc461062af5aadfd013ccaacf20e @bkeepers committed Sep 22, 2011
Showing with 12 additions and 9 deletions.
  1. +5 −6 Gemfile
  2. +2 −0 qu-mongo.gemspec
  3. +5 −3 qu.gemspec
View
11 Gemfile
@@ -1,13 +1,12 @@
source "http://rubygems.org"
gemspec :name => 'qu'
-group :mongo do
- gemspec :name => 'qu-mongo', :development_group => :mongo
- gem 'bson_ext'
-end
+Dir['qu-*.gemspec'].each do |gemspec|
+ plugin = gemspec.scan(/qu-(.*)\.gemspec/).to_s
-group :redis do
- gemspec :name => 'qu-redis', :development_group => :redis
+ group plugin do
+ gemspec(:name => "qu-#{plugin}", :development_group => plugin)
+ end
end
group :test do
View
2 qu-mongo.gemspec
@@ -16,4 +16,6 @@ Gem::Specification.new do |s|
s.add_dependency 'mongo'
s.add_dependency 'qu', Qu::VERSION
+
+ s.add_development_dependency 'bson_ext'
end
View
8 qu.gemspec
@@ -2,17 +2,19 @@
$:.push File.expand_path("../lib", __FILE__)
require "qu/version"
+plugins = Dir['qu-*.gemspec'].map {|gemspec| gemspec.scan(/qu-(.*)\.gemspec/).to_s }.join('\|')
+
Gem::Specification.new do |s|
s.name = "qu"
s.version = Qu::VERSION
s.authors = ["Brandon Keepers"]
s.email = ["brandon@opensoul.org"]
- s.homepage = ""
+ s.homepage = "http://github.com/bkeepers/qu"
s.summary = %q{}
s.description = %q{}
- s.files = `git ls-files | grep -v 'redis\|mongo'`.split("\n")
- s.test_files = `git ls-files -- spec | grep -v 'redis\|mongo'`.split("\n")
+ s.files = `git ls-files | grep -v '#{plugins}'`.split("\n")
+ s.test_files = `git ls-files -- spec | grep -v '#{plugins}'`.split("\n")
s.executables = `git ls-files -- bin`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

0 comments on commit f76bf11

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