Product Import compliment for translating and caching spreadsheets as sets of data operations.
Establish a connection to Redis:
CasualJacket.configure do |config|
config.redis_host = 'your.redis_instance.biz:6379'
endConfiguration can also be supplied via YAML file:
CasualJacket.load!('path/to/yaml/file')YAML example:
redis_host: your.redis_instance.biz:6379Importing 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")rake wine_lolly - Invoke a pry session within the CasualJacket module.
- Add
casual_jacketto your Gemfile - Optionally supply
config/casual_jacket.yml
