Description
Bundler plugin for auto-downloading extra gem files (e.g. large file downloads) specified in Downloadfile after bundle install.
bundler-download alternatives and similar gems
Based on the "Database Tools" category.
Alternatively, view bundler-download alternatives based on common mentions on social networks and blogs.
-
Database Cleaner
Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing. -
Lol DBA
lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts. -
Seed Fu
Advanced seed data handling for Rails, combining the best practices of several methods together. -
Seedbank
Seedbank gives your seed data a little structure. Create seeds for each environment, share seeds between environments and specify dependencies to load your seeds in order. All nicely integrated with simple rake tasks. -
DatabaseConsistency
The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models. -
Polo
Polo travels through your database and creates sample snapshots so you can work with real world data in development. -
SchemaPlus
DISCONTINUED. SchemaPlus provides a collection of enhancements and extensions to ActiveRecord -
Upsert
Upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates functions (UDF) for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE. -
OnlineMigrations
Catch unsafe PostgreSQL migrations in development and run them easier in production (code helpers for table/column renaming, changing column type, adding columns with default, background migrations, etc). -
Ruby PG Extras
Ruby PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more. -
Slack Smart Bot
Create a Slack bot that is smart and so easy to expand, create new bots on demand, run ruby code on chat, create shortcuts... The main scope of this gem is to be used internally in the company so teams can create team channels with their own bot to help them on their daily work, almost everything is suitable to be automated!! slack-smart-bot can create bots on demand, create shortcuts, run ruby code... just on a chat channel. You can access it just from your mobile phone if you want and run those tests you forgot to run, get the results, restart a server... no limits. -
PgDriveBackup
Simple solution to make encrypted with ccrypt PostgreSQL backups and storing on Google Drive API -
Perfect Shape
Perfect Shape is a collection of geometric algorithms that are mostly useful for GUI manipulation like checking containment of a point in popular geometric shapes such as rectangle, square, arc, circle, polygon, and paths containing lines, quadratic bézier curves, and cubic bezier curves. Also, some general math algorithms like IEEE-754 Remainder. -
ActiveRecord Setops
Union, Intersect, and Difference set operations for ActiveRecord (also, SQL's UnionAll). -
Rapidity
Simple but fast Redis-backed distributed rate limiter. Allows you to specify time interval and count within to limit distributed operations. -
PRY-BYETYPO 👋
A Pry plugin that captures exceptions that may arise from typos and deduces the correct command.
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of bundler-download or a related project?
README
bundler-download - Bundler Plugin - v1.3.0
Bundler plugin for auto-downloading extra gem files (e.g. large file downloads) specified in Downloadfile
after bundle install
Background
The RubyGem ecosystem, famous for gems like Rails for web development, Devise for authentication, and Pundit for authorization, enables productivity via code reuse. As such, it is great for quickly adding libraries to your project to automate part of the work or reuse other people's solutions to solved problems.
That said, you would not want to package extremely large files, like the OpenAI GPT-3 175 billion parameter models, in a RubyGem.
Enter bundler-download, a Bundler Plugin that enables downloading extra gem files after installing with bundle install
by declaring gem downloads in a Downloadfile
How It Works
Gems can add a Downloadfile
at the root to declare the need for extra downloads upon install by Bundler.
Apps can add those gems to Bundler Gemfile
the standard way in addition to installing the bundler-download Bundler plugin. Afterwards, when running bundle install
, bundle-download will automatically download extra files at the end.
If a Ruby Gem needs to depend on one of those gems, it can declare as a standard dependency in .gemspec
Gem Instructions
Add bundler-download as a standard .gemspec dependency:
s.add_dependency('bundler-download', ["~> 1.3"])
Afterwards, ensure there is a Downloadfile
at the root directory of the gem, including in .gemspec files
:
s.files = [
# ...
"Downloadfile",
# ...
]
Finally, follow one of two options for having applications obtain downloads:
- Advertise that apps must install
bundler-download
as a Bundler plugin as per the App Bundler Plugin Instructions below. - Use the API to automatically trigger downloads on first use of your gem features.
Downloadfile
A gem Downloadfile
contains download
links for files that need to be downloaded relative to the gem directory after bundle install
.
Downloadfile entries follow this format (keyword args are optional):
download url, to: gem_subdirectory, os: os
Example Downloadfile
:
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.202005172227.jar' # downloads into gem root directory
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar',
to: 'cef' # downloads into 'cef' directory under the gem installation directory
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.win32.win32.x86_64_0.4.0.202005172227.jar',
to: 'cef/windows', os: 'windows' # downloads into 'cef/windows' directory under the gem installation directory in Windows OS only
The keyword download
declares a file to download and takes the following arguments:
- Download URL string
to:
keyword arg: mentions a local download path relative to the gem installation directory (e.g. 'vendor' or 'lib/ai/data'). It automatically creates the path with all its subdirectories if it does not already exist. If left empty, then the file is downloaded to the gem directory root path.os:
keyword arg (value:mac
/windows
/linux
): limits the operating system under which the download is made. It isnil
by default, allowing the download to occur in all operating systems.
App Bundler Plugin Instructions
In plugin mode, all gems declared in Gemfile are inspected for presence of Downloadfile regardless of what group they belong to.
An app can depend on a gem that has a Downloadfile
by adding the bundler-download
plugin first (or manually installing via bundle plugin install bundler-download
) and then including the gem in Gemfile
like it normally would:
plugin 'bundler-download'
gem 'some_gem_with_downloadfile'
Afterwards, run:
bundle install
(run one extra time if you don't have the bundler-download
plugin installed yet since the first run would just install the plugin and subsequent runs would activate it)
You should see something like this:
$ bundle
Using array_include_methods 1.0.2
Using bundler 2.1.4
Using download 1.1.0
Using mime-types-data 3.2020.0512
Using mime-types 3.3.1
Using multi_xml 0.6.0
Using httparty 0.18.1
Using strings-ansi 0.1.0
Using tty-cursor 0.7.1
Using tty-screen 0.8.1
Using unicode-display_width 1.7.0
Using tty-progressbar 0.17.0
Using bundler-download 1.3.0
Using facets 3.1.0
Using glimmer 1.0.0
bundle-download plugin gem-after-install-all hook:
Processing /Users/User/.rvm/gems/ruby-2.7.1@tmp/gems/glimmer-1.0.0/Downloadfile
Download URL: https://equo-chromium-cef.ams3.digitaloceanspaces.com/rls/repository/plugins/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.202005172227.jar
Download size: 57742279
Download path: /Users/User/.rvm/gems/ruby-2.7.1@tmp/gems/glimmer-1.0.0/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.202005172227.jar
Downloading 100% ( 0s ) [========================================================]
Download URL: https://equo-chromium-cef.ams3.digitaloceanspaces.com/rls/repository/plugins/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar
Download size: 54070695
Download path: /Users/User/.rvm/gems/ruby-2.7.1@tmp/gems/glimmer-1.0.0/cef/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar
Downloading 26% ( 59s ) [============== ]
After the initial download of files, running bundle install
again will keep existing downloads without overwriting them unless you use the bundle-download
command to manually redownload files again.
Bundler Download Command
If you would like to redownload files for all gems again, overwriting existing downloads, simply run:
bundle download
Options
--keep-existing
If you only want to download files if they did not exist already, you could run:
bundle download --keep-existing
Example printout:
Downloading /Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/Downloadfile
Download '/Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/vendor/jars/mac/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar' already exists! (run `bundle download` to redownload)
--all-operating-systems
If you want to download files for all operating systems (including ones other than the current platform), you could run:
bundle download --all-operating-systems
Subcommands
help (alias: usage)
Run the help
subcommand (or usage) to bring up usage instructions:
bundle download help
Prints:
== bundler-download - Bundler Plugin - v1.3.0 ==
Commands/Subcommands/Options:
bundle download help # Provide help by printing usage instructions
bundle download usage # (alias for help)
bundle download start # Start downloads for current operating system
bundle download # (alias for start)
bundle download --all-operating-systems # Download files for all operating systems
bundle download --keep-existing # Do not redownload already downloaded files
bundle download clear # Clear downloads by deleting them under all gems
bundle download clean # (alias for clear)
bundle download list # List downloads by printing Downloadfile content for all gems
bundle download show # Show downloaded files for all gems
clear (alias: clean)
Run the clear
subcommand to clear downloads by deleting them under all gems:
bundle download clear
Example printout:
Clearing /Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/Downloadfile
list
Run the list
subcommand to list downloads by printing Downloadfile content for all gems:
bundle download list
Example printout:
Listing /Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/Downloadfile
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.gtk.linux.x86_64_0.4.0.202005172227.jar',
to: 'vendor/jars/linux', os: 'linux'
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar',
to: 'vendor/jars/mac', os: 'mac'
download 'http://dl.maketechnology.io/chromium-cef/rls/repository/plugins/com.make.chromium.cef.win32.win32.x86_64_0.4.0.202005172227.jar',
to: 'vendor/jars/windows', os: 'windows'
show
Run the show
subcommand to show downloaded files for all gems:
bundle download show
Example printout:
Showing downloaded files for /Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/Downloadfile
54070695 /Users/User/.rvm/gems/ruby-2.7.1@bundler-download/gems/glimmer-cw-browser-chromium-1.0.0/vendor/jars/mac/com.make.chromium.cef.cocoa.macosx.x86_64_0.4.0.202005172227.jar
API
In API mode, only gems belonging to the default group in Gemfile are inspected for presence of Downloadfile by default. An app may change that though by loading other Bundler groups (e.g. Bundler.setup(:default, :developemnt)
)
Apps may choose to integrate with the bundler-download gem directly to trigger downloads instead of relying on the plugin. This can be useful when wanting to trigger downloads only on first use while staying transparent should the gem features not be used.
To do so, simply include this Ruby code to trigger downloads:
require 'bundler-download'
Bundler::Download.new.exec('download', [])
You can also use the --keep-existing
option to avoid redownload if files were there already:
require 'bundler-download'
Bundler::Download.new.exec('download', ['--keep-existing'])
Contributing to bundler-download
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
- Fork the project.
- Start a feature/bugfix branch.
- Commit and push until you are happy with your contribution.
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright
[MIT](LICENSE.txt)
Copyright (c) 2020 Andy Maleh.
*Note that all licence references and agreements mentioned in the bundler-download README section above
are relevant to that project's source code only.