atpay_buttons 1.3.1 → 1.3.2

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.3.1'
7
+ spec.version = '1.3.2'
8
8
  spec.date = '2014-01-31'
9
9
  spec.authors = ["Thomas Pastinsky", "Glen Holcomb", "James Kassemi", "Isaiah Baca"]
10
10
  spec.email = ["dev@atpay.com"]
@@ -53,11 +53,11 @@ module AtPay
53
53
  # @param email [String] the email address the button is intended for.
54
54
  #
55
55
  # @return [AtPay::Button::Template]
56
- def template(email)
56
+ def template(email = nil)
57
57
  Template.new(@options.update(:email => email, :amount => amount))
58
58
  end
59
59
 
60
- def to_html(token, email)
60
+ def to_html(token, email = nil)
61
61
  @options.update({:token => token})
62
62
  template(email).render(token: token, :email => email)
63
63
  end
@@ -47,6 +47,8 @@ module AtPay
47
47
  end
48
48
 
49
49
  def provider
50
+ return :default if @options[:email].nil?
51
+
50
52
  if ["yahoo.com", "ymail.com", "rocketmail.com"].any? { |c| @options[:email].include? c }
51
53
  :yahoo
52
54
  else
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.3.1
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: