omise 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yml +34 -0
- data/.github/workflows/ruby.yml +7 -10
- data/CHANGELOG.md +4 -0
- data/lib/omise/version.rb +1 -1
- data/test/omise/test_account.rb +2 -2
- data/test/omise/test_attributes.rb +2 -2
- data/test/omise/test_balance.rb +2 -2
- data/test/omise/test_card.rb +2 -2
- data/test/omise/test_chain.rb +4 -4
- data/test/omise/test_charge.rb +2 -2
- data/test/omise/test_customer.rb +2 -2
- data/test/omise/test_dispute.rb +4 -4
- data/test/omise/test_document.rb +2 -2
- data/test/omise/test_forex.rb +2 -2
- data/test/omise/test_link.rb +2 -2
- data/test/omise/test_receipt.rb +2 -2
- data/test/omise/test_recipient.rb +2 -2
- data/test/omise/test_refund.rb +2 -2
- data/test/omise/test_token.rb +2 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86f667adb02844ae4a28e2a27d5dc510f525bb6c5b7466e8498fddb09d3f793c
|
4
|
+
data.tar.gz: cf02aa9699535883c6ff342fd93dcbb5bd4e39dbcd65d7737b50cf98748cf94a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36c8120f9b002f22c684bf6b7926209c31310d7fcb7a0a47b04a9988cf2f6f13a70e5d177fbd133ec923d619da770a812e7cce901dd60ceef36d670abdea1bad
|
7
|
+
data.tar.gz: f0d8ff93d321ada34b1a848ebcebc39b313023ed77fbead69af9d0e67b42d4a3dba05e69788160e61593edc4e4f8ccc14e95c4fdefd13ef1db9c2d5aec6bd347
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Publish
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
publish:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v3
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: '3.2'
|
17
|
+
bundler-cache: true
|
18
|
+
|
19
|
+
- name: Build and test with Rake
|
20
|
+
run: |
|
21
|
+
gem install bundler
|
22
|
+
bundle install --jobs 4 --retry 3
|
23
|
+
bundle exec rake test
|
24
|
+
|
25
|
+
- name: Publish to RubyGems
|
26
|
+
run: |
|
27
|
+
mkdir -p $HOME/.gem
|
28
|
+
touch $HOME/.gem/credentials
|
29
|
+
chmod 0600 $HOME/.gem/credentials
|
30
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
31
|
+
gem build *.gemspec
|
32
|
+
gem push *.gem
|
33
|
+
env:
|
34
|
+
GEM_HOST_API_KEY: ${{secrets.GEM_HOST_API_KEY}}
|
data/.github/workflows/ruby.yml
CHANGED
@@ -2,24 +2,21 @@ name: Ruby
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [ 'master' ]
|
6
|
-
pull_request:
|
7
|
-
branches: [ 'master' ]
|
8
5
|
|
9
6
|
jobs:
|
10
7
|
build:
|
11
|
-
runs-on: ubuntu-latest
|
12
8
|
strategy:
|
9
|
+
fail-fast: false
|
13
10
|
matrix:
|
14
|
-
|
15
|
-
|
11
|
+
os: [ubuntu-latest]
|
12
|
+
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2' ]
|
13
|
+
runs-on: ${{ matrix.os }}
|
16
14
|
steps:
|
17
|
-
- uses: actions/checkout@
|
18
|
-
-
|
19
|
-
uses: actions/setup-ruby@v1
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- uses: ruby/setup-ruby@v1
|
20
17
|
with:
|
21
18
|
ruby-version: ${{ matrix.ruby }}
|
22
|
-
|
19
|
+
bundler-cache: true
|
23
20
|
- name: Build and test with Rake
|
24
21
|
run: |
|
25
22
|
gem install bundler
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
An [unreleased] version is not available on rubygems and is subject to changes and must not be considered final. Elements of unreleased list may be edited or removed at any time.
|
4
4
|
|
5
|
+
## [0.10.1] 2023-04-20
|
6
|
+
|
7
|
+
- [Updated] Updated test case for ruby >= 3.0 (https://github.com/omise/omise-ruby/pull/48)
|
8
|
+
|
5
9
|
## [0.10.0] 2021-02-16
|
6
10
|
|
7
11
|
- [Added] Add a new method to fetch all events belonging to a charge (https://github.com/omise/omise-ruby/pull/45)
|
data/lib/omise/version.rb
CHANGED
data/test/omise/test_account.rb
CHANGED
@@ -11,10 +11,10 @@ class TestAccount < Omise::Test
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def test_that_we_can_reload_the_account
|
14
|
-
@account.attributes.
|
14
|
+
@account.attributes.freeze
|
15
15
|
@account.reload
|
16
16
|
|
17
|
-
refute @account.attributes.
|
17
|
+
refute @account.attributes.frozen?
|
18
18
|
end
|
19
19
|
|
20
20
|
def test_that_we_can_update_the_account
|
@@ -40,10 +40,10 @@ class TestAttributes < Omise::Test
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_that_we_can_update_the_teapot_attributes
|
43
|
-
@teapot.attributes.
|
43
|
+
@teapot.attributes.freeze
|
44
44
|
@teapot.assign_attributes({})
|
45
45
|
|
46
|
-
refute @teapot.attributes.
|
46
|
+
refute @teapot.attributes.frozen?
|
47
47
|
end
|
48
48
|
|
49
49
|
def test_that_we_can_tell_if_a_teapot_has_not_been_destroyed
|
data/test/omise/test_balance.rb
CHANGED
@@ -11,9 +11,9 @@ class TestBalance < Omise::Test
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def test_that_we_can_reload_a_customer
|
14
|
-
@balance.attributes.
|
14
|
+
@balance.attributes.freeze
|
15
15
|
@balance.reload
|
16
16
|
|
17
|
-
refute @balance.attributes.
|
17
|
+
refute @balance.attributes.frozen?
|
18
18
|
end
|
19
19
|
end
|
data/test/omise/test_card.rb
CHANGED
@@ -25,10 +25,10 @@ class TestCard < Omise::Test
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_that_a_card_can_be_reloaded
|
28
|
-
@card.attributes.
|
28
|
+
@card.attributes.freeze
|
29
29
|
@card.reload
|
30
30
|
|
31
|
-
refute @card.attributes.
|
31
|
+
refute @card.attributes.frozen?
|
32
32
|
end
|
33
33
|
|
34
34
|
def test_that_retrieveing_a_non_existing_card_will_raise_an_error
|
data/test/omise/test_chain.rb
CHANGED
@@ -21,20 +21,20 @@ class TestChain < Omise::Test
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_that_we_can_reload_a_chain
|
24
|
-
@chain.attributes.
|
24
|
+
@chain.attributes.freeze
|
25
25
|
@chain.reload
|
26
26
|
|
27
|
-
refute @chain.attributes.
|
27
|
+
refute @chain.attributes.frozen?
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_that_we_can_revoke_a_chain
|
31
|
-
@chain.attributes.
|
31
|
+
@chain.attributes.freeze
|
32
32
|
|
33
33
|
refute @chain.revoked
|
34
34
|
|
35
35
|
@chain.revoke
|
36
36
|
|
37
37
|
assert @chain.revoked?
|
38
|
-
refute @chain.attributes.
|
38
|
+
refute @chain.attributes.frozen?
|
39
39
|
end
|
40
40
|
end
|
data/test/omise/test_charge.rb
CHANGED
@@ -57,10 +57,10 @@ class TestCharge < Omise::Test
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_that_we_can_reload_a_charge
|
60
|
-
@charge.attributes.
|
60
|
+
@charge.attributes.freeze
|
61
61
|
@charge.reload
|
62
62
|
|
63
|
-
refute @charge.attributes.
|
63
|
+
refute @charge.attributes.frozen?
|
64
64
|
end
|
65
65
|
|
66
66
|
def test_that_retrieveing_a_non_existing_charge_will_raise_an_error
|
data/test/omise/test_customer.rb
CHANGED
@@ -37,10 +37,10 @@ class TestCustomer < Omise::Test
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def test_that_we_can_reload_a_customer
|
40
|
-
@customer.attributes.
|
40
|
+
@customer.attributes.freeze
|
41
41
|
@customer.reload
|
42
42
|
|
43
|
-
refute @customer.attributes.
|
43
|
+
refute @customer.attributes.frozen?
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_that_we_can_charge_a_customer
|
data/test/omise/test_dispute.rb
CHANGED
@@ -35,10 +35,10 @@ class TestDispute < Omise::Test
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def test_that_we_can_reload_a_dispute
|
38
|
-
@dispute.attributes.
|
38
|
+
@dispute.attributes.freeze
|
39
39
|
@dispute.reload
|
40
40
|
|
41
|
-
refute @dispute.attributes.
|
41
|
+
refute @dispute.attributes.frozen?
|
42
42
|
end
|
43
43
|
|
44
44
|
def test_that_we_can_update_a_dispute
|
@@ -48,14 +48,14 @@ class TestDispute < Omise::Test
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def test_that_we_can_accept_a_dispute
|
51
|
-
@dispute.attributes.
|
51
|
+
@dispute.attributes.freeze
|
52
52
|
|
53
53
|
assert_equal @dispute.status, "open"
|
54
54
|
|
55
55
|
@dispute.accept
|
56
56
|
|
57
57
|
assert_equal @dispute.status, "lost"
|
58
|
-
refute @dispute.attributes.
|
58
|
+
refute @dispute.attributes.frozen?
|
59
59
|
end
|
60
60
|
|
61
61
|
def test_that_we_can_retrieve_a_list_of_documents
|
data/test/omise/test_document.rb
CHANGED
@@ -19,10 +19,10 @@ class TestDocument < Omise::Test
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def test_that_a_document_can_be_reloaded
|
22
|
-
@document.attributes.
|
22
|
+
@document.attributes.freeze
|
23
23
|
@document.reload
|
24
24
|
|
25
|
-
refute @document.attributes.
|
25
|
+
refute @document.attributes.frozen?
|
26
26
|
end
|
27
27
|
|
28
28
|
def test_that_we_can_destroy_a_document
|
data/test/omise/test_forex.rb
CHANGED
data/test/omise/test_link.rb
CHANGED
@@ -31,10 +31,10 @@ class TestLink < Omise::Test
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def test_that_we_can_reload_a_link
|
34
|
-
@link.attributes.
|
34
|
+
@link.attributes.freeze
|
35
35
|
@link.reload
|
36
36
|
|
37
|
-
refute @link.attributes.
|
37
|
+
refute @link.attributes.frozen?
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_that_a_link_has_a_list_of_charges
|
data/test/omise/test_receipt.rb
CHANGED
@@ -21,9 +21,9 @@ class TestReceipt < Omise::Test
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_that_we_can_reload_a_receipt
|
24
|
-
@receipt.attributes.
|
24
|
+
@receipt.attributes.freeze
|
25
25
|
@receipt.reload
|
26
26
|
|
27
|
-
refute @receipt.attributes.
|
27
|
+
refute @receipt.attributes.frozen?
|
28
28
|
end
|
29
29
|
end
|
@@ -23,10 +23,10 @@ class TestRecipient < Omise::Test
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def test_that_we_can_reload_a_recipient
|
26
|
-
@recipient.attributes.
|
26
|
+
@recipient.attributes.freeze
|
27
27
|
@recipient.reload
|
28
28
|
|
29
|
-
refute @recipient.attributes.
|
29
|
+
refute @recipient.attributes.frozen?
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_that_we_can_destroy_a_recipient
|
data/test/omise/test_refund.rb
CHANGED
@@ -27,10 +27,10 @@ class TestRefund < Omise::Test
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_that_a_refund_can_be_reloaded
|
30
|
-
@refund.attributes.
|
30
|
+
@refund.attributes.freeze
|
31
31
|
@refund.reload
|
32
32
|
|
33
|
-
refute @refund.attributes.
|
33
|
+
refute @refund.attributes.frozen?
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_that_retrieveing_a_non_existing_refund_will_raise_an_error
|
data/test/omise/test_token.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Clart
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -94,13 +94,14 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '5.4'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- robin@omise.co
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/workflows/publish.yml"
|
104
105
|
- ".github/workflows/ruby.yml"
|
105
106
|
- ".gitignore"
|
106
107
|
- CHANGELOG.md
|
@@ -273,7 +274,7 @@ homepage: https://www.omise.co/
|
|
273
274
|
licenses:
|
274
275
|
- MIT
|
275
276
|
metadata: {}
|
276
|
-
post_install_message:
|
277
|
+
post_install_message:
|
277
278
|
rdoc_options: []
|
278
279
|
require_paths:
|
279
280
|
- lib
|
@@ -288,8 +289,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
289
|
- !ruby/object:Gem::Version
|
289
290
|
version: '0'
|
290
291
|
requirements: []
|
291
|
-
rubygems_version: 3.
|
292
|
-
signing_key:
|
292
|
+
rubygems_version: 3.4.10
|
293
|
+
signing_key:
|
293
294
|
specification_version: 4
|
294
295
|
summary: Omise Ruby client
|
295
296
|
test_files:
|