gala 0.3.1 → 0.3.2

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
2
  SHA1:
3
- metadata.gz: 282d6469414bc3815ece41d1ca0c88df2943c081
4
- data.tar.gz: 1952197de23562117ce28641a8379c311190fbf3
3
+ metadata.gz: 4227537dc0b299428df76e8558c2191c30d065b0
4
+ data.tar.gz: 87347e9b12ab6fb03644a13c18c171d4f90801cd
5
5
  SHA512:
6
- metadata.gz: 8718b796da3467a4fea07e223a872f4a52daaab38241a0cd3cede1672653c18bc8577e6297f72d45aa65a22fcce064e0a7bc07fdadfd64c68087b82c8a927d27
7
- data.tar.gz: a43e76f47d3d81c988221a5cd52a1cbb259cd9781860029984b5686df66948b3f39a00d7b3887eba5c0c4b931dfb6c0b1add7ae29ac472915518fa09751af4bb
6
+ metadata.gz: 04c1581817cf346028e8b575802150c3e4639e7b87c44f49c35b83058c939c0d7eff0f5ebc9e98d0e9a14dbb535f5688de72c014ead1a7169727f637c735c0a7
7
+ data.tar.gz: 0f12a08997bdba5a6996811f2713c6b68d7cca61de3835b712d4786f6f62c949b2fb930140e912d3a1852ed21458480ae79bab5e58e2d5253e95c86b0ec845a1
@@ -0,0 +1,30 @@
1
+ version: 2
2
+ jobs:
3
+ ruby-2.1:
4
+ docker:
5
+ - image: circleci/ruby:2.1.10
6
+ steps:
7
+ - checkout
8
+ - run: bundle
9
+ - run: rake test
10
+ ruby-2.2:
11
+ docker:
12
+ - image: circleci/ruby:2.2.10
13
+ steps:
14
+ - checkout
15
+ - run: bundle
16
+ - run: rake test
17
+ ruby-2.3:
18
+ docker:
19
+ - image: circleci/ruby:2.3.7
20
+ steps:
21
+ - checkout
22
+ - run: bundle
23
+ - run: rake test
24
+ workflows:
25
+ version: 2
26
+ rubies:
27
+ jobs:
28
+ - ruby-2.1
29
+ - ruby-2.2
30
+ - ruby-2.3
data/Gemfile.lock CHANGED
@@ -17,6 +17,7 @@ GEM
17
17
  specs:
18
18
  macaddr (1.7.1)
19
19
  systemu (~> 2.6.2)
20
+ minitest (5.11.3)
20
21
  rake (12.0.0)
21
22
  systemu (2.6.5)
22
23
 
@@ -27,7 +28,8 @@ DEPENDENCIES
27
28
  aead!
28
29
  bundler (~> 1.14)
29
30
  gala!
31
+ minitest
30
32
  rake (~> 12.0)
31
33
 
32
34
  BUNDLED WITH
33
- 1.14.6
35
+ 1.15.4
data/README.md CHANGED
@@ -6,16 +6,18 @@ Gala is available under the MIT License.
6
6
 
7
7
  ## Install
8
8
 
9
- Add to your `Gemfile`:
9
+ Add both `gala` and `aead` to your `Gemfile`. Specifying `aead` is necessary to pull in the Shopify version of the library which has been updated to support Ruby versions 2.2 and above.
10
10
 
11
11
  ```ruby
12
12
  gem "gala", "~> 0.3.1"
13
+ gem 'aead', git: 'https://github.com/Shopify/aead.git', ref: '340e7718d8bd9c1fcf3c443e32f439436ea2b70d'
13
14
  ```
14
15
 
15
- Or, if you need to track a development branch:
16
+ If you need to track a development branch or reference functionality not yet contained in the RubyGem release you can specify the gala repo directly.
16
17
 
17
18
  ```ruby
18
- gem "gala", git: "https://github.com/spreedly/gala.git", ref: master
19
+ gem "gala", git: "https://github.com/spreedly/gala.git", ref: :master
20
+ gem 'aead', git: 'https://github.com/Shopify/aead.git', ref: '340e7718d8bd9c1fcf3c443e32f439436ea2b70d'
19
21
  ```
20
22
 
21
23
  Then `bundle install` to fetch Gala into your local environment.
@@ -89,6 +91,12 @@ $ rake release
89
91
 
90
92
  ## Changelog
91
93
 
94
+ ### v0.3.2
95
+
96
+ * Setup CircleCI for more comprehensive Ruby version/compatibility testing
97
+ * Use Minitest instead of TestUnit to more seamlessly support higher Ruby versions
98
+ * Last planned release that supports < Ruby 2.4
99
+
92
100
  ### v0.3.1
93
101
 
94
102
  * Use Shopify aead library for compatibility w/ Ruby >= v2.2
data/gala.gemspec CHANGED
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_development_dependency 'bundler', '~> 1.14'
27
27
  spec.add_development_dependency 'rake', '~> 12.0'
28
+ spec.add_development_dependency 'minitest'
28
29
  end
data/lib/gala/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gala
2
- VERSION = "0.3.1" unless defined? Gala::VERSION
2
+ VERSION = "0.3.2" unless defined? Gala::VERSION
3
3
  end
@@ -1,9 +1,9 @@
1
1
  $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
- require 'test/unit'
2
+ require 'minitest/autorun'
3
3
  require 'json'
4
4
  require 'gala'
5
5
 
6
- class Gala::PaymentTokenTest < Test::Unit::TestCase
6
+ class Gala::PaymentTokenTest < Minitest::Test
7
7
 
8
8
  def setup
9
9
  fixtures = File.dirname(__FILE__) + "/fixtures/"
@@ -45,7 +45,7 @@ class Gala::PaymentTokenTest < Test::Unit::TestCase
45
45
  assert_equal "200731", payment_data["applicationExpirationDate"]
46
46
  assert_equal "840", payment_data["currencyCode"]
47
47
  assert_equal 100, payment_data["transactionAmount"]
48
- assert_equal nil, payment_data["cardholderName"]
48
+ assert_nil payment_data["cardholderName"]
49
49
  assert_equal "040010030273", payment_data["deviceManufacturerIdentifier"]
50
50
  assert_equal "3DSecure", payment_data["paymentDataType"]
51
51
  assert_equal "Af9x/QwAA/DjmU65oyc1MAABAAA=", payment_data["paymentData"]["onlinePaymentCryptogram"]
@@ -54,7 +54,7 @@ class Gala::PaymentTokenTest < Test::Unit::TestCase
54
54
 
55
55
  def test_failed_decrypt
56
56
  @payment_token.data = "bogus4OZho15e9Yp5K0EtKergKzeRpPAjnKHwmSNnagxhjwhKQ5d29sfTXjdbh1CtTJ4DYjsD6kfulNUnYmBTsruphBz7RRVI1WI8P0LrmfTnImjcq1mi"
57
- exception = assert_raise Gala::PaymentToken::InvalidSignatureError do
57
+ exception = assert_raises Gala::PaymentToken::InvalidSignatureError do
58
58
  JSON.parse(@payment_token.decrypt(@certificate, @private_key))
59
59
  end
60
60
  assert_equal("The given signature is not a valid ECDSA signature.", exception.message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gala
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Bennett
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-07 00:00:00.000000000 Z
12
+ date: 2018-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aead
@@ -53,6 +53,20 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '12.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: minitest
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
56
70
  description: Given an (encrypted) Apple Pay token, verify and decrypt it
57
71
  email:
58
72
  - ryan@spreedly.com
@@ -60,6 +74,7 @@ executables: []
60
74
  extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
77
+ - ".circleci/config.yml"
63
78
  - ".gitignore"
64
79
  - Gemfile
65
80
  - Gemfile.lock