Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (35 loc) · 1.03 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.03 KB

CasualJacket

Casual Jacket

Product Import compliment for translating and caching spreadsheets as sets of data operations.

Configuration

Establish a connection to Redis:

CasualJacket.configure do |config|
  config.redis_host = 'your.redis_instance.biz:6379'
end

Configuration can also be supplied via YAML file:

CasualJacket.load!('path/to/yaml/file')

YAML example:

redis_host: your.redis_instance.biz:6379

General Usage

Importing a spreadsheet into the cache:

handle = "test import"
file   = "/tmp/products.csv"
legend = { "headername" => "translation" }

CasualJacket.cache_operations(handle, file, legend)

Retrieve operations from the cache:

CasualJacket.operations_for("test_import")

Utility Tasks

rake wine_lolly - Invoke a pry session within the CasualJacket module.

Rails Integration

  • Add casual_jacket to your Gemfile
  • Optionally supply config/casual_jacket.yml