bukku_rails 0.2.2 → 0.3.0
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 +4 -4
- data/README.md +5 -3
- data/lib/bukku_rails/version.rb +1 -1
- data/lib/bukku_test.rb +1 -1
- data/lib/client.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 565be27afe248599db5d33a723aaa9a5ad9c57bc25ffab1b7f8e0f9a91fb5bf5
|
|
4
|
+
data.tar.gz: cccbcfb3e2dbdef04b6d851f9504b31f93e5c897e2a198a680a9a2f863e671c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01d76b79443c4113cfe1bc605cffea51bf241b9d69f6a98c1b10185939164d8aa75ca39d68ab5ea53d84f63d007883109993fa4188b99a7dff7d9e08424f709f
|
|
7
|
+
data.tar.gz: 0b017d34db3dbe0cfef610aadcf14e2e1dc7987b73aecb1ac179463000569b69fa1a3495f6663a6c68c945ade9242a6972741ee75eaaa37d04cc470d0eed5fe5
|
data/README.md
CHANGED
|
@@ -36,13 +36,15 @@ Note: Bukku offers 2 type of access:
|
|
|
36
36
|
|
|
37
37
|
**Bukku Rails** provides usage for both access, under 2 different classes:
|
|
38
38
|
|
|
39
|
-
1. *Staging* use the `BukkuTest` class, like so
|
|
39
|
+
1. *Staging* use the `BukkuTest` class, like so
|
|
40
|
+
`client = BukkuTest.new(domain: "sub-domain", token: "api-token-from-bukku-fyi")`
|
|
40
41
|
|
|
41
|
-
2. *Production* use `Bukku` class, like so
|
|
42
|
+
2. *Production* use `Bukku` class, like so
|
|
43
|
+
`client = Bukku.new(domain: "sub-domain", token: "api-token-from-bukku-my")`
|
|
42
44
|
|
|
43
45
|
### Available Methods
|
|
44
46
|
|
|
45
|
-
Just like in Rails the methods follow the singular and plural expression. Methods
|
|
47
|
+
Just like in Rails the methods follow the singular and plural expression. Methods that might return multiple records are plural expression methods. While methods that returns or create a single records are singular methods. So be careful where you put your ***s***'s 😁
|
|
46
48
|
|
|
47
49
|
#### Sales
|
|
48
50
|
|
data/lib/bukku_rails/version.rb
CHANGED
data/lib/bukku_test.rb
CHANGED
data/lib/client.rb
CHANGED
|
@@ -49,7 +49,7 @@ class Client
|
|
|
49
49
|
http.use_ssl = uri.instance_of?(URI::HTTPS)
|
|
50
50
|
|
|
51
51
|
# Add the 2 lines below because development keeps on failing SSL CRL checks
|
|
52
|
-
# Check this article for explanation:
|
|
52
|
+
# Check this article for explanation:
|
|
53
53
|
# https://dev.to/madhuhari188/how-we-solved-unable-to-get-certificate-crl-in-rails-a-debugging-story-2pna
|
|
54
54
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
55
55
|
http.verify_callback = ->(_preverify_ok, _store_ctx) { true }
|
|
@@ -58,7 +58,7 @@ class Client
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def make_request(klass, path, query: {}, body: {})
|
|
61
|
-
# Uncomment below for debuging purpose to see
|
|
61
|
+
# Uncomment below for debuging purpose to see payload that was sent.
|
|
62
62
|
# build_http(uri).set_debug_output($stdout)
|
|
63
63
|
|
|
64
64
|
uri = URI("#{base_uri}#{path}")
|
|
@@ -90,5 +90,6 @@ class Client
|
|
|
90
90
|
raise Error, "#{response.code}: #{response.body}"
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
|
+
|
|
93
94
|
class Error < StandardError; end
|
|
94
95
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bukku_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muzaffar Ariff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Use Rails conventions to call Bukku API requests.
|
|
14
14
|
email:
|