This repository was archived by the owner on Oct 14, 2022. It is now read-only.
forked from ringcentral/slate
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.rb
133 lines (121 loc) · 6.64 KB
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Unique header generation
require './lib/unique_head.rb'
# Markdown
set :markdown_engine, :redcarpet
set :markdown,
fenced_code_blocks: true,
smartypants: true,
disable_indented_code_blocks: true,
prettify: true,
strikethrough: true,
tables: true,
with_toc_data: true,
no_intra_emphasis: true,
renderer: UniqueHeadCounter
# Assets
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :fonts_dir, 'fonts'
# Activate the syntax highlighter
activate :syntax
ready do
require './lib/monokai_sublime_slate.rb'
require './lib/multilang.rb'
end
activate :sprockets
activate :autoprefixer do |config|
config.browsers = ['last 2 version', 'Firefox ESR']
config.cascade = false
config.inline = true
end
# Github pages require relative links
activate :relative_assets
set :relative_links, true
# Build Configuration
configure :build do
# We do want to hash woff and woff2 as there's a bug where woff2 will use
# woff asset hash which breaks things. Trying to use a combination of ignore and
# rewrite_ignore does not work as it conflicts weirdly with relative_assets. Disabling
# the .woff2 extension only does not work as .woff will still activate it so have to
# have both. See https://github.com/slatedocs/slate/issues/1171 for more details.
activate :asset_hash, :exts => app.config[:asset_extensions] - %w[.woff .woff2]
# If you're having trouble with Middleman hanging, commenting
# out the following two lines has been known to help
activate :minify_css
activate :minify_javascript
# activate :gzip
end
# Deploy Configuration
# If you want Middleman to listen on a different port, you can set that below
set :port, 4567
helpers do
require './lib/toc_data.rb'
end
# ====================
# Custom Configuration
# ====================
config.mpToken = '16aa17c5de12dd4ba07edc5c4fb73ddf'; # Prod
# Api Configuration
config.brand = 'Q2'
config.apiName = 'Q2 Biller Direct API'
config.host = 'https://api.q2open.io/v1'
config.auth = 'Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e'
config.billerName = 'Netflix'
config.billerLogo = 'https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/7242937ba29042cce61a8e4745269fce.png'
config.billerLogoSvg = 'https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/7242937ba29042cce61a8e4745269fce.svg'
config.statusSvg = 'https://s3.amazonaws.com/app-assets.unbill.io-primary/assets/api/bill-status/status.svg'
config.billerColor = 'FF041F'
config.billerLogin = 'https://www.netflix.com/Login'
config.billerSignup = 'https://www.netflix.com'
config.futureDate = '2018-10-25T00:00:00.000Z'
config.futureDateBefore = '2018-10-24T00:00:00.000Z'
config.futureStatus = 'Due Oct 25'
config.s3 = 'https://s3.amazonaws.com/app-assets.unbill.io-primary/assets/docs'
config.iFramePostMessage = 'https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage'
config.iosPostMessage = 'https://developer.apple.com/documentation/webkit/wkscriptmessagehandler'
config.androidPostMessage = 'https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)'
config.companyResponseDescription = [
'`_id` | ID of the company.',
'`name` | Name of the company.',
'`categories` | Categories of the company. A company may fall under multiple categories.',
'`status` | The operational status of the company at any given moment of time. Possible values are `operational`, `maintenance`.',
'`fullyAutomatedBill` | If `true`, then bill aggregation and payments are fully automated. Possible values are `true`, `false`.',
'`fullyAutomatedCardSwap` | If `true`, then swapping a card is fully automated. Possible values are `true`, `false`.',
'`logo` | Company logo object.',
'`logo.url` | URL of the company logo.',
'`logo.background` | If this is `true`, then the logo looks best as a background image.',
'`logo.svg` | Company logo svg object.',
'`logo.svg.url` | URL of the company svg logo.',
'`logo.svg.color` | Hex color of the company logo.',
'`requiredPayment` | If a specific payment method type is required by this company, this will be defined. Possible values are `bank`, `card`.',
'`userPresenceRequired` | If the company requires that the user is present to pass through any security flows. See best practices in the [Connect](#connect) documentation.',
'`schedule` | The [bill payment schedule](#bill-payment-schedule) this company follows. If this parameter is set, the schedule for a bill linked to this company may not be changed. Typically subscription companies such as Netflix have this parameter set since payments must be made on a specific date.',
'`additionalPaymentOptions` | Present when the company provides additional payment options that allow users to make payments towards their outstanding balance.',
'`fees` | The surcharge object. Possible child objects are `ach`, `cards`',
'`fees.ach` | Present when the company applies surcharges to ACH payments.',
'`fees.ach.percentage` | If the ACH surcharge is a percentage of the payment amount.',
'`fees.ach.rate` | Either a dollar amount or a percentage amount.',
'`fees.cards` | Present when the company applies surcharges to card payments. Possible child objects are `american express`, `discover`, `mastercard`, and `visa`, referred to below as `{cardBrand}`. See example `company` response.',
'`fees.cards.{cardBrand}` | Possible child objects are `credit` or `debit`, referred to below as `{cardType}`.',
'`fees.cards.{cardBrand}.{cardType}.percentage` | If the surcharge is a percentage of the payment amount.',
'`fees.cards.{cardBrand}.{cardType}.rate` | Either a dollar amount or a percentage amount.',
'`auth` | Company auth fields.',
'`auth.urls` | Company Auth Urls (login URL is always available, but the others can by null).',
'`auth.urls.login` | Login URL.',
'`auth.urls.signup` | Signup URL.',
'`auth.urls.forgotPassword` | Forgot password URL.',
'`auth.urls.forgotUsername` | Forgot username URL.',
'`auth.loginFields` | Form fields for credentials.',
'`auth.loginFields.placeholder` | Input `placeholder` field.',
'`auth.loginFields.formType` | Input `type` field.',
'`auth.loginFields.name` | Input `name` field.',
'`auth.loginFields.label` | Label for `input`.',
'`geo` | Geo based location (not available for regional or national company).',
'`geo.lat` | Latitude coordinate.',
'`geo.lng` | Longitude coordinate.',
'`geo.stateShort` | Abbreviated state name.',
'`geo.stateLong` | Full state name.',
'`geo.zipcode` | Zipcode.',
'`geo.address` | Formatted address.',
].join("\n")