Stash as test have broken

This commit is contained in:
David Henry
2014-05-05 23:23:55 +01:00
parent 1e8e8516f0
commit 18da4b1eff
17 changed files with 183 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ group :test do
gem "omniauth-openid", "~> 1.0.1"
gem "webrat", "0.7.3", require: false
gem "mocha", "~> 1.0.0", require: false
gemspec path: "test/rails_app/rails_engine"
end
platforms :jruby do

View File

@@ -19,6 +19,12 @@ PATH
thread_safe (~> 0.1)
warden (~> 1.2.3)
PATH
remote: test/rails_app/rails_engine
specs:
rails_engine (0.0.1)
rails
GEM
remote: https://rubygems.org/
specs:
@@ -161,6 +167,7 @@ DEPENDENCIES
omniauth-oauth2 (~> 1.0.0)
omniauth-openid (~> 1.0.1)
rails (~> 4.0.0)
rails_engine!
rdoc
sqlite3
webrat (= 0.7.3)

View File

@@ -12,6 +12,7 @@ rescue LoadError
end
require "devise"
require "rails_engine"
module RailsApp
class Application < Rails::Application

View File

@@ -1,4 +1,6 @@
Rails.application.routes.draw do
mount RailsEngine::Engine => '/rails_engine', as: 'rails_engine'
# Resources for testing
resources :users, only: [:index] do
member do

View File

@@ -0,0 +1,5 @@
source "https://rubygems.org"
gemspec

View File

@@ -0,0 +1,86 @@
PATH
remote: .
specs:
rails_engine (0.0.1)
rails (~> 4.0.0)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.4)
actionpack (= 4.0.4)
mail (~> 2.5.4)
actionpack (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
activerecord (4.0.4)
activemodel (= 4.0.4)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.4)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.4)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
builder (3.1.4)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.9.3)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.4)
actionmailer (= 4.0.4)
actionpack (= 4.0.4)
activerecord (= 4.0.4)
activesupport (= 4.0.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.4)
sprockets-rails (~> 2.0.0)
railties (4.0.4)
actionpack (= 4.0.4)
activesupport (= 4.0.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.1)
sprockets (2.12.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.39)
PLATFORMS
ruby
DEPENDENCIES
rails_engine!
sqlite3

View File

@@ -0,0 +1,13 @@
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
load 'rails/tasks/engine.rake'
Bundler::GemHelper.install_tasks

View File

@@ -0,0 +1,4 @@
module RailsEngine
class ApplicationController < ActionController::Base
end
end

View File

@@ -0,0 +1,5 @@
module RailsEngine
class User
table_name :user
end
end

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>RailsEngine</title>
<%= stylesheet_link_tag "rails_engine/application", media: "all" %>
<%= javascript_include_tag "rails_engine/application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
ENGINE_ROOT = File.expand_path('../..', __FILE__)
ENGINE_PATH = File.expand_path('../../lib/rails_engine/engine', __FILE__)
require 'rails/all'
require 'rails/engine/commands'

View File

@@ -0,0 +1,5 @@
RailsEngine::Engine.routes.draw do
# devise_for :engine_users, class_name: RailsEngine::User
# devise_for :engine_users_with_router_name, router_name: :rails_engine
end

View File

@@ -0,0 +1,4 @@
require "rails_engine/engine"
module RailsEngine
end

View File

@@ -0,0 +1,5 @@
module RailsEngine
class Engine < ::Rails::Engine
isolate_namespace RailsEngine
end
end

View File

@@ -0,0 +1,3 @@
module RailsEngine
VERSION = "0.0.1"
end

View File

@@ -0,0 +1,4 @@
# desc "Explaining what the task does"
# task :rails_engine do
# # Task goes here
# end

View File

@@ -0,0 +1,16 @@
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "rails_engine/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "rails_engine"
s.version = RailsEngine::VERSION
s.summary = "Engine route testing."
s.authors = "David Henry"
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile"]
s.add_dependency "rails"
end