prawnto_2 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +1 -1
- data/README.rdoc +14 -15
- data/Rakefile +1 -8
- data/lib/prawnto.rb +1 -0
- data/lib/prawnto/compile_support.rb +1 -1
- metadata +44 -179
- data/.gitignore +0 -8
- data/.travis.yml +0 -5
- data/Appraisals +0 -7
- data/Gemfile +0 -13
- data/Guardfile +0 -15
- data/prawnto.gemspec +0 -22
- data/rails/init.rb +0 -1
- data/script/rails +0 -6
- data/spec/assets/1.8/default_render-0.12.0.pdf +0 -83
- data/spec/assets/1.8/default_render-0.6.3.pdf +0 -83
- data/spec/assets/1.8/dsl_render-0.12.0.pdf +0 -83
- data/spec/assets/1.8/dsl_render-0.6.3.pdf +0 -85
- data/spec/assets/1.8/partial_render-0.12.0.pdf +0 -83
- data/spec/assets/1.8/partial_render-0.6.3.pdf +0 -85
- data/spec/assets/1.8/yield_block_in_helper_test-0.12.0.pdf +0 -76
- data/spec/assets/1.8/yield_block_in_helper_test-0.6.3.pdf +0 -78
- data/spec/assets/1.9/default_render-0.12.0.pdf +0 -83
- data/spec/assets/1.9/default_render-0.6.3.pdf +0 -85
- data/spec/assets/1.9/dsl_render-0.12.0.pdf +0 -83
- data/spec/assets/1.9/dsl_render-0.6.3.pdf +0 -85
- data/spec/assets/1.9/partial_render-0.12.0.pdf +0 -83
- data/spec/assets/1.9/partial_render-0.6.3.pdf +0 -85
- data/spec/assets/1.9/yield_block_in_helper_test-0.12.0.pdf +0 -76
- data/spec/assets/1.9/yield_block_in_helper_test-0.6.3.pdf +0 -78
- data/spec/dummy/.rspec +0 -1
- data/spec/dummy/.sass-cache/387f7b3fde13680ae5a79212c089f81d2d418f1e/application.css.scssc +0 -0
- data/spec/dummy/.sass-cache/6a18c557e07dbc07a14d0809be02d4f21f1dbe91/_shared.css.scssc +0 -0
- data/spec/dummy/.sass-cache/6a18c557e07dbc07a14d0809be02d4f21f1dbe91/ab_tests.css.scssc +0 -0
- data/spec/dummy/.sass-cache/6a18c557e07dbc07a14d0809be02d4f21f1dbe91/application.css.scssc +0 -0
- data/spec/dummy/.sass-cache/6a18c557e07dbc07a14d0809be02d4f21f1dbe91/metrics.css.scssc +0 -0
- data/spec/dummy/.sass-cache/6a18c557e07dbc07a14d0809be02d4f21f1dbe91/reports.css.scssc +0 -0
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -10
- data/spec/dummy/app/assets/javascripts/highcharts.js +0 -170
- data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -78
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/controllers/test_controller.rb +0 -32
- data/spec/dummy/app/helpers/application_helper.rb +0 -18
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/mailers/pdf_emailer.rb +0 -14
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/super_model.rb +0 -8
- data/spec/dummy/app/views/layouts/application.html.erb +0 -23
- data/spec/dummy/app/views/pdf_emailer/email_with_attachment.text.erb +0 -1
- data/spec/dummy/app/views/test/_simple_partial.pdf.prawn +0 -1
- data/spec/dummy/app/views/test/default_render.pdf.prawn +0 -3
- data/spec/dummy/app/views/test/dsl_render.pdf.prawn +0 -3
- data/spec/dummy/app/views/test/instance_var_test.pdf.prawn +0 -15
- data/spec/dummy/app/views/test/partial_render.pdf.prawn +0 -3
- data/spec/dummy/app/views/test/yield_block_in_helper_test.pdf.prawn +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -49
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -30
- data/spec/dummy/config/environments/production.rb +0 -60
- data/spec/dummy/config/environments/test.rb +0 -39
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -10
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -8
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -26
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/index.html +0 -13
- data/spec/dummy/script/delayed_job +0 -5
- data/spec/dummy/script/rails +0 -6
- data/spec/integrations/pdf_emailer_spec.rb +0 -21
- data/spec/integrations/super_model_spec.rb +0 -16
- data/spec/integrations/test_controller_spec.rb +0 -60
- data/spec/spec_helper.rb +0 -33
- data/spec/units/action_controller_mixin_spec.rb +0 -48
- data/spec/units/compile_support_spec.rb +0 -50
- data/spec/units/template_handlers/partials_spec.rb +0 -68
- data/spec/units/template_handlers/renderer_spec.rb +0 -4
@@ -1,78 +0,0 @@
|
|
1
|
-
html, body {
|
2
|
-
background-color: #4B7399;
|
3
|
-
font-family: Verdana, Helvetica, Arial;
|
4
|
-
font-size: 14px;
|
5
|
-
}
|
6
|
-
|
7
|
-
#container {
|
8
|
-
width: 75%;
|
9
|
-
margin: 0 auto;
|
10
|
-
background-color: #FFF;
|
11
|
-
padding: 20px 40px;
|
12
|
-
border: solid 1px black;
|
13
|
-
margin-top: 20px;
|
14
|
-
}
|
15
|
-
|
16
|
-
#flash_notice, #flash_error, #flash_alert {
|
17
|
-
padding: 5px 8px;
|
18
|
-
margin: 10px 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
#flash_notice {
|
22
|
-
background-color: #CFC;
|
23
|
-
border: solid 1px #6C6;
|
24
|
-
}
|
25
|
-
|
26
|
-
#flash_error, #flash_alert {
|
27
|
-
background-color: #FCC;
|
28
|
-
border: solid 1px #C66;
|
29
|
-
}
|
30
|
-
|
31
|
-
p, ol, ul, td {
|
32
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
33
|
-
font-size: 13px;
|
34
|
-
line-height: 18px; }
|
35
|
-
|
36
|
-
pre {
|
37
|
-
background-color: #eee;
|
38
|
-
padding: 10px;
|
39
|
-
font-size: 11px; }
|
40
|
-
|
41
|
-
a {
|
42
|
-
color: #000;
|
43
|
-
&:visited {
|
44
|
-
color: #666; }
|
45
|
-
&:hover {
|
46
|
-
color: #fff;
|
47
|
-
background-color: #000; } }
|
48
|
-
|
49
|
-
div {
|
50
|
-
&.field, &.actions {
|
51
|
-
margin-bottom: 10px; } }
|
52
|
-
|
53
|
-
#notice { color: green; }
|
54
|
-
|
55
|
-
form .field_with_errors { display:inline;
|
56
|
-
label { color:red; }
|
57
|
-
input { color:red; border-color:red;}
|
58
|
-
}
|
59
|
-
|
60
|
-
#error_explanation {
|
61
|
-
width: 450px;
|
62
|
-
border: 2px solid red;
|
63
|
-
padding: 7px;
|
64
|
-
padding-bottom: 0;
|
65
|
-
margin-bottom: 20px;
|
66
|
-
background-color: #f0f0f0;
|
67
|
-
h2 {
|
68
|
-
text-align: left;
|
69
|
-
font-weight: bold;
|
70
|
-
padding: 5px 5px 5px 15px;
|
71
|
-
font-size: 12px;
|
72
|
-
margin: -7px;
|
73
|
-
margin-bottom: 0px;
|
74
|
-
background-color: #c00;
|
75
|
-
color: #fff; }
|
76
|
-
ul li {
|
77
|
-
font-size: 12px;
|
78
|
-
list-style: square; } }
|
@@ -1,32 +0,0 @@
|
|
1
|
-
class TestController < ApplicationController
|
2
|
-
|
3
|
-
def default_render
|
4
|
-
@x = 1
|
5
|
-
render :action => "default_render"
|
6
|
-
end
|
7
|
-
|
8
|
-
def dsl_render
|
9
|
-
@x = 1
|
10
|
-
render :action => "dsl_render"
|
11
|
-
end
|
12
|
-
|
13
|
-
def instance_var_test
|
14
|
-
@x = 1
|
15
|
-
render :action => "instance_var_test"
|
16
|
-
end
|
17
|
-
|
18
|
-
def yield_block_in_helper_test
|
19
|
-
render :action => "yield_block_in_helper_test"
|
20
|
-
end
|
21
|
-
|
22
|
-
def partial_render
|
23
|
-
@x = 1
|
24
|
-
render :action => "partial_render"
|
25
|
-
end
|
26
|
-
|
27
|
-
def filename_test
|
28
|
-
prawnto :filename => "fancy_name.pdf", :inline => false
|
29
|
-
render :action => "default_render"
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
File without changes
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class PdfEmailer < ActionMailer::Base
|
2
|
-
helper :application
|
3
|
-
default :from => "from@example.com"
|
4
|
-
|
5
|
-
def email_with_attachment
|
6
|
-
@x = 1
|
7
|
-
|
8
|
-
attachments["hello_world.pdf"] = render("test/default_render", :format => :pdf)
|
9
|
-
mail :subject => "Hello", :to => "test@test.com" do |format|
|
10
|
-
format.text
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
File without changes
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Dummy</title>
|
5
|
-
<%= stylesheet_link_tag "application" %>
|
6
|
-
<%= javascript_include_tag "application" %>
|
7
|
-
|
8
|
-
<%= yield :extra_scripts_and_styles %>
|
9
|
-
|
10
|
-
<%= csrf_meta_tags %>
|
11
|
-
</head>
|
12
|
-
<body>
|
13
|
-
|
14
|
-
<div id="container">
|
15
|
-
<% flash.each do |name, msg| %>
|
16
|
-
<%= content_tag :div, msg, :id => "flash_#{name}", :class => "flash clearfix hide_for_print" %>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<%= yield %>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
Please see attached PDF
|
@@ -1 +0,0 @@
|
|
1
|
-
text "inside partial"
|
data/spec/dummy/config.ru
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require "action_controller/railtie"
|
4
|
-
require "action_mailer/railtie"
|
5
|
-
require "active_resource/railtie"
|
6
|
-
require "rails/test_unit/railtie"
|
7
|
-
require "sprockets/railtie"
|
8
|
-
|
9
|
-
Bundler.require
|
10
|
-
require "prawnto"
|
11
|
-
|
12
|
-
module Dummy
|
13
|
-
class Application < Rails::Application
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
|
18
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
-
|
21
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
-
|
25
|
-
# Activate observers that should always be running.
|
26
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
-
|
28
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
31
|
-
|
32
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
|
-
# config.i18n.default_locale = :de
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
|
42
|
-
# Enable the asset pipeline
|
43
|
-
config.assets.enabled = true
|
44
|
-
|
45
|
-
# Version of your assets, change this if you want to expire all your assets
|
46
|
-
config.assets.version = '1.0'
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
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.consider_all_requests_local = 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
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
|
-
# Do not compress assets
|
26
|
-
config.assets.compress = false
|
27
|
-
|
28
|
-
# Expands the lines which load the assets
|
29
|
-
config.assets.debug = true
|
30
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# Code is not reloaded between requests
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Full error reports are disabled and caching is turned on
|
8
|
-
config.consider_all_requests_local = false
|
9
|
-
config.action_controller.perform_caching = true
|
10
|
-
|
11
|
-
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
-
config.serve_static_assets = false
|
13
|
-
|
14
|
-
# Compress JavaScripts and CSS
|
15
|
-
config.assets.compress = true
|
16
|
-
|
17
|
-
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
-
config.assets.compile = false
|
19
|
-
|
20
|
-
# Generate digests for assets URLs
|
21
|
-
config.assets.digest = true
|
22
|
-
|
23
|
-
# Defaults to Rails.root.join("public/assets")
|
24
|
-
# config.assets.manifest = YOUR_PATH
|
25
|
-
|
26
|
-
# Specifies the header that your server uses for sending files
|
27
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
-
|
30
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
-
# config.force_ssl = true
|
32
|
-
|
33
|
-
# See everything in the log (default is :info)
|
34
|
-
# config.log_level = :debug
|
35
|
-
|
36
|
-
# Use a different logger for distributed setups
|
37
|
-
# config.logger = SyslogLogger.new
|
38
|
-
|
39
|
-
# Use a different cache store in production
|
40
|
-
# config.cache_store = :mem_cache_store
|
41
|
-
|
42
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
43
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
44
|
-
|
45
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
46
|
-
# config.assets.precompile += %w( search.js )
|
47
|
-
|
48
|
-
# Disable delivery errors, bad email addresses will be ignored
|
49
|
-
# config.action_mailer.raise_delivery_errors = false
|
50
|
-
|
51
|
-
# Enable threaded mode
|
52
|
-
# config.threadsafe!
|
53
|
-
|
54
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
55
|
-
# the I18n.default_locale when a translation can not be found)
|
56
|
-
config.i18n.fallbacks = true
|
57
|
-
|
58
|
-
# Send deprecation notices to registered listeners
|
59
|
-
config.active_support.deprecation = :notify
|
60
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
Dummy::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
|
-
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.serve_static_assets = true
|
12
|
-
config.static_cache_control = "public, max-age=3600"
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
18
|
-
config.consider_all_requests_local = true
|
19
|
-
config.action_controller.perform_caching = false
|
20
|
-
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
22
|
-
config.action_dispatch.show_exceptions = false
|
23
|
-
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection = false
|
26
|
-
|
27
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
-
# The :test delivery method accumulates sent emails in the
|
29
|
-
# ActionMailer::Base.deliveries array.
|
30
|
-
config.action_mailer.delivery_method = :test
|
31
|
-
|
32
|
-
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
33
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
34
|
-
# like if you have constraints or database-specific column types
|
35
|
-
# config.active_record.schema_format = :sql
|
36
|
-
|
37
|
-
# Print deprecation notices to the stderr
|
38
|
-
config.active_support.deprecation = :stderr
|
39
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|