Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spree_weigth_calculator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spree_weigth_calculator

  • 3.0.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Code Climate

SpreeWeigthCalculator

This is a calculator that calculates (cuak!) the shipping cost based on the weight, volume and price of the order. To do that we have created an end-point that calculate that for us.

Installation

Add spree_weigth_calculator to your Gemfile:

gem 'spree_weigth_calculator'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_weigth_calculator:install

Configuration

The calculator has two preferences:

  1. URL

    The preference URL is the endpoint. For example: https://logistic.domain.com/cost.

The endpoint should be like:

https://logistic.domain.com/cost/#{zip}?volume=#{volume}&weight=#{weight}&dimension=#{dimension}

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_weigth_calculator/factories'

TODO

  1. Set the weight, dimension and volume as optional parameters in the URL.
  2. Add some tests.

FAQs

Package last updated on 19 Jun 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc