
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Use google-api-ruby-client and Google Drive to convert files from one mime-type to another. For available formats see Google Drive API Export Formats.
Simply add it to your Gemfile:
gem 'file-convert'
FileConvert
exposes .configure
which accepts a block and passes the config hash.
Example:
FileConvert.configure do |config|
config['google_service_account'] = {
'email' => '<strange-hash>@developer.gserviceaccount.com',
'pkcs12_file_path' => 'config/file_convert_key.p12'
}
end
# converts `path_to_some_file` from <txt> to <pdf>
conversion = FileConvert.convert('path_to_some_file.txt', 'text/plain', 'application/pdf')
# converted body is accessible via `#body`
conversion.body
# .. or define a path to save the converted document to
conversion.save('path_to_new_file.pdf')
$ bundle exec rake
for rspec
and rubocop
.$ bundle exec rake build
to also run the integration
tests located at spec/integration/**/*_integration.rb
.
Note that you need to configure valid Google API credentials (i.e. set ENV['email']
and ENV['pkcspath']
) for these tests to work, since we want to actually test the integration with the Google API here. (Do not worry, TravisCI will run these tests as well.)In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using the ways described above.
file-convert is Copyright © 2014 Roman Ernst and tolingo GmbH and may be redistributed under the terms specified in the LICENSE file.
FAQs
Unknown package
We found that file-convert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.