VegetableBox is a Ruby gem for interacting with the online order system at diegemuesekiste.de.
It helps you to:
- fetch available order lists
- fetch the current order with normalized item data
- and send the current order to a Trello inbox email (via SMTP)
Add this line to your application's Gemfile:
gem 'vegetable_box'Then run:
bundle installOr install directly:
gem install vegetable_boxYou can configure globally:
require 'vegetable_box'
VegetableBox.configure do |config|
config.username = ENV['VEGETABLE_BOX_USERNAME']
config.password = ENV['VEGETABLE_BOX_PASSWORD']
config.base_url = 'https://www.diegemuesekiste.de' # optional (default is set)
# Optional: specific delivery date (Date, Time, or String parseable by Date.parse)
# config.delivery_date = '2026-01-23'
# Optional: needed for notify_current_order
config.smtp = {
address: 'smtp.example.com',
port: 587,
domain: 'example.com',
user_name: 'smtp_user@example.com',
password: 'smtp_password',
authentication: :login,
enable_starttls_auto: true
}
config.trello_inbox_mail = 'your-trello-inbox@example.com'
endOr instantiate a dedicated configuration object:
config = VegetableBox::Configuration.new(
username: ENV['VEGETABLE_BOX_USERNAME'],
password: ENV['VEGETABLE_BOX_PASSWORD'],
smtp: {
address: 'smtp.example.com',
port: 587,
domain: 'example.com',
user_name: 'smtp_user@example.com',
password: 'smtp_password',
authentication: :login,
enable_starttls_auto: true
},
trello_inbox_mail: 'your-trello-inbox@example.com'
)client = VegetableBox::Client.new(VegetableBox.config)
# or: client = VegetableBox::Client.new(config)
client.login
# Get all orders for the configured/current delivery date
orders = client.order_list(for_specific_date: true)
# Get current order (order_id optional)
current_order = client.current_order
# or: current_order = client.current_order(order_id: 123)
# Send current order to Trello inbox email
client.notify_current_order- Calling
logout,order_list,current_order, ornotify_current_orderwithout logging in raisesVegetableBox::Error::NotLoggedInError. delivery_dateis normalized toYYYY-MM-DD. If invalid or missing, the gem falls back to the next Saturday.
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
Bug reports and pull requests are welcome on GitHub at https://github.com/y0wel/vegetable_box.
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run checks locally:
bin/setup bundle exec rake - Open a pull request
Please keep changes focused, documented, and covered by specs.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the VegetableBox project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.