atpay_buttons 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/atpay_buttons.gemspec +2 -2
- data/lib/atpay/button/template.rb +4 -4
- data/spec/template_spec.rb +4 -3
- metadata +13 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9d7c2f7c2ecdfb14ae73fa781bd85b1bea29e4a
|
4
|
+
data.tar.gz: 34b1c01ebd8d3410ac2050ce2f13bb39bcbea8f0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ac73cf12e8e86e961fd5e2e66a10e6a23e09171b8ee0987cc856fb197cf4af07d06e542f7ae35d383299a3ddb89a215c3cf60dc8c0501d65ce7ea7676cfe8950
|
7
|
+
data.tar.gz: 44dc92d2cf2c42a2f00844c70052fc3b08b1566662092baa1a5015d4093b3a685054991cdc6a18652efabbea79b7d2db638df797388d64f3432926ad42c0f800
|
data/.gitignore
CHANGED
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.1.
|
8
|
-
spec.date = '2013-
|
7
|
+
spec.version = '1.1.6'
|
8
|
+
spec.date = '2013-10-03'
|
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'
|
@@ -53,7 +53,7 @@ module AtPay
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def mailto_subject
|
56
|
-
|
56
|
+
URI.encode(@options[:subject])
|
57
57
|
end
|
58
58
|
|
59
59
|
def yahoo_mailto
|
@@ -78,11 +78,11 @@ module AtPay
|
|
78
78
|
#
|
79
79
|
# @return [String]
|
80
80
|
def mailto_body
|
81
|
-
|
81
|
+
mailto_body_template.render({
|
82
82
|
'amount' => amount,
|
83
83
|
'name' => @options[:destination],
|
84
|
-
'token' => @options[:token]
|
85
|
-
})
|
84
|
+
'token' => CGI.escape(@options[:token])
|
85
|
+
})
|
86
86
|
end
|
87
87
|
|
88
88
|
# This is processed as liquid - in the future we can allow overwriting the
|
data/spec/template_spec.rb
CHANGED
@@ -2,13 +2,14 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe AtPay::Button::Template do
|
4
4
|
let(:session) { mock }
|
5
|
-
let(:
|
5
|
+
let(:token) { '@QQTFJz2wM5fcVD/PLmpnjNvJIKe8MoGOAAAAAAAAD63aKFKQqrkwigfNSdPP2kVGqHiDr7t2yCLyqcuDTUrBvGBcgbzFnyNui7PYSzHRJM0tP3TS7DlURUuhVq5p3gQvX0Ycd2ISHGP9POWz3B2u+sTVtRy89aM=' }
|
6
|
+
let(:options) { {destination: "Partner Name", email: 'bob@example.com', amount: 20, templates: "spec/fixtures/templates", token: token } }
|
6
7
|
let(:subject) { AtPay::Button::Template.new options }
|
7
8
|
let(:subject_class) { AtPay::Button::Template }
|
8
9
|
|
9
10
|
describe "#new" do
|
10
11
|
it "adds the provided options to the defaults" do
|
11
|
-
subject.instance_eval{ @options }.keys.sort.must_equal [:subject, :title, :background_color, :foreground_color, :image, :processor, :destination, :templates, :email, :amount, :wrap, :wrap_text].sort
|
12
|
+
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
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -54,7 +55,7 @@ describe AtPay::Button::Template do
|
|
54
55
|
|
55
56
|
# Integration style tests
|
56
57
|
describe "#templates" do
|
57
|
-
let(:options) { {destination: "Partner Name", amount: 20 } }
|
58
|
+
let(:options) { {destination: "Partner Name", amount: 20, token: token } }
|
58
59
|
|
59
60
|
it "should render with all known template types" do
|
60
61
|
%w(test@hotmail.com test@yahoo.com test@atpay.com).each do |email|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atpay_buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.6
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thomas Pastinsky
|
@@ -12,12 +11,11 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date: 2013-
|
14
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
16
|
- !ruby/object:Gem::Dependency
|
18
17
|
name: bundler
|
19
18
|
requirement: !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
19
|
requirements:
|
22
20
|
- - ~>
|
23
21
|
- !ruby/object:Gem::Version
|
@@ -25,7 +23,6 @@ dependencies:
|
|
25
23
|
type: :development
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
27
|
- - ~>
|
31
28
|
- !ruby/object:Gem::Version
|
@@ -33,49 +30,43 @@ dependencies:
|
|
33
30
|
- !ruby/object:Gem::Dependency
|
34
31
|
name: rake
|
35
32
|
requirement: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
33
|
requirements:
|
38
|
-
- -
|
34
|
+
- - '>='
|
39
35
|
- !ruby/object:Gem::Version
|
40
36
|
version: '0'
|
41
37
|
type: :development
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
|
-
- -
|
41
|
+
- - '>='
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: '0'
|
49
44
|
- !ruby/object:Gem::Dependency
|
50
45
|
name: atpay_tokens
|
51
46
|
requirement: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
47
|
requirements:
|
54
|
-
- -
|
48
|
+
- - '>='
|
55
49
|
- !ruby/object:Gem::Version
|
56
50
|
version: '0'
|
57
51
|
type: :runtime
|
58
52
|
prerelease: false
|
59
53
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
54
|
requirements:
|
62
|
-
- -
|
55
|
+
- - '>='
|
63
56
|
- !ruby/object:Gem::Version
|
64
57
|
version: '0'
|
65
58
|
- !ruby/object:Gem::Dependency
|
66
59
|
name: liquid
|
67
60
|
requirement: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
61
|
requirements:
|
70
|
-
- -
|
62
|
+
- - '>='
|
71
63
|
- !ruby/object:Gem::Version
|
72
64
|
version: '0'
|
73
65
|
type: :runtime
|
74
66
|
prerelease: false
|
75
67
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
68
|
requirements:
|
78
|
-
- -
|
69
|
+
- - '>='
|
79
70
|
- !ruby/object:Gem::Version
|
80
71
|
version: '0'
|
81
72
|
description: Atpay button generator
|
@@ -114,27 +105,26 @@ files:
|
|
114
105
|
- test_data.txt
|
115
106
|
homepage: http://atpay.com
|
116
107
|
licenses: []
|
108
|
+
metadata: {}
|
117
109
|
post_install_message:
|
118
110
|
rdoc_options: []
|
119
111
|
require_paths:
|
120
112
|
- lib
|
121
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
114
|
requirements:
|
124
|
-
- -
|
115
|
+
- - '>='
|
125
116
|
- !ruby/object:Gem::Version
|
126
117
|
version: '0'
|
127
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
-
none: false
|
129
119
|
requirements:
|
130
|
-
- -
|
120
|
+
- - '>='
|
131
121
|
- !ruby/object:Gem::Version
|
132
122
|
version: '0'
|
133
123
|
requirements: []
|
134
124
|
rubyforge_project:
|
135
|
-
rubygems_version:
|
125
|
+
rubygems_version: 2.0.2
|
136
126
|
signing_key:
|
137
|
-
specification_version:
|
127
|
+
specification_version: 4
|
138
128
|
summary: Command line tool and Ruby library for generating @Pay 2 click email buttons
|
139
129
|
test_files:
|
140
130
|
- spec/command_line_spec.rb
|
@@ -146,4 +136,3 @@ test_files:
|
|
146
136
|
- spec/generator_spec.rb
|
147
137
|
- spec/spec_helper.rb
|
148
138
|
- spec/template_spec.rb
|
149
|
-
has_rdoc:
|