- Update the version number in the gemspec
- Run
gem build sprint_client.gemspec
- Run
gem push sprint_client-<version number>.gem
- Add
gem 'sprint_client'
to the Gemfile. - Run
bundle install --full-index
- Add
SprintClient.sprint_uri = 'http://example.com'
to Rails initializer code, with the correct URI for SPrint - Call
SprintClient.send_print_request()
in the class where required
If you want to point to local gem
gem 'sprint_client', path: "/Users/hc6/psd/sprint_client"
bundle update sprint_client
If the above doesn't work
- Run
gem list -r sprint_client
to check the gem is accessible - Run
gem install sprint_client
- Run
bundle install
When updating
- Run
bundle update sprint_client
Argument | Description |
---|---|
printer_name | a string showing which printer to send the request to |
label_template_name | a string to identify which label template to be used in the print request |
merge_fields_list | a list of hashes, each containing the field values for a particular label. For each hash in the merge_fields_list arguement, the keys match up to the label templates expected values |
SprintClient.send_print_request("a printer", "a label template",[{ barcode: "DN111111", date: "1-APR-2020", barcode_text: "DN111111", workline_identifier: "DN111111", order_role: "Heron", plate_purpose: "LHR PCR 1" }, { barcode: "DN222222", date: "2-APR-2020" barcode_text: "DN222222", workline_identifier: "DN6222222", order_role: "Heron", plate_purpose: "LHR PCR 2" }])