-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
484 additions
and
383 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,5 +1,5 @@ | ||
require 'bundler/gem_tasks' | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
|
||
RSpec::Core::RakeTask.new("spec") | ||
task :default => :spec | ||
task default: :spec |
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,32 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "datatrans/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "datatrans" | ||
s.version = Datatrans::VERSION | ||
s.authors = ["Tobias Miesel", "Thomas Maurer", "Corin Langosch", "Pascal Betz"] | ||
s.email = ["[email protected]"] | ||
s.homepage = "" | ||
s.summary = %q{Datatrans Integration for Ruby on Rails} | ||
s.description = %q{Datatrans Integration for Ruby on Rails} | ||
s.name = "datatrans" | ||
s.version = Datatrans::VERSION | ||
s.authors = ["Tobias Miesel", "Thomas Maurer", "Corin Langosch", "Pascal Betz"] | ||
s.email = ["[email protected]"] | ||
s.homepage = "" | ||
s.summary = "Datatrans Integration for Ruby on Rails" | ||
s.description = "Datatrans Integration for Ruby on Rails" | ||
|
||
s.rubyforge_project = "datatrans" | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | ||
s.files = `git ls-files`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } | ||
s.require_paths = ["lib"] | ||
|
||
s.required_ruby_version = '>= 2.6' | ||
s.required_ruby_version = ">= 2.6" | ||
|
||
s.add_dependency 'httparty' | ||
s.add_dependency 'activesupport', '>= 5.2' | ||
s.add_dependency 'i18n' | ||
s.add_dependency 'builder' | ||
s.add_dependency 'multi_xml', '>= 0.5.1' | ||
s.add_dependency "httparty" | ||
s.add_dependency "activesupport", ">= 5.2" | ||
s.add_dependency "i18n" | ||
s.add_dependency "builder" | ||
s.add_dependency "multi_xml", ">= 0.5.1" | ||
|
||
s.add_development_dependency 'actionpack', '>= 5.2' | ||
s.add_development_dependency 'appraisal' | ||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'rspec' | ||
s.license = 'MIT' | ||
s.add_development_dependency "actionpack", ">= 5.2" | ||
s.add_development_dependency "appraisal" | ||
s.add_development_dependency "rake" | ||
s.add_development_dependency "rspec" | ||
s.license = "MIT" | ||
end |
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,19 +1,19 @@ | ||
require 'active_support/core_ext/module' | ||
require "active_support/core_ext/module" | ||
|
||
module Datatrans | ||
InvalidSignatureError = Class.new(StandardError) | ||
end | ||
|
||
require 'datatrans/version' | ||
require 'datatrans/common' | ||
require 'datatrans/config' | ||
require 'datatrans/xml/transaction' | ||
require 'datatrans/web/transaction' | ||
require 'datatrans/json/transaction' | ||
require "datatrans/version" | ||
require "datatrans/common" | ||
require "datatrans/config" | ||
require "datatrans/xml/transaction" | ||
require "datatrans/web/transaction" | ||
require "datatrans/json/transaction" | ||
|
||
begin | ||
require 'action_view' | ||
require 'datatrans/web/view_helper' | ||
require "action_view" | ||
require "datatrans/web/view_helper" | ||
ActionView::Base.send(:include, Datatrans::Web::ViewHelper) | ||
rescue LoadError | ||
end |
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,10 +1,10 @@ | ||
require 'openssl' | ||
require "openssl" | ||
|
||
module Datatrans::Common | ||
def sign(*fields) | ||
return nil unless self.datatrans.sign_key | ||
key = self.datatrans.sign_key.split(/([a-f0-9][a-f0-9])/).reject(&:empty?) | ||
return nil unless datatrans.sign_key | ||
key = datatrans.sign_key.split(/([a-f0-9][a-f0-9])/).reject(&:empty?) | ||
key = key.pack("H*" * key.size) | ||
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::MD5.new, key, fields.join) | ||
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("MD5"), key, fields.join) | ||
end | ||
end | ||
end |
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
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
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
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
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
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
Oops, something went wrong.