Top Level Namespace
Defined Under Namespace
Modules: WkhtmltopdfInstaller
Instance Method Summary collapse
- #makefile_dir ⇒ Object
-
#package_url ⇒ Object
Some examples: “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-linux_amd64.deb” “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-linux_i386.deb” “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-macos_cocoa.pkg”.
- #probe ⇒ Object
- #version ⇒ Object
Instance Method Details
#makefile_dir ⇒ Object
23 24 25 |
# File 'ext/extconf.rb', line 23 def makefile_dir File.dirname(__FILE__) end |
#package_url ⇒ Object
Some examples: “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-linux_amd64.deb” “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-linux_i386.deb” “github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/0.12.5.2/wkhtmltox-0.12.5.2-macos_cocoa.pkg”
32 33 34 |
# File 'ext/extconf.rb', line 32 def package_url "https://github.com/vovayartsev/wkhtmltopdf-installer-ruby/releases/download/#{version}/wkhtmltox-#{version}-#{probe.platform}.#{probe.ext}" end |
#probe ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'ext/extconf.rb', line 6 def probe @probe ||= case RUBY_PLATFORM when /x86_64-darwin.*/ OpenStruct.new(script: 'macos', platform: 'macos_cocoa', ext: 'pkg') when /x86_64-linux/ OpenStruct.new(script: 'linux', platform: 'linux_amd64', ext: 'deb') when /i[3456]86-linux/ OpenStruct.new(script: 'linux', platform: 'linux_i386', ext: 'deb') else raise NotImplementedError "Unsupported ruby platform #{RUBY_PLATFORM}" end end |
#version ⇒ Object
19 20 21 |
# File 'ext/extconf.rb', line 19 def version WkhtmltopdfInstaller::GEM_VERSION end |