solidus_braintree 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2dc626000669163124de96bf97bf6a20aa28078c
4
- data.tar.gz: 7a81acc31f411af559dfbe0fb9a023d962d3491d
2
+ SHA256:
3
+ metadata.gz: d6187e1c0eac731b74a33c03cec5b0a28036454e1491f21dc011b94904b9a59f
4
+ data.tar.gz: 649dcd6d6e32db5499429fd7bdb6024ab87e7f50f413f091c84d331125364066
5
5
  SHA512:
6
- metadata.gz: 79b5a87a130c7389d9900af4a51840e87dab35a7026ac74a6f11a52a2164356e8fcb4457bba78fce3974c3ae879d00045b9b26c58fab8c6f756d783d7e33e898
7
- data.tar.gz: 794e78130c00e985767a2c4d136fbc2ef831d9808ff1d45aa13fd7ada5f977323673f065e5d0007d9c9ff1da869829de187aa54cfeb479850b4f981d19a3679e
6
+ metadata.gz: 7cfb547b455007903f95d4d9ce4353d862791eea8556204b6b20000d0aebac949206d74f33a1772d5c655fdf6dbc490c2848732cf530fff68c8920d9355e463a
7
+ data.tar.gz: c75a9a69da5cbda3ac951b42f0aeadea6597bd1a6b81ed0bafc4a2cd457ac5dfb26ac2793b9040cf6ac64d1145ecefef7c4a8267c4bad14d259a50870473e856
@@ -1,5 +1,16 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ cache:
4
+ directories:
5
+ - travis_phantomjs
6
+
7
+ before_install:
8
+ - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
9
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
10
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
11
+ - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
12
+ - "phantomjs --version"
13
+
3
14
  rvm:
4
15
  - 2.3.1
5
16
  env:
@@ -9,10 +20,22 @@ env:
9
20
  - SOLIDUS_BRANCH=v1.3 DB=postgres
10
21
  - SOLIDUS_BRANCH=v1.4 DB=postgres
11
22
  - SOLIDUS_BRANCH=v2.0 DB=postgres
23
+ - SOLIDUS_BRANCH=v2.1 DB=postgres
24
+ - SOLIDUS_BRANCH=v2.2 DB=postgres
25
+ - SOLIDUS_BRANCH=v2.3 DB=postgres
26
+ - SOLIDUS_BRANCH=v2.4 DB=postgres
27
+ - SOLIDUS_BRANCH=v2.5 DB=postgres
28
+ - SOLIDUS_BRANCH=v2.6 DB=postgres
12
29
  - SOLIDUS_BRANCH=master DB=postgres
13
30
  - SOLIDUS_BRANCH=v1.1 DB=mysql
14
31
  - SOLIDUS_BRANCH=v1.2 DB=mysql
15
32
  - SOLIDUS_BRANCH=v1.3 DB=mysql
16
33
  - SOLIDUS_BRANCH=v1.4 DB=mysql
17
34
  - SOLIDUS_BRANCH=v2.0 DB=mysql
35
+ - SOLIDUS_BRANCH=v2.1 DB=mysql
36
+ - SOLIDUS_BRANCH=v2.2 DB=mysql
37
+ - SOLIDUS_BRANCH=v2.3 DB=mysql
38
+ - SOLIDUS_BRANCH=v2.4 DB=mysql
39
+ - SOLIDUS_BRANCH=v2.5 DB=mysql
40
+ - SOLIDUS_BRANCH=v2.6 DB=mysql
18
41
  - SOLIDUS_BRANCH=master DB=mysql
data/Gemfile CHANGED
@@ -3,12 +3,19 @@ source "https://rubygems.org"
3
3
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
4
4
  gem "solidus", github: "solidusio/solidus", branch: branch
5
5
 
6
- if branch == 'master' || branch >= "v2.0"
6
+ if branch == 'master' || branch >= "v2.3"
7
+ gem "rails", "~> 5.1.0"
7
8
  gem "rails-controller-testing", group: :test
9
+ elsif branch >= "v2.0"
10
+ gem "rails", "~> 5.0.0"
11
+ gem "rails-controller-testing", group: :test
12
+ else
13
+ gem "rails", "~> 4.2.0"
14
+ gem "rails_test_params_backport", group: :test
8
15
  end
9
16
 
10
- gem 'pg'
11
- gem 'mysql2'
17
+ gem 'pg', '~> 0.21'
18
+ gem 'mysql2', '~> 0.4.10'
12
19
 
13
20
  group :development, :test do
14
21
  gem "pry-rails"
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # solidus_braintree
1
+ # Solidus Braintree
2
2
 
3
- `solidus_braintree` is a gem that adds [Braintree v.zero](https://www.braintreepayments.com/v.zero) support to the [solidus](http://solidus.io/) E-commerce platform.
3
+ [![Build Status](https://travis-ci.org/solidusio/solidus_braintree.svg?branch=master)](https://travis-ci.org/solidusio/solidus_braintree)
4
+
5
+ `solidus_braintree` is a gem that adds [Braintree v.zero](https://www.braintreepayments.com/v-zero) support to the [solidus](http://solidus.io/) E-commerce platform.
4
6
 
5
7
  It provides support for credit card and Paypal payment methods via the `Spree::CreditCard`
6
8
 
@@ -1,7 +1,14 @@
1
1
  require "braintree"
2
2
 
3
3
  module Solidus
4
- class Gateway::BraintreeGateway < ::Spree::Gateway
4
+ gateway_superclass =
5
+ if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
6
+ ::Spree::Gateway
7
+ else
8
+ ::Spree::PaymentMethod::CreditCard
9
+ end
10
+
11
+ class Gateway::BraintreeGateway < gateway_superclass
5
12
  preference :environment, :string
6
13
  preference :merchant_id, :string
7
14
  preference :public_key, :string
@@ -22,8 +29,14 @@ module Solidus
22
29
  'Visa' => 'visa',
23
30
  }
24
31
 
25
- def method_type
26
- 'braintree'
32
+ if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
33
+ def method_type
34
+ 'braintree'
35
+ end
36
+ else
37
+ def partial_name
38
+ 'braintree'
39
+ end
27
40
  end
28
41
 
29
42
  def gateway_options
@@ -1,4 +1,4 @@
1
- class AddDataToCreditCard < ActiveRecord::Migration
1
+ class AddDataToCreditCard < SolidusSupport::Migration[4.2]
2
2
  def change
3
3
  add_column :spree_credit_cards, :data, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddBraintreeDeviceDataToOrder < ActiveRecord::Migration
1
+ class AddBraintreeDeviceDataToOrder < SolidusSupport::Migration[4.2]
2
2
  def change
3
3
  add_column :spree_orders, :braintree_device_data, :text
4
4
  end
@@ -1,3 +1,4 @@
1
1
  require "solidus_core"
2
+ require 'solidus_support'
2
3
  require "solidus_braintree/version"
3
4
  require 'solidus_braintree/engine'
@@ -1,3 +1,3 @@
1
1
  module SolidusBraintree
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -21,13 +21,14 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency "solidus_api", [">= 1.0.0", "< 3"]
23
23
  spec.add_dependency "solidus_core", [">= 1.0.0", "< 3"]
24
+ spec.add_dependency "solidus_support"
24
25
  spec.add_dependency "braintree", "~> 2.46"
25
26
 
26
27
  spec.add_development_dependency "bundler", "~> 1.10"
27
28
  spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency 'factory_girl', '~> 4.4'
29
+ spec.add_development_dependency 'factory_bot', '~> 4.4'
29
30
  spec.add_development_dependency 'rspec-rails'
30
- spec.add_development_dependency 'capybara'
31
+ spec.add_development_dependency 'capybara', '~> 2.18'
31
32
  spec.add_development_dependency 'capybara-screenshot'
32
33
  spec.add_development_dependency 'poltergeist', '~> 1.9'
33
34
  spec.add_development_dependency 'ffaker'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -50,6 +50,20 @@ dependencies:
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '3'
53
+ - !ruby/object:Gem::Dependency
54
+ name: solidus_support
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: braintree
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -93,7 +107,7 @@ dependencies:
93
107
  - !ruby/object:Gem::Version
94
108
  version: '10.0'
95
109
  - !ruby/object:Gem::Dependency
96
- name: factory_girl
110
+ name: factory_bot
97
111
  requirement: !ruby/object:Gem::Requirement
98
112
  requirements:
99
113
  - - "~>"
@@ -124,16 +138,16 @@ dependencies:
124
138
  name: capybara
125
139
  requirement: !ruby/object:Gem::Requirement
126
140
  requirements:
127
- - - ">="
141
+ - - "~>"
128
142
  - !ruby/object:Gem::Version
129
- version: '0'
143
+ version: '2.18'
130
144
  type: :development
131
145
  prerelease: false
132
146
  version_requirements: !ruby/object:Gem::Requirement
133
147
  requirements:
134
- - - ">="
148
+ - - "~>"
135
149
  - !ruby/object:Gem::Version
136
- version: '0'
150
+ version: '2.18'
137
151
  - !ruby/object:Gem::Dependency
138
152
  name: capybara-screenshot
139
153
  requirement: !ruby/object:Gem::Requirement
@@ -357,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
357
371
  version: '0'
358
372
  requirements: []
359
373
  rubyforge_project:
360
- rubygems_version: 2.5.1
374
+ rubygems_version: 2.7.6
361
375
  signing_key:
362
376
  specification_version: 4
363
377
  summary: Adds Solidus support for Braintree v.zero Gateway.