diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c111b33 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.gem diff --git a/README.markdown b/README.markdown index 5dbbd6d..d2a3a23 100644 --- a/README.markdown +++ b/README.markdown @@ -9,7 +9,11 @@ It's a Ruby on Rails port of the connexion kits published by the bank. ## INSTALL -script/plugin install git://github.com/novelys/paiementcic.git + script/plugin install git://github.com/novelys/paiementcic.git + +or, in your Gemfile + + gem 'paiement_cic', :git => 'git://github.com/novelys/paiementcic.git', :branch => 'gem' ## USAGE @@ -32,7 +36,7 @@ script/plugin install git://github.com/novelys/paiementcic.git ### in order controller : - helper :paiement_cic + helper :'paiement_cic/form' ### in the payment by card view : diff --git a/init.rb b/init.rb index a4d18c5..3ae6e16 100644 --- a/init.rb +++ b/init.rb @@ -1,2 +1,2 @@ require "paiement_cic" -require "paiement_cic_helper" +require "paiement_cic/form_helper" diff --git a/lib/paiement_cic.rb b/lib/paiement_cic.rb index 487a4dc..90c5af5 100644 --- a/lib/paiement_cic.rb +++ b/lib/paiement_cic.rb @@ -14,6 +14,8 @@ class String end class PaiementCic + autoload :FormHelper, "paiement_cic/form_helper" + @@version = "3.0" # clé extraite grâce à extract2HmacSha1.html fourni par le Crédit Mutuel cattr_accessor :version diff --git a/lib/paiement_cic_helper.rb b/lib/paiement_cic/form_helper.rb similarity index 98% rename from lib/paiement_cic_helper.rb rename to lib/paiement_cic/form_helper.rb index 7cec90e..a171310 100644 --- a/lib/paiement_cic_helper.rb +++ b/lib/paiement_cic/form_helper.rb @@ -1,5 +1,5 @@ ## refactor this -module PaiementCicHelper +module PaiementCic::FormHelper def paiement_cic_hidden_fields(order, price, order_transaction, options = {}) oa = PaiementCic.config(price, order_transaction.reference) diff --git a/lib/paiement_cic/version.rb b/lib/paiement_cic/version.rb new file mode 100644 index 0000000..b97e9ab --- /dev/null +++ b/lib/paiement_cic/version.rb @@ -0,0 +1,3 @@ +class PaiementCic + VERSION = "0.1" +end diff --git a/paiement_cic.gemspec b/paiement_cic.gemspec new file mode 100644 index 0000000..bf33c84 --- /dev/null +++ b/paiement_cic.gemspec @@ -0,0 +1,16 @@ +# encoding: utf-8 +$:.push File.expand_path("../lib", __FILE__) +require "paiement_cic/version" + +Gem::Specification.new do |s| + s.name = "paiement_cic" + s.version = PaiementCic::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["Novelys Team"] + s.homepage = "https://github.com/novelys/paiementcic" + s.summary = %q{CIC / Crédit Mutuel credit card payment toolbox} + s.description = %q{Paiement CIC is a gem to ease credit card payment with the CIC / Crédit Mutuel banks system. It's a Ruby on Rails port of the connexion kits published by the bank.} + + s.files = `git ls-files`.split("\n") + s.require_paths = ["lib"] +end