omise 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/lib/omise/config.rb +1 -1
- data/lib/omise/resource.rb +4 -0
- data/lib/omise/version.rb +1 -1
- data/test/omise/test_resource.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc3ed7874767ee929bd07b3579faec6fdbaf3a22
|
4
|
+
data.tar.gz: ac029be84b38f795b6f163f1fa9a6dba1dd757c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4378039e687cc23acb12b3afe3c7d8dfe016c14bf3848c717c8d85d1b9bac1e02867d57a7eefbeb4aac162f003a45f903136fbef6a2664b24eb1a827365d1c2e
|
7
|
+
data.tar.gz: 155b4409ba41338eed7dadd9988c1eb666ee3450c9e481071d028d659726a25472be0a550d301f4b47a0e0b63a205b4be4d25fa7f8f86be64a4ec2ec827f1ddc
|
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.7.1] 2017-12-13
|
6
|
+
|
7
|
+
- [Added] Ability to add a suffix to the user agent
|
8
|
+
|
5
9
|
## [0.7.0] 2017-06-04
|
6
10
|
|
7
11
|
- [Added] Support for start_date in Scheduler
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ Omise.public_api_key = "pkey_test_xxxxxxxxxxxxxxxxxxx"
|
|
39
39
|
|
40
40
|
With this set you'll be able to retrieve tokens or create new ones.
|
41
41
|
|
42
|
-
However we recommend using [Omise.js](https://
|
42
|
+
However we recommend using [Omise.js](https://www.omise.co/omise-js-api) to
|
43
43
|
[collect cards](https://www.omise.co/collecting-card-information). When creating a token server side you'll need card data
|
44
44
|
transiting to and from your server and this requires that your organization be
|
45
45
|
PCI compliant.
|
@@ -74,7 +74,7 @@ Omise.logger = Rails.logger
|
|
74
74
|
|
75
75
|
## Quick Start
|
76
76
|
|
77
|
-
After you have implemented [Omise.js](https://
|
77
|
+
After you have implemented [Omise.js](https://www.omise.co/omise-js-api) on your
|
78
78
|
frontend you can charge the card by passing the token into the `card` attribute.
|
79
79
|
|
80
80
|
```ruby
|
@@ -95,7 +95,7 @@ end
|
|
95
95
|
```
|
96
96
|
|
97
97
|
You can check the complete documentation at
|
98
|
-
[
|
98
|
+
[omise.co/docs](https://omise.co/docs).
|
99
99
|
|
100
100
|
## Development
|
101
101
|
|
data/lib/omise/config.rb
CHANGED
@@ -5,7 +5,7 @@ module Omise
|
|
5
5
|
LIB_PATH = File.expand_path("../../", __FILE__)
|
6
6
|
|
7
7
|
class << self
|
8
|
-
attr_accessor :api_url, :vault_url, :api_version, :resource
|
8
|
+
attr_accessor :api_url, :vault_url, :api_version, :resource, :user_agent_suffix
|
9
9
|
|
10
10
|
attr_writer :secret_api_key, :public_api_key
|
11
11
|
|
data/lib/omise/resource.rb
CHANGED
data/lib/omise/version.rb
CHANGED
data/test/omise/test_resource.rb
CHANGED
@@ -22,6 +22,20 @@ class TestResource < Omise::Test
|
|
22
22
|
assert_equal "2014-07-27", resource.headers[:omise_version]
|
23
23
|
end
|
24
24
|
|
25
|
+
def test_that_the_user_agent_header_has_no_suffix_if_suffix_not_set
|
26
|
+
Omise.user_agent_suffix = nil
|
27
|
+
resource = Omise::Resource.new(Omise.api_url, "/", "skey_xxx")
|
28
|
+
|
29
|
+
assert_equal "OmiseRuby/#{Omise::VERSION} Ruby/#{RUBY_VERSION}", resource.headers[:user_agent]
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_that_the_user_agent_header_has_suffix_if_suffix_set
|
33
|
+
suffix = "Suffix/1.0"
|
34
|
+
Omise.user_agent_suffix = suffix
|
35
|
+
resource = Omise::Resource.new(Omise.api_url, "/", "skey_xxx")
|
36
|
+
assert resource.headers[:user_agent].end_with? suffix
|
37
|
+
end
|
38
|
+
|
25
39
|
def test_that_the_path_is_set
|
26
40
|
resource = Omise::Resource.new(Omise.api_url, "/charges", "skey_xxx")
|
27
41
|
uri = URI.parse("https://api.omise.co/charges")
|
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.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Clart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|