Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added bundler support also for testing [Thanks to Ryanfitz]

  • Loading branch information...
commit 01476f7e1f6037a8c31af8d19157dc740adf1fa0 1 parent 06a7291
@DAddYE DAddYE authored
View
1  .gitignore
@@ -0,0 +1 @@
+.bundle
View
1  CHANGES.rdoc
@@ -2,6 +2,7 @@
== 0.9.11 (Unreleased)
+* Added bundler support also for testing [Thanks to Ryanfitz]
* Updated I18n dependency to version > 0.4.0
* Padrino now uses http_router instead of usher to handle url routing
* Reorganized a bit ours "servers"
View
24 Gemfile
@@ -0,0 +1,24 @@
+source 'http://rubygems.org'
+
+gem "sinatra", ">= 1.0.0"
+gem "http_router", ">= 0.2.1"
+gem "thor", ">= 0.13.0"
+gem "activesupport", "<= 2.3.8", :require => 'active_support'
+gem "shoulda", ">= 2.10.3"
+gem "i18n", "0.4.1"
+gem "mail", ">= 2.2.0"
+gem "builder", ">= 2.1.2"
+
+group :db do
+ gem "dm-core", ">= 0.10.2"
+ gem "dm-validations", ">= 0.10.2"
+ gem "dm-aggregates", ">= 0.10.2"
+ gem "data_objects", ">= 0.10.2"
+ gem "do_sqlite3", ">= 0.10.2"
+end
+
+gem "rake", ">= 0.8.7"
+gem "mocha", ">= 0.9.8"
+gem "rack-test", ">= 0.5.0"
+gem "webrat", ">= 0.5.1"
+gem "haml", ">= 2.2.22"
View
25 load_paths.rb
@@ -0,0 +1,25 @@
+begin
+ require File.expand_path('../.bundle/environment', __FILE__)
+rescue LoadError
+ # bust gem prelude
+ if defined?(Gem)
+ Gem.cache
+ gem 'bundler'
+ else
+ require 'rubygems'
+ end
+ require 'bundler'
+ Bundler.setup
+end
+
+%w(
+ padrino
+ padrino-admin
+ padrino-cache
+ padrino-core
+ padrino-gen
+ padrino-helpers
+ padrino-mailer
+).each do |framework|
+ $:.unshift File.expand_path("../#{framework}/lib", __FILE__)
+end
View
2  padrino-admin/test/helper.rb
@@ -1,7 +1,7 @@
ENV['PADRINO_ENV'] = 'test'
PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'rack/test'
require 'rack'
View
3  padrino-cache/test/helper.rb
@@ -1,10 +1,9 @@
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'shoulda'
require 'mocha'
require 'rack/test'
require 'webrat'
-
require 'padrino-cache'
class Test::Unit::TestCase
View
2  padrino-core/test/helper.rb
@@ -1,7 +1,7 @@
ENV['PADRINO_ENV'] = 'test'
PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'padrino-core'
require 'test/unit'
require 'rack/test'
View
12 padrino-gen/test/helper.rb
@@ -1,18 +1,10 @@
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'shoulda'
require 'mocha'
require 'rack/test'
require 'webrat'
require 'thor/group'
-
-# We try to load the vendored padrino-core if exist
-%w(core).each do |lib|
- if File.exist?(File.dirname(__FILE__) + "/../../padrino-#{lib}/lib")
- $:.unshift File.dirname(__FILE__) + "/../../padrino-#{lib}/lib"
- end
-end
-
require 'padrino-gen'
require 'padrino-core/support_lite'
@@ -32,7 +24,7 @@ def stop_time_for_test
Time.stubs(:now).returns(time)
return time
end
-
+
# generate(:controller, 'DemoItems', '-r=/tmp/sample_project')
def generate(name, *params)
"Padrino::Generators::#{name.to_s.camelize}".constantize.start(params)
View
2  padrino-helpers/padrino-helpers.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = 'lib'
s.add_runtime_dependency(%q<padrino-core>, ["= #{Padrino.version}"])
- s.add_runtime_dependency(%q<i18n>, [">= 0.4.0"])
+ s.add_runtime_dependency(%q<i18n>, [">= 0.4.1"])
s.add_development_dependency(%q<haml>, [">= 2.2.1"])
s.add_development_dependency(%q<shoulda>, [">= 2.10.3"])
s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
View
10 padrino-helpers/test/helper.rb
@@ -1,17 +1,9 @@
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'shoulda'
require 'mocha'
require 'rack/test'
require 'webrat'
-
-# We try to load the vendored padrino-core if exist
-%w(core).each do |lib|
- if File.exist?(File.dirname(__FILE__) + "/../../padrino-#{lib}/lib")
- $:.unshift File.dirname(__FILE__) + "/../../padrino-#{lib}/lib"
- end
-end
-
require 'padrino-helpers'
# We need some extension for do our tests
View
11 padrino-mailer/test/helper.rb
@@ -1,20 +1,11 @@
ENV['PADRINO_ENV'] = 'test'
PADRINO_ROOT = File.dirname(__FILE__) unless defined? PADRINO_ROOT
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'shoulda'
require 'mocha'
require 'rack/test'
-require 'sinatra/base'
-
-# We try to load the vendored padrino-core if exist
-%w(core).each do |lib|
- if File.exist?(File.dirname(__FILE__) + "/../../padrino-#{lib}/lib")
- $:.unshift File.dirname(__FILE__) + "/../../padrino-#{lib}/lib"
- end
-end
-
require 'padrino-core'
require 'padrino-mailer'
View
3  padrino/test/helper.rb
@@ -1,7 +1,6 @@
-require 'rubygems'
+require File.expand_path('../../../load_paths', __FILE__)
require 'test/unit'
require 'shoulda'
-
require 'padrino'
class Test::Unit::TestCase
Please sign in to comment.
Something went wrong with that request. Please try again.