active_merchant_pay2go 0.1.0 → 0.1.1

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
2
  SHA1:
3
- metadata.gz: a82975572be69d4045c053e97c27c618852597cf
4
- data.tar.gz: a123f3fbc7b7d1c6ac02921f8c570cd32efea8d6
3
+ metadata.gz: 4f70e761c628f745b7e046f04575a9924ed7320a
4
+ data.tar.gz: 97116e83a67e4eacd8b68e38362af400258ac463
5
5
  SHA512:
6
- metadata.gz: ec013c3fcb95a5398c2bd1b76bdeefe996f68d841da4c0b62a6c9715d8b2085a2db9520ff8b35d960ac024c77dd0b1a8bb0092ec3833be3493459a780304cd51
7
- data.tar.gz: e14e68e9f949571330768b7c17acc48af8dc8483cbb90f544836732d7c8f3b636958c0f25088ab7635c243e521c3f62aa837806419489b15976cba2a723d8a6d
6
+ metadata.gz: 05a465ebc60e92f54d6e5be5333ce72eb745061cf94fe2aecd2d7048f45d8bfbeb1018f777492548ef73854e090644d3a7298f6f7d89364c19fd3c3ab7133b62
7
+ data.tar.gz: a5947769d2487ac950adfd01849de8b437fe17d5b53dd6edfbf38b5438e3cf2e1f5626ea707bfc1f7f9111ba76b541049b04724a84f77040e76f928ffdc2f7ba
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ test/tmp/*
10
11
  *.gem
data/README.md CHANGED
@@ -24,15 +24,10 @@ $ bundle
24
24
 
25
25
  1. I would suggest reading the [official API](https://www.pay2go.com/dw_files/info_api/pay2go_gateway_MPGapi_V1_1_4.pdf) first.
26
26
 
27
- 2. Create file `config/initializers/allpay.rb`
28
-
29
- ``` rb
30
- OffsitePayments::Integrations::Pay2go.setup do |pay2go|
31
- # You have to apply credential below by yourself.
32
- pay2go.merchant_id = 'xxx'
33
- pay2go.hash_key = 'xxx'
34
- pay2go.hash_iv = 'xxx'
35
- end
27
+ 2. Create file `config/initializers/pay2go.rb`
28
+
29
+ ``` sh
30
+ rails g pay2go:install
36
31
  ```
37
32
 
38
33
  3. Environment configuration:
@@ -19,12 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_runtime_dependency 'activemerchant'
23
- spec.add_runtime_dependency 'offsite_payments'
22
+ spec.add_dependency 'activemerchant'
23
+ spec.add_dependency 'offsite_payments'
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1.10'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'test-unit', '~> 3.0'
28
+ spec.add_development_dependency 'rails', '>= 3.2.6', '< 5'
24
29
 
25
- spec.add_development_dependency "bundler", "~> 1.10"
26
- spec.add_development_dependency "rake", "~> 10.0"
27
- spec.add_development_dependency 'mocha', '~> 0.13.0'
28
- spec.add_development_dependency 'test-unit', '~> 2.5'
29
- spec.add_development_dependency 'thor', '~> 0'
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchantPay2go
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,15 @@
1
+ module Pay2go
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ desc "Creates a Pay2go initialize"
7
+ class_option :orm
8
+
9
+ def copy_initializer
10
+ template "pay2go.rb", "config/initializers/pay2go.rb"
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ OffsitePayments::Integrations::Pay2go.setup do |pay2go|
2
+ # You have to apply credential below by yourself.
3
+ pay2go.merchant_id = ''
4
+ pay2go.hash_key = ''
5
+ pay2go.hash_iv = ''
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_merchant_pay2go
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary
@@ -66,48 +66,40 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
- - !ruby/object:Gem::Dependency
70
- name: mocha
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.13.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.13.0
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: test-unit
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '2.5'
75
+ version: '3.0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '2.5'
82
+ version: '3.0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: thor
84
+ name: rails
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - "~>"
87
+ - - ">="
102
88
  - !ruby/object:Gem::Version
103
- version: '0'
89
+ version: 3.2.6
90
+ - - "<"
91
+ - !ruby/object:Gem::Version
92
+ version: '5'
104
93
  type: :development
105
94
  prerelease: false
106
95
  version_requirements: !ruby/object:Gem::Requirement
107
96
  requirements:
108
- - - "~>"
97
+ - - ">="
109
98
  - !ruby/object:Gem::Version
110
- version: '0'
99
+ version: 3.2.6
100
+ - - "<"
101
+ - !ruby/object:Gem::Version
102
+ version: '5'
111
103
  description: This gem integrate Rails with pay2go(智付寶).
112
104
  email:
113
105
  - garylai1990@gmail.com
@@ -127,6 +119,8 @@ files:
127
119
  - bin/setup
128
120
  - lib/active_merchant_pay2go.rb
129
121
  - lib/active_merchant_pay2go/version.rb
122
+ - lib/generators/pay2go/install_generator.rb
123
+ - lib/generators/pay2go/templates/pay2go.rb
130
124
  - lib/offsite_payments/integrations/pay2go.rb
131
125
  homepage: https://github.com/imgarylai/active_merchant_pay2go
132
126
  licenses: