atpay_buttons 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ $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.4.3'
7
+ spec.version = '1.4.4'
8
8
  spec.date = '2014-04-07'
9
9
  spec.authors = ["Thomas Pastinsky", "Glen Holcomb", "James Kassemi", "Isaiah Baca"]
10
10
  spec.email = ["dev@atpay.com"]
@@ -34,6 +34,7 @@ require_relative '../lib/atpay_buttons.rb'
34
34
  opt :signup_url, "This is the signup url for recipients that don't have @Pay Records", :type => :string
35
35
  opt :image_url, "The URL to a small thumbnail image to be used in the button. Default: https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png", :type => :string, :default => "https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png"
36
36
  opt :background_color, "The background color of the button. Default: #6dbe45", :type => :string, :default => "#6dbe45"
37
+ opt :analytic_url, "The URL for an image to track opens. Default: none", :type => :string, :default => nil
37
38
  opt :foreground_color, "The foreground color of the button. Default: #ffffff", :type => :string, :default => "#ffffff"
38
39
  opt :title, "The title for each button", :type => :string
39
40
  opt :wrap, "Will use wrapped (with a styled div container) version of the template. Default: false", :type => :boolean, :default => false
@@ -1,5 +1,6 @@
1
1
  require 'liquid'
2
2
  require 'cgi'
3
+ require 'uri'
3
4
 
4
5
  module AtPay
5
6
  module Button
@@ -14,6 +15,7 @@ module AtPay
14
15
  :image => "https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png",
15
16
  :processor => ENV["ATPAY_PAYMENT_ADDRESS"] || "transaction@secure.atpay.com",
16
17
  :templates => File.join(File.dirname(__FILE__), "/templates"),
18
+ :analytic_url => nil,
17
19
  :wrap => false,
18
20
  :wrap_text => "Made for Mobile"
19
21
  }.update(options)
@@ -18,6 +18,10 @@
18
18
  </style>
19
19
 
20
20
  <center>
21
+ {% if analytic_url %}
22
+ <img src="{{analytic_url}}" width="1" height="1" />
23
+ {% endif %}
24
+
21
25
  <table class="reg_mailto" border='0' cellpadding='0' cellspacing='0' style='font-family: Tahoma; margin: 0 auto !important; background-color:{{background_color}};'>
22
26
  <tr>
23
27
  {% if image %}
@@ -36,6 +36,10 @@
36
36
  <!-- BUTTON CODE -->
37
37
 
38
38
  <center>
39
+ {% if analytic_url %}
40
+ <img src="{{analytic_url}}" width="1" height="1" />
41
+ {% endif %}
42
+
39
43
  <table class="reg_mailto" border='0' cellpadding='0' cellspacing='0' style='margin:0px auto !important; font-family: Tahoma; background-color:{{background_color}};'>
40
44
  <tr>
41
45
  {% if image %}
@@ -9,6 +9,11 @@
9
9
  a.yahoo[fix] {display:none; display: none !important;font-size: 0px !important;}
10
10
  </style>
11
11
 
12
+ {% if analytic_url %}
13
+ <img src="{{analytic_url}}" width="1" height="1" />
14
+ {% endif %}
15
+
16
+
12
17
  <center>
13
18
  <table cellpadding='0' cellspacing='0' style='margin-bottom:20px;'>
14
19
  <tr>
@@ -9,6 +9,11 @@
9
9
  a.yahoo[fix] {display:none; display: none !important;font-size: 0px !important;}
10
10
  </style>
11
11
 
12
+ {% if analytic_url %}
13
+ <img src="{{analytic_url}}" width="1" height="1" />
14
+ {% endif %}
15
+
16
+
12
17
  <center>
13
18
  <a border='0' class='yahoo' fix='email' href='{{yahoo_url}}' style='text-underline:none;'>
14
19
  <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
@@ -7,15 +7,10 @@ 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
-
16
10
  describe "#new" do
17
11
  it "adds the provided options to the defaults" do
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
12
+ # TODO: does this add any value to the tests?
13
+ subject.instance_eval{ @options }.keys.sort.must_equal [:analytic_url, :subject, :token, :title, :background_color, :foreground_color, :image, :processor, :destination, :templates, :email, :amount, :wrap, :wrap_text].sort
19
14
  end
20
15
  end
21
16
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atpay_buttons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Thomas Pastinsky
@@ -16,6 +17,7 @@ dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: bundler
18
19
  requirement: !ruby/object:Gem::Requirement
20
+ none: false
19
21
  requirements:
20
22
  - - ~>
21
23
  - !ruby/object:Gem::Version
@@ -23,6 +25,7 @@ dependencies:
23
25
  type: :development
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
30
  - - ~>
28
31
  - !ruby/object:Gem::Version
@@ -30,6 +33,7 @@ dependencies:
30
33
  - !ruby/object:Gem::Dependency
31
34
  name: rake
32
35
  requirement: !ruby/object:Gem::Requirement
36
+ none: false
33
37
  requirements:
34
38
  - - ! '>='
35
39
  - !ruby/object:Gem::Version
@@ -37,6 +41,7 @@ dependencies:
37
41
  type: :development
38
42
  prerelease: false
39
43
  version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
40
45
  requirements:
41
46
  - - ! '>='
42
47
  - !ruby/object:Gem::Version
@@ -44,6 +49,7 @@ dependencies:
44
49
  - !ruby/object:Gem::Dependency
45
50
  name: atpay_tokens
46
51
  requirement: !ruby/object:Gem::Requirement
52
+ none: false
47
53
  requirements:
48
54
  - - ! '>='
49
55
  - !ruby/object:Gem::Version
@@ -51,6 +57,7 @@ dependencies:
51
57
  type: :runtime
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
54
61
  requirements:
55
62
  - - ! '>='
56
63
  - !ruby/object:Gem::Version
@@ -58,6 +65,7 @@ dependencies:
58
65
  - !ruby/object:Gem::Dependency
59
66
  name: liquid
60
67
  requirement: !ruby/object:Gem::Requirement
68
+ none: false
61
69
  requirements:
62
70
  - - ! '>='
63
71
  - !ruby/object:Gem::Version
@@ -65,6 +73,7 @@ dependencies:
65
73
  type: :runtime
66
74
  prerelease: false
67
75
  version_requirements: !ruby/object:Gem::Requirement
76
+ none: false
68
77
  requirements:
69
78
  - - ! '>='
70
79
  - !ruby/object:Gem::Version
@@ -105,26 +114,27 @@ files:
105
114
  - test_data.txt
106
115
  homepage: http://atpay.com
107
116
  licenses: []
108
- metadata: {}
109
117
  post_install_message:
110
118
  rdoc_options: []
111
119
  require_paths:
112
120
  - lib
113
121
  required_ruby_version: !ruby/object:Gem::Requirement
122
+ none: false
114
123
  requirements:
115
124
  - - ! '>='
116
125
  - !ruby/object:Gem::Version
117
126
  version: '0'
118
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
+ none: false
119
129
  requirements:
120
130
  - - ! '>='
121
131
  - !ruby/object:Gem::Version
122
132
  version: '0'
123
133
  requirements: []
124
134
  rubyforge_project:
125
- rubygems_version: 2.2.2
135
+ rubygems_version: 1.8.23
126
136
  signing_key:
127
- specification_version: 4
137
+ specification_version: 3
128
138
  summary: Command line tool and Ruby library for generating @Pay 2 click email buttons
129
139
  test_files:
130
140
  - spec/command_line_spec.rb
@@ -136,4 +146,3 @@ test_files:
136
146
  - spec/generator_spec.rb
137
147
  - spec/spec_helper.rb
138
148
  - spec/template_spec.rb
139
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MjM0NjFkODBjMWFhMzA5ODc5MjM5ZGU3Njg5ZmViMWM4YTRmNTczZg==
5
- data.tar.gz: !binary |-
6
- OTRmOGNhNmUxYzg1NmJlMWEwMzFlMzEyNDMwMTVkYTkyZGZmMmQ2OA==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- YjY4MGQyMDE1MGVhNWI0OTlkMDkzYTYyNTYwYWUyNDQxOTJjNWJhZTY3MTRh
10
- YTJlNjQwMDZlNjRjNTc0ZmY2ZjcwOGNkNzQwZjk5MWM1MDFlZDllNzM1NjRm
11
- ZjVhN2RmMGE2YjIzZjJmYjZlMDBlNzkxNjgyNDEyZDliNTBhMWU=
12
- data.tar.gz: !binary |-
13
- N2Q4NzkzNWI3NzBmODVmNzc5MzAzZjNhNWUwMzBlNjUzOGRmYTQ3ZDMxNTRi
14
- NmU2NTJiOWY1M2Q3MzhkYjlmODNkYWE3MDk0NTZkNDc2MzIwZDY4M2I1MzEw
15
- ZmY5MThiYjQxMzliZDk4ZGFhNjg4YWQ1M2E3ZmI5NzFmNTA5MDQ=