ggg
This commit is contained in:
parent
7da4f19e7f
commit
0be07bce40
4
Gemfile
4
Gemfile
|
|
@ -8,7 +8,7 @@ gem 'rails', '~> 5.1.4'
|
||||||
gem 'momentjs-rails', '>= 2.9.0'
|
gem 'momentjs-rails', '>= 2.9.0'
|
||||||
gem 'bootstrap3-datetimepicker-rails', '~> 4.14.30'
|
gem 'bootstrap3-datetimepicker-rails', '~> 4.14.30'
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
|
gem 'cocoon'
|
||||||
gem 'mysql2'
|
gem 'mysql2'
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 3.7'
|
gem 'puma', '~> 3.7'
|
||||||
|
|
@ -36,7 +36,7 @@ gem 'jbuilder', '~> 2.5'
|
||||||
# Use Capistrano for deployment
|
# Use Capistrano for deployment
|
||||||
# gem 'capistrano-rails', group: :development
|
# gem 'capistrano-rails', group: :development
|
||||||
gem 'wicked_pdf'
|
gem 'wicked_pdf'
|
||||||
#gem 'wkhtmltopdf-binary'
|
gem 'wkhtmltopdf-binary'#, '0.9.9'
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
gem 'byebug', platform: :mri
|
gem 'byebug', platform: :mri
|
||||||
|
|
|
||||||
227
Gemfile.lock
227
Gemfile.lock
|
|
@ -1,175 +1,193 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (5.0.0.1)
|
actioncable (5.1.4)
|
||||||
actionpack (= 5.0.0.1)
|
actionpack (= 5.1.4)
|
||||||
nio4r (~> 1.2)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (~> 0.6.1)
|
websocket-driver (~> 0.6.1)
|
||||||
actionmailer (5.0.0.1)
|
actionmailer (5.1.4)
|
||||||
actionpack (= 5.0.0.1)
|
actionpack (= 5.1.4)
|
||||||
actionview (= 5.0.0.1)
|
actionview (= 5.1.4)
|
||||||
activejob (= 5.0.0.1)
|
activejob (= 5.1.4)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (5.0.0.1)
|
actionpack (5.1.4)
|
||||||
actionview (= 5.0.0.1)
|
actionview (= 5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
rack-test (~> 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
actionview (5.0.0.1)
|
actionview (5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubis (~> 2.7.0)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||||
activejob (5.0.0.1)
|
activejob (5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (5.0.0.1)
|
activemodel (5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
activerecord (5.0.0.1)
|
activerecord (5.1.4)
|
||||||
activemodel (= 5.0.0.1)
|
activemodel (= 5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
arel (~> 7.0)
|
arel (~> 8.0)
|
||||||
activesupport (5.0.0.1)
|
activesupport (5.1.4)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (7.1.2)
|
arel (8.0.0)
|
||||||
|
bcrypt (3.1.11)
|
||||||
bcrypt (3.1.11-x64-mingw32)
|
bcrypt (3.1.11-x64-mingw32)
|
||||||
bcrypt (3.1.11-x86-mingw32)
|
bcrypt (3.1.11-x86-mingw32)
|
||||||
|
bindex (0.5.0)
|
||||||
bootstrap3-datetimepicker-rails (4.14.30)
|
bootstrap3-datetimepicker-rails (4.14.30)
|
||||||
momentjs-rails (>= 2.8.1)
|
momentjs-rails (>= 2.8.1)
|
||||||
builder (3.2.2)
|
builder (3.2.3)
|
||||||
coffee-rails (4.2.1)
|
byebug (9.1.0)
|
||||||
|
cocoon (1.2.11)
|
||||||
|
coffee-rails (4.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (>= 4.0.0, < 5.2.x)
|
railties (>= 4.0.0)
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.8.0)
|
coffee-script-source (1.8.0)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.5)
|
||||||
debug_inspector (0.0.2)
|
crass (1.0.3)
|
||||||
devise (4.2.0)
|
devise (4.3.0)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 4.1.0, < 5.1)
|
railties (>= 4.1.0, < 5.2)
|
||||||
responders
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
erubis (2.7.0)
|
erubi (1.7.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
globalid (0.3.7)
|
ffi (1.9.18)
|
||||||
activesupport (>= 4.1.0)
|
ffi (1.9.18-x64-mingw32)
|
||||||
i18n (0.7.0)
|
ffi (1.9.18-x86-mingw32)
|
||||||
jbuilder (2.6.0)
|
globalid (0.4.1)
|
||||||
activesupport (>= 3.0.0, < 5.1)
|
activesupport (>= 4.2.0)
|
||||||
multi_json (~> 1.2)
|
i18n (0.9.1)
|
||||||
jquery-rails (4.2.1)
|
concurrent-ruby (~> 1.0)
|
||||||
|
jbuilder (2.7.0)
|
||||||
|
activesupport (>= 4.2.0)
|
||||||
|
multi_json (>= 1.2)
|
||||||
|
jquery-rails (4.3.1)
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
loofah (2.0.3)
|
loofah (2.1.1)
|
||||||
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.6.4)
|
mail (2.7.0)
|
||||||
mime-types (>= 1.16, < 4)
|
mini_mime (>= 0.1.1)
|
||||||
method_source (0.8.2)
|
method_source (0.9.0)
|
||||||
mime-types (3.1)
|
mini_mime (1.0.0)
|
||||||
mime-types-data (~> 3.2015)
|
mini_portile2 (2.3.0)
|
||||||
mime-types-data (3.2016.0521)
|
minitest (5.10.3)
|
||||||
mini_portile2 (2.1.0)
|
momentjs-rails (2.17.1)
|
||||||
minitest (5.9.1)
|
|
||||||
momentjs-rails (2.15.1)
|
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
multi_json (1.12.1)
|
multi_json (1.12.2)
|
||||||
mysql2 (0.4.4-x64-mingw32)
|
mysql2 (0.4.10)
|
||||||
mysql2 (0.4.4-x86-mingw32)
|
mysql2 (0.4.10-x64-mingw32)
|
||||||
nio4r (1.2.1)
|
mysql2 (0.4.10-x86-mingw32)
|
||||||
nokogiri (1.6.8-x64-mingw32)
|
nio4r (2.1.0)
|
||||||
mini_portile2 (~> 2.1.0)
|
nokogiri (1.8.1)
|
||||||
pkg-config (~> 1.1.7)
|
mini_portile2 (~> 2.3.0)
|
||||||
nokogiri (1.6.8-x86-mingw32)
|
nokogiri (1.8.1-x64-mingw32)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
pkg-config (~> 1.1.7)
|
nokogiri (1.8.1-x86-mingw32)
|
||||||
|
mini_portile2 (~> 2.3.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
pkg-config (1.1.7)
|
puma (3.11.0)
|
||||||
puma (3.6.0)
|
rack (2.0.3)
|
||||||
rack (2.0.1)
|
rack-test (0.8.2)
|
||||||
rack-test (0.6.3)
|
rack (>= 1.0, < 3)
|
||||||
rack (>= 1.0)
|
rails (5.1.4)
|
||||||
rails (5.0.0.1)
|
actioncable (= 5.1.4)
|
||||||
actioncable (= 5.0.0.1)
|
actionmailer (= 5.1.4)
|
||||||
actionmailer (= 5.0.0.1)
|
actionpack (= 5.1.4)
|
||||||
actionpack (= 5.0.0.1)
|
actionview (= 5.1.4)
|
||||||
actionview (= 5.0.0.1)
|
activejob (= 5.1.4)
|
||||||
activejob (= 5.0.0.1)
|
activemodel (= 5.1.4)
|
||||||
activemodel (= 5.0.0.1)
|
activerecord (= 5.1.4)
|
||||||
activerecord (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
bundler (>= 1.3.0)
|
||||||
bundler (>= 1.3.0, < 2.0)
|
railties (= 5.1.4)
|
||||||
railties (= 5.0.0.1)
|
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-dom-testing (2.0.1)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0, < 6.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.0.3)
|
rails-html-sanitizer (1.0.3)
|
||||||
loofah (~> 2.0)
|
loofah (~> 2.0)
|
||||||
railties (5.0.0.1)
|
railties (5.1.4)
|
||||||
actionpack (= 5.0.0.1)
|
actionpack (= 5.1.4)
|
||||||
activesupport (= 5.0.0.1)
|
activesupport (= 5.1.4)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (11.3.0)
|
rake (12.3.0)
|
||||||
responders (2.3.0)
|
rb-fsevent (0.10.2)
|
||||||
railties (>= 4.2.0, < 5.1)
|
rb-inotify (0.9.10)
|
||||||
sass (3.4.22)
|
ffi (>= 0.5.0, < 2)
|
||||||
sass-rails (5.0.6)
|
responders (2.4.0)
|
||||||
|
actionpack (>= 4.2.0, < 5.3)
|
||||||
|
railties (>= 4.2.0, < 5.3)
|
||||||
|
sass (3.5.3)
|
||||||
|
sass-listen (~> 4.0.0)
|
||||||
|
sass-listen (4.0.0)
|
||||||
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
sass-rails (5.0.7)
|
||||||
railties (>= 4.0.0, < 6)
|
railties (>= 4.0.0, < 6)
|
||||||
sass (~> 3.1)
|
sass (~> 3.1)
|
||||||
sprockets (>= 2.8, < 4.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
sprockets-rails (>= 2.0, < 4.0)
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
tilt (>= 1.1, < 3)
|
tilt (>= 1.1, < 3)
|
||||||
sprockets (3.7.0)
|
sprockets (3.7.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
sprockets-rails (3.2.0)
|
sprockets-rails (3.2.1)
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
thor (0.19.1)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.5)
|
tilt (2.0.8)
|
||||||
turbolinks (5.0.1)
|
turbolinks (5.0.1)
|
||||||
turbolinks-source (~> 5)
|
turbolinks-source (~> 5)
|
||||||
turbolinks-source (5.0.0)
|
turbolinks-source (5.0.3)
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.4)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
tzinfo-data (1.2016.7)
|
tzinfo-data (1.2017.3)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
uglifier (3.0.2)
|
uglifier (4.0.1)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
warden (1.2.6)
|
warden (1.2.7)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
web-console (3.3.1)
|
web-console (3.5.1)
|
||||||
actionview (>= 5.0)
|
actionview (>= 5.0)
|
||||||
activemodel (>= 5.0)
|
activemodel (>= 5.0)
|
||||||
debug_inspector
|
bindex (>= 0.4.0)
|
||||||
railties (>= 5.0)
|
railties (>= 5.0)
|
||||||
websocket-driver (0.6.4)
|
websocket-driver (0.6.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.2)
|
websocket-extensions (0.1.3)
|
||||||
wicked_pdf (1.1.0)
|
wicked_pdf (1.1.0)
|
||||||
|
wkhtmltopdf-binary (0.12.3.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
ruby
|
||||||
x64-mingw32
|
x64-mingw32
|
||||||
x86-mingw32
|
x86-mingw32
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootstrap3-datetimepicker-rails (~> 4.14.30)
|
bootstrap3-datetimepicker-rails (~> 4.14.30)
|
||||||
byebug
|
byebug
|
||||||
|
cocoon
|
||||||
coffee-rails (~> 4.2)
|
coffee-rails (~> 4.2)
|
||||||
coffee-script-source (= 1.8.0)
|
coffee-script-source (= 1.8.0)
|
||||||
devise
|
devise
|
||||||
|
|
@ -177,14 +195,15 @@ DEPENDENCIES
|
||||||
jquery-rails
|
jquery-rails
|
||||||
momentjs-rails (>= 2.9.0)
|
momentjs-rails (>= 2.9.0)
|
||||||
mysql2
|
mysql2
|
||||||
puma (~> 3.0)
|
puma (~> 3.7)
|
||||||
rails (~> 5.0.0, >= 5.0.0.1)
|
rails (~> 5.1.4)
|
||||||
sass-rails (~> 5.0)
|
sass-rails (~> 5.0)
|
||||||
turbolinks (~> 5)
|
turbolinks (~> 5)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
web-console
|
web-console
|
||||||
wicked_pdf
|
wicked_pdf
|
||||||
|
wkhtmltopdf-binary
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.13.2
|
1.16.0
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,12 @@ class InvoicesController < ApplicationController
|
||||||
layout: 'pdf',
|
layout: 'pdf',
|
||||||
encoding: 'UTF-8',
|
encoding: 'UTF-8',
|
||||||
page_size: 'A4',
|
page_size: 'A4',
|
||||||
|
print_media_type: true,
|
||||||
margin: { top: 8, # default 10 (mm)
|
margin: { top: 8, # default 10 (mm)
|
||||||
bottom: 8,
|
bottom: 8,
|
||||||
left: 8,
|
left: 8,
|
||||||
right: 8 },
|
right: 8 },
|
||||||
viewport_size: '1280x1024'
|
viewport_size: '1336x1024'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,12 @@
|
||||||
WickedPdf.config = {
|
WickedPdf.config = {
|
||||||
# Path to the wkhtmltopdf executable: This usually isn't needed if using
|
# Path to the wkhtmltopdf executable: This usually isn't needed if using
|
||||||
# one of the wkhtmltopdf-binary family of gems.
|
# one of the wkhtmltopdf-binary family of gems.
|
||||||
exe_path: 'c:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe',
|
# exe_path: 'c:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe',
|
||||||
# exe_path: '/usr/local/rvm/gems/ruby-2.2.5/gems/wkhtmltopdf-binary-0.9.9/bin/wkhtmltopdf_linux_x64'
|
# exe_path: '/usr/local/rvm/gems/ruby-2.4.1/gems/wkhtmltopdf-binary-0.12.3.1/bin/wkhtmltopdf_linux_x86',
|
||||||
|
# exe_path: '/usr/local/rvm/gems/ruby-2.4.1/gems/wkhtmltopdf-binary-0.9.9/bin/',
|
||||||
|
exe_path: '/usr/bin/wkhtmltopdf',
|
||||||
# or
|
# or
|
||||||
#exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf')
|
# exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf'),
|
||||||
|
|
||||||
# Layout file to be used for all PDFs
|
# Layout file to be used for all PDFs
|
||||||
# (but can be overridden in `render :pdf` calls)
|
# (but can be overridden in `render :pdf` calls)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue