lipseys 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 85dd68aea52b13495d0f693ace2247ba1f84d2fc
4
- data.tar.gz: f38b94435002c2039c85302ef75702b8650c8501
2
+ SHA256:
3
+ metadata.gz: ef56a0dd5f1678c2988c74e16c1eb6b17f770ee81af235fd7175e503c0e82d59
4
+ data.tar.gz: f652f6409e46bcb51f11a73affb0031c94c63f2842e29833e91a9d7d54a070d8
5
5
  SHA512:
6
- metadata.gz: 556c67b9070d7223f4796024fdcdfc47751fa9fb3ff67693337e699c04cb790a2d7d3fd9ed0c728e894868ca5578740d0b8db126624688f58a6aab5f5fda1f1a
7
- data.tar.gz: a0142d7bcaaa1c8c9283631c50e685c9f18fa51ff40cf523a02e2045e0062e309842d7dc00c252ba2ca9134b4e705dbb930a20fb6eec3d511c8cee171ac78a7f
6
+ metadata.gz: 9b6f1358deebf524df3712a369060234795bc6c109950b463c3cd854baae5efae56d9c346b9bb41954464f48c58303cab522eb557273e8c5bf01276360e51c3a
7
+ data.tar.gz: 16d3a7c98e1f3bcffc4660462c673073baf235594fbe6724782823a42c1279731d9dbc2c846078a11ba43692f43d95a991aef100a193fae143e12b7e0a85424f
@@ -0,0 +1,41 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # specify the version you desire here
10
+ - image: circleci/ruby:2.4.1-node-browsers
11
+
12
+ working_directory: ~/repo
13
+
14
+ steps:
15
+ - checkout
16
+
17
+ # Download and cache dependencies
18
+ - restore_cache:
19
+ keys:
20
+ - v1-dependencies-{{ checksum "lipseys.gemspec" }}
21
+ # fallback to using the latest cache if no exact match is found
22
+ - v1-dependencies-
23
+
24
+ - run:
25
+ name: install dependencies
26
+ command: |
27
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
28
+
29
+ - save_cache:
30
+ paths:
31
+ - ./vendor/bundle
32
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
33
+
34
+ # run tests!
35
+ - run:
36
+ name: run tests
37
+ command: |
38
+ mkdir /tmp/test-results
39
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
40
+
41
+ bundle exec rspec --format documentation $TEST_FILES
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.3.6
data/README.md CHANGED
@@ -18,109 +18,6 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install lipseys
20
20
 
21
- ## Usage
22
-
23
- **Note**: Nearly all methods require `:email` and `:password` keys in the options hash.
24
-
25
- ```ruby
26
- options = {
27
- email: 'dealer@example.com',
28
- password: 'sekret-passwd'
29
- }
30
- ```
31
-
32
- ### Lipseys::Catalog
33
-
34
- There are several methods you can use to fetch different kinds (or all) items in the catalog.
35
- All of the listed methods return the same response structure. See `Lipseys::Catalog` for details.
36
-
37
- ```ruby
38
- # All items
39
- catalog = Lipseys::Catalog.all(options)
40
-
41
- # Firearms only
42
- firearms = Lipseys::Catalog.firearms(options)
43
-
44
- # NFA / Class 3 items only
45
- nfa = Lipseys::Catalog.nfa(options)
46
-
47
- # Optics only
48
- optics = Lipseys::Catalog.optics(options)
49
-
50
- # Accessories only
51
- accessories = Lipseys::Catalog.accessories(options)
52
- ```
53
-
54
- ### Lipseys::Inventory
55
-
56
- There are similar methods for getting your account's inventory (availability, price, etc.).
57
- All methods return the same response structure. See `Lipseys::Inventory` for details.
58
-
59
- ```ruby
60
- inventory = Lipseys::Inventory.all(options)
61
- firearms = Lipseys::Inventory.firearms(options)
62
- nfa = Lipseys::Inventory.nfa(options)
63
- optics = Lipseys::Inventory.optics(options)
64
- accessories = Lipseys::Inventory.accessories(options)
65
- ```
66
-
67
- ### Lipseys::Order
68
-
69
- In addition to the `:email` and `:password` keys in the options hash, submitting an order requires
70
- the following params:
71
-
72
- ```ruby
73
- options = {
74
- email: 'dealer@example.com',
75
- password: 'sekret-passwd',
76
-
77
- item_number: '...', # Lipsey's item number
78
- # - OR -
79
- upc: '...', # Universal Product Code
80
-
81
- quantity: 1,
82
- purchase_order: 'PO-123', # Application specific Purchase Order
83
-
84
- # Optional order params:
85
- notify_by_email: true, # If you want an email sent when the order is created
86
- note: '...', # Any notes attached to the order
87
- }
88
-
89
- response = Lipseys::Order.submit!(options)
90
- ```
91
-
92
- The response will have this structure: (See `Lipseys::Order` for more details)
93
-
94
- ```ruby
95
- {
96
- order_number: '...',
97
- new_order: (true/false),
98
- success: (true/false),
99
- description: '...',
100
- quantity_received: Integer,
101
- }
102
- ```
103
-
104
- ### Lipseys::Invoice
105
-
106
- In addition to the `:email` and `:password` keys in the options hash, finding an invoice requires
107
- either an `:order_number` **OR** a `:purchase_order` param.
108
-
109
- ```ruby
110
- options = {
111
- email: 'dealer@example.com',
112
- password: 'sekret-passwd',
113
-
114
- order_number: '...', # Lipsey's order number
115
- # - OR -
116
- purchase_order: '...', # Application specific Purchase Order submitted with the order
117
- }
118
-
119
- invoice = Lipseys::Invoice.all(options)
120
- ```
121
-
122
- See `Lipseys::Invoice` for the response structure details.
123
-
124
21
  ## Development
125
22
 
126
23
  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.
@@ -54,7 +54,7 @@ module Lipseys
54
54
  def map_hash(node)
55
55
  model = content_for(node, 'Model')
56
56
  mfg_number = content_for(node, 'MFGModelNo')
57
- name = "#{model} #{mfg_number}"
57
+ name = "#{model} #{mfg_number}".lstrip.rstrip
58
58
 
59
59
  {
60
60
  name: name,
@@ -67,7 +67,6 @@ module Lipseys
67
67
  item_identifier: content_for(node, 'ItemNo'),
68
68
  brand: content_for(node, 'MFG'),
69
69
  mfg_number: mfg_number,
70
- image_url: "http://www.lipseys.net/images/#{content_for(node, 'Image')}",
71
70
  features: {
72
71
  caliber: content_for(node, 'Caliber'),
73
72
  action: content_for(node, 'Action'),
@@ -1,3 +1,3 @@
1
1
  module Lipseys
2
- VERSION = '3.0.0'.freeze
2
+ VERSION = '3.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lipseys
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -115,11 +115,11 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".circleci/config.yml"
118
119
  - ".gitignore"
119
120
  - ".rspec"
120
121
  - ".ruby-gemset"
121
122
  - ".ruby-version"
122
- - ".travis.yml"
123
123
  - Gemfile
124
124
  - LICENSE.txt
125
125
  - README.md
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.6.12
161
+ rubygems_version: 2.7.7
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Ruby library for Lipsey's API.
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.13.6