context_exposer 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +22 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +111 -0
  7. data/Rakefile +1 -0
  8. data/context_exposer.gemspec +23 -0
  9. data/lib/context_exposer.rb +8 -0
  10. data/lib/context_exposer/base_controller.rb +84 -0
  11. data/lib/context_exposer/version.rb +3 -0
  12. data/lib/context_exposer/view_context.rb +14 -0
  13. data/spec/app/posts_spec.rb +1 -0
  14. data/spec/context_exposer/expose_spec.rb +128 -0
  15. data/spec/dummy/README.rdoc +261 -0
  16. data/spec/dummy/Rakefile +7 -0
  17. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  18. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  19. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  20. data/spec/dummy/app/controllers/posts_controller.rb +13 -0
  21. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  22. data/spec/dummy/app/mailers/.gitkeep +0 -0
  23. data/spec/dummy/app/models/.gitkeep +0 -0
  24. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  25. data/spec/dummy/app/views/posts/index.html.erb +1 -0
  26. data/spec/dummy/app/views/posts/show.html.erb +1 -0
  27. data/spec/dummy/config.ru +4 -0
  28. data/spec/dummy/config/application.rb +65 -0
  29. data/spec/dummy/config/boot.rb +10 -0
  30. data/spec/dummy/config/environment.rb +5 -0
  31. data/spec/dummy/config/environments/development.rb +30 -0
  32. data/spec/dummy/config/environments/production.rb +65 -0
  33. data/spec/dummy/config/environments/test.rb +34 -0
  34. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  35. data/spec/dummy/config/initializers/inflections.rb +15 -0
  36. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  37. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  38. data/spec/dummy/config/initializers/session_store.rb +8 -0
  39. data/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
  40. data/spec/dummy/config/locales/en.yml +5 -0
  41. data/spec/dummy/config/routes.rb +60 -0
  42. data/spec/dummy/lib/assets/.gitkeep +0 -0
  43. data/spec/dummy/log/.gitkeep +0 -0
  44. data/spec/dummy/log/test.log +2163 -0
  45. data/spec/dummy/public/404.html +26 -0
  46. data/spec/dummy/public/422.html +26 -0
  47. data/spec/dummy/public/500.html +25 -0
  48. data/spec/dummy/public/favicon.ico +0 -0
  49. data/spec/dummy/script/rails +6 -0
  50. data/spec/spec_helper.rb +8 -0
  51. metadata +162 -0
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,8 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'context_exposure'
5
+
6
+ RSpec.configure do |config|
7
+ # some (optional) config here
8
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: context_exposer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kristian Mandrup
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-03-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Exposes a ViewContext object to the View with all the data needed by
42
+ the view
43
+ email:
44
+ - kmandrup@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - .gitignore
50
+ - .rspec
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - context_exposer.gemspec
56
+ - lib/context_exposer.rb
57
+ - lib/context_exposer/base_controller.rb
58
+ - lib/context_exposer/version.rb
59
+ - lib/context_exposer/view_context.rb
60
+ - spec/app/posts_spec.rb
61
+ - spec/context_exposer/expose_spec.rb
62
+ - spec/dummy/README.rdoc
63
+ - spec/dummy/Rakefile
64
+ - spec/dummy/app/assets/javascripts/application.js
65
+ - spec/dummy/app/assets/stylesheets/application.css
66
+ - spec/dummy/app/controllers/application_controller.rb
67
+ - spec/dummy/app/controllers/posts_controller.rb
68
+ - spec/dummy/app/helpers/application_helper.rb
69
+ - spec/dummy/app/mailers/.gitkeep
70
+ - spec/dummy/app/models/.gitkeep
71
+ - spec/dummy/app/views/layouts/application.html.erb
72
+ - spec/dummy/app/views/posts/index.html.erb
73
+ - spec/dummy/app/views/posts/show.html.erb
74
+ - spec/dummy/config.ru
75
+ - spec/dummy/config/application.rb
76
+ - spec/dummy/config/boot.rb
77
+ - spec/dummy/config/environment.rb
78
+ - spec/dummy/config/environments/development.rb
79
+ - spec/dummy/config/environments/production.rb
80
+ - spec/dummy/config/environments/test.rb
81
+ - spec/dummy/config/initializers/backtrace_silencers.rb
82
+ - spec/dummy/config/initializers/inflections.rb
83
+ - spec/dummy/config/initializers/mime_types.rb
84
+ - spec/dummy/config/initializers/secret_token.rb
85
+ - spec/dummy/config/initializers/session_store.rb
86
+ - spec/dummy/config/initializers/wrap_parameters.rb
87
+ - spec/dummy/config/locales/en.yml
88
+ - spec/dummy/config/routes.rb
89
+ - spec/dummy/lib/assets/.gitkeep
90
+ - spec/dummy/log/.gitkeep
91
+ - spec/dummy/log/test.log
92
+ - spec/dummy/public/404.html
93
+ - spec/dummy/public/422.html
94
+ - spec/dummy/public/500.html
95
+ - spec/dummy/public/favicon.ico
96
+ - spec/dummy/script/rails
97
+ - spec/spec_helper.rb
98
+ homepage: https://github.com/kristianmandrup/context_exposer
99
+ licenses:
100
+ - MIT
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 2.0.0
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: The Context object becomes the single communication point between View and
122
+ Controller
123
+ test_files:
124
+ - spec/app/posts_spec.rb
125
+ - spec/context_exposer/expose_spec.rb
126
+ - spec/dummy/README.rdoc
127
+ - spec/dummy/Rakefile
128
+ - spec/dummy/app/assets/javascripts/application.js
129
+ - spec/dummy/app/assets/stylesheets/application.css
130
+ - spec/dummy/app/controllers/application_controller.rb
131
+ - spec/dummy/app/controllers/posts_controller.rb
132
+ - spec/dummy/app/helpers/application_helper.rb
133
+ - spec/dummy/app/mailers/.gitkeep
134
+ - spec/dummy/app/models/.gitkeep
135
+ - spec/dummy/app/views/layouts/application.html.erb
136
+ - spec/dummy/app/views/posts/index.html.erb
137
+ - spec/dummy/app/views/posts/show.html.erb
138
+ - spec/dummy/config.ru
139
+ - spec/dummy/config/application.rb
140
+ - spec/dummy/config/boot.rb
141
+ - spec/dummy/config/environment.rb
142
+ - spec/dummy/config/environments/development.rb
143
+ - spec/dummy/config/environments/production.rb
144
+ - spec/dummy/config/environments/test.rb
145
+ - spec/dummy/config/initializers/backtrace_silencers.rb
146
+ - spec/dummy/config/initializers/inflections.rb
147
+ - spec/dummy/config/initializers/mime_types.rb
148
+ - spec/dummy/config/initializers/secret_token.rb
149
+ - spec/dummy/config/initializers/session_store.rb
150
+ - spec/dummy/config/initializers/wrap_parameters.rb
151
+ - spec/dummy/config/locales/en.yml
152
+ - spec/dummy/config/routes.rb
153
+ - spec/dummy/lib/assets/.gitkeep
154
+ - spec/dummy/log/.gitkeep
155
+ - spec/dummy/log/test.log
156
+ - spec/dummy/public/404.html
157
+ - spec/dummy/public/422.html
158
+ - spec/dummy/public/500.html
159
+ - spec/dummy/public/favicon.ico
160
+ - spec/dummy/script/rails
161
+ - spec/spec_helper.rb
162
+ has_rdoc: