presenting 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -20
- data/README +10 -10
- data/Rakefile +22 -22
- data/app/assets/javascripts/search.js +13 -13
- data/app/assets/stylesheets/details-color.css +7 -7
- data/app/assets/stylesheets/details.css +10 -10
- data/app/assets/stylesheets/form.css +1 -1
- data/app/assets/stylesheets/grid-color.css +71 -71
- data/app/assets/stylesheets/grid.css +64 -64
- data/app/assets/stylesheets/search-color.css +16 -16
- data/app/assets/stylesheets/search.css +45 -45
- data/app/controllers/presentation/assets_controller.rb +42 -42
- data/app/views/presentations/_details.erb +11 -11
- data/app/views/presentations/_field_search.erb +14 -14
- data/app/views/presentations/_form.erb +20 -20
- data/app/views/presentations/_grid.erb +70 -70
- data/app/views/presentations/_search.erb +7 -7
- data/lib/presentation/base.rb +31 -31
- data/lib/presentation/details.rb +21 -21
- data/lib/presentation/field_search.rb +67 -67
- data/lib/presentation/form.rb +149 -149
- data/lib/presentation/grid.rb +162 -160
- data/lib/presentation/search.rb +9 -9
- data/lib/presenting/attribute.rb +51 -51
- data/lib/presenting/configurable.rb +10 -10
- data/lib/presenting/defaults.rb +10 -10
- data/lib/presenting/field_set.rb +26 -26
- data/lib/presenting/form_helpers.rb +51 -51
- data/lib/presenting/helpers.rb +114 -114
- data/lib/presenting/sanitize.rb +19 -19
- data/lib/presenting/search.rb +185 -185
- data/lib/presenting/sorting.rb +87 -87
- data/test/attribute_test.rb +61 -61
- data/test/configurable_test.rb +20 -20
- data/test/details_test.rb +68 -68
- data/test/field_search_test.rb +102 -102
- data/test/field_set_test.rb +46 -46
- data/test/grid_test.rb +246 -239
- data/test/helpers_test.rb +72 -72
- data/test/presenting_test.rb +15 -15
- data/test/r3/Gemfile +7 -7
- data/test/r3/Gemfile.lock +86 -82
- data/test/r3/config/application.rb +12 -12
- data/test/r3/config/boot.rb +6 -6
- data/test/r3/config/database.yml +22 -22
- data/test/r3/config/environment.rb +5 -5
- data/test/r3/config/environments/test.rb +35 -35
- data/test/r3/db/test.sqlite3 +0 -0
- data/test/r3/log/test.log +336 -0
- data/test/r3/public/javascripts/presenting/grid.js +0 -0
- data/test/r3/public/javascripts/presenting/search.js +13 -13
- data/test/r3/public/stylesheets/presenting/details-color.css +7 -7
- data/test/r3/public/stylesheets/presenting/details.css +10 -10
- data/test/r3/public/stylesheets/presenting/form.css +1 -1
- data/test/r3/public/stylesheets/presenting/grid-color.css +71 -71
- data/test/r3/public/stylesheets/presenting/grid.css +64 -64
- data/test/r3/public/stylesheets/presenting/search-color.css +16 -16
- data/test/r3/public/stylesheets/presenting/search.css +45 -45
- data/test/sanitize_test.rb +15 -15
- data/test/search_conditions_test.rb +137 -137
- data/test/search_test.rb +30 -30
- data/test/sorting_test.rb +63 -63
- metadata +74 -74
data/test/r3/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
source 'http://rubygems.org'
|
2
|
-
|
3
|
-
gem 'rails', '3.0.
|
4
|
-
gem 'sqlite3'
|
5
|
-
|
6
|
-
gem 'presenting', :path => File.dirname(__FILE__) + '/../../'
|
7
|
-
gem 'will_paginate', '~>3.0.0'
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '3.0.10'
|
4
|
+
gem 'sqlite3'
|
5
|
+
|
6
|
+
gem 'presenting', :path => File.dirname(__FILE__) + '/../../'
|
7
|
+
gem 'will_paginate', '~>3.0.0'
|
data/test/r3/Gemfile.lock
CHANGED
@@ -1,82 +1,86 @@
|
|
1
|
-
PATH
|
2
|
-
remote: /
|
3
|
-
specs:
|
4
|
-
presenting (2.0.
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: http://rubygems.org/
|
8
|
-
specs:
|
9
|
-
abstract (1.0.0)
|
10
|
-
actionmailer (3.0.
|
11
|
-
actionpack (= 3.0.
|
12
|
-
mail (~> 2.2.
|
13
|
-
actionpack (3.0.
|
14
|
-
activemodel (= 3.0.
|
15
|
-
activesupport (= 3.0.
|
16
|
-
builder (~> 2.1.2)
|
17
|
-
erubis (~> 2.6.6)
|
18
|
-
i18n (~> 0.5.0)
|
19
|
-
rack (~> 1.2.1)
|
20
|
-
rack-mount (~> 0.6.14)
|
21
|
-
rack-test (~> 0.5.7)
|
22
|
-
tzinfo (~> 0.3.23)
|
23
|
-
activemodel (3.0.
|
24
|
-
activesupport (= 3.0.
|
25
|
-
builder (~> 2.1.2)
|
26
|
-
i18n (~> 0.5.0)
|
27
|
-
activerecord (3.0.
|
28
|
-
activemodel (= 3.0.
|
29
|
-
activesupport (= 3.0.
|
30
|
-
arel (~> 2.0.
|
31
|
-
tzinfo (~> 0.3.23)
|
32
|
-
activeresource (3.0.
|
33
|
-
activemodel (= 3.0.
|
34
|
-
activesupport (= 3.0.
|
35
|
-
activesupport (3.0.
|
36
|
-
arel (2.0.10)
|
37
|
-
builder (2.1.2)
|
38
|
-
erubis (2.6.6)
|
39
|
-
abstract (>= 1.0.0)
|
40
|
-
i18n (0.5.0)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
rack
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
1
|
+
PATH
|
2
|
+
remote: /Users/cainlevy/Code/presenting
|
3
|
+
specs:
|
4
|
+
presenting (2.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: http://rubygems.org/
|
8
|
+
specs:
|
9
|
+
abstract (1.0.0)
|
10
|
+
actionmailer (3.0.10)
|
11
|
+
actionpack (= 3.0.10)
|
12
|
+
mail (~> 2.2.19)
|
13
|
+
actionpack (3.0.10)
|
14
|
+
activemodel (= 3.0.10)
|
15
|
+
activesupport (= 3.0.10)
|
16
|
+
builder (~> 2.1.2)
|
17
|
+
erubis (~> 2.6.6)
|
18
|
+
i18n (~> 0.5.0)
|
19
|
+
rack (~> 1.2.1)
|
20
|
+
rack-mount (~> 0.6.14)
|
21
|
+
rack-test (~> 0.5.7)
|
22
|
+
tzinfo (~> 0.3.23)
|
23
|
+
activemodel (3.0.10)
|
24
|
+
activesupport (= 3.0.10)
|
25
|
+
builder (~> 2.1.2)
|
26
|
+
i18n (~> 0.5.0)
|
27
|
+
activerecord (3.0.10)
|
28
|
+
activemodel (= 3.0.10)
|
29
|
+
activesupport (= 3.0.10)
|
30
|
+
arel (~> 2.0.10)
|
31
|
+
tzinfo (~> 0.3.23)
|
32
|
+
activeresource (3.0.10)
|
33
|
+
activemodel (= 3.0.10)
|
34
|
+
activesupport (= 3.0.10)
|
35
|
+
activesupport (3.0.10)
|
36
|
+
arel (2.0.10)
|
37
|
+
builder (2.1.2)
|
38
|
+
erubis (2.6.6)
|
39
|
+
abstract (>= 1.0.0)
|
40
|
+
i18n (0.5.0)
|
41
|
+
json (1.6.1)
|
42
|
+
mail (2.2.19)
|
43
|
+
activesupport (>= 2.3.6)
|
44
|
+
i18n (>= 0.4.0)
|
45
|
+
mime-types (~> 1.16)
|
46
|
+
treetop (~> 1.4.8)
|
47
|
+
mime-types (1.17.2)
|
48
|
+
polyglot (0.3.3)
|
49
|
+
rack (1.2.4)
|
50
|
+
rack-mount (0.6.14)
|
51
|
+
rack (>= 1.0.0)
|
52
|
+
rack-test (0.5.7)
|
53
|
+
rack (>= 1.0)
|
54
|
+
rails (3.0.10)
|
55
|
+
actionmailer (= 3.0.10)
|
56
|
+
actionpack (= 3.0.10)
|
57
|
+
activerecord (= 3.0.10)
|
58
|
+
activeresource (= 3.0.10)
|
59
|
+
activesupport (= 3.0.10)
|
60
|
+
bundler (~> 1.0)
|
61
|
+
railties (= 3.0.10)
|
62
|
+
railties (3.0.10)
|
63
|
+
actionpack (= 3.0.10)
|
64
|
+
activesupport (= 3.0.10)
|
65
|
+
rake (>= 0.8.7)
|
66
|
+
rdoc (~> 3.4)
|
67
|
+
thor (~> 0.14.4)
|
68
|
+
rake (0.9.2.2)
|
69
|
+
rdoc (3.11)
|
70
|
+
json (~> 1.4)
|
71
|
+
sqlite3 (1.3.3)
|
72
|
+
thor (0.14.6)
|
73
|
+
treetop (1.4.10)
|
74
|
+
polyglot
|
75
|
+
polyglot (>= 0.3.1)
|
76
|
+
tzinfo (0.3.31)
|
77
|
+
will_paginate (3.0.0)
|
78
|
+
|
79
|
+
PLATFORMS
|
80
|
+
ruby
|
81
|
+
|
82
|
+
DEPENDENCIES
|
83
|
+
presenting!
|
84
|
+
rails (= 3.0.10)
|
85
|
+
sqlite3
|
86
|
+
will_paginate (~> 3.0.0)
|
@@ -1,12 +1,12 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
6
|
-
|
7
|
-
module R3
|
8
|
-
class Application < Rails::Application
|
9
|
-
config.encoding = "utf-8"
|
10
|
-
config.filter_parameters += [:password]
|
11
|
-
end
|
12
|
-
end
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
6
|
+
|
7
|
+
module R3
|
8
|
+
class Application < Rails::Application
|
9
|
+
config.encoding = "utf-8"
|
10
|
+
config.filter_parameters += [:password]
|
11
|
+
end
|
12
|
+
end
|
data/test/r3/config/boot.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
# Set up gems listed in the Gemfile.
|
4
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
5
|
-
|
6
|
-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# Set up gems listed in the Gemfile.
|
4
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
|
6
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
data/test/r3/config/database.yml
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
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
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
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
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# Load the rails application
|
2
|
-
require File.expand_path('../application', __FILE__)
|
3
|
-
|
4
|
-
# Initialize the rails application
|
5
|
-
R3::Application.initialize!
|
1
|
+
# Load the rails application
|
2
|
+
require File.expand_path('../application', __FILE__)
|
3
|
+
|
4
|
+
# Initialize the rails application
|
5
|
+
R3::Application.initialize!
|
@@ -1,35 +1,35 @@
|
|
1
|
-
R3::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Log error messages when you accidentally call methods on nil.
|
11
|
-
config.whiny_nils = true
|
12
|
-
|
13
|
-
# Show full error reports and disable caching
|
14
|
-
config.consider_all_requests_local = true
|
15
|
-
config.action_controller.perform_caching = false
|
16
|
-
|
17
|
-
# Raise exceptions instead of rendering exception templates
|
18
|
-
config.action_dispatch.show_exceptions = false
|
19
|
-
|
20
|
-
# Disable request forgery protection in test environment
|
21
|
-
config.action_controller.allow_forgery_protection = false
|
22
|
-
|
23
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
-
# The :test delivery method accumulates sent emails in the
|
25
|
-
# ActionMailer::Base.deliveries array.
|
26
|
-
config.action_mailer.delivery_method = :test
|
27
|
-
|
28
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
-
# like if you have constraints or database-specific column types
|
31
|
-
# config.active_record.schema_format = :sql
|
32
|
-
|
33
|
-
# Print deprecation notices to the stderr
|
34
|
-
config.active_support.deprecation = :stderr
|
35
|
-
end
|
1
|
+
R3::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Raise exceptions instead of rendering exception templates
|
18
|
+
config.action_dispatch.show_exceptions = false
|
19
|
+
|
20
|
+
# Disable request forgery protection in test environment
|
21
|
+
config.action_controller.allow_forgery_protection = false
|
22
|
+
|
23
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
24
|
+
# The :test delivery method accumulates sent emails in the
|
25
|
+
# ActionMailer::Base.deliveries array.
|
26
|
+
config.action_mailer.delivery_method = :test
|
27
|
+
|
28
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
29
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
30
|
+
# like if you have constraints or database-specific column types
|
31
|
+
# config.active_record.schema_format = :sql
|
32
|
+
|
33
|
+
# Print deprecation notices to the stderr
|
34
|
+
config.active_support.deprecation = :stderr
|
35
|
+
end
|
data/test/r3/db/test.sqlite3
CHANGED
File without changes
|