ryana-plug_test 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Manifest +46 -0
- data/README.rdoc +73 -0
- data/Rakefile +18 -0
- data/lib/plug_test.rb +1 -0
- data/lib/plug_test/app/Rakefile +10 -0
- data/lib/plug_test/app/app/controllers/application.rb +15 -0
- data/lib/plug_test/app/app/controllers/plug_test_controller.rb +15 -0
- data/lib/plug_test/app/config/boot.rb +109 -0
- data/lib/plug_test/app/config/database.yml +22 -0
- data/lib/plug_test/app/config/environment.rb +75 -0
- data/lib/plug_test/app/config/environments/development.rb +17 -0
- data/lib/plug_test/app/config/environments/production.rb +24 -0
- data/lib/plug_test/app/config/environments/test.rb +22 -0
- data/lib/plug_test/app/config/initializers/inflections.rb +10 -0
- data/lib/plug_test/app/config/initializers/mime_types.rb +5 -0
- data/lib/plug_test/app/config/initializers/new_rails_defaults.rb +17 -0
- data/lib/plug_test/app/config/initializers/plug_test.rb +29 -0
- data/lib/plug_test/app/config/locales/en.yml +5 -0
- data/lib/plug_test/app/config/routes.rb +43 -0
- data/lib/plug_test/app/log/development.log +0 -0
- data/lib/plug_test/app/public/404.html +30 -0
- data/lib/plug_test/app/public/422.html +30 -0
- data/lib/plug_test/app/public/500.html +33 -0
- data/lib/plug_test/app/public/dispatch.cgi +10 -0
- data/lib/plug_test/app/public/dispatch.fcgi +24 -0
- data/lib/plug_test/app/public/dispatch.rb +10 -0
- data/lib/plug_test/app/public/favicon.ico +0 -0
- data/lib/plug_test/app/public/index.html +12 -0
- data/lib/plug_test/app/public/robots.txt +5 -0
- data/lib/plug_test/app/script/about +4 -0
- data/lib/plug_test/app/script/console +3 -0
- data/lib/plug_test/app/script/dbconsole +3 -0
- data/lib/plug_test/app/script/destroy +3 -0
- data/lib/plug_test/app/script/generate +3 -0
- data/lib/plug_test/app/script/performance/benchmarker +3 -0
- data/lib/plug_test/app/script/performance/profiler +3 -0
- data/lib/plug_test/app/script/performance/request +3 -0
- data/lib/plug_test/app/script/plugin +3 -0
- data/lib/plug_test/app/script/process/inspector +3 -0
- data/lib/plug_test/app/script/process/reaper +3 -0
- data/lib/plug_test/app/script/process/spawner +3 -0
- data/lib/plug_test/app/script/runner +3 -0
- data/lib/plug_test/app/script/server +3 -0
- data/lib/plug_test/app/test/performance/browsing_test.rb +9 -0
- data/lib/plug_test/app/test/test_helper.rb +38 -0
- data/plug_test.gemspec +31 -0
- metadata +145 -0
data/Manifest
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
Manifest
|
2
|
+
README.rdoc
|
3
|
+
plug_test.gemspec
|
4
|
+
lib/plug_test/app/log/development.log
|
5
|
+
lib/plug_test/app/script/dbconsole
|
6
|
+
lib/plug_test/app/script/runner
|
7
|
+
lib/plug_test/app/script/performance/benchmarker
|
8
|
+
lib/plug_test/app/script/performance/profiler
|
9
|
+
lib/plug_test/app/script/performance/request
|
10
|
+
lib/plug_test/app/script/server
|
11
|
+
lib/plug_test/app/script/process/spawner
|
12
|
+
lib/plug_test/app/script/process/inspector
|
13
|
+
lib/plug_test/app/script/process/reaper
|
14
|
+
lib/plug_test/app/script/destroy
|
15
|
+
lib/plug_test/app/script/about
|
16
|
+
lib/plug_test/app/script/plugin
|
17
|
+
lib/plug_test/app/script/generate
|
18
|
+
lib/plug_test/app/script/console
|
19
|
+
lib/plug_test/app/app/controllers/application.rb
|
20
|
+
lib/plug_test/app/app/controllers/plug_test_controller.rb
|
21
|
+
lib/plug_test/app/test/performance/browsing_test.rb
|
22
|
+
lib/plug_test/app/test/test_helper.rb
|
23
|
+
lib/plug_test/app/config/initializers/new_rails_defaults.rb
|
24
|
+
lib/plug_test/app/config/initializers/mime_types.rb
|
25
|
+
lib/plug_test/app/config/initializers/inflections.rb
|
26
|
+
lib/plug_test/app/config/initializers/plug_test.rb
|
27
|
+
lib/plug_test/app/config/boot.rb
|
28
|
+
lib/plug_test/app/config/locales/en.yml
|
29
|
+
lib/plug_test/app/config/database.yml
|
30
|
+
lib/plug_test/app/config/environments/development.rb
|
31
|
+
lib/plug_test/app/config/environments/test.rb
|
32
|
+
lib/plug_test/app/config/environments/production.rb
|
33
|
+
lib/plug_test/app/config/routes.rb
|
34
|
+
lib/plug_test/app/config/environment.rb
|
35
|
+
lib/plug_test/app/Rakefile
|
36
|
+
lib/plug_test/app/public/robots.txt
|
37
|
+
lib/plug_test/app/public/500.html
|
38
|
+
lib/plug_test/app/public/dispatch.rb
|
39
|
+
lib/plug_test/app/public/favicon.ico
|
40
|
+
lib/plug_test/app/public/422.html
|
41
|
+
lib/plug_test/app/public/dispatch.fcgi
|
42
|
+
lib/plug_test/app/public/dispatch.cgi
|
43
|
+
lib/plug_test/app/public/404.html
|
44
|
+
lib/plug_test/app/public/index.html
|
45
|
+
lib/plug_test.rb
|
46
|
+
Rakefile
|
data/README.rdoc
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
= PlugTest
|
2
|
+
|
3
|
+
PlugTest is my solution to what was a shockingly difficult time testing my very first gem/plugin: link_block[http://github.com/ryana/link_block].
|
4
|
+
After rifling through problem after problem trying to use ActionController::TestCase when testing views helpers, I realized
|
5
|
+
that the plugin and helpers worked in the Rails app, so why not just test in there.
|
6
|
+
|
7
|
+
Problem is that you can't really release a plugin without tests, and having tests be dependent on your Rails app is silly.
|
8
|
+
|
9
|
+
So here it is: version 1.0 of PlugTest.
|
10
|
+
|
11
|
+
I tried to make it as lightweight as possible. I removed the javascript and images, and told Initializer not to load
|
12
|
+
ActiveRecord, ActiveResource, or ActionMailer. The bulk of the code is in PlugTestController and config/initializers/plug_test.rb
|
13
|
+
|
14
|
+
== Installation
|
15
|
+
|
16
|
+
$ gem install ryana-plug_test
|
17
|
+
|
18
|
+
add the following line to your [PLUGIN_DIR]/test/test_helper.rb (or whatever)
|
19
|
+
|
20
|
+
require 'plug_test'
|
21
|
+
|
22
|
+
and call the pt_setup method from your TestUnit setup like so:
|
23
|
+
|
24
|
+
class MySweetPluginTest < Test::Unit::TestCase
|
25
|
+
def setup
|
26
|
+
pt_setup
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
Bing bang boom.
|
31
|
+
|
32
|
+
== Usage
|
33
|
+
|
34
|
+
Whenever you want to test a helper just call:
|
35
|
+
|
36
|
+
pt_helper(" [CODE YOU WANT TO TEST] ")
|
37
|
+
|
38
|
+
pt_helper will return the output of the call and setup your @response so you can do:
|
39
|
+
|
40
|
+
res = pt_helper("link_to 'my link text', :action => 'test'")
|
41
|
+
assert_response :success
|
42
|
+
assert_select 'a', 'my link text'
|
43
|
+
assert(/my link text/.match(res))
|
44
|
+
|
45
|
+
It's that easy. First crack. It only solves a small need of mine, so fork and pull request away.
|
46
|
+
|
47
|
+
== Shameless Plug
|
48
|
+
|
49
|
+
Recommend me on Working With Rails[http://workingwithrails.com/recommendation/new/person/14860-ryan-angilly] or give
|
50
|
+
me a shout out on Twitter @angilly[http://twitter.com/angilly] if you think this is awesome.
|
51
|
+
|
52
|
+
== MIT License
|
53
|
+
|
54
|
+
=== Copyright (c) 2008 Ryan Angilly
|
55
|
+
|
56
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
57
|
+
this software and associated documentation files (the "Software"), to deal in
|
58
|
+
the Software without restriction, including without limitation the rights to
|
59
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
60
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
61
|
+
so, subject to the following conditions:
|
62
|
+
|
63
|
+
The above copyright notice and this permission notice shall be included in all
|
64
|
+
copies or substantial portions of the Software.
|
65
|
+
|
66
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
67
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
68
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
69
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
70
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
71
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
72
|
+
SOFTWARE.
|
73
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Rakefile
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rake'
|
4
|
+
require 'echoe'
|
5
|
+
|
6
|
+
Echoe.new('plug_test', '0.1.0') do |p|
|
7
|
+
p.description = "Allows simpler testing of view helpers in Rails."
|
8
|
+
p.url = "http://github.com/ryana/plug_test"
|
9
|
+
p.author = "Ryan Angilly"
|
10
|
+
p.email = "ryan@angilly.com"
|
11
|
+
p.ignore_pattern = ["tmp/*", "script/*"]
|
12
|
+
p.development_dependencies = []
|
13
|
+
p.clean_pattern.delete_if {|a| /log/.match(a) or /gemspec/.match(a)}
|
14
|
+
end
|
15
|
+
|
16
|
+
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
17
|
+
|
18
|
+
|
data/lib/plug_test.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/plug_test/app/config/environment'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
+
|
4
|
+
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
|
+
|
6
|
+
require 'rake'
|
7
|
+
require 'rake/testtask'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
|
10
|
+
require 'tasks/rails'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Filters added to this controller apply to all controllers in the application.
|
2
|
+
# Likewise, all the methods added will be available for all controllers.
|
3
|
+
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
helper :all # include all helpers, all the time
|
6
|
+
|
7
|
+
# See ActionController::RequestForgeryProtection for details
|
8
|
+
# Uncomment the :secret if you're not using the cookie session store
|
9
|
+
protect_from_forgery # :secret => '16a9e2b9807ab21150aedaa891a7e209'
|
10
|
+
|
11
|
+
# See ActionController::Base for details
|
12
|
+
# Uncomment this to filter the contents of submitted sensitive data parameters
|
13
|
+
# from your application log (in this case, all fields with names like "password").
|
14
|
+
# filter_parameter_logging :password
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class PlugTestController < ApplicationController
|
2
|
+
helper :all
|
3
|
+
|
4
|
+
attr_accessor :plug_test_answer, :plug_test_block
|
5
|
+
|
6
|
+
def test_action
|
7
|
+
overwrite_me
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
def overwrite_me
|
12
|
+
@plug_test_answer = render_to_string(:inline => "You were supposed to overwrite me, man: <%= link_to 'man', :action => 'test_action' %>", :status => 200)
|
13
|
+
render(:text => @plug_test_answer, :status => 404)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
+
|
4
|
+
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
|
5
|
+
|
6
|
+
module Rails
|
7
|
+
class << self
|
8
|
+
def boot!
|
9
|
+
unless booted?
|
10
|
+
preinitialize
|
11
|
+
pick_boot.run
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def booted?
|
16
|
+
defined? Rails::Initializer
|
17
|
+
end
|
18
|
+
|
19
|
+
def pick_boot
|
20
|
+
(vendor_rails? ? VendorBoot : GemBoot).new
|
21
|
+
end
|
22
|
+
|
23
|
+
def vendor_rails?
|
24
|
+
File.exist?("#{RAILS_ROOT}/vendor/rails")
|
25
|
+
end
|
26
|
+
|
27
|
+
def preinitialize
|
28
|
+
load(preinitializer_path) if File.exist?(preinitializer_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def preinitializer_path
|
32
|
+
"#{RAILS_ROOT}/config/preinitializer.rb"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Boot
|
37
|
+
def run
|
38
|
+
load_initializer
|
39
|
+
Rails::Initializer.run(:set_load_path)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
class VendorBoot < Boot
|
44
|
+
def load_initializer
|
45
|
+
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
46
|
+
Rails::Initializer.run(:install_gem_spec_stubs)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
class GemBoot < Boot
|
51
|
+
def load_initializer
|
52
|
+
self.class.load_rubygems
|
53
|
+
load_rails_gem
|
54
|
+
require 'initializer'
|
55
|
+
end
|
56
|
+
|
57
|
+
def load_rails_gem
|
58
|
+
if version = self.class.gem_version
|
59
|
+
gem 'rails', version
|
60
|
+
else
|
61
|
+
gem 'rails'
|
62
|
+
end
|
63
|
+
rescue Gem::LoadError => load_error
|
64
|
+
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
|
65
|
+
exit 1
|
66
|
+
end
|
67
|
+
|
68
|
+
class << self
|
69
|
+
def rubygems_version
|
70
|
+
Gem::RubyGemsVersion rescue nil
|
71
|
+
end
|
72
|
+
|
73
|
+
def gem_version
|
74
|
+
if defined? RAILS_GEM_VERSION
|
75
|
+
RAILS_GEM_VERSION
|
76
|
+
elsif ENV.include?('RAILS_GEM_VERSION')
|
77
|
+
ENV['RAILS_GEM_VERSION']
|
78
|
+
else
|
79
|
+
parse_gem_version(read_environment_rb)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_rubygems
|
84
|
+
require 'rubygems'
|
85
|
+
min_version = '1.3.1'
|
86
|
+
unless rubygems_version >= min_version
|
87
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
88
|
+
exit 1
|
89
|
+
end
|
90
|
+
|
91
|
+
rescue LoadError
|
92
|
+
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
93
|
+
exit 1
|
94
|
+
end
|
95
|
+
|
96
|
+
def parse_gem_version(text)
|
97
|
+
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
def read_environment_rb
|
102
|
+
File.read("#{RAILS_ROOT}/config/environment.rb")
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# All that for this:
|
109
|
+
Rails.boot!
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file
|
2
|
+
|
3
|
+
# Force PlugTest into test mode
|
4
|
+
ENV['RAILS_ENV'] ||= 'test'
|
5
|
+
|
6
|
+
# Specifies gem version of Rails to use when vendor/rails is not present
|
7
|
+
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
|
8
|
+
|
9
|
+
# Bootstrap the Rails environment, frameworks, and default configuration
|
10
|
+
require File.join(File.dirname(__FILE__), 'boot')
|
11
|
+
|
12
|
+
Rails::Initializer.run do |config|
|
13
|
+
# Settings in config/environments/* take precedence over those specified here.
|
14
|
+
# Application configuration should go into files in config/initializers
|
15
|
+
# -- all .rb files in that directory are automatically loaded.
|
16
|
+
# See Rails::Configuration for more options.
|
17
|
+
|
18
|
+
# Skip frameworks you're not going to use. To use Rails without a database
|
19
|
+
# you must remove the Active Record framework. Don't forget to include
|
20
|
+
# AR is you are testing AR plugins
|
21
|
+
config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
|
22
|
+
|
23
|
+
# Specify gems that this application depends on.
|
24
|
+
# They can then be installed with "rake gems:install" on new installations.
|
25
|
+
# You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
|
26
|
+
# config.gem "bj"
|
27
|
+
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
|
28
|
+
# config.gem "sqlite3-ruby", :lib => "sqlite3"
|
29
|
+
# config.gem "aws-s3", :lib => "aws/s3"
|
30
|
+
|
31
|
+
# Only load the plugins named here, in the order given. By default, all plugins
|
32
|
+
# in vendor/plugins are loaded in alphabetical order.
|
33
|
+
# :all can be used as a placeholder for all plugins not explicitly named
|
34
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
35
|
+
|
36
|
+
# Add additional load paths for your own custom dirs
|
37
|
+
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
38
|
+
|
39
|
+
# Force all environments to use the same logger level
|
40
|
+
# (by default production uses :info, the others :debug)
|
41
|
+
# config.log_level = :debug
|
42
|
+
|
43
|
+
# Make Time.zone default to the specified zone, and make Active Record store time values
|
44
|
+
# in the database in UTC, and return them converted to the specified local zone.
|
45
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
|
46
|
+
config.time_zone = 'UTC'
|
47
|
+
|
48
|
+
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
49
|
+
# All files from config/locales/*.rb,yml are added automatically.
|
50
|
+
# config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
|
51
|
+
# config.i18n.default_locale = :de
|
52
|
+
|
53
|
+
# Your secret key for verifying cookie session data integrity.
|
54
|
+
# If you change this key, all old sessions will become invalid!
|
55
|
+
# Make sure the secret is at least 30 characters and all random,
|
56
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
57
|
+
config.action_controller.session = {
|
58
|
+
:session_key => '_test_app_session',
|
59
|
+
:secret => '5bd22878f8fe45b00075317814217a457cccb2939ee70de2728968e5a61d867e479f8a93e4a5f28dbadac680c59b81322e6467450cc336d03557030cf5e9bdf4'
|
60
|
+
}
|
61
|
+
|
62
|
+
# Use the database for sessions instead of the cookie-based default,
|
63
|
+
# which shouldn't be used to store highly confidential information
|
64
|
+
# (create the session table with "rake db:sessions:create")
|
65
|
+
# config.action_controller.session_store = :active_record_store
|
66
|
+
|
67
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
68
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
69
|
+
# like if you have constraints or database-specific column types
|
70
|
+
# config.active_record.schema_format = :sql
|
71
|
+
|
72
|
+
# Activate observers that should always be running
|
73
|
+
# Please note that observers generated using script/generate observer need to have an _observer suffix
|
74
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
75
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# In the development environment your application's code is reloaded on
|
4
|
+
# every request. This slows down response time but is perfect for development
|
5
|
+
# since you don't have to restart the webserver when you make code changes.
|
6
|
+
config.cache_classes = false
|
7
|
+
|
8
|
+
# Log error messages when you accidentally call methods on nil.
|
9
|
+
config.whiny_nils = true
|
10
|
+
|
11
|
+
# Show full error reports and disable caching
|
12
|
+
config.action_controller.consider_all_requests_local = true
|
13
|
+
config.action_view.debug_rjs = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The production environment is meant for finished, "live" apps.
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Enable threaded mode
|
8
|
+
# config.threadsafe!
|
9
|
+
|
10
|
+
# Use a different logger for distributed setups
|
11
|
+
# config.logger = SyslogLogger.new
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on
|
14
|
+
config.action_controller.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Use a different cache store in production
|
18
|
+
# config.cache_store = :mem_cache_store
|
19
|
+
|
20
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
21
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
22
|
+
|
23
|
+
# Disable delivery errors, bad email addresses will be ignored
|
24
|
+
# config.action_mailer.raise_delivery_errors = false
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The test environment is used exclusively to run your application's
|
4
|
+
# test suite. You never need to work with it otherwise. Remember that
|
5
|
+
# your test database is "scratch space" for the test suite and is wiped
|
6
|
+
# and recreated between test runs. Don't rely on the data there!
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Disable request forgery protection in test environment
|
17
|
+
config.action_controller.allow_forgery_protection = false
|
18
|
+
|
19
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
20
|
+
# The :test delivery method accumulates sent emails in the
|
21
|
+
# ActionMailer::Base.deliveries array.
|
22
|
+
config.action_mailer.delivery_method = :test
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# These settings change the behavior of Rails 2 apps and will be defaults
|
2
|
+
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
3
|
+
|
4
|
+
if defined?(ActiveRecord)
|
5
|
+
# Include Active Record class name as root for JSON serialized output.
|
6
|
+
ActiveRecord::Base.include_root_in_json = true
|
7
|
+
|
8
|
+
# Store the full class name (including module namespace) in STI type column.
|
9
|
+
ActiveRecord::Base.store_full_sti_class = true
|
10
|
+
end
|
11
|
+
|
12
|
+
# Use ISO 8601 format for JSON serialized times and dates.
|
13
|
+
ActiveSupport.use_standard_json_time_format = true
|
14
|
+
|
15
|
+
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
16
|
+
# if you're including raw json in an HTML page.
|
17
|
+
ActiveSupport.escape_html_entities_in_json = false
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module PlugTest
|
2
|
+
module TestHelpers
|
3
|
+
def pt_helper(block)
|
4
|
+
@controller.plug_test_block = block
|
5
|
+
|
6
|
+
class <<@controller
|
7
|
+
def overwrite_me
|
8
|
+
@plug_test_answer = render_to_string(:inline => "<%=" + @plug_test_block + "%>")
|
9
|
+
render :text => @plug_test_answer
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
get :test_action
|
14
|
+
assert_response :success
|
15
|
+
@controller.plug_test_answer
|
16
|
+
end
|
17
|
+
|
18
|
+
def pt_setup
|
19
|
+
@controller = PlugTestController.new
|
20
|
+
@helper = @controller.class.helpers
|
21
|
+
@request = ActionController::TestRequest.new
|
22
|
+
@response = ActionController::TestResponse.new
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'test_help'
|
29
|
+
Test::Unit::TestCase.send :include, PlugTest::TestHelpers
|
@@ -0,0 +1,43 @@
|
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
|
4
|
+
# Sample of regular route:
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
+
# Keep in mind you can assign values other than :controller and :action
|
7
|
+
|
8
|
+
# Sample of named route:
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
+
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
14
|
+
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
+
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route with more complex sub-resources
|
22
|
+
# map.resources :products do |products|
|
23
|
+
# products.resources :comments
|
24
|
+
# products.resources :sales, :collection => { :recent => :get }
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Sample resource route within a namespace:
|
28
|
+
# map.namespace :admin do |admin|
|
29
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
30
|
+
# admin.resources :products
|
31
|
+
# end
|
32
|
+
|
33
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
34
|
+
# map.root :controller => "welcome"
|
35
|
+
|
36
|
+
# See how all your routes lay out with "rake routes"
|
37
|
+
|
38
|
+
# Install the default routes as the lowest priority.
|
39
|
+
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
40
|
+
# consider removing the them or commenting them out if you're using named routes and resources.
|
41
|
+
map.connect ':controller/:action/:id'
|
42
|
+
map.connect ':controller/:action/:id.:format'
|
43
|
+
end
|
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/404.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
27
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>The change you wanted was rejected (422)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/422.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>The change you wanted was rejected.</h1>
|
27
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
|
6
|
+
<head>
|
7
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
8
|
+
<title>We're sorry, but something went wrong (500)</title>
|
9
|
+
<style type="text/css">
|
10
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
11
|
+
div.dialog {
|
12
|
+
width: 25em;
|
13
|
+
padding: 0 4em;
|
14
|
+
margin: 4em auto 0 auto;
|
15
|
+
border: 1px solid #ccc;
|
16
|
+
border-right-color: #999;
|
17
|
+
border-bottom-color: #999;
|
18
|
+
}
|
19
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
20
|
+
</style>
|
21
|
+
</head>
|
22
|
+
|
23
|
+
<body>
|
24
|
+
<!-- This file lives in public/500.html -->
|
25
|
+
<div class="dialog">
|
26
|
+
<h1>We're sorry, but something went wrong.</h1>
|
27
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
28
|
+
<p><small>(If you're the administrator of this website, then please read
|
29
|
+
the log file "<%=h RAILS_ENV %>.log"
|
30
|
+
to find out what went wrong.)</small></p>
|
31
|
+
</div>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/ruby1.8
|
2
|
+
|
3
|
+
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
|
4
|
+
|
5
|
+
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
|
6
|
+
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
|
7
|
+
require "dispatcher"
|
8
|
+
|
9
|
+
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
|
10
|
+
Dispatcher.dispatch
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/ruby1.8
|
2
|
+
#
|
3
|
+
# You may specify the path to the FastCGI crash log (a log of unhandled
|
4
|
+
# exceptions which forced the FastCGI instance to exit, great for debugging)
|
5
|
+
# and the number of requests to process before running garbage collection.
|
6
|
+
#
|
7
|
+
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
|
8
|
+
# and the GC period is nil (turned off). A reasonable number of requests
|
9
|
+
# could range from 10-100 depending on the memory footprint of your app.
|
10
|
+
#
|
11
|
+
# Example:
|
12
|
+
# # Default log path, normal GC behavior.
|
13
|
+
# RailsFCGIHandler.process!
|
14
|
+
#
|
15
|
+
# # Default log path, 50 requests between GC.
|
16
|
+
# RailsFCGIHandler.process! nil, 50
|
17
|
+
#
|
18
|
+
# # Custom log path, normal GC behavior.
|
19
|
+
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
|
20
|
+
#
|
21
|
+
require File.dirname(__FILE__) + "/../config/environment"
|
22
|
+
require 'fcgi_handler'
|
23
|
+
|
24
|
+
RailsFCGIHandler.process!
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/ruby1.8
|
2
|
+
|
3
|
+
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
|
4
|
+
|
5
|
+
# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
|
6
|
+
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
|
7
|
+
require "dispatcher"
|
8
|
+
|
9
|
+
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
|
10
|
+
Dispatcher.dispatch
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
+
<title>PlugTest -- Testing App for Testing Rails plugins</title>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<h1>Lightweight</h1>
|
10
|
+
<p>Need to update this -- refer to the README</p>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
3
|
+
require 'test_help'
|
4
|
+
|
5
|
+
class Test::Unit::TestCase
|
6
|
+
# Transactional fixtures accelerate your tests by wrapping each test method
|
7
|
+
# in a transaction that's rolled back on completion. This ensures that the
|
8
|
+
# test database remains unchanged so your fixtures don't have to be reloaded
|
9
|
+
# between every test method. Fewer database queries means faster tests.
|
10
|
+
#
|
11
|
+
# Read Mike Clark's excellent walkthrough at
|
12
|
+
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
|
13
|
+
#
|
14
|
+
# Every Active Record database supports transactions except MyISAM tables
|
15
|
+
# in MySQL. Turn off transactional fixtures in this case; however, if you
|
16
|
+
# don't care one way or the other, switching from MyISAM to InnoDB tables
|
17
|
+
# is recommended.
|
18
|
+
#
|
19
|
+
# The only drawback to using transactional fixtures is when you actually
|
20
|
+
# need to test transactions. Since your test is bracketed by a transaction,
|
21
|
+
# any transactions started in your code will be automatically rolled back.
|
22
|
+
self.use_transactional_fixtures = true
|
23
|
+
|
24
|
+
# Instantiated fixtures are slow, but give you @david where otherwise you
|
25
|
+
# would need people(:david). If you don't want to migrate your existing
|
26
|
+
# test cases which use the @david style and don't mind the speed hit (each
|
27
|
+
# instantiated fixtures translates to a database query per test method),
|
28
|
+
# then set this back to true.
|
29
|
+
self.use_instantiated_fixtures = false
|
30
|
+
|
31
|
+
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
32
|
+
#
|
33
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
34
|
+
# -- they do not yet inherit this setting
|
35
|
+
fixtures :all
|
36
|
+
|
37
|
+
# Add more helper methods to be used by all tests here...
|
38
|
+
end
|
data/plug_test.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{plug_test}
|
5
|
+
s.version = "0.1.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Ryan Angilly"]
|
9
|
+
s.date = %q{2008-12-19}
|
10
|
+
s.description = %q{Allows simpler testing of view helpers in Rails.}
|
11
|
+
s.email = %q{ryan@angilly.com}
|
12
|
+
s.extra_rdoc_files = ["README.rdoc", "lib/plug_test/app/log/development.log", "lib/plug_test/app/script/dbconsole", "lib/plug_test/app/script/runner", "lib/plug_test/app/script/performance/benchmarker", "lib/plug_test/app/script/performance/profiler", "lib/plug_test/app/script/performance/request", "lib/plug_test/app/script/server", "lib/plug_test/app/script/process/spawner", "lib/plug_test/app/script/process/inspector", "lib/plug_test/app/script/process/reaper", "lib/plug_test/app/script/destroy", "lib/plug_test/app/script/about", "lib/plug_test/app/script/plugin", "lib/plug_test/app/script/generate", "lib/plug_test/app/script/console", "lib/plug_test/app/app/controllers/application.rb", "lib/plug_test/app/app/controllers/plug_test_controller.rb", "lib/plug_test/app/test/performance/browsing_test.rb", "lib/plug_test/app/test/test_helper.rb", "lib/plug_test/app/config/initializers/new_rails_defaults.rb", "lib/plug_test/app/config/initializers/mime_types.rb", "lib/plug_test/app/config/initializers/inflections.rb", "lib/plug_test/app/config/initializers/plug_test.rb", "lib/plug_test/app/config/boot.rb", "lib/plug_test/app/config/locales/en.yml", "lib/plug_test/app/config/database.yml", "lib/plug_test/app/config/environments/development.rb", "lib/plug_test/app/config/environments/test.rb", "lib/plug_test/app/config/environments/production.rb", "lib/plug_test/app/config/routes.rb", "lib/plug_test/app/config/environment.rb", "lib/plug_test/app/Rakefile", "lib/plug_test/app/public/robots.txt", "lib/plug_test/app/public/500.html", "lib/plug_test/app/public/dispatch.rb", "lib/plug_test/app/public/favicon.ico", "lib/plug_test/app/public/422.html", "lib/plug_test/app/public/dispatch.fcgi", "lib/plug_test/app/public/dispatch.cgi", "lib/plug_test/app/public/404.html", "lib/plug_test/app/public/index.html", "lib/plug_test.rb"]
|
13
|
+
s.files = ["Manifest", "README.rdoc", "lib/plug_test/app/log/development.log", "lib/plug_test/app/script/dbconsole", "lib/plug_test/app/script/runner", "lib/plug_test/app/script/performance/benchmarker", "lib/plug_test/app/script/performance/profiler", "lib/plug_test/app/script/performance/request", "lib/plug_test/app/script/server", "lib/plug_test/app/script/process/spawner", "lib/plug_test/app/script/process/inspector", "lib/plug_test/app/script/process/reaper", "lib/plug_test/app/script/destroy", "lib/plug_test/app/script/about", "lib/plug_test/app/script/plugin", "lib/plug_test/app/script/generate", "lib/plug_test/app/script/console", "lib/plug_test/app/app/controllers/application.rb", "lib/plug_test/app/app/controllers/plug_test_controller.rb", "lib/plug_test/app/test/performance/browsing_test.rb", "lib/plug_test/app/test/test_helper.rb", "lib/plug_test/app/config/initializers/new_rails_defaults.rb", "lib/plug_test/app/config/initializers/mime_types.rb", "lib/plug_test/app/config/initializers/inflections.rb", "lib/plug_test/app/config/initializers/plug_test.rb", "lib/plug_test/app/config/boot.rb", "lib/plug_test/app/config/locales/en.yml", "lib/plug_test/app/config/database.yml", "lib/plug_test/app/config/environments/development.rb", "lib/plug_test/app/config/environments/test.rb", "lib/plug_test/app/config/environments/production.rb", "lib/plug_test/app/config/routes.rb", "lib/plug_test/app/config/environment.rb", "lib/plug_test/app/Rakefile", "lib/plug_test/app/public/robots.txt", "lib/plug_test/app/public/500.html", "lib/plug_test/app/public/dispatch.rb", "lib/plug_test/app/public/favicon.ico", "lib/plug_test/app/public/422.html", "lib/plug_test/app/public/dispatch.fcgi", "lib/plug_test/app/public/dispatch.cgi", "lib/plug_test/app/public/404.html", "lib/plug_test/app/public/index.html", "lib/plug_test.rb", "Rakefile", "plug_test.gemspec"]
|
14
|
+
s.has_rdoc = true
|
15
|
+
s.homepage = %q{http://github.com/ryana/plug_test}
|
16
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Plug_test", "--main", "README.rdoc"]
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
s.rubyforge_project = %q{plug_test}
|
19
|
+
s.rubygems_version = %q{1.3.1}
|
20
|
+
s.summary = %q{Allows simpler testing of view helpers in Rails.}
|
21
|
+
|
22
|
+
if s.respond_to? :specification_version then
|
23
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
+
s.specification_version = 2
|
25
|
+
|
26
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
+
else
|
28
|
+
end
|
29
|
+
else
|
30
|
+
end
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ryana-plug_test
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Angilly
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-12-19 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Allows simpler testing of view helpers in Rails.
|
17
|
+
email: ryan@angilly.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
24
|
+
- lib/plug_test/app/log/development.log
|
25
|
+
- lib/plug_test/app/script/dbconsole
|
26
|
+
- lib/plug_test/app/script/runner
|
27
|
+
- lib/plug_test/app/script/performance/benchmarker
|
28
|
+
- lib/plug_test/app/script/performance/profiler
|
29
|
+
- lib/plug_test/app/script/performance/request
|
30
|
+
- lib/plug_test/app/script/server
|
31
|
+
- lib/plug_test/app/script/process/spawner
|
32
|
+
- lib/plug_test/app/script/process/inspector
|
33
|
+
- lib/plug_test/app/script/process/reaper
|
34
|
+
- lib/plug_test/app/script/destroy
|
35
|
+
- lib/plug_test/app/script/about
|
36
|
+
- lib/plug_test/app/script/plugin
|
37
|
+
- lib/plug_test/app/script/generate
|
38
|
+
- lib/plug_test/app/script/console
|
39
|
+
- lib/plug_test/app/app/controllers/application.rb
|
40
|
+
- lib/plug_test/app/app/controllers/plug_test_controller.rb
|
41
|
+
- lib/plug_test/app/test/performance/browsing_test.rb
|
42
|
+
- lib/plug_test/app/test/test_helper.rb
|
43
|
+
- lib/plug_test/app/config/initializers/new_rails_defaults.rb
|
44
|
+
- lib/plug_test/app/config/initializers/mime_types.rb
|
45
|
+
- lib/plug_test/app/config/initializers/inflections.rb
|
46
|
+
- lib/plug_test/app/config/initializers/plug_test.rb
|
47
|
+
- lib/plug_test/app/config/boot.rb
|
48
|
+
- lib/plug_test/app/config/locales/en.yml
|
49
|
+
- lib/plug_test/app/config/database.yml
|
50
|
+
- lib/plug_test/app/config/environments/development.rb
|
51
|
+
- lib/plug_test/app/config/environments/test.rb
|
52
|
+
- lib/plug_test/app/config/environments/production.rb
|
53
|
+
- lib/plug_test/app/config/routes.rb
|
54
|
+
- lib/plug_test/app/config/environment.rb
|
55
|
+
- lib/plug_test/app/Rakefile
|
56
|
+
- lib/plug_test/app/public/robots.txt
|
57
|
+
- lib/plug_test/app/public/500.html
|
58
|
+
- lib/plug_test/app/public/dispatch.rb
|
59
|
+
- lib/plug_test/app/public/favicon.ico
|
60
|
+
- lib/plug_test/app/public/422.html
|
61
|
+
- lib/plug_test/app/public/dispatch.fcgi
|
62
|
+
- lib/plug_test/app/public/dispatch.cgi
|
63
|
+
- lib/plug_test/app/public/404.html
|
64
|
+
- lib/plug_test/app/public/index.html
|
65
|
+
- lib/plug_test.rb
|
66
|
+
files:
|
67
|
+
- Manifest
|
68
|
+
- README.rdoc
|
69
|
+
- lib/plug_test/app/log/development.log
|
70
|
+
- lib/plug_test/app/script/dbconsole
|
71
|
+
- lib/plug_test/app/script/runner
|
72
|
+
- lib/plug_test/app/script/performance/benchmarker
|
73
|
+
- lib/plug_test/app/script/performance/profiler
|
74
|
+
- lib/plug_test/app/script/performance/request
|
75
|
+
- lib/plug_test/app/script/server
|
76
|
+
- lib/plug_test/app/script/process/spawner
|
77
|
+
- lib/plug_test/app/script/process/inspector
|
78
|
+
- lib/plug_test/app/script/process/reaper
|
79
|
+
- lib/plug_test/app/script/destroy
|
80
|
+
- lib/plug_test/app/script/about
|
81
|
+
- lib/plug_test/app/script/plugin
|
82
|
+
- lib/plug_test/app/script/generate
|
83
|
+
- lib/plug_test/app/script/console
|
84
|
+
- lib/plug_test/app/app/controllers/application.rb
|
85
|
+
- lib/plug_test/app/app/controllers/plug_test_controller.rb
|
86
|
+
- lib/plug_test/app/test/performance/browsing_test.rb
|
87
|
+
- lib/plug_test/app/test/test_helper.rb
|
88
|
+
- lib/plug_test/app/config/initializers/new_rails_defaults.rb
|
89
|
+
- lib/plug_test/app/config/initializers/mime_types.rb
|
90
|
+
- lib/plug_test/app/config/initializers/inflections.rb
|
91
|
+
- lib/plug_test/app/config/initializers/plug_test.rb
|
92
|
+
- lib/plug_test/app/config/boot.rb
|
93
|
+
- lib/plug_test/app/config/locales/en.yml
|
94
|
+
- lib/plug_test/app/config/database.yml
|
95
|
+
- lib/plug_test/app/config/environments/development.rb
|
96
|
+
- lib/plug_test/app/config/environments/test.rb
|
97
|
+
- lib/plug_test/app/config/environments/production.rb
|
98
|
+
- lib/plug_test/app/config/routes.rb
|
99
|
+
- lib/plug_test/app/config/environment.rb
|
100
|
+
- lib/plug_test/app/Rakefile
|
101
|
+
- lib/plug_test/app/public/robots.txt
|
102
|
+
- lib/plug_test/app/public/500.html
|
103
|
+
- lib/plug_test/app/public/dispatch.rb
|
104
|
+
- lib/plug_test/app/public/favicon.ico
|
105
|
+
- lib/plug_test/app/public/422.html
|
106
|
+
- lib/plug_test/app/public/dispatch.fcgi
|
107
|
+
- lib/plug_test/app/public/dispatch.cgi
|
108
|
+
- lib/plug_test/app/public/404.html
|
109
|
+
- lib/plug_test/app/public/index.html
|
110
|
+
- lib/plug_test.rb
|
111
|
+
- Rakefile
|
112
|
+
- plug_test.gemspec
|
113
|
+
has_rdoc: true
|
114
|
+
homepage: http://github.com/ryana/plug_test
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options:
|
117
|
+
- --line-numbers
|
118
|
+
- --inline-source
|
119
|
+
- --title
|
120
|
+
- Plug_test
|
121
|
+
- --main
|
122
|
+
- README.rdoc
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: "0"
|
130
|
+
version:
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: "1.2"
|
136
|
+
version:
|
137
|
+
requirements: []
|
138
|
+
|
139
|
+
rubyforge_project: plug_test
|
140
|
+
rubygems_version: 1.2.0
|
141
|
+
signing_key:
|
142
|
+
specification_version: 2
|
143
|
+
summary: Allows simpler testing of view helpers in Rails.
|
144
|
+
test_files: []
|
145
|
+
|