payment_icons 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/payment_icons/manifest.js +1 -0
  3. data/app/assets/images/payment_icons/airtel_money.svg +1 -0
  4. data/app/assets/images/payment_icons/alipay.svg +1 -0
  5. data/app/assets/images/payment_icons/amazon.svg +1 -5
  6. data/app/assets/images/payment_icons/ambank.svg +1 -0
  7. data/app/assets/images/payment_icons/american_express.svg +1 -0
  8. data/app/assets/images/payment_icons/apple_pay.svg +1 -0
  9. data/app/assets/images/payment_icons/arvato.svg +1 -0
  10. data/app/assets/images/payment_icons/atmbersama.svg +1 -0
  11. data/app/assets/images/payment_icons/bancnet.svg +1 -0
  12. data/app/assets/images/payment_icons/bitcoin.svg +1 -1
  13. data/app/assets/images/payment_icons/bitcoin_cash.svg +1 -0
  14. data/app/assets/images/payment_icons/bogus.svg +1 -1
  15. data/app/assets/images/payment_icons/boleto.svg +1 -1
  16. data/app/assets/images/payment_icons/cash.svg +1 -1
  17. data/app/assets/images/payment_icons/cimb.svg +1 -0
  18. data/app/assets/images/payment_icons/circlek.svg +1 -0
  19. data/app/assets/images/payment_icons/citadele.svg +1 -0
  20. data/app/assets/images/payment_icons/collector_bank.svg +1 -0
  21. data/app/assets/images/payment_icons/dailyyamazaki.svg +1 -0
  22. data/app/assets/images/payment_icons/dankort.svg +1 -1
  23. data/app/assets/images/payment_icons/danske_bank.svg +1 -0
  24. data/app/assets/images/payment_icons/diners_club.svg +1 -0
  25. data/app/assets/images/payment_icons/discover.svg +1 -1
  26. data/app/assets/images/payment_icons/dnb.svg +1 -0
  27. data/app/assets/images/payment_icons/dogecoin.svg +1 -1
  28. data/app/assets/images/payment_icons/dwolla.svg +1 -1
  29. data/app/assets/images/payment_icons/eghl.svg +1 -0
  30. data/app/assets/images/payment_icons/elo.svg +1 -0
  31. data/app/assets/images/payment_icons/elv.svg +1 -0
  32. data/app/assets/images/payment_icons/epayments.svg +1 -0
  33. data/app/assets/images/payment_icons/esr_paymentslip_switzerland.svg +1 -0
  34. data/app/assets/images/payment_icons/ethereum.svg +1 -0
  35. data/app/assets/images/payment_icons/familymart.svg +1 -0
  36. data/app/assets/images/payment_icons/forbrugsforeningen.svg +1 -1
  37. data/app/assets/images/payment_icons/fpx.svg +1 -0
  38. data/app/assets/images/payment_icons/freecharge.svg +1 -0
  39. data/app/assets/images/payment_icons/generic.svg +1 -1
  40. data/app/assets/images/payment_icons/gift-card.svg +1 -1
  41. data/app/assets/images/payment_icons/giropay.svg +1 -1
  42. data/app/assets/images/payment_icons/google_pay.svg +1 -0
  43. data/app/assets/images/payment_icons/google_wallet.svg +1 -0
  44. data/app/assets/images/payment_icons/hongleongbank.svg +1 -0
  45. data/app/assets/images/payment_icons/hyper.svg +1 -0
  46. data/app/assets/images/payment_icons/hypercard.svg +1 -0
  47. data/app/assets/images/payment_icons/ideal.svg +1 -0
  48. data/app/assets/images/payment_icons/jcb.svg +1 -1
  49. data/app/assets/images/payment_icons/jousto.svg +1 -0
  50. data/app/assets/images/payment_icons/klarna-pay-later.svg +1 -0
  51. data/app/assets/images/payment_icons/klarna-pay-now.svg +1 -0
  52. data/app/assets/images/payment_icons/klarna-slice-it.svg +1 -0
  53. data/app/assets/images/payment_icons/krediidipank.svg +1 -0
  54. data/app/assets/images/payment_icons/laser.svg +1 -1
  55. data/app/assets/images/payment_icons/lawson.svg +1 -0
  56. data/app/assets/images/payment_icons/laybuy.svg +1 -0
  57. data/app/assets/images/payment_icons/lhv.svg +1 -0
  58. data/app/assets/images/payment_icons/litecoin.svg +1 -1
  59. data/app/assets/images/payment_icons/maestro.svg +1 -1
  60. data/app/assets/images/payment_icons/mash.svg +1 -0
  61. data/app/assets/images/payment_icons/master.svg +1 -1
  62. data/app/assets/images/payment_icons/masterpass.svg +1 -0
  63. data/app/assets/images/payment_icons/maybank.svg +1 -0
  64. data/app/assets/images/payment_icons/ministop.svg +1 -0
  65. data/app/assets/images/payment_icons/mobicred.svg +1 -0
  66. data/app/assets/images/payment_icons/mobikwik.svg +1 -0
  67. data/app/assets/images/payment_icons/mobilepay.svg +1 -0
  68. data/app/assets/images/payment_icons/mondido.svg +1 -0
  69. data/app/assets/images/payment_icons/monero.svg +1 -0
  70. data/app/assets/images/payment_icons/netbanking.svg +1 -0
  71. data/app/assets/images/payment_icons/nordea.svg +1 -0
  72. data/app/assets/images/payment_icons/ola_money.svg +1 -0
  73. data/app/assets/images/payment_icons/op.svg +1 -0
  74. data/app/assets/images/payment_icons/payd.svg +1 -0
  75. data/app/assets/images/payment_icons/payfast_instant_eft.svg +1 -0
  76. data/app/assets/images/payment_icons/paymark_online_eftpos.svg +1 -0
  77. data/app/assets/images/payment_icons/paypal.svg +1 -1
  78. data/app/assets/images/payment_icons/paysafecard.svg +1 -0
  79. data/app/assets/images/payment_icons/paysera.svg +1 -0
  80. data/app/assets/images/payment_icons/paytm.svg +1 -0
  81. data/app/assets/images/payment_icons/payzapp.svg +1 -0
  82. data/app/assets/images/payment_icons/pivo.svg +1 -0
  83. data/app/assets/images/payment_icons/prepaysolutions.svg +1 -0
  84. data/app/assets/images/payment_icons/przelew24.svg +1 -0
  85. data/app/assets/images/payment_icons/publicbank.svg +1 -0
  86. data/app/assets/images/payment_icons/rhbbank.svg +1 -0
  87. data/app/assets/images/payment_icons/rupay.svg +1 -0
  88. data/app/assets/images/payment_icons/santander.svg +1 -0
  89. data/app/assets/images/payment_icons/seb.svg +1 -0
  90. data/app/assets/images/payment_icons/seveneleven.svg +1 -0
  91. data/app/assets/images/payment_icons/sezzle.svg +1 -0
  92. data/app/assets/images/payment_icons/shopify_pay.svg +1 -0
  93. data/app/assets/images/payment_icons/sofort.svg +1 -1
  94. data/app/assets/images/payment_icons/sunkus.svg +1 -0
  95. data/app/assets/images/payment_icons/swedbank.svg +1 -0
  96. data/app/assets/images/payment_icons/swish.svg +1 -0
  97. data/app/assets/images/payment_icons/trustly.svg +1 -0
  98. data/app/assets/images/payment_icons/twint.svg +1 -0
  99. data/app/assets/images/payment_icons/unionpay.svg +1 -1
  100. data/app/assets/images/payment_icons/unipay.svg +1 -0
  101. data/app/assets/images/payment_icons/venmo.svg +1 -0
  102. data/app/assets/images/payment_icons/viabill.svg +1 -0
  103. data/app/assets/images/payment_icons/visa.svg +1 -1
  104. data/app/assets/images/payment_icons/visaelectron.svg +1 -1
  105. data/app/assets/stylesheets/payment_icons/_payment_icons.scss +22 -0
  106. data/app/models/payment_icon.rb +13 -0
  107. data/db/payment_icons.yml +311 -7
  108. data/lib/payment_icons.rb +1 -0
  109. data/lib/payment_icons/engine.rb +4 -0
  110. data/lib/payment_icons/version.rb +1 -1
  111. data/lib/sass_functions/payment_icons.rb +23 -0
  112. data/test/dummy/app/views/icons/show.html.erb +0 -2
  113. data/test/dummy/test/controllers/icons_controller_test.rb +1 -2
  114. data/test/unit/payment_icon_test.rb +87 -15
  115. metadata +128 -29
  116. data/app/assets/images/payment_icons/american-express.svg +0 -1
  117. data/app/assets/images/payment_icons/diners-club.svg +0 -1
  118. data/app/assets/images/payment_icons/google-wallet.svg +0 -1
data/lib/payment_icons.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'payment_icons/engine'
2
2
  require 'frozen_record'
3
+ require 'sass_functions/payment_icons'
3
4
 
4
5
  module PaymentIcons
5
6
  end
@@ -1,5 +1,9 @@
1
1
  module PaymentIcons
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace PaymentIcons
4
+
5
+ initializer "payment_icons.assets.precompile" do |app|
6
+ app.config.assets.precompile += %w(payment_icons/manifest.js)
7
+ end
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module PaymentIcons
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+ require 'sass'
3
+
4
+ module SassFunctions
5
+ module PaymentIcons
6
+ def payment_icons
7
+ pattern = ::PaymentIcons::Engine.root.join('app', 'assets', 'images', 'payment_icons', '*.svg')
8
+ icons = Dir.glob(pattern).map do |icon_path|
9
+ icon_name = File.basename(icon_path, '.svg')
10
+ svg_name = Sass::Script::Value::String.new(icon_name)
11
+ class_name = Sass::Script::Value::String.new(icon_name.dasherize)
12
+
13
+ Sass::Script::Value::List.new([svg_name, class_name], :space)
14
+ end
15
+
16
+ Sass::Script::Value::List.new(icons, :space)
17
+ end
18
+ end
19
+ end
20
+
21
+ module Sass::Script::Functions
22
+ include SassFunctions::PaymentIcons
23
+ end
@@ -10,5 +10,3 @@ Hello there
10
10
  <%= image_tag currency.path, id: "#{currency.name}" %>
11
11
  <% end %>
12
12
  </div>
13
-
14
- <%= image_tag "chocolate.png", id: "chocolate" %>
@@ -4,7 +4,7 @@ class IconsControllerTest < ActionController::TestCase
4
4
 
5
5
  test 'can find all payment icon assets' do
6
6
  PaymentIcon.all.each do |icon|
7
- assert_not_nil Rails.application.assets.find_asset("payment_icons/#{icon.name}.svg")
7
+ assert_not_nil Rails.application.assets.find_asset("payment_icons/#{icon.name}.svg"), "#{icon.name} not found"
8
8
  end
9
9
  end
10
10
 
@@ -25,5 +25,4 @@ class IconsControllerTest < ActionController::TestCase
25
25
  end
26
26
  end
27
27
  end
28
-
29
28
  end
@@ -2,33 +2,105 @@ require 'test_helper'
2
2
 
3
3
  class PaymentIconTest < ActiveSupport::TestCase
4
4
 
5
- test '#all returns some records' do
6
- refute PaymentIcon.all.empty?
5
+ ICONS_DIRECTORY = PaymentIcons::Engine.root.join("app/assets/images/payment_icons")
6
+ SVG_PAYMENT_TYPES = Dir[ICONS_DIRECTORY.join('*.svg')].each_with_object({}) do |path, hash|
7
+ hash[File.basename(path, '.svg')] = File.read(path).freeze
8
+ end.freeze
9
+
10
+ test "Every payment icon record is valid" do
11
+ PaymentIcon.all.each do |icon|
12
+ assert_predicate icon.name, :present?
13
+ assert_predicate icon.label, :present?
14
+ assert_includes PaymentIcon::GROUPS.keys, icon.group.to_sym
15
+ end
7
16
  end
8
17
 
9
- test '#credit_cards returns all icons of group credit card' do
10
- assert_equal ['visa', 'master', 'discover', 'american-express', 'diners-club', 'jcb'], PaymentIcon.credit_cards.pluck(:name)
18
+ test '#path returns path within app/assets/images' do
19
+ visa = PaymentIcon.where(name: 'visa').first
20
+ assert_equal 'payment_icons/visa.svg', visa.path
11
21
  end
12
22
 
13
- test '#cryptocurrencies returns all icons of group cryptocurrencies' do
14
- assert_equal ['bitcoin', 'dogecoin', 'litecoin'], PaymentIcon.cryptocurrencies.pluck(:name)
23
+ test 'Every payment icon record has a corresponding SVG file' do
24
+ PaymentIcon.all.each do |icon|
25
+ assert SVG_PAYMENT_TYPES.key?(icon.name)
26
+ end
15
27
  end
16
28
 
17
- test '#bank_transfers returns all icons of group bank_transfers' do
18
- assert_equal ['boleto', 'dankort', 'dwolla', 'forbrugsforeningen', 'giropay', 'laser', 'sofort', 'maestro', 'unionpay', 'visaelectron'], PaymentIcon.bank_transfers.pluck(:name)
29
+ test 'Every payment icon record has a unique "name"' do
30
+ names = PaymentIcon.all.map(&:name)
31
+ duplicates = names.detect {|e| names.rindex(e) != names.index(e) }
32
+ assert !duplicates.present?, "The payment_icons.yml file contains duplicate records: #{duplicates}"
19
33
  end
20
34
 
21
- test '#wallets returns all icons of group wallets' do
22
- assert_equal ['amazon', 'google-wallet', 'paypal'], PaymentIcon.wallets.pluck(:name)
35
+ test 'Every payment icon SVG has a valid XML tree' do
36
+ SVG_PAYMENT_TYPES.each do |payment_type, svg|
37
+ document = Nokogiri::XML.parse(svg)
38
+ assert document.errors.blank?,
39
+ message: "The '#{payment_type}' SVG file is invalid: #{document.errors}. Please fix the errors, then optimize the file using SVGO."
40
+ end
23
41
  end
24
42
 
25
- test '#find_by_group returns all icons of group passed' do
26
- assert_equal ['boleto', 'dankort', 'dwolla', 'forbrugsforeningen', 'giropay', 'laser', 'sofort', 'maestro', 'unionpay', 'visaelectron'], PaymentIcon.find_by_group('bank_transfers').pluck(:name)
43
+ test 'Every payment icon SVG is 38x24 pixels' do
44
+ SVG_PAYMENT_TYPES.each do |payment_type, svg|
45
+ document = Nokogiri::XML.parse(svg)
46
+ assert_equal 38, document.root["width"].to_i,
47
+ message: "The '#{payment_type}' SVG file must be 38 pixels wide"
48
+ assert_equal 24, document.root["height"].to_i,
49
+ message: "The '#{payment_type}' SVG file must be 24 pixels high"
50
+ end
27
51
  end
28
52
 
29
- test '#path returns path within app/assets/images' do
30
- visa = PaymentIcon.where(name: 'visa').first
31
- assert_equal 'payment_icons/visa.svg', visa.path
53
+ test 'Every payment icon SVG has a viewBox attribute' do
54
+ SVG_PAYMENT_TYPES.each do |payment_type, svg|
55
+ document = Nokogiri::XML.parse(svg)
56
+ assert document.root.key?('viewBox'),
57
+ message: "The '#{payment_type}' SVG file should have a 'viewBox' attribute on the root <svg> tag"
58
+ end
32
59
  end
33
60
 
61
+ test "Every payment SVG meets accessibility requirements" do
62
+ ICON_ID_PREFIX = "pi-"
63
+
64
+ SVG_PAYMENT_TYPES.each do |payment_type, svg|
65
+ document = Nokogiri::XML.parse(svg)
66
+ icon_id = ICON_ID_PREFIX + payment_type
67
+
68
+ assert_equal 1, document.root.search('title').count,
69
+ message: "The '#{payment_type}' SVG file should have a single <title> tag"
70
+
71
+ assert document.root.search('title').present?,
72
+ message: "The '#{payment_type}' SVG file should have a <title> tag as a child of the root <svg> tag"
73
+
74
+ assert_equal "title", document.root.first_element_child.name,
75
+ message: "The '#{payment_type}' SVG file should have a <title> tag as first child of the root <svg> tag"
76
+
77
+ expected_title = PaymentIcon.where(name: payment_type).present? ? PaymentIcon.where(name: payment_type).first.label : payment_type.titleize
78
+ assert_equal expected_title, document.root.at('title').content,
79
+ message: "The '#{payment_type}' SVG file does not have the appropriate <title> value"
80
+
81
+ assert_equal icon_id, document.root.at('title')['id'],
82
+ message: "The '#{payment_type}' SVG file does not have the appropriate 'id' value on the <title> tag"
83
+
84
+ document.xpath("//*[@id]").each do |element|
85
+ actual_element_id = element.attr('id')
86
+ expected_element_id = "#{icon_id}-#{actual_element_id}"
87
+ expected_element_id_regex = /#{ICON_ID_PREFIX}(.*)/
88
+
89
+ assert_match expected_element_id_regex, actual_element_id,
90
+ message: "The '#{actual_element_id}' ID should be #{expected_element_id} (missing '#{ICON_ID_PREFIX}' prefix)"
91
+ end
92
+
93
+ assert document.root.key?('role'),
94
+ message: "The '#{payment_type}' SVG file should have a 'role' attribute on the root <svg> tag"
95
+
96
+ assert_equal "img", document.root['role'],
97
+ message: "The '#{payment_type}' SVG file should have a role='img' attribute on the root <svg> tag"
98
+
99
+ assert document.root.key?('aria-labelledby'),
100
+ message: "The '#{payment_type}' SVG file should have a 'aria-labelledby' attribute on the root <svg> node"
101
+
102
+ assert_equal icon_id, document.root['aria-labelledby'],
103
+ message: "The '#{payment_type}' SVG file should have a aria-labelledby='#{ICON_ID_PREFIX}#{payment_type}' attribute on the root <svg> node"
104
+ end
105
+ end
34
106
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: payment_icons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nakul Pathak
@@ -9,24 +9,44 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-01 00:00:00.000000000 Z
12
+ date: 2018-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: frozen_record
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: rails
16
30
  requirement: !ruby/object:Gem::Requirement
17
31
  requirements:
18
- - - "~>"
32
+ - - ">="
19
33
  - !ruby/object:Gem::Version
20
34
  version: '4.1'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '6.0'
21
38
  type: :runtime
22
39
  prerelease: false
23
40
  version_requirements: !ruby/object:Gem::Requirement
24
41
  requirements:
25
- - - "~>"
42
+ - - ">="
26
43
  - !ruby/object:Gem::Version
27
44
  version: '4.1'
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: '6.0'
28
48
  - !ruby/object:Gem::Dependency
29
- name: frozen_record
49
+ name: sass
30
50
  requirement: !ruby/object:Gem::Requirement
31
51
  requirements:
32
52
  - - ">="
@@ -50,37 +70,116 @@ extra_rdoc_files: []
50
70
  files:
51
71
  - MIT-LICENSE
52
72
  - Rakefile
73
+ - app/assets/config/payment_icons/manifest.js
74
+ - app/assets/images/payment_icons/airtel_money.svg
75
+ - app/assets/images/payment_icons/alipay.svg
53
76
  - app/assets/images/payment_icons/amazon.svg
54
- - app/assets/images/payment_icons/american-express.svg
77
+ - app/assets/images/payment_icons/ambank.svg
78
+ - app/assets/images/payment_icons/american_express.svg
79
+ - app/assets/images/payment_icons/apple_pay.svg
80
+ - app/assets/images/payment_icons/arvato.svg
81
+ - app/assets/images/payment_icons/atmbersama.svg
82
+ - app/assets/images/payment_icons/bancnet.svg
55
83
  - app/assets/images/payment_icons/bitcoin.svg
84
+ - app/assets/images/payment_icons/bitcoin_cash.svg
56
85
  - app/assets/images/payment_icons/bogus.svg
57
86
  - app/assets/images/payment_icons/boleto.svg
58
87
  - app/assets/images/payment_icons/cash.svg
88
+ - app/assets/images/payment_icons/cimb.svg
89
+ - app/assets/images/payment_icons/circlek.svg
90
+ - app/assets/images/payment_icons/citadele.svg
91
+ - app/assets/images/payment_icons/collector_bank.svg
92
+ - app/assets/images/payment_icons/dailyyamazaki.svg
59
93
  - app/assets/images/payment_icons/dankort.svg
60
- - app/assets/images/payment_icons/diners-club.svg
94
+ - app/assets/images/payment_icons/danske_bank.svg
95
+ - app/assets/images/payment_icons/diners_club.svg
61
96
  - app/assets/images/payment_icons/discover.svg
97
+ - app/assets/images/payment_icons/dnb.svg
62
98
  - app/assets/images/payment_icons/dogecoin.svg
63
99
  - app/assets/images/payment_icons/dwolla.svg
100
+ - app/assets/images/payment_icons/eghl.svg
101
+ - app/assets/images/payment_icons/elo.svg
102
+ - app/assets/images/payment_icons/elv.svg
103
+ - app/assets/images/payment_icons/epayments.svg
104
+ - app/assets/images/payment_icons/esr_paymentslip_switzerland.svg
105
+ - app/assets/images/payment_icons/ethereum.svg
106
+ - app/assets/images/payment_icons/familymart.svg
64
107
  - app/assets/images/payment_icons/forbrugsforeningen.svg
108
+ - app/assets/images/payment_icons/fpx.svg
109
+ - app/assets/images/payment_icons/freecharge.svg
65
110
  - app/assets/images/payment_icons/generic.svg
66
111
  - app/assets/images/payment_icons/gift-card.svg
67
112
  - app/assets/images/payment_icons/giropay.svg
68
- - app/assets/images/payment_icons/google-wallet.svg
113
+ - app/assets/images/payment_icons/google_pay.svg
114
+ - app/assets/images/payment_icons/google_wallet.svg
115
+ - app/assets/images/payment_icons/hongleongbank.svg
116
+ - app/assets/images/payment_icons/hyper.svg
117
+ - app/assets/images/payment_icons/hypercard.svg
118
+ - app/assets/images/payment_icons/ideal.svg
69
119
  - app/assets/images/payment_icons/jcb.svg
120
+ - app/assets/images/payment_icons/jousto.svg
121
+ - app/assets/images/payment_icons/klarna-pay-later.svg
122
+ - app/assets/images/payment_icons/klarna-pay-now.svg
123
+ - app/assets/images/payment_icons/klarna-slice-it.svg
124
+ - app/assets/images/payment_icons/krediidipank.svg
70
125
  - app/assets/images/payment_icons/laser.svg
126
+ - app/assets/images/payment_icons/lawson.svg
127
+ - app/assets/images/payment_icons/laybuy.svg
128
+ - app/assets/images/payment_icons/lhv.svg
71
129
  - app/assets/images/payment_icons/litecoin.svg
72
130
  - app/assets/images/payment_icons/maestro.svg
131
+ - app/assets/images/payment_icons/mash.svg
73
132
  - app/assets/images/payment_icons/master.svg
133
+ - app/assets/images/payment_icons/masterpass.svg
134
+ - app/assets/images/payment_icons/maybank.svg
135
+ - app/assets/images/payment_icons/ministop.svg
136
+ - app/assets/images/payment_icons/mobicred.svg
137
+ - app/assets/images/payment_icons/mobikwik.svg
138
+ - app/assets/images/payment_icons/mobilepay.svg
139
+ - app/assets/images/payment_icons/mondido.svg
140
+ - app/assets/images/payment_icons/monero.svg
141
+ - app/assets/images/payment_icons/netbanking.svg
142
+ - app/assets/images/payment_icons/nordea.svg
143
+ - app/assets/images/payment_icons/ola_money.svg
144
+ - app/assets/images/payment_icons/op.svg
145
+ - app/assets/images/payment_icons/payd.svg
146
+ - app/assets/images/payment_icons/payfast_instant_eft.svg
147
+ - app/assets/images/payment_icons/paymark_online_eftpos.svg
74
148
  - app/assets/images/payment_icons/paypal.svg
149
+ - app/assets/images/payment_icons/paysafecard.svg
150
+ - app/assets/images/payment_icons/paysera.svg
151
+ - app/assets/images/payment_icons/paytm.svg
152
+ - app/assets/images/payment_icons/payzapp.svg
153
+ - app/assets/images/payment_icons/pivo.svg
154
+ - app/assets/images/payment_icons/prepaysolutions.svg
155
+ - app/assets/images/payment_icons/przelew24.svg
156
+ - app/assets/images/payment_icons/publicbank.svg
157
+ - app/assets/images/payment_icons/rhbbank.svg
158
+ - app/assets/images/payment_icons/rupay.svg
159
+ - app/assets/images/payment_icons/santander.svg
160
+ - app/assets/images/payment_icons/seb.svg
161
+ - app/assets/images/payment_icons/seveneleven.svg
162
+ - app/assets/images/payment_icons/sezzle.svg
163
+ - app/assets/images/payment_icons/shopify_pay.svg
75
164
  - app/assets/images/payment_icons/sofort.svg
165
+ - app/assets/images/payment_icons/sunkus.svg
166
+ - app/assets/images/payment_icons/swedbank.svg
167
+ - app/assets/images/payment_icons/swish.svg
168
+ - app/assets/images/payment_icons/trustly.svg
169
+ - app/assets/images/payment_icons/twint.svg
76
170
  - app/assets/images/payment_icons/unionpay.svg
171
+ - app/assets/images/payment_icons/unipay.svg
172
+ - app/assets/images/payment_icons/venmo.svg
173
+ - app/assets/images/payment_icons/viabill.svg
77
174
  - app/assets/images/payment_icons/visa.svg
78
175
  - app/assets/images/payment_icons/visaelectron.svg
176
+ - app/assets/stylesheets/payment_icons/_payment_icons.scss
79
177
  - app/models/payment_icon.rb
80
178
  - db/payment_icons.yml
81
179
  - lib/payment_icons.rb
82
180
  - lib/payment_icons/engine.rb
83
181
  - lib/payment_icons/version.rb
182
+ - lib/sass_functions/payment_icons.rb
84
183
  - test/dummy/README.md
85
184
  - test/dummy/Rakefile
86
185
  - test/dummy/app/controllers/application_controller.rb
@@ -132,40 +231,40 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
231
  version: '0'
133
232
  requirements: []
134
233
  rubyforge_project:
135
- rubygems_version: 2.4.6
234
+ rubygems_version: 2.6.14
136
235
  signing_key:
137
236
  specification_version: 4
138
237
  summary: Payment Icon engine that can be integrated with any rails app to give easy
139
238
  access to common payment icons like visa, mastercard, etc.
140
239
  test_files:
141
- - test/dummy/app/controllers/application_controller.rb
142
- - test/dummy/app/controllers/icons_controller.rb
143
- - test/dummy/app/views/icons/show.html.erb
144
- - test/dummy/app/views/layouts/application.html.erb
240
+ - test/dummy/test/controllers/icons_controller_test.rb
241
+ - test/dummy/public/favicon.ico
242
+ - test/dummy/public/500.html
243
+ - test/dummy/public/422.html
244
+ - test/dummy/public/404.html
245
+ - test/dummy/bin/rake
145
246
  - test/dummy/bin/bundle
146
247
  - test/dummy/bin/rails
147
- - test/dummy/bin/rake
148
248
  - test/dummy/bin/setup
249
+ - test/dummy/app/views/icons/show.html.erb
250
+ - test/dummy/app/views/layouts/application.html.erb
251
+ - test/dummy/app/controllers/icons_controller.rb
252
+ - test/dummy/app/controllers/application_controller.rb
253
+ - test/dummy/config.ru
254
+ - test/dummy/Rakefile
149
255
  - test/dummy/config/application.rb
256
+ - test/dummy/config/secrets.yml
150
257
  - test/dummy/config/boot.rb
151
- - test/dummy/config/environment.rb
152
- - test/dummy/config/environments/development.rb
153
- - test/dummy/config/environments/production.rb
154
- - test/dummy/config/environments/test.rb
155
- - test/dummy/config/initializers/assets.rb
156
- - test/dummy/config/initializers/cookies_serializer.rb
157
258
  - test/dummy/config/initializers/filter_parameter_logging.rb
158
259
  - test/dummy/config/initializers/session_store.rb
260
+ - test/dummy/config/initializers/cookies_serializer.rb
261
+ - test/dummy/config/initializers/assets.rb
159
262
  - test/dummy/config/initializers/wrap_parameters.rb
263
+ - test/dummy/config/environment.rb
160
264
  - test/dummy/config/routes.rb
161
- - test/dummy/config/secrets.yml
162
- - test/dummy/config.ru
163
- - test/dummy/public/404.html
164
- - test/dummy/public/422.html
165
- - test/dummy/public/500.html
166
- - test/dummy/public/favicon.ico
167
- - test/dummy/Rakefile
265
+ - test/dummy/config/environments/test.rb
266
+ - test/dummy/config/environments/development.rb
267
+ - test/dummy/config/environments/production.rb
168
268
  - test/dummy/README.md
169
- - test/dummy/test/controllers/icons_controller_test.rb
170
- - test/test_helper.rb
171
269
  - test/unit/payment_icon_test.rb
270
+ - test/test_helper.rb
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="38" height="24"><path fill="#3086C8" d="M2.339 0c-1.292 0-2.339.914-2.339 2.042v19.916c0 1.128 1.047 2.042 2.339 2.042h33.159c1.382 0 2.502-.914 2.502-2.042v-19.916c0-1.128-1.12-2.042-2.502-2.042h-33.159zm15.104 13.305l-1.538-3.275h-2.078v4.718l-2.087-4.718h-1.664l-2.213 4.944h1.299l.491-1.232h2.509l.498 1.226h2.464v-3.7l1.747 3.709h1.143l1.595-3.648v3.652h1.489v-4.951h-2.113l-1.542 3.275zm-7.315-.611l.75-1.656.781 1.656h-1.531zm17.224-1.087l-1.401-1.576h-3.997v4.934h3.836l1.516-1.595 1.481 1.606h1.14v-.476l-1.783-2.023 1.783-1.893v-.559h-1.128l-1.447 1.582zm-2.222 2.34h-1.894v-1.027h1.785v-.85h-1.785v-1.011l2.054.006 1.229 1.412-1.389 1.47zm5.87-3.231l-1.709 1.784 1.709 1.784v1.716h-1.073v-.001h-1.671l-.909-1.064-.972 1.064h-4.845v.001h-2.564v-.047h-.022v-.526l-.262.571h-2.265l-.284-.61v.61h-4.233l-.501-1.23h-.848l-.529 1.23h-2.167v.002h-.855v-1.853l.855-1.647v.004l1.581-3.503h3.08l.432.994v-.986h3.769l.829 1.674.81-1.681h2.961v-.002h.427v.001h-.427v.019h5.155l.949 1.031.972-1.031h1.534v-.02h1.073v1.716z"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="38" height="24" viewBox="0 0 38 24"><path opacity=".07" enable-background="new" d="M35 0h-32c-1.7 0-3 1.3-3 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3v-18c0-1.7-1.4-3-3-3z"/><path fill="#fff" d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2h-32c-1.1 0-2-.9-2-2v-18c0-1.1.9-2 2-2h32"/><g fill="#3086C8"><path d="M12 12v3.7c0 .3-.2.3-.5.2-1.9-.8-3-3.3-2.3-5.4.4-1.1 1.2-2 2.3-2.4.4-.2.5-.1.5.2v3.7zM14 12v-3.7c0-.3 0-.3.3-.2 2.1.8 3.2 3.3 2.4 5.4-.4 1.1-1.2 2-2.3 2.4-.4.2-.4.1-.4-.2v-3.7zM21.2 5h-8.2c3.8 0 6.8 3.1 6.8 7s-3 7-6.8 7h8.2c3.8 0 6.8-3.1 6.8-7s-3-7-6.8-7z"/></g></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="38" height="24" viewBox="0 0 38 24"><path opacity=".07" enable-background="new" d="M35 0h-32c-1.7 0-3 1.3-3 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3v-18c0-1.7-1.4-3-3-3z"/><path fill="#fff" d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2h-32c-1.1 0-2-.9-2-2v-18c0-1.1.9-2 2-2h32"/><path fill="#98C74C" d="M23 3c.8 0 1.2.7 1.5 1.4 1.9 4.6 2 9.2.1 13.9l-.3.7c-.4.8-1.3 1.2-2.1.9-.9-.3-1.3-1-1.2-2l.3-.8c.9-2.1 1.3-4.3 1.2-6.6 0-.3 0-.6-.2-.9 0-1.3-.5-2.6-1-3.8-.2-.4-.4-.8-.4-1.2.1-.9.7-1.6 1.5-1.6h.6z"/><path fill="#CE4549" d="M16.2 10.5c-.1-1.1-.5-2.1-1-3-.6-1-.2-2.1.8-2.5.7-.3 1.4 0 2 .6.4.7.8 1.5 1.1 2.3.5 1.4.6 2.9.6 4.4-.1 1.7-.6 3.3-1.5 4.8-.5.8-1.2 1.2-2 1-.8-.2-1.3-.9-1.3-1.9 0-.3.2-.6.3-.8.9-1.6 1.2-3.2 1-4.9z"/><path fill="#3086C8" d="M16.2 10.5c.2 1.7-.1 3.4-1 4.9-.1.2-.3.5-.3.8-.2-.8-.3-1.6-.6-2.3-.7-1.6-1.8-2.8-3.3-3.7-.8-.4-1.1-1.1-1-1.7.2-1.2 1.4-1.7 2.4-1.2 1.4.7 2.6 1.7 3.5 2.9l.3.3z"/><path fill="#FFDB43" d="M19.6 12.2c0-1.5-.1-2.9-.6-4.4-.3-.8-.7-1.6-1.1-2.3.2-.1.3.1.4.2 1.4 1 2.7 2.3 3.7 3.7 0 .1.1.1.2.2.2.3.1.6.2.9.1 2.3-.2 4.5-1.2 6.6l-.3.8c-.1-1.3-.1-2.5-.5-3.7-.2-.7-.4-1.4-.8-2z"/></svg>