crayfish 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/MIT-LICENSE +21 -0
  2. data/README.md +115 -0
  3. data/Rakefile +35 -0
  4. data/lib/crayfish.rb +53 -0
  5. data/lib/crayfish/action_controller.rb +35 -0
  6. data/lib/crayfish/action_view.rb +110 -0
  7. data/lib/crayfish/elements/cell_helper.rb +70 -0
  8. data/lib/crayfish/elements/container.rb +64 -0
  9. data/lib/crayfish/elements/form.rb +161 -0
  10. data/lib/crayfish/elements/row.rb +70 -0
  11. data/lib/crayfish/elements/table.rb +51 -0
  12. data/lib/crayfish/rails/base.rb +36 -0
  13. data/lib/crayfish/rails/pdf.rb +47 -0
  14. data/lib/crayfish/version.rb +3 -0
  15. data/lib/tasks/crayfish_tasks.rake +4 -0
  16. data/test/crayfish_test.rb +227 -0
  17. data/test/dummy/README.rdoc +261 -0
  18. data/test/dummy/Rakefile +7 -0
  19. data/test/dummy/app/assets/javascripts/application.js +15 -0
  20. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  21. data/test/dummy/app/controllers/application_controller.rb +3 -0
  22. data/test/dummy/app/helpers/application_helper.rb +2 -0
  23. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  24. data/test/dummy/config.ru +4 -0
  25. data/test/dummy/config/application.rb +56 -0
  26. data/test/dummy/config/boot.rb +10 -0
  27. data/test/dummy/config/database.yml +25 -0
  28. data/test/dummy/config/environment.rb +5 -0
  29. data/test/dummy/config/environments/development.rb +37 -0
  30. data/test/dummy/config/environments/production.rb +67 -0
  31. data/test/dummy/config/environments/test.rb +37 -0
  32. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  33. data/test/dummy/config/initializers/inflections.rb +15 -0
  34. data/test/dummy/config/initializers/mime_types.rb +5 -0
  35. data/test/dummy/config/initializers/secret_token.rb +7 -0
  36. data/test/dummy/config/initializers/session_store.rb +8 -0
  37. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  38. data/test/dummy/config/locales/en.yml +5 -0
  39. data/test/dummy/config/routes.rb +58 -0
  40. data/test/dummy/db/test.sqlite3 +0 -0
  41. data/test/dummy/log/test.log +2 -0
  42. data/test/dummy/public/404.html +26 -0
  43. data/test/dummy/public/422.html +26 -0
  44. data/test/dummy/public/500.html +25 -0
  45. data/test/dummy/public/favicon.ico +0 -0
  46. data/test/dummy/script/rails +6 -0
  47. data/test/test_helper.rb +32 -0
  48. metadata +174 -0
File without changes
@@ -0,0 +1,2 @@
1
+  (0.2ms) begin transaction
2
+  (0.0ms) rollback transaction
@@ -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,32 @@
1
+ # Copyright (c) 2012 Bingoentrepenøren AS
2
+ # Copyright (c) 2012 Patrick Hanevold
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ # Configure Rails Environment
24
+ ENV["RAILS_ENV"] = "test"
25
+
26
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
27
+ require "rails/test_help"
28
+
29
+ Rails.backtrace_cleaner.remove_silencers!
30
+
31
+ # Load support files
32
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: crayfish
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Patrick Hanevold
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-02 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70304152295180 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70304152295180
25
+ - !ruby/object:Gem::Dependency
26
+ name: prawn
27
+ requirement: &70304152291860 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70304152291860
36
+ - !ruby/object:Gem::Dependency
37
+ name: sqlite3
38
+ requirement: &70304152290940 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70304152290940
47
+ - !ruby/object:Gem::Dependency
48
+ name: mocha
49
+ requirement: &70304152290180 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70304152290180
58
+ description: Crayfish - PDF templating for Rails
59
+ email:
60
+ - patrick.hanevold@gmail.com
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - lib/crayfish/action_controller.rb
66
+ - lib/crayfish/action_view.rb
67
+ - lib/crayfish/elements/cell_helper.rb
68
+ - lib/crayfish/elements/container.rb
69
+ - lib/crayfish/elements/form.rb
70
+ - lib/crayfish/elements/row.rb
71
+ - lib/crayfish/elements/table.rb
72
+ - lib/crayfish/rails/base.rb
73
+ - lib/crayfish/rails/pdf.rb
74
+ - lib/crayfish/version.rb
75
+ - lib/crayfish.rb
76
+ - lib/tasks/crayfish_tasks.rake
77
+ - MIT-LICENSE
78
+ - Rakefile
79
+ - README.md
80
+ - test/crayfish_test.rb
81
+ - test/dummy/README.rdoc
82
+ - test/dummy/Rakefile
83
+ - test/dummy/app/assets/javascripts/application.js
84
+ - test/dummy/app/assets/stylesheets/application.css
85
+ - test/dummy/app/controllers/application_controller.rb
86
+ - test/dummy/app/helpers/application_helper.rb
87
+ - test/dummy/app/views/layouts/application.html.erb
88
+ - test/dummy/config/application.rb
89
+ - test/dummy/config/boot.rb
90
+ - test/dummy/config/database.yml
91
+ - test/dummy/config/environment.rb
92
+ - test/dummy/config/environments/development.rb
93
+ - test/dummy/config/environments/production.rb
94
+ - test/dummy/config/environments/test.rb
95
+ - test/dummy/config/initializers/backtrace_silencers.rb
96
+ - test/dummy/config/initializers/inflections.rb
97
+ - test/dummy/config/initializers/mime_types.rb
98
+ - test/dummy/config/initializers/secret_token.rb
99
+ - test/dummy/config/initializers/session_store.rb
100
+ - test/dummy/config/initializers/wrap_parameters.rb
101
+ - test/dummy/config/locales/en.yml
102
+ - test/dummy/config/routes.rb
103
+ - test/dummy/config.ru
104
+ - test/dummy/db/test.sqlite3
105
+ - test/dummy/log/test.log
106
+ - test/dummy/public/404.html
107
+ - test/dummy/public/422.html
108
+ - test/dummy/public/500.html
109
+ - test/dummy/public/favicon.ico
110
+ - test/dummy/script/rails
111
+ - test/test_helper.rb
112
+ homepage: http://github.com/patrickhno
113
+ licenses: []
114
+ post_install_message:
115
+ rdoc_options: []
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ segments:
125
+ - 0
126
+ hash: -589067026738800894
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ segments:
134
+ - 0
135
+ hash: -589067026738800894
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 1.8.15
139
+ signing_key:
140
+ specification_version: 3
141
+ summary: Crayfish - PDF templating for Rails
142
+ test_files:
143
+ - test/crayfish_test.rb
144
+ - test/dummy/README.rdoc
145
+ - test/dummy/Rakefile
146
+ - test/dummy/app/assets/javascripts/application.js
147
+ - test/dummy/app/assets/stylesheets/application.css
148
+ - test/dummy/app/controllers/application_controller.rb
149
+ - test/dummy/app/helpers/application_helper.rb
150
+ - test/dummy/app/views/layouts/application.html.erb
151
+ - test/dummy/config/application.rb
152
+ - test/dummy/config/boot.rb
153
+ - test/dummy/config/database.yml
154
+ - test/dummy/config/environment.rb
155
+ - test/dummy/config/environments/development.rb
156
+ - test/dummy/config/environments/production.rb
157
+ - test/dummy/config/environments/test.rb
158
+ - test/dummy/config/initializers/backtrace_silencers.rb
159
+ - test/dummy/config/initializers/inflections.rb
160
+ - test/dummy/config/initializers/mime_types.rb
161
+ - test/dummy/config/initializers/secret_token.rb
162
+ - test/dummy/config/initializers/session_store.rb
163
+ - test/dummy/config/initializers/wrap_parameters.rb
164
+ - test/dummy/config/locales/en.yml
165
+ - test/dummy/config/routes.rb
166
+ - test/dummy/config.ru
167
+ - test/dummy/db/test.sqlite3
168
+ - test/dummy/log/test.log
169
+ - test/dummy/public/404.html
170
+ - test/dummy/public/422.html
171
+ - test/dummy/public/500.html
172
+ - test/dummy/public/favicon.ico
173
+ - test/dummy/script/rails
174
+ - test/test_helper.rb