Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made the support files (gemspec, Gemfile, etc) look like goliath's)

  • Loading branch information...
commit 42809231275fbbadec6052a0ecf8bb87d7591a74 1 parent 89aab31
@mrflip mrflip authored
View
11 Gemfile
@@ -2,3 +2,14 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in goliath-contrib.gemspec
gemspec
+
+gem 'goliath', :path => '../goliath'
+
+# Gems for testing and coverage
+group :test do
+ gem 'pry'
+ gem 'rspec'
+ gem 'guard'
+ gem 'guard-rspec'
+ gem 'guard-yard'
+end
View
20 Guardfile
@@ -0,0 +1,20 @@
+# -*- ruby -*-
+
+format = 'progress' # 'doc' for more verbose, 'progress' for less
+tags = %w[ ]
+guard 'rspec', :version => 2, :cli => "--format #{format} #{ tags.map{|tag| "--tag #{tag}"}.join(' ') }" do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^examples/(.+)\.rb$}) { |m| "spec/integration/#{m[1]}_spec.rb" }
+
+ watch('spec/spec_helper.rb') { 'spec' }
+ watch(/spec\/support\/(.+)\.rb/) { 'spec' }
+end
+
+group :docs do
+ guard 'yard' do
+ watch(%r{app/.+\.rb})
+ watch(%r{lib/.+\.rb})
+ watch(%r{ext/.+\.c})
+ end
+end
View
68 goliath-contrib.gemspec
@@ -1,23 +1,61 @@
# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require 'goliath/contrib/version'
-require File.expand_path('../lib/goliath/contrib', __FILE__)
+Gem::Specification.new do |s|
+ s.name = "goliath-contrib"
+ s.version = Goliath::Contrib::VERSION
-# require './lib/goliath/contrib'
+ s.authors = ["goliath-io"]
+ s.email = ["goliath-io@googlegroups.com"]
-Gem::Specification.new do |gem|
- gem.authors = ["goliath-io"]
- gem.email = ["goliath-io@googlegroups.com"]
+ s.homepage = "https://github.com/postrank-labs/goliath-contrib"
+ s.summary = "Contributed Goliath middleware, plugins, and utilities"
+ s.description = s.summary
- gem.homepage = "https://github.com/postrank-labs/goliath-contrib"
- gem.description = "Contributed Goliath middleware, plugins, and utilities"
- gem.summary = gem.description
+ s.required_ruby_version = '>=1.9.2'
- gem.files = `git ls-files`.split($\)
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.name = "goliath-contrib"
- gem.require_paths = ["lib"]
- gem.version = Goliath::Contrib::VERSION
+ s.add_dependency 'goliath'
- gem.add_dependency 'goliath'
+ s.add_development_dependency 'rspec', '>2.0'
+ s.add_development_dependency 'nokogiri'
+ s.add_development_dependency 'em-http-request', '>=1.0.0'
+ s.add_development_dependency 'em-mongo', '~> 0.4.0'
+ s.add_development_dependency 'rack-rewrite'
+ s.add_development_dependency 'multipart_body'
+ s.add_development_dependency 'amqp', '>=0.7.1'
+ s.add_development_dependency 'em-websocket-client'
+
+ s.add_development_dependency 'tilt', '>=1.2.2'
+ s.add_development_dependency 'haml', '>=3.0.25'
+ s.add_development_dependency 'yard'
+
+ s.add_development_dependency 'guard'
+ s.add_development_dependency 'guard-rspec'
+
+ if RUBY_PLATFORM != 'java'
+ s.add_development_dependency 'yajl-ruby'
+ s.add_development_dependency 'bluecloth'
+ s.add_development_dependency 'bson_ext'
+ else
+ s.add_development_dependency 'json-jruby'
+ s.add_development_dependency 'maruku'
+ end
+
+ if RUBY_PLATFORM.include?('darwin')
+ s.add_development_dependency 'growl', '~> 1.0.3'
+ s.add_development_dependency 'rb-fsevent'
+ end
+
+ ignores = File.readlines(".gitignore").grep(/\S+/).map {|i| i.chomp }
+ dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
+
+ # s.files = `git ls-files`.split($\)
+ # s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ # s.test_files = s.files.grep(%r{^(test|spec|features)/})
+ # s.require_paths = ["lib"]
+
+ s.files = Dir["**/*"].reject {|f| File.directory?(f) || ignores.any? {|i| File.fnmatch(i, f) } } + dotfiles
+ s.test_files = s.files.grep(/^spec\//)
+ s.require_paths = ['lib']
end
View
6 lib/goliath/contrib.rb
@@ -1,11 +1,9 @@
+require 'goliath/contrib'
+
# TODO: tries to start server :-)
# require 'goliath'
module Goliath
- module Contrib
- VERSION = "1.0.0.beta1"
- end
-
# autoload :MiddlewareName, "goliath/contrib/middleware_name"
# ...
end
View
5 lib/goliath/contrib/version.rb
@@ -0,0 +1,5 @@
+module Goliath
+ module Contrib
+ VERSION = "1.0.0.beta1"
+ end
+end
View
6 spec/goliath/contrib_spec.rb
@@ -0,0 +1,6 @@
+
+describe Goliath::Contrib do
+ it 'has a version' do
+ Goliath::Contrib::VERSION.should be_a(String)
+ end
+end
View
14 spec/spec_helper.rb
@@ -0,0 +1,14 @@
+require 'bundler'
+
+Bundler.setup
+Bundler.require
+
+require 'goliath/test_helper'
+
+Goliath.env = :test
+
+RSpec.configure do |c|
+ c.include Goliath::TestHelper, :example_group => {
+ :file_path => /spec\/integration/
+ }
+end
Please sign in to comment.
Something went wrong with that request. Please try again.