presenting 2.0.0 → 2.0.1

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.
Files changed (63) hide show
  1. data/LICENSE +20 -20
  2. data/README +10 -10
  3. data/Rakefile +22 -22
  4. data/app/assets/javascripts/search.js +13 -13
  5. data/app/assets/stylesheets/details-color.css +7 -7
  6. data/app/assets/stylesheets/details.css +10 -10
  7. data/app/assets/stylesheets/form.css +1 -1
  8. data/app/assets/stylesheets/grid-color.css +71 -71
  9. data/app/assets/stylesheets/grid.css +64 -64
  10. data/app/assets/stylesheets/search-color.css +16 -16
  11. data/app/assets/stylesheets/search.css +45 -45
  12. data/app/controllers/presentation/assets_controller.rb +42 -42
  13. data/app/views/presentations/_details.erb +11 -11
  14. data/app/views/presentations/_field_search.erb +14 -14
  15. data/app/views/presentations/_form.erb +20 -20
  16. data/app/views/presentations/_grid.erb +70 -70
  17. data/app/views/presentations/_search.erb +7 -7
  18. data/lib/presentation/base.rb +31 -31
  19. data/lib/presentation/details.rb +21 -21
  20. data/lib/presentation/field_search.rb +67 -67
  21. data/lib/presentation/form.rb +149 -149
  22. data/lib/presentation/grid.rb +162 -160
  23. data/lib/presentation/search.rb +9 -9
  24. data/lib/presenting/attribute.rb +51 -51
  25. data/lib/presenting/configurable.rb +10 -10
  26. data/lib/presenting/defaults.rb +10 -10
  27. data/lib/presenting/field_set.rb +26 -26
  28. data/lib/presenting/form_helpers.rb +51 -51
  29. data/lib/presenting/helpers.rb +114 -114
  30. data/lib/presenting/sanitize.rb +19 -19
  31. data/lib/presenting/search.rb +185 -185
  32. data/lib/presenting/sorting.rb +87 -87
  33. data/test/attribute_test.rb +61 -61
  34. data/test/configurable_test.rb +20 -20
  35. data/test/details_test.rb +68 -68
  36. data/test/field_search_test.rb +102 -102
  37. data/test/field_set_test.rb +46 -46
  38. data/test/grid_test.rb +246 -239
  39. data/test/helpers_test.rb +72 -72
  40. data/test/presenting_test.rb +15 -15
  41. data/test/r3/Gemfile +7 -7
  42. data/test/r3/Gemfile.lock +86 -82
  43. data/test/r3/config/application.rb +12 -12
  44. data/test/r3/config/boot.rb +6 -6
  45. data/test/r3/config/database.yml +22 -22
  46. data/test/r3/config/environment.rb +5 -5
  47. data/test/r3/config/environments/test.rb +35 -35
  48. data/test/r3/db/test.sqlite3 +0 -0
  49. data/test/r3/log/test.log +336 -0
  50. data/test/r3/public/javascripts/presenting/grid.js +0 -0
  51. data/test/r3/public/javascripts/presenting/search.js +13 -13
  52. data/test/r3/public/stylesheets/presenting/details-color.css +7 -7
  53. data/test/r3/public/stylesheets/presenting/details.css +10 -10
  54. data/test/r3/public/stylesheets/presenting/form.css +1 -1
  55. data/test/r3/public/stylesheets/presenting/grid-color.css +71 -71
  56. data/test/r3/public/stylesheets/presenting/grid.css +64 -64
  57. data/test/r3/public/stylesheets/presenting/search-color.css +16 -16
  58. data/test/r3/public/stylesheets/presenting/search.css +45 -45
  59. data/test/sanitize_test.rb +15 -15
  60. data/test/search_conditions_test.rb +137 -137
  61. data/test/search_test.rb +30 -30
  62. data/test/sorting_test.rb +63 -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.7'
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: /home/cainlevy/development/presenting
3
- specs:
4
- presenting (2.0.0rc3)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- abstract (1.0.0)
10
- actionmailer (3.0.7)
11
- actionpack (= 3.0.7)
12
- mail (~> 2.2.15)
13
- actionpack (3.0.7)
14
- activemodel (= 3.0.7)
15
- activesupport (= 3.0.7)
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.7)
24
- activesupport (= 3.0.7)
25
- builder (~> 2.1.2)
26
- i18n (~> 0.5.0)
27
- activerecord (3.0.7)
28
- activemodel (= 3.0.7)
29
- activesupport (= 3.0.7)
30
- arel (~> 2.0.2)
31
- tzinfo (~> 0.3.23)
32
- activeresource (3.0.7)
33
- activemodel (= 3.0.7)
34
- activesupport (= 3.0.7)
35
- activesupport (3.0.7)
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
- mail (2.2.19)
42
- activesupport (>= 2.3.6)
43
- i18n (>= 0.4.0)
44
- mime-types (~> 1.16)
45
- treetop (~> 1.4.8)
46
- mime-types (1.16)
47
- polyglot (0.3.2)
48
- rack (1.2.3)
49
- rack-mount (0.6.14)
50
- rack (>= 1.0.0)
51
- rack-test (0.5.7)
52
- rack (>= 1.0)
53
- rails (3.0.7)
54
- actionmailer (= 3.0.7)
55
- actionpack (= 3.0.7)
56
- activerecord (= 3.0.7)
57
- activeresource (= 3.0.7)
58
- activesupport (= 3.0.7)
59
- bundler (~> 1.0)
60
- railties (= 3.0.7)
61
- railties (3.0.7)
62
- actionpack (= 3.0.7)
63
- activesupport (= 3.0.7)
64
- rake (>= 0.8.7)
65
- thor (~> 0.14.4)
66
- rake (0.9.2)
67
- sqlite3 (1.3.3)
68
- thor (0.14.6)
69
- treetop (1.4.10)
70
- polyglot
71
- polyglot (>= 0.3.1)
72
- tzinfo (0.3.29)
73
- will_paginate (3.0.0)
74
-
75
- PLATFORMS
76
- ruby
77
-
78
- DEPENDENCIES
79
- presenting!
80
- rails (= 3.0.7)
81
- sqlite3
82
- will_paginate (~> 3.0.0)
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
@@ -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'])
@@ -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
File without changes