atpay_buttons 1.1.7 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
data/atpay_buttons.gemspec
CHANGED
@@ -4,8 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "atpay_buttons"
|
7
|
-
spec.version = '1.
|
8
|
-
spec.date = '2013-
|
7
|
+
spec.version = '1.2.0'
|
8
|
+
spec.date = '2013-12-05'
|
9
9
|
spec.authors = ["Thomas Pastinsky", "Glen Holcomb", "James Kassemi", "Isaiah Baca"]
|
10
10
|
spec.email = ["dev@atpay.com"]
|
11
11
|
spec.description = 'Atpay button generator'
|
@@ -52,6 +52,10 @@ module AtPay
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def token
|
56
|
+
@options[:token].chars.each_slice(50).map(&:join).join("\n")
|
57
|
+
end
|
58
|
+
|
55
59
|
def mailto_subject
|
56
60
|
URI.encode(@options[:subject])
|
57
61
|
end
|
@@ -78,11 +82,12 @@ module AtPay
|
|
78
82
|
#
|
79
83
|
# @return [String]
|
80
84
|
def mailto_body
|
81
|
-
mailto_body_template.render({
|
85
|
+
part_a = URI.encode(mailto_body_template.render({
|
82
86
|
'amount' => amount,
|
83
|
-
'name' => @options[:destination]
|
84
|
-
|
85
|
-
}
|
87
|
+
'name' => @options[:destination]}))
|
88
|
+
part_b = CGI.escape(token)
|
89
|
+
part_z = "#{part_a}%0A%0A#{part_b}"
|
90
|
+
return part_z
|
86
91
|
end
|
87
92
|
|
88
93
|
# This is processed as liquid - in the future we can allow overwriting the
|
@@ -105,4 +110,4 @@ module AtPay
|
|
105
110
|
end
|
106
111
|
end
|
107
112
|
end
|
108
|
-
end
|
113
|
+
end
|
@@ -1,11 +1,9 @@
|
|
1
1
|
Just hit send to complete your payment of {{amount}}. You will receive a receipt by email,
|
2
2
|
|
3
|
-
Thank You!
|
3
|
+
Thank You!
|
4
4
|
|
5
5
|
|
6
6
|
|
7
7
|
---
|
8
8
|
|
9
|
-
The code below secures and validates your transaction:
|
10
|
-
|
11
|
-
{{token}}
|
9
|
+
The code below secures and validates your transaction:
|
data/spec/template_spec.rb
CHANGED
@@ -7,6 +7,12 @@ describe AtPay::Button::Template do
|
|
7
7
|
let(:subject) { AtPay::Button::Template.new options }
|
8
8
|
let(:subject_class) { AtPay::Button::Template }
|
9
9
|
|
10
|
+
=begin
|
11
|
+
it "test" do
|
12
|
+
binding.pry
|
13
|
+
end
|
14
|
+
=end
|
15
|
+
|
10
16
|
describe "#new" do
|
11
17
|
it "adds the provided options to the defaults" do
|
12
18
|
subject.instance_eval{ @options }.keys.sort.must_equal [:subject, :token, :title, :background_color, :foreground_color, :image, :processor, :destination, :templates, :email, :amount, :wrap, :wrap_text].sort
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atpay_buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-
|
15
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bundler
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.8.
|
135
|
+
rubygems_version: 1.8.25
|
136
136
|
signing_key:
|
137
137
|
specification_version: 3
|
138
138
|
summary: Command line tool and Ruby library for generating @Pay 2 click email buttons
|
@@ -146,3 +146,4 @@ test_files:
|
|
146
146
|
- spec/generator_spec.rb
|
147
147
|
- spec/spec_helper.rb
|
148
148
|
- spec/template_spec.rb
|
149
|
+
has_rdoc:
|