-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from solidusio/gsmendoza/92-merge-solidus-payp…
…al-braintree Merge the history of Solidus PayPal Braintree into this repository
- Loading branch information
Showing
252 changed files
with
14,299 additions
and
10,244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
# Required for feature specs. | ||
browser-tools: circleci/[email protected] | ||
|
||
# Always take the latest version of the orb, this allows us to | ||
# run specs against Solidus supported versions only without the need | ||
# to change this configuration every time a Solidus version is released | ||
|
@@ -11,17 +14,26 @@ jobs: | |
run-specs-with-postgres: | ||
executor: solidusio_extensions/postgres | ||
steps: | ||
- browser-tools/install-browser-tools | ||
- solidusio_extensions/run-tests | ||
run-specs-with-mysql: | ||
executor: solidusio_extensions/mysql | ||
steps: | ||
- browser-tools/install-browser-tools | ||
- solidusio_extensions/run-tests | ||
lint-code: | ||
executor: solidusio_extensions/sqlite-memory | ||
steps: | ||
- browser-tools/install-browser-tools | ||
- solidusio_extensions/lint-code | ||
|
||
workflows: | ||
"Run specs on supported Solidus versions": | ||
jobs: | ||
- run-specs-with-postgres | ||
- run-specs-with-mysql | ||
- lint-code | ||
|
||
"Weekly run specs against master": | ||
triggers: | ||
- schedule: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bump: | ||
recurse: false | ||
file: 'lib/solidus_paypal_braintree/version.rb' | ||
message: Bump SolidusPaypalBraintree to %{version} | ||
tag: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
issues=false | ||
exclude-labels=infrastructure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/Gemfile.lock | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
/spec/dummy | ||
/spec/examples.txt | ||
*.gem | ||
\#* | ||
*~ | ||
.#* | ||
.DS_Store | ||
.idea | ||
.project | ||
.sass-cache | ||
coverage | ||
Gemfile.lock | ||
tmp | ||
nbproject | ||
pkg | ||
*.swp | ||
spec/dummy | ||
spec/examples.txt | ||
/sandbox | ||
.rvmrc | ||
.ruby-version | ||
.ruby-gemset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
require: | ||
- solidus_dev_support/rubocop | ||
|
||
AllCops: | ||
NewCops: disable | ||
|
||
Layout/FirstArgumentIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/FirstHashElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
|
||
Naming/VariableNumber: | ||
Enabled: false | ||
|
||
# We use this extensively, the alternatives are not viable or desirable. | ||
RSpec/AnyInstance: | ||
Enabled: false | ||
|
||
# No need to make the code more complex for no real gain. | ||
RSpec/MessageSpies: | ||
Enabled: false | ||
|
||
# Let's consider legitimate to have multiple expectations within an example. | ||
RSpec/MultipleExpectations: | ||
Enabled: false | ||
|
||
# Allow to use subject as is, no big deal. | ||
RSpec/NamedSubject: | ||
Enabled: false | ||
|
||
# Let's set this to some really exagerate value. | ||
RSpec/NestedGroups: | ||
Max: 8 | ||
|
||
# We don't use the FactoryBot mixin | ||
RSpec/FactoryBot/SyntaxMethods: | ||
Enabled: false | ||
|
||
RSpec/VerifiedDoubles: | ||
# Sometimes you really need an "anything" double | ||
IgnoreSymbolicNames: true | ||
|
||
Style/FrozenStringLiteralComment: | ||
Exclude: | ||
- spec/**/* | ||
- db/migrate/**/* | ||
- bin/**/* | ||
|
||
Style/ExplicitBlockArgument: | ||
Exclude: | ||
- lib/solidus_paypal_braintree/request_protection.rb | ||
|
||
Rails/SkipsModelValidations: | ||
Exclude: | ||
- db/migrate/**/* | ||
|
||
Rails/ReflectionClassName: | ||
Exclude: | ||
- app/models/solidus_paypal_braintree/customer.rb | ||
- app/models/solidus_paypal_braintree/source.rb | ||
|
||
RSpec/MultipleMemoizedHelpers: | ||
Exclude: | ||
- spec/models/solidus_paypal_braintree/transaction_import_spec.rb | ||
- spec/models/solidus_paypal_braintree/response_spec.rb | ||
- spec/models/solidus_paypal_braintree/gateway_spec.rb | ||
- spec/controllers/solidus_paypal_braintree/client_tokens_controller_spec.rb | ||
- spec/features/frontend/braintree_credit_card_checkout_spec.rb |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
source "https://rubygems.org" | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
|
||
branch = ENV.fetch('SOLIDUS_BRANCH', 'master') | ||
solidus_git, solidus_frontend_git = if (branch == 'master') || (branch >= 'v3.2') | ||
%w[solidusio/solidus solidusio/solidus_frontend] | ||
else | ||
%w[solidusio/solidus] * 2 | ||
end | ||
gem 'solidus', github: solidus_git, branch: branch | ||
gem 'solidus_frontend', github: solidus_frontend_git, branch: branch | ||
gem 'solidus', github: 'solidusio/solidus', branch: branch | ||
|
||
# The solidus_frontend gem has been pulled out since v3.2 | ||
gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master' | ||
gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem | ||
|
||
# Needed to help Bundler figure out how to resolve dependencies, | ||
# otherwise it takes forever to resolve them | ||
if branch == 'master' || Gem::Version.new(branch[1..-1]) >= Gem::Version.new('2.10.0') | ||
gem 'rails', '~> 6.0' | ||
else | ||
gem 'rails', '~> 5.0' | ||
end | ||
# otherwise it takes forever to resolve them. | ||
# See https://github.com/bundler/bundler/issues/6677 | ||
gem 'rails', '>0.a' | ||
|
||
# Provides basic authentication functionality for testing parts of your engine | ||
gem 'solidus_auth_devise' | ||
|
||
case ENV['DB'] | ||
case ENV.fetch('DB', nil) | ||
when 'mysql' | ||
gem 'mysql2' | ||
when 'postgres' | ||
when 'postgresql' | ||
gem 'pg' | ||
else | ||
gem 'sqlite3' | ||
end | ||
|
||
gem "rails-controller-testing", group: :test | ||
|
||
group :development, :test do | ||
gem 'factory_bot', '> 4.10.0' | ||
gem "pry-rails" | ||
end | ||
# While we still support Ruby < 3 we need to workaround a limitation in | ||
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't | ||
# resolve gems based on the required ruby version. | ||
gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3') | ||
|
||
gemspec | ||
|
||
# Use a local Gemfile to include development dependencies that might not be | ||
# relevant for the project or for other contributors, e.g. pry-byebug. | ||
# | ||
# We use `send` instead of calling `eval_gemfile` to work around an issue with | ||
# how Dependabot parses projects: https://github.com/dependabot/dependabot-core/issues/1658. | ||
send(:eval_gemfile, 'Gemfile-local') if File.exist? 'Gemfile-local' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Copyright (c) 2016-2020 Stembolt and other contributors | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name Solidus nor the names of its contributors may be used to | ||
endorse or promote products derived from this software without specific | ||
prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.