Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added bundler support also for testing [Thanks to Ryanfitz]

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

0 comments on commit 01476f7

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