presenting 1.0.0 → 2.0.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/app/controllers/presentation/assets_controller.rb +1 -1
- data/app/views/presentations/_details.erb +1 -1
- data/app/views/presentations/_field_search.erb +1 -1
- data/app/views/presentations/_form.erb +1 -1
- data/app/views/presentations/_grid.erb +1 -1
- data/app/views/presentations/_search.erb +1 -1
- data/config/routes.rb +7 -2
- data/lib/presentation/base.rb +10 -27
- data/lib/presentation/details.rb +2 -0
- data/lib/presentation/field_search.rb +2 -0
- data/lib/presentation/grid.rb +1 -1
- data/lib/presenting/engine.rb +7 -0
- data/lib/presenting/form_helpers.rb +1 -1
- data/lib/presenting/helpers.rb +7 -3
- data/lib/presenting/view.rb +3 -3
- data/lib/presenting.rb +38 -5
- data/test/assets_test.rb +5 -7
- data/test/details_test.rb +1 -1
- data/test/field_search_test.rb +1 -1
- data/test/form_test.rb +316 -287
- data/test/grid_test.rb +28 -8
- data/test/helpers_test.rb +2 -2
- data/test/presenting_test.rb +1 -1
- data/test/r3/Gemfile +7 -0
- data/test/r3/Gemfile.lock +82 -0
- data/test/r3/config/application.rb +12 -0
- data/test/r3/config/boot.rb +6 -0
- data/test/{rails → r3}/config/database.yml +6 -1
- data/test/r3/config/environment.rb +5 -0
- data/test/r3/config/environments/test.rb +35 -0
- data/test/r3/config.ru +4 -0
- data/test/r3/db/test.sqlite3 +0 -0
- data/test/r3/log/test.log +2354 -0
- data/test/r3/public/javascripts/presenting/grid.js +0 -0
- data/test/r3/public/javascripts/presenting/search.js +13 -0
- data/test/r3/public/stylesheets/presenting/details-color.css +7 -0
- data/test/r3/public/stylesheets/presenting/details.css +10 -0
- data/test/r3/public/stylesheets/presenting/form.css +1 -0
- data/test/r3/public/stylesheets/presenting/grid-color.css +71 -0
- data/test/r3/public/stylesheets/presenting/grid.css +64 -0
- data/test/r3/public/stylesheets/presenting/search-color.css +16 -0
- data/test/r3/public/stylesheets/presenting/search.css +45 -0
- data/test/search_conditions_test.rb +2 -2
- data/test/search_test.rb +1 -1
- data/test/test_helper.rb +8 -39
- metadata +45 -79
- data/rails/init.rb +0 -12
- data/test/rails/app/controllers/application_controller.rb +0 -15
- data/test/rails/app/controllers/users_controller.rb +0 -36
- data/test/rails/app/helpers/application_helper.rb +0 -3
- data/test/rails/app/helpers/users_helper.rb +0 -2
- data/test/rails/app/models/user.rb +0 -2
- data/test/rails/app/views/layouts/application.html.erb +0 -15
- data/test/rails/app/views/users/index.html.erb +0 -10
- data/test/rails/app/views/users/new.html.erb +0 -2
- data/test/rails/app/views/users/show.html.erb +0 -1
- data/test/rails/config/boot.rb +0 -109
- data/test/rails/config/environment.rb +0 -13
- data/test/rails/config/environments/development.rb +0 -17
- data/test/rails/config/environments/production.rb +0 -24
- data/test/rails/config/environments/test.rb +0 -22
- data/test/rails/config/locales/en.yml +0 -5
- data/test/rails/config/routes.rb +0 -5
- data/test/rails/db/development.sqlite3 +0 -0
- data/test/rails/db/migrate/20090213085444_create_users.rb +0 -13
- data/test/rails/db/migrate/20090213085607_populate_users.rb +0 -13
- data/test/rails/db/schema.rb +0 -23
- data/test/rails/db/test.sqlite3 +0 -0
- data/test/rails/log/development.log +0 -858
- data/test/rails/public/404.html +0 -30
- data/test/rails/public/422.html +0 -30
- data/test/rails/public/500.html +0 -33
- data/test/rails/public/javascripts/application.js +0 -2
- data/test/rails/public/javascripts/jquery.livequery.min.js +0 -11
- data/test/rails/public/javascripts/prototype.js +0 -4320
- data/test/rails/script/console +0 -3
- data/test/rails/script/dbconsole +0 -3
- data/test/rails/script/destroy +0 -3
- data/test/rails/script/generate +0 -3
- data/test/rails/script/plugin +0 -3
- data/test/rails/script/runner +0 -3
- data/test/rails/script/server +0 -3
- /data/app/assets/{javascript → javascripts}/grid.js +0 -0
- /data/app/assets/{javascript → javascripts}/search.js +0 -0
data/test/rails/config/boot.rb
DELETED
@@ -1,109 +0,0 @@
|
|
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!
|
@@ -1,13 +0,0 @@
|
|
1
|
-
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
|
2
|
-
require File.join(File.dirname(__FILE__), 'boot')
|
3
|
-
|
4
|
-
Rails::Initializer.run do |config|
|
5
|
-
config.gem 'mislav-will_paginate', :lib => 'will_paginate'
|
6
|
-
config.time_zone = 'UTC'
|
7
|
-
config.action_controller.session = {
|
8
|
-
:session_key => '_presenting-app_session',
|
9
|
-
:secret => '7eac9f1cad277b81d353cd79968b7482107043cd00ad19ead80f8edf8094991a831e09e336255b5cb14305379636cd02bbc814bc820ae17c2fdaac892c8e7e06'
|
10
|
-
}
|
11
|
-
config.plugin_paths = [File.join(File.dirname(__FILE__), *%w(.. .. .. ..))]
|
12
|
-
config.plugins = ['presenting']
|
13
|
-
end
|
@@ -1,17 +0,0 @@
|
|
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
|
@@ -1,24 +0,0 @@
|
|
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
|
@@ -1,22 +0,0 @@
|
|
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
|
data/test/rails/config/routes.rb
DELETED
Binary file
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class PopulateUsers < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
User.create(:prefix => 'Mr', :first_name => 'Samuel', :last_name => 'Flippledot', :email => "sam@example.com")
|
4
|
-
User.create(:prefix => 'Mrs', :first_name => 'Jacey', :last_name => 'Flippledot', :email => "jacey@example.com")
|
5
|
-
User.create(:prefix => 'Sr', :first_name => 'Chavez', :last_name => 'Laventin', :email => 'chavez@example.com')
|
6
|
-
User.create(:prefix => 'Mr', :first_name => 'Cain', :last_name => 'Levy', :email => 'cain@example.com')
|
7
|
-
User.create(:prefix => 'Ms', :first_name => 'Iris', :last_name => 'Tank', :email => 'iris@example.com')
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.down
|
11
|
-
User.destroy_all
|
12
|
-
end
|
13
|
-
end
|
data/test/rails/db/schema.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead of editing this file,
|
2
|
-
# please use the migrations feature of Active Record to incrementally modify your database, and
|
3
|
-
# then regenerate this schema definition.
|
4
|
-
#
|
5
|
-
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
|
6
|
-
# to create the application database on another system, you should be using db:schema:load, not running
|
7
|
-
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
8
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
9
|
-
#
|
10
|
-
# It's strongly recommended to check this file into your version control system.
|
11
|
-
|
12
|
-
ActiveRecord::Schema.define(:version => 20090213085607) do
|
13
|
-
|
14
|
-
create_table "users", :force => true do |t|
|
15
|
-
t.string "prefix"
|
16
|
-
t.string "first_name"
|
17
|
-
t.string "last_name"
|
18
|
-
t.string "email"
|
19
|
-
t.datetime "created_at"
|
20
|
-
t.datetime "updated_at"
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
data/test/rails/db/test.sqlite3
DELETED
Binary file
|