Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Extension maintenance #216

Merged
merged 6 commits into from
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ rvm:
- 2.5
env:
matrix:
- SOLIDUS_BRANCH=v2.3 DB=postgres
- SOLIDUS_BRANCH=v2.4 DB=postgres
- SOLIDUS_BRANCH=v2.5 DB=postgres
- SOLIDUS_BRANCH=v2.6 DB=postgres
- SOLIDUS_BRANCH=v2.7 DB=postgres
- SOLIDUS_BRANCH=v2.8 DB=postgres
- SOLIDUS_BRANCH=master DB=postgres
- SOLIDUS_BRANCH=v2.3 DB=mysql
- SOLIDUS_BRANCH=v2.4 DB=mysql
- SOLIDUS_BRANCH=v2.5 DB=mysql
- SOLIDUS_BRANCH=v2.6 DB=mysql
- SOLIDUS_BRANCH=v2.7 DB=mysql
- SOLIDUS_BRANCH=v2.8 DB=mysql
- SOLIDUS_BRANCH=master DB=mysql
2 changes: 1 addition & 1 deletion app/views/spree/shared/_braintree_hosted_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="input" id="card_code<%= id %>"></div>

<a href="/content/cvv" class="info cvvLink" target="_blank">
(<%= Spree.t(:what_is_this) %>)
(<%= I18n.t("spree.what_is_this") %>)
</a>
</div>

Expand Down
4 changes: 2 additions & 2 deletions lib/solidus_paypal_braintree/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# As we match the body in our VCR settings VCR can not match the request anymore and therefore cannot replay existing cassettes.
#
factory :address do
zipcode '21088-0255'
lastname "Doe"
zipcode { '21088-0255' }
lastname { 'Doe' }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<% previous_cards.each do |card| %>
<label><%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_number %><br /></label>
<% end %>
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= Spree.t(:use_new_cc) %></label>
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= I18n.t("spree.use_new_cc") %></label>
<% end %>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class="row">
<div class="alpha six columns">
<dl>
<dt><%= Spree.t(:identifier) %>:</dt>
<dt><%= I18n.t("spree.identifier") %>:</dt>
<dd><%= payment.number %></dd>

<dt><%= Spree.t(:response_code) %>:</dt>
<dt><%= I18n.t("spree.response_code") %>:</dt>
<dd><%= braintree_transaction_link(payment) %></dd>

<% if payment.source.token.present? %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<% previous_cards.each do |card| %>
<label><%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.display_number %><br /></label>
<% end %>
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= Spree.t(:use_new_cc) %></label>
<label><%= radio_button_tag :card, "new", false, { id: "card_new#{id}" } %> <%= I18n.t("spree.use_new_cc") %></label>
<% end %>
</div>

Expand Down
2 changes: 1 addition & 1 deletion solidus_paypal_braintree.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rubocop', '~> 0.53.0'
s.add_development_dependency 'rubocop-rspec'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'sqlite3'
s.add_development_dependency 'sqlite3', '~> 1.3.6'
s.add_development_dependency 'webmock'
s.add_development_dependency 'vcr'
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
create(:store, payment_methods: [gateway, braintree]).tap do |store|
store.braintree_configuration.update!(credit_card: true)
end
order = OrderWalkthrough.up_to(:delivery)

if SolidusSupport.solidus_gem_version >= Gem::Version.new('2.6.0')
order = Spree::TestingSupport::OrderWalkthrough.up_to(:delivery)
else
order = OrderWalkthrough.up_to(:delivery)
end

user = create(:user)
order.user = user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
# new address is NY
ny_zone = Spree::Zone.create name: 'nyc tax'
ny_zone.members << Spree::ZoneMember.new(zoneable: new_york)
create :tax_rate, tax_category: original_tax_rate.tax_category, zone: ny_zone, amount: 0.1
create :tax_rate, tax_categories: [original_tax_rate.tax_categories.first], zone: ny_zone, amount: 0.1
end

it 'includes the lower tax in the payment' do
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

ApplicationController.prepend_view_path "spec/fixtures/views"

FactoryBot.use_parent_strategy = false

VCR.configure do |c|
c.cassette_library_dir = "spec/fixtures/cassettes"
c.hook_into :webmock
Expand Down