this_feature 0.4.0 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/README.md +27 -38
- data/docs/flipper.html +1087 -0
- data/docs/flipper.md +41 -0
- data/docs/memory.md +88 -0
- data/docs/splitio.md +35 -0
- data/docs/writing_an_adapter.md +9 -0
- data/lib/this_feature.rb +4 -0
- data/lib/this_feature/adapters/base.rb +0 -5
- data/lib/this_feature/adapters/flipper.rb +1 -7
- data/lib/this_feature/adapters/memory.rb +2 -6
- data/lib/this_feature/adapters/split_io.rb +1 -1
- data/lib/this_feature/configuration.rb +7 -2
- data/lib/this_feature/errors.rb +2 -2
- data/lib/this_feature/version.rb +1 -1
- data/this_feature.gemspec +2 -4
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d173ac479e6b81bd46368c6d4a16c135781f53c087ecbe787d8b81ab753f9db
|
4
|
+
data.tar.gz: ad26a2049348ae2ef9ebe0d60a4a3d1059b0cb2a38db10b25c2707a33b5c8bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9b4b5144aeba8d98fd881efa6b99ab68a4ea3cc44571d4757b0f9182a1b95f7f947b95926a8f5954297139260098c524c7cbdab94f49228b3436ae7ff71a0b6
|
7
|
+
data.tar.gz: 9b840f3f2b75a0ef67a4e05a426f4faf73792faabd55df3a423f935a1a60d93b638c0d7474af56b7a4640292f84986e8bbeb424abb4e5bb96e59523a941f544f
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
this_feature (0.
|
5
|
-
this_feature-adapters-flipper (0.
|
4
|
+
this_feature (0.5.3)
|
5
|
+
this_feature-adapters-flipper (0.5.3)
|
6
6
|
flipper (~> 0.16)
|
7
7
|
flipper-active_record (~> 0.16)
|
8
8
|
this_feature
|
9
|
-
this_feature-adapters-split_io (0.
|
9
|
+
this_feature-adapters-split_io (0.5.3)
|
10
10
|
splitclient-rb
|
11
11
|
this_feature
|
12
12
|
|
@@ -35,10 +35,10 @@ GEM
|
|
35
35
|
diff-lcs (1.3)
|
36
36
|
faraday (1.0.1)
|
37
37
|
multipart-post (>= 1.2, < 3)
|
38
|
-
flipper (0.
|
39
|
-
flipper-active_record (0.
|
38
|
+
flipper (0.19.0)
|
39
|
+
flipper-active_record (0.19.0)
|
40
40
|
activerecord (>= 5.0, < 7)
|
41
|
-
flipper (~> 0.
|
41
|
+
flipper (~> 0.19.0)
|
42
42
|
gem-release (2.1.1)
|
43
43
|
hitimes (1.3.1)
|
44
44
|
i18n (1.8.5)
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
byebug (~> 11.0)
|
59
59
|
pry (~> 0.13.0)
|
60
60
|
rake (13.0.1)
|
61
|
-
redis (4.2.
|
61
|
+
redis (4.2.2)
|
62
62
|
rspec (3.9.0)
|
63
63
|
rspec-core (~> 3.9.0)
|
64
64
|
rspec-expectations (~> 3.9.0)
|
data/README.md
CHANGED
@@ -1,65 +1,44 @@
|
|
1
1
|
# ThisFeature
|
2
2
|
|
3
|
-
|
3
|
+
**A common interface to interact with many feature flag providers.**
|
4
4
|
|
5
|
-
|
5
|
+
Can be used to more easily migrate among providers.
|
6
|
+
|
7
|
+
If your code uses ThisFeature,
|
8
|
+
then you can just swap out the adapter without having to do a bunch of find-and-replace.
|
6
9
|
|
7
|
-
|
10
|
+
## Installation
|
8
11
|
|
9
12
|
```ruby
|
10
13
|
gem 'this_feature'
|
11
14
|
```
|
12
15
|
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
```sh
|
16
|
-
bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
```sh
|
22
|
-
gem install this_feature
|
23
|
-
```
|
24
|
-
|
25
16
|
## Configuration
|
26
17
|
|
27
18
|
```ruby
|
28
19
|
# config/initializers/this_feature.rb
|
29
20
|
require 'this_feature'
|
21
|
+
require 'this_feature/adapters/memory'
|
30
22
|
|
31
23
|
ThisFeature.configure do |config|
|
32
|
-
|
33
|
-
config.
|
24
|
+
adapter = ThisFeature::Adapters::Memory.new
|
25
|
+
config.adapters = [adapter]
|
26
|
+
config.default_adapter = adapter
|
34
27
|
end
|
35
28
|
```
|
36
29
|
|
37
30
|
**NOTE**: When searching for the presence of a flag, adapters are queried in order. The default adapter is the fallback adapter used when a flag isn't present in any of the adapters.
|
38
31
|
|
39
|
-
|
40
|
-
### With Flipper
|
41
|
-
|
42
|
-
```ruby
|
43
|
-
# config/initializers/this_feature.rb
|
44
|
-
require 'this_feature/adapters/flipper'
|
45
|
-
|
46
|
-
ThisFeature.configure do |config|
|
47
|
-
config.adapters = [ThisFeature::Adapters::Flipper]
|
48
|
-
config.default_adapter = config.adapters.first
|
49
|
-
end
|
50
|
-
```
|
51
|
-
|
52
|
-
|
53
|
-
|
54
32
|
## Usage
|
55
33
|
|
56
34
|
### Flags
|
35
|
+
|
57
36
|
```ruby
|
58
|
-
ThisFeature.flag('flag_name').on?
|
59
|
-
ThisFeature.flag('flag_name').off?
|
60
|
-
ThisFeature.flag('flag_name').control? #
|
61
|
-
ThisFeature.flag('flag_name').
|
62
|
-
ThisFeature.
|
37
|
+
ThisFeature.flag('flag_name').on? # is the flag is turned on?
|
38
|
+
ThisFeature.flag('flag_name').off? # is the flag is turned off?
|
39
|
+
ThisFeature.flag('flag_name').control? # is the adapter is using the control?
|
40
|
+
ThisFeature.flag('flag_name').present? # is the flag set at all?
|
41
|
+
ThisFeature.default_adapter # access the default adapter directly if needed
|
63
42
|
```
|
64
43
|
|
65
44
|
### Context
|
@@ -78,8 +57,13 @@ In case context is not sufficient, you can also pass a data hash.
|
|
78
57
|
ThisFeature.flag('flag_name', context: context, data: { org_id: 1 }).on?
|
79
58
|
```
|
80
59
|
|
81
|
-
##
|
60
|
+
## Available Adapters
|
61
|
+
|
62
|
+
These adapters do behave slightly differently, so make sure to read the following docs:
|
82
63
|
|
64
|
+
- [Flipper adapter](./docs/flipper.md)
|
65
|
+
- [Split.io adapter](./docs/splitio.md)
|
66
|
+
- [Memory adapter](./docs/memory.md) - **designed for use in tests**
|
83
67
|
|
84
68
|
## Development
|
85
69
|
|
@@ -90,6 +74,11 @@ You can run the tests with these commands in your Terminal:
|
|
90
74
|
bundle install && bundle exec rspec
|
91
75
|
```
|
92
76
|
|
77
|
+
To write a new adapter, check the [Guide](./docs/writing_an_adapter.md).
|
78
|
+
|
93
79
|
## License
|
94
80
|
|
95
81
|
ThisFeature is released under the [MIT License](https://choosealicense.com/licenses/mit).
|
82
|
+
|
83
|
+
|
84
|
+
|
data/docs/flipper.html
ADDED
@@ -0,0 +1,1087 @@
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><style>body {
|
2
|
+
max-width: 980px;
|
3
|
+
border: 1px solid #ddd;
|
4
|
+
outline: 1300px solid #fff;
|
5
|
+
margin: 16px auto;
|
6
|
+
}
|
7
|
+
|
8
|
+
body .markdown-body
|
9
|
+
{
|
10
|
+
padding: 45px;
|
11
|
+
}
|
12
|
+
|
13
|
+
@font-face {
|
14
|
+
font-family: fontawesome-mini;
|
15
|
+
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAABE0AA8AAAAAHWwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY3d1HZY21hcAAAAdgAAACqAAACOvWLi0FjdnQgAAAChAAAABMAAAAgBtX/BGZwZ20AAAKYAAAFkAAAC3CKkZBZZ2FzcAAACCgAAAAIAAAACAAAABBnbHlmAAAIMAAABdQAAAjkYT9TNWhlYWQAAA4EAAAAMwAAADYQ6WvNaGhlYQAADjgAAAAfAAAAJAc6A1pob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OTaDC4+2TjKMtN9KQf1ezLx/Sg/00FCvABHhjDjAAB4nGPw3sFwIihiIyNjX+QGxp0cDBwMyQUbGVidNjEwMmiBGJu5mBg5ICw+BjCLzWkX0wGgNCeQze60i8EBwmZmcNmowtgRGLHBoSNiI3OKy0Y1EG8XRwMDI4tDR3JIBEhJJBBs5mFi5NHawfi/dQNL70YmBhcADHYj9AAA) format('woff');
|
16
|
+
}
|
17
|
+
|
18
|
+
.markdown-body {
|
19
|
+
font-family: sans-serif;
|
20
|
+
-ms-text-size-adjust: 100%;
|
21
|
+
-webkit-text-size-adjust: 100%;
|
22
|
+
color: #333333;
|
23
|
+
overflow: hidden;
|
24
|
+
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
25
|
+
font-size: 16px;
|
26
|
+
line-height: 1.6;
|
27
|
+
word-wrap: break-word;
|
28
|
+
}
|
29
|
+
|
30
|
+
.markdown-body a {
|
31
|
+
background: transparent;
|
32
|
+
}
|
33
|
+
|
34
|
+
.markdown-body a:active,
|
35
|
+
.markdown-body a:hover {
|
36
|
+
outline: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
.markdown-body b,
|
40
|
+
.markdown-body strong {
|
41
|
+
font-weight: bold;
|
42
|
+
}
|
43
|
+
|
44
|
+
.markdown-body mark {
|
45
|
+
background: #ff0;
|
46
|
+
color: #000;
|
47
|
+
font-style: italic;
|
48
|
+
font-weight: bold;
|
49
|
+
}
|
50
|
+
|
51
|
+
.markdown-body sub,
|
52
|
+
.markdown-body sup {
|
53
|
+
font-size: 75%;
|
54
|
+
line-height: 0;
|
55
|
+
position: relative;
|
56
|
+
vertical-align: baseline;
|
57
|
+
}
|
58
|
+
.markdown-body sup {
|
59
|
+
top: -0.5em;
|
60
|
+
}
|
61
|
+
.markdown-body sub {
|
62
|
+
bottom: -0.25em;
|
63
|
+
}
|
64
|
+
|
65
|
+
.markdown-body h1 {
|
66
|
+
font-size: 2em;
|
67
|
+
margin: 0.67em 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.markdown-body img {
|
71
|
+
border: 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.markdown-body hr {
|
75
|
+
-moz-box-sizing: content-box;
|
76
|
+
box-sizing: content-box;
|
77
|
+
height: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.markdown-body pre {
|
81
|
+
overflow: auto;
|
82
|
+
}
|
83
|
+
|
84
|
+
.markdown-body code,
|
85
|
+
.markdown-body kbd,
|
86
|
+
.markdown-body pre,
|
87
|
+
.markdown-body samp {
|
88
|
+
font-family: monospace, monospace;
|
89
|
+
font-size: 1em;
|
90
|
+
}
|
91
|
+
|
92
|
+
.markdown-body input {
|
93
|
+
color: inherit;
|
94
|
+
font: inherit;
|
95
|
+
margin: 0;
|
96
|
+
}
|
97
|
+
|
98
|
+
.markdown-body html input[disabled] {
|
99
|
+
cursor: default;
|
100
|
+
}
|
101
|
+
|
102
|
+
.markdown-body input {
|
103
|
+
line-height: normal;
|
104
|
+
}
|
105
|
+
|
106
|
+
.markdown-body input[type="checkbox"] {
|
107
|
+
box-sizing: border-box;
|
108
|
+
padding: 0;
|
109
|
+
}
|
110
|
+
|
111
|
+
.markdown-body table {
|
112
|
+
border-collapse: collapse;
|
113
|
+
border-spacing: 0;
|
114
|
+
}
|
115
|
+
|
116
|
+
.markdown-body td,
|
117
|
+
.markdown-body th {
|
118
|
+
padding: 0;
|
119
|
+
}
|
120
|
+
|
121
|
+
.markdown-body .codehilitetable {
|
122
|
+
border: 0;
|
123
|
+
border-spacing: 0;
|
124
|
+
}
|
125
|
+
|
126
|
+
.markdown-body .codehilitetable tr {
|
127
|
+
border: 0;
|
128
|
+
}
|
129
|
+
|
130
|
+
.markdown-body .codehilitetable pre,
|
131
|
+
.markdown-body .codehilitetable div.codehilite {
|
132
|
+
margin: 0;
|
133
|
+
}
|
134
|
+
|
135
|
+
.markdown-body .linenos,
|
136
|
+
.markdown-body .code,
|
137
|
+
.markdown-body .codehilitetable td {
|
138
|
+
border: 0;
|
139
|
+
padding: 0;
|
140
|
+
}
|
141
|
+
|
142
|
+
.markdown-body td:not(.linenos) .linenodiv {
|
143
|
+
padding: 0 !important;
|
144
|
+
}
|
145
|
+
|
146
|
+
.markdown-body .code {
|
147
|
+
width: 100%;
|
148
|
+
}
|
149
|
+
|
150
|
+
.markdown-body .linenos div pre,
|
151
|
+
.markdown-body .linenodiv pre,
|
152
|
+
.markdown-body .linenodiv {
|
153
|
+
border: 0;
|
154
|
+
-webkit-border-radius: 0;
|
155
|
+
-moz-border-radius: 0;
|
156
|
+
border-radius: 0;
|
157
|
+
-webkit-border-top-left-radius: 3px;
|
158
|
+
-webkit-border-bottom-left-radius: 3px;
|
159
|
+
-moz-border-radius-topleft: 3px;
|
160
|
+
-moz-border-radius-bottomleft: 3px;
|
161
|
+
border-top-left-radius: 3px;
|
162
|
+
border-bottom-left-radius: 3px;
|
163
|
+
}
|
164
|
+
|
165
|
+
.markdown-body .code div pre,
|
166
|
+
.markdown-body .code div {
|
167
|
+
border: 0;
|
168
|
+
-webkit-border-radius: 0;
|
169
|
+
-moz-border-radius: 0;
|
170
|
+
border-radius: 0;
|
171
|
+
-webkit-border-top-right-radius: 3px;
|
172
|
+
-webkit-border-bottom-right-radius: 3px;
|
173
|
+
-moz-border-radius-topright: 3px;
|
174
|
+
-moz-border-radius-bottomright: 3px;
|
175
|
+
border-top-right-radius: 3px;
|
176
|
+
border-bottom-right-radius: 3px;
|
177
|
+
}
|
178
|
+
|
179
|
+
.markdown-body * {
|
180
|
+
-moz-box-sizing: border-box;
|
181
|
+
box-sizing: border-box;
|
182
|
+
}
|
183
|
+
|
184
|
+
.markdown-body input {
|
185
|
+
font: 13px Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
186
|
+
line-height: 1.4;
|
187
|
+
}
|
188
|
+
|
189
|
+
.markdown-body a {
|
190
|
+
color: #4183c4;
|
191
|
+
text-decoration: none;
|
192
|
+
}
|
193
|
+
|
194
|
+
.markdown-body a:hover,
|
195
|
+
.markdown-body a:focus,
|
196
|
+
.markdown-body a:active {
|
197
|
+
text-decoration: underline;
|
198
|
+
}
|
199
|
+
|
200
|
+
.markdown-body hr {
|
201
|
+
height: 0;
|
202
|
+
margin: 15px 0;
|
203
|
+
overflow: hidden;
|
204
|
+
background: transparent;
|
205
|
+
border: 0;
|
206
|
+
border-bottom: 1px solid #ddd;
|
207
|
+
}
|
208
|
+
|
209
|
+
.markdown-body hr:before,
|
210
|
+
.markdown-body hr:after {
|
211
|
+
display: table;
|
212
|
+
content: " ";
|
213
|
+
}
|
214
|
+
|
215
|
+
.markdown-body hr:after {
|
216
|
+
clear: both;
|
217
|
+
}
|
218
|
+
|
219
|
+
.markdown-body h1,
|
220
|
+
.markdown-body h2,
|
221
|
+
.markdown-body h3,
|
222
|
+
.markdown-body h4,
|
223
|
+
.markdown-body h5,
|
224
|
+
.markdown-body h6 {
|
225
|
+
margin-top: 15px;
|
226
|
+
margin-bottom: 15px;
|
227
|
+
line-height: 1.1;
|
228
|
+
}
|
229
|
+
|
230
|
+
.markdown-body h1 {
|
231
|
+
font-size: 30px;
|
232
|
+
}
|
233
|
+
|
234
|
+
.markdown-body h2 {
|
235
|
+
font-size: 21px;
|
236
|
+
}
|
237
|
+
|
238
|
+
.markdown-body h3 {
|
239
|
+
font-size: 16px;
|
240
|
+
}
|
241
|
+
|
242
|
+
.markdown-body h4 {
|
243
|
+
font-size: 14px;
|
244
|
+
}
|
245
|
+
|
246
|
+
.markdown-body h5 {
|
247
|
+
font-size: 12px;
|
248
|
+
}
|
249
|
+
|
250
|
+
.markdown-body h6 {
|
251
|
+
font-size: 11px;
|
252
|
+
}
|
253
|
+
|
254
|
+
.markdown-body blockquote {
|
255
|
+
margin: 0;
|
256
|
+
}
|
257
|
+
|
258
|
+
.markdown-body ul,
|
259
|
+
.markdown-body ol {
|
260
|
+
padding: 0;
|
261
|
+
margin-top: 0;
|
262
|
+
margin-bottom: 0;
|
263
|
+
}
|
264
|
+
|
265
|
+
.markdown-body ol ol,
|
266
|
+
.markdown-body ul ol {
|
267
|
+
list-style-type: lower-roman;
|
268
|
+
}
|
269
|
+
|
270
|
+
.markdown-body ul ul ol,
|
271
|
+
.markdown-body ul ol ol,
|
272
|
+
.markdown-body ol ul ol,
|
273
|
+
.markdown-body ol ol ol {
|
274
|
+
list-style-type: lower-alpha;
|
275
|
+
}
|
276
|
+
|
277
|
+
.markdown-body dd {
|
278
|
+
margin-left: 0;
|
279
|
+
}
|
280
|
+
|
281
|
+
.markdown-body code,
|
282
|
+
.markdown-body pre,
|
283
|
+
.markdown-body samp {
|
284
|
+
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
285
|
+
font-size: 12px;
|
286
|
+
}
|
287
|
+
|
288
|
+
.markdown-body pre {
|
289
|
+
margin-top: 0;
|
290
|
+
margin-bottom: 0;
|
291
|
+
}
|
292
|
+
|
293
|
+
.markdown-body kbd {
|
294
|
+
background-color: #e7e7e7;
|
295
|
+
background-image: -moz-linear-gradient(#fefefe, #e7e7e7);
|
296
|
+
background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
|
297
|
+
background-image: linear-gradient(#fefefe, #e7e7e7);
|
298
|
+
background-repeat: repeat-x;
|
299
|
+
border-radius: 2px;
|
300
|
+
border: 1px solid #cfcfcf;
|
301
|
+
color: #000;
|
302
|
+
padding: 3px 5px;
|
303
|
+
line-height: 10px;
|
304
|
+
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
305
|
+
display: inline-block;
|
306
|
+
}
|
307
|
+
|
308
|
+
.markdown-body>*:first-child {
|
309
|
+
margin-top: 0 !important;
|
310
|
+
}
|
311
|
+
|
312
|
+
.markdown-body>*:last-child {
|
313
|
+
margin-bottom: 0 !important;
|
314
|
+
}
|
315
|
+
|
316
|
+
.markdown-body .headerlink {
|
317
|
+
font: normal 400 16px fontawesome-mini;
|
318
|
+
vertical-align: middle;
|
319
|
+
margin-left: -16px;
|
320
|
+
float: left;
|
321
|
+
display: inline-block;
|
322
|
+
text-decoration: none;
|
323
|
+
opacity: 0;
|
324
|
+
color: #333;
|
325
|
+
}
|
326
|
+
|
327
|
+
.markdown-body .headerlink:focus {
|
328
|
+
outline: none;
|
329
|
+
}
|
330
|
+
|
331
|
+
.markdown-body h1 .headerlink {
|
332
|
+
margin-top: 0.8rem;
|
333
|
+
}
|
334
|
+
|
335
|
+
.markdown-body h2 .headerlink,
|
336
|
+
.markdown-body h3 .headerlink {
|
337
|
+
margin-top: 0.6rem;
|
338
|
+
}
|
339
|
+
|
340
|
+
.markdown-body h4 .headerlink {
|
341
|
+
margin-top: 0.2rem;
|
342
|
+
}
|
343
|
+
|
344
|
+
.markdown-body h5 .headerlink,
|
345
|
+
.markdown-body h6 .headerlink {
|
346
|
+
margin-top: 0;
|
347
|
+
}
|
348
|
+
|
349
|
+
.markdown-body .headerlink:hover,
|
350
|
+
.markdown-body h1:hover .headerlink,
|
351
|
+
.markdown-body h2:hover .headerlink,
|
352
|
+
.markdown-body h3:hover .headerlink,
|
353
|
+
.markdown-body h4:hover .headerlink,
|
354
|
+
.markdown-body h5:hover .headerlink,
|
355
|
+
.markdown-body h6:hover .headerlink {
|
356
|
+
opacity: 1;
|
357
|
+
text-decoration: none;
|
358
|
+
}
|
359
|
+
|
360
|
+
.markdown-body h1 {
|
361
|
+
padding-bottom: 0.3em;
|
362
|
+
font-size: 2.25em;
|
363
|
+
line-height: 1.2;
|
364
|
+
border-bottom: 1px solid #eee;
|
365
|
+
}
|
366
|
+
|
367
|
+
.markdown-body h2 {
|
368
|
+
padding-bottom: 0.3em;
|
369
|
+
font-size: 1.75em;
|
370
|
+
line-height: 1.225;
|
371
|
+
border-bottom: 1px solid #eee;
|
372
|
+
}
|
373
|
+
|
374
|
+
.markdown-body h3 {
|
375
|
+
font-size: 1.5em;
|
376
|
+
line-height: 1.43;
|
377
|
+
}
|
378
|
+
|
379
|
+
.markdown-body h4 {
|
380
|
+
font-size: 1.25em;
|
381
|
+
}
|
382
|
+
|
383
|
+
.markdown-body h5 {
|
384
|
+
font-size: 1em;
|
385
|
+
}
|
386
|
+
|
387
|
+
.markdown-body h6 {
|
388
|
+
font-size: 1em;
|
389
|
+
color: #777;
|
390
|
+
}
|
391
|
+
|
392
|
+
.markdown-body p,
|
393
|
+
.markdown-body blockquote,
|
394
|
+
.markdown-body ul,
|
395
|
+
.markdown-body ol,
|
396
|
+
.markdown-body dl,
|
397
|
+
.markdown-body table,
|
398
|
+
.markdown-body pre,
|
399
|
+
.markdown-body .admonition {
|
400
|
+
margin-top: 0;
|
401
|
+
margin-bottom: 16px;
|
402
|
+
}
|
403
|
+
|
404
|
+
.markdown-body hr {
|
405
|
+
height: 4px;
|
406
|
+
padding: 0;
|
407
|
+
margin: 16px 0;
|
408
|
+
background-color: #e7e7e7;
|
409
|
+
border: 0 none;
|
410
|
+
}
|
411
|
+
|
412
|
+
.markdown-body ul,
|
413
|
+
.markdown-body ol {
|
414
|
+
padding-left: 2em;
|
415
|
+
}
|
416
|
+
|
417
|
+
.markdown-body ul ul,
|
418
|
+
.markdown-body ul ol,
|
419
|
+
.markdown-body ol ol,
|
420
|
+
.markdown-body ol ul {
|
421
|
+
margin-top: 0;
|
422
|
+
margin-bottom: 0;
|
423
|
+
}
|
424
|
+
|
425
|
+
.markdown-body li>p {
|
426
|
+
margin-top: 16px;
|
427
|
+
}
|
428
|
+
|
429
|
+
.markdown-body dl {
|
430
|
+
padding: 0;
|
431
|
+
}
|
432
|
+
|
433
|
+
.markdown-body dl dt {
|
434
|
+
padding: 0;
|
435
|
+
margin-top: 16px;
|
436
|
+
font-size: 1em;
|
437
|
+
font-style: italic;
|
438
|
+
font-weight: bold;
|
439
|
+
}
|
440
|
+
|
441
|
+
.markdown-body dl dd {
|
442
|
+
padding: 0 16px;
|
443
|
+
margin-bottom: 16px;
|
444
|
+
}
|
445
|
+
|
446
|
+
.markdown-body blockquote {
|
447
|
+
padding: 0 15px;
|
448
|
+
color: #777;
|
449
|
+
border-left: 4px solid #ddd;
|
450
|
+
}
|
451
|
+
|
452
|
+
.markdown-body blockquote>:first-child {
|
453
|
+
margin-top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.markdown-body blockquote>:last-child {
|
457
|
+
margin-bottom: 0;
|
458
|
+
}
|
459
|
+
|
460
|
+
.markdown-body table {
|
461
|
+
display: block;
|
462
|
+
width: 100%;
|
463
|
+
overflow: auto;
|
464
|
+
word-break: normal;
|
465
|
+
word-break: keep-all;
|
466
|
+
}
|
467
|
+
|
468
|
+
.markdown-body table th {
|
469
|
+
font-weight: bold;
|
470
|
+
}
|
471
|
+
|
472
|
+
.markdown-body table th,
|
473
|
+
.markdown-body table td {
|
474
|
+
padding: 6px 13px;
|
475
|
+
border: 1px solid #ddd;
|
476
|
+
}
|
477
|
+
|
478
|
+
.markdown-body table tr {
|
479
|
+
background-color: #fff;
|
480
|
+
border-top: 1px solid #ccc;
|
481
|
+
}
|
482
|
+
|
483
|
+
.markdown-body table tr:nth-child(2n) {
|
484
|
+
background-color: #f8f8f8;
|
485
|
+
}
|
486
|
+
|
487
|
+
.markdown-body img {
|
488
|
+
max-width: 100%;
|
489
|
+
-moz-box-sizing: border-box;
|
490
|
+
box-sizing: border-box;
|
491
|
+
}
|
492
|
+
|
493
|
+
.markdown-body code,
|
494
|
+
.markdown-body samp {
|
495
|
+
padding: 0;
|
496
|
+
padding-top: 0.2em;
|
497
|
+
padding-bottom: 0.2em;
|
498
|
+
margin: 0;
|
499
|
+
font-size: 85%;
|
500
|
+
background-color: rgba(0,0,0,0.04);
|
501
|
+
border-radius: 3px;
|
502
|
+
}
|
503
|
+
|
504
|
+
.markdown-body code:before,
|
505
|
+
.markdown-body code:after {
|
506
|
+
letter-spacing: -0.2em;
|
507
|
+
content: "\00a0";
|
508
|
+
}
|
509
|
+
|
510
|
+
.markdown-body pre>code {
|
511
|
+
padding: 0;
|
512
|
+
margin: 0;
|
513
|
+
font-size: 100%;
|
514
|
+
word-break: normal;
|
515
|
+
white-space: pre;
|
516
|
+
background: transparent;
|
517
|
+
border: 0;
|
518
|
+
}
|
519
|
+
|
520
|
+
.markdown-body .codehilite {
|
521
|
+
margin-bottom: 16px;
|
522
|
+
}
|
523
|
+
|
524
|
+
.markdown-body .codehilite pre,
|
525
|
+
.markdown-body pre {
|
526
|
+
padding: 16px;
|
527
|
+
overflow: auto;
|
528
|
+
font-size: 85%;
|
529
|
+
line-height: 1.45;
|
530
|
+
background-color: #f7f7f7;
|
531
|
+
border-radius: 3px;
|
532
|
+
}
|
533
|
+
|
534
|
+
.markdown-body .codehilite pre {
|
535
|
+
margin-bottom: 0;
|
536
|
+
word-break: normal;
|
537
|
+
}
|
538
|
+
|
539
|
+
.markdown-body pre {
|
540
|
+
word-wrap: normal;
|
541
|
+
}
|
542
|
+
|
543
|
+
.markdown-body pre code {
|
544
|
+
display: inline;
|
545
|
+
max-width: initial;
|
546
|
+
padding: 0;
|
547
|
+
margin: 0;
|
548
|
+
overflow: initial;
|
549
|
+
line-height: inherit;
|
550
|
+
word-wrap: normal;
|
551
|
+
background-color: transparent;
|
552
|
+
border: 0;
|
553
|
+
}
|
554
|
+
|
555
|
+
.markdown-body pre code:before,
|
556
|
+
.markdown-body pre code:after {
|
557
|
+
content: normal;
|
558
|
+
}
|
559
|
+
|
560
|
+
/* Admonition */
|
561
|
+
.markdown-body .admonition {
|
562
|
+
-webkit-border-radius: 3px;
|
563
|
+
-moz-border-radius: 3px;
|
564
|
+
position: relative;
|
565
|
+
border-radius: 3px;
|
566
|
+
border: 1px solid #e0e0e0;
|
567
|
+
border-left: 6px solid #333;
|
568
|
+
padding: 10px 10px 10px 30px;
|
569
|
+
}
|
570
|
+
|
571
|
+
.markdown-body .admonition table {
|
572
|
+
color: #333;
|
573
|
+
}
|
574
|
+
|
575
|
+
.markdown-body .admonition p {
|
576
|
+
padding: 0;
|
577
|
+
}
|
578
|
+
|
579
|
+
.markdown-body .admonition-title {
|
580
|
+
font-weight: bold;
|
581
|
+
margin: 0;
|
582
|
+
}
|
583
|
+
|
584
|
+
.markdown-body .admonition>.admonition-title {
|
585
|
+
color: #333;
|
586
|
+
}
|
587
|
+
|
588
|
+
.markdown-body .attention>.admonition-title {
|
589
|
+
color: #a6d796;
|
590
|
+
}
|
591
|
+
|
592
|
+
.markdown-body .caution>.admonition-title {
|
593
|
+
color: #d7a796;
|
594
|
+
}
|
595
|
+
|
596
|
+
.markdown-body .hint>.admonition-title {
|
597
|
+
color: #96c6d7;
|
598
|
+
}
|
599
|
+
|
600
|
+
.markdown-body .danger>.admonition-title {
|
601
|
+
color: #c25f77;
|
602
|
+
}
|
603
|
+
|
604
|
+
.markdown-body .question>.admonition-title {
|
605
|
+
color: #96a6d7;
|
606
|
+
}
|
607
|
+
|
608
|
+
.markdown-body .note>.admonition-title {
|
609
|
+
color: #d7c896;
|
610
|
+
}
|
611
|
+
|
612
|
+
.markdown-body .admonition:before,
|
613
|
+
.markdown-body .attention:before,
|
614
|
+
.markdown-body .caution:before,
|
615
|
+
.markdown-body .hint:before,
|
616
|
+
.markdown-body .danger:before,
|
617
|
+
.markdown-body .question:before,
|
618
|
+
.markdown-body .note:before {
|
619
|
+
font: normal normal 16px fontawesome-mini;
|
620
|
+
-moz-osx-font-smoothing: grayscale;
|
621
|
+
-webkit-user-select: none;
|
622
|
+
-moz-user-select: none;
|
623
|
+
-ms-user-select: none;
|
624
|
+
user-select: none;
|
625
|
+
line-height: 1.5;
|
626
|
+
color: #333;
|
627
|
+
position: absolute;
|
628
|
+
left: 0;
|
629
|
+
top: 0;
|
630
|
+
padding-top: 10px;
|
631
|
+
padding-left: 10px;
|
632
|
+
}
|
633
|
+
|
634
|
+
.markdown-body .admonition:before {
|
635
|
+
content: "\f056\00a0";
|
636
|
+
color: 333;
|
637
|
+
}
|
638
|
+
|
639
|
+
.markdown-body .attention:before {
|
640
|
+
content: "\f058\00a0";
|
641
|
+
color: #a6d796;
|
642
|
+
}
|
643
|
+
|
644
|
+
.markdown-body .caution:before {
|
645
|
+
content: "\f06a\00a0";
|
646
|
+
color: #d7a796;
|
647
|
+
}
|
648
|
+
|
649
|
+
.markdown-body .hint:before {
|
650
|
+
content: "\f05a\00a0";
|
651
|
+
color: #96c6d7;
|
652
|
+
}
|
653
|
+
|
654
|
+
.markdown-body .danger:before {
|
655
|
+
content: "\f057\00a0";
|
656
|
+
color: #c25f77;
|
657
|
+
}
|
658
|
+
|
659
|
+
.markdown-body .question:before {
|
660
|
+
content: "\f059\00a0";
|
661
|
+
color: #96a6d7;
|
662
|
+
}
|
663
|
+
|
664
|
+
.markdown-body .note:before {
|
665
|
+
content: "\f040\00a0";
|
666
|
+
color: #d7c896;
|
667
|
+
}
|
668
|
+
|
669
|
+
.markdown-body .admonition::after {
|
670
|
+
content: normal;
|
671
|
+
}
|
672
|
+
|
673
|
+
.markdown-body .attention {
|
674
|
+
border-left: 6px solid #a6d796;
|
675
|
+
}
|
676
|
+
|
677
|
+
.markdown-body .caution {
|
678
|
+
border-left: 6px solid #d7a796;
|
679
|
+
}
|
680
|
+
|
681
|
+
.markdown-body .hint {
|
682
|
+
border-left: 6px solid #96c6d7;
|
683
|
+
}
|
684
|
+
|
685
|
+
.markdown-body .danger {
|
686
|
+
border-left: 6px solid #c25f77;
|
687
|
+
}
|
688
|
+
|
689
|
+
.markdown-body .question {
|
690
|
+
border-left: 6px solid #96a6d7;
|
691
|
+
}
|
692
|
+
|
693
|
+
.markdown-body .note {
|
694
|
+
border-left: 6px solid #d7c896;
|
695
|
+
}
|
696
|
+
|
697
|
+
.markdown-body .admonition>*:first-child {
|
698
|
+
margin-top: 0 !important;
|
699
|
+
}
|
700
|
+
|
701
|
+
.markdown-body .admonition>*:last-child {
|
702
|
+
margin-bottom: 0 !important;
|
703
|
+
}
|
704
|
+
|
705
|
+
/* progress bar*/
|
706
|
+
.markdown-body .progress {
|
707
|
+
display: block;
|
708
|
+
width: 300px;
|
709
|
+
margin: 10px 0;
|
710
|
+
height: 24px;
|
711
|
+
-webkit-border-radius: 3px;
|
712
|
+
-moz-border-radius: 3px;
|
713
|
+
border-radius: 3px;
|
714
|
+
background-color: #ededed;
|
715
|
+
position: relative;
|
716
|
+
box-shadow: inset -1px 1px 3px rgba(0, 0, 0, .1);
|
717
|
+
}
|
718
|
+
|
719
|
+
.markdown-body .progress-label {
|
720
|
+
position: absolute;
|
721
|
+
text-align: center;
|
722
|
+
font-weight: bold;
|
723
|
+
width: 100%; margin: 0;
|
724
|
+
line-height: 24px;
|
725
|
+
color: #333;
|
726
|
+
text-shadow: 1px 1px 0 #fefefe, -1px -1px 0 #fefefe, -1px 1px 0 #fefefe, 1px -1px 0 #fefefe, 0 1px 0 #fefefe, 0 -1px 0 #fefefe, 1px 0 0 #fefefe, -1px 0 0 #fefefe, 1px 1px 2px #000;
|
727
|
+
-webkit-font-smoothing: antialiased !important;
|
728
|
+
white-space: nowrap;
|
729
|
+
overflow: hidden;
|
730
|
+
}
|
731
|
+
|
732
|
+
.markdown-body .progress-bar {
|
733
|
+
height: 24px;
|
734
|
+
float: left;
|
735
|
+
-webkit-border-radius: 3px;
|
736
|
+
-moz-border-radius: 3px;
|
737
|
+
border-radius: 3px;
|
738
|
+
background-color: #96c6d7;
|
739
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .1);
|
740
|
+
background-size: 30px 30px;
|
741
|
+
background-image: -webkit-linear-gradient(
|
742
|
+
135deg, rgba(255, 255, 255, .4) 27%,
|
743
|
+
transparent 27%,
|
744
|
+
transparent 52%, rgba(255, 255, 255, .4) 52%,
|
745
|
+
rgba(255, 255, 255, .4) 77%,
|
746
|
+
transparent 77%, transparent
|
747
|
+
);
|
748
|
+
background-image: -moz-linear-gradient(
|
749
|
+
135deg,
|
750
|
+
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
751
|
+
transparent 52%, rgba(255, 255, 255, .4) 52%,
|
752
|
+
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
753
|
+
transparent
|
754
|
+
);
|
755
|
+
background-image: -ms-linear-gradient(
|
756
|
+
135deg,
|
757
|
+
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
758
|
+
transparent 52%, rgba(255, 255, 255, .4) 52%,
|
759
|
+
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
760
|
+
transparent
|
761
|
+
);
|
762
|
+
background-image: -o-linear-gradient(
|
763
|
+
135deg,
|
764
|
+
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
765
|
+
transparent 52%, rgba(255, 255, 255, .4) 52%,
|
766
|
+
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
767
|
+
transparent
|
768
|
+
);
|
769
|
+
background-image: linear-gradient(
|
770
|
+
135deg,
|
771
|
+
rgba(255, 255, 255, .4) 27%, transparent 27%,
|
772
|
+
transparent 52%, rgba(255, 255, 255, .4) 52%,
|
773
|
+
rgba(255, 255, 255, .4) 77%, transparent 77%,
|
774
|
+
transparent
|
775
|
+
);
|
776
|
+
}
|
777
|
+
|
778
|
+
.markdown-body .progress-100plus .progress-bar {
|
779
|
+
background-color: #a6d796;
|
780
|
+
}
|
781
|
+
|
782
|
+
.markdown-body .progress-80plus .progress-bar {
|
783
|
+
background-color: #c6d796;
|
784
|
+
}
|
785
|
+
|
786
|
+
.markdown-body .progress-60plus .progress-bar {
|
787
|
+
background-color: #d7c896;
|
788
|
+
}
|
789
|
+
|
790
|
+
.markdown-body .progress-40plus .progress-bar {
|
791
|
+
background-color: #d7a796;
|
792
|
+
}
|
793
|
+
|
794
|
+
.markdown-body .progress-20plus .progress-bar {
|
795
|
+
background-color: #d796a6;
|
796
|
+
}
|
797
|
+
|
798
|
+
.markdown-body .progress-0plus .progress-bar {
|
799
|
+
background-color: #c25f77;
|
800
|
+
}
|
801
|
+
|
802
|
+
.markdown-body .candystripe-animate .progress-bar{
|
803
|
+
-webkit-animation: animate-stripes 3s linear infinite;
|
804
|
+
-moz-animation: animate-stripes 3s linear infinite;
|
805
|
+
animation: animate-stripes 3s linear infinite;
|
806
|
+
}
|
807
|
+
|
808
|
+
@-webkit-keyframes animate-stripes {
|
809
|
+
0% {
|
810
|
+
background-position: 0 0;
|
811
|
+
}
|
812
|
+
|
813
|
+
100% {
|
814
|
+
background-position: 60px 0;
|
815
|
+
}
|
816
|
+
}
|
817
|
+
|
818
|
+
@-moz-keyframes animate-stripes {
|
819
|
+
0% {
|
820
|
+
background-position: 0 0;
|
821
|
+
}
|
822
|
+
|
823
|
+
100% {
|
824
|
+
background-position: 60px 0;
|
825
|
+
}
|
826
|
+
}
|
827
|
+
|
828
|
+
@keyframes animate-stripes {
|
829
|
+
0% {
|
830
|
+
background-position: 0 0;
|
831
|
+
}
|
832
|
+
|
833
|
+
100% {
|
834
|
+
background-position: 60px 0;
|
835
|
+
}
|
836
|
+
}
|
837
|
+
|
838
|
+
.markdown-body .gloss .progress-bar {
|
839
|
+
box-shadow:
|
840
|
+
inset 0 4px 12px rgba(255, 255, 255, .7),
|
841
|
+
inset 0 -12px 0 rgba(0, 0, 0, .05);
|
842
|
+
}
|
843
|
+
|
844
|
+
/* MultiMarkdown Critic Blocks */
|
845
|
+
.markdown-body .critic_mark {
|
846
|
+
background: #ff0;
|
847
|
+
}
|
848
|
+
|
849
|
+
.markdown-body .critic_delete {
|
850
|
+
color: #c82829;
|
851
|
+
text-decoration: line-through;
|
852
|
+
}
|
853
|
+
|
854
|
+
.markdown-body .critic_insert {
|
855
|
+
color: #718c00 ;
|
856
|
+
text-decoration: underline;
|
857
|
+
}
|
858
|
+
|
859
|
+
.markdown-body .critic_comment {
|
860
|
+
color: #8e908c;
|
861
|
+
font-style: italic;
|
862
|
+
}
|
863
|
+
|
864
|
+
.markdown-body .headeranchor {
|
865
|
+
font: normal normal 16px fontawesome-mini;
|
866
|
+
line-height: 1;
|
867
|
+
display: inline-block;
|
868
|
+
text-decoration: none;
|
869
|
+
-webkit-font-smoothing: antialiased;
|
870
|
+
-moz-osx-font-smoothing: grayscale;
|
871
|
+
-webkit-user-select: none;
|
872
|
+
-moz-user-select: none;
|
873
|
+
-ms-user-select: none;
|
874
|
+
user-select: none;
|
875
|
+
}
|
876
|
+
|
877
|
+
.headeranchor:before {
|
878
|
+
content: '\e157';
|
879
|
+
}
|
880
|
+
|
881
|
+
.markdown-body .task-list-item {
|
882
|
+
list-style-type: none;
|
883
|
+
}
|
884
|
+
|
885
|
+
.markdown-body .task-list-item+.task-list-item {
|
886
|
+
margin-top: 3px;
|
887
|
+
}
|
888
|
+
|
889
|
+
.markdown-body .task-list-item input {
|
890
|
+
margin: 0 4px 0.25em -20px;
|
891
|
+
vertical-align: middle;
|
892
|
+
}
|
893
|
+
|
894
|
+
/* Media */
|
895
|
+
@media only screen and (min-width: 480px) {
|
896
|
+
.markdown-body {
|
897
|
+
font-size:14px;
|
898
|
+
}
|
899
|
+
}
|
900
|
+
|
901
|
+
@media only screen and (min-width: 768px) {
|
902
|
+
.markdown-body {
|
903
|
+
font-size:16px;
|
904
|
+
}
|
905
|
+
}
|
906
|
+
|
907
|
+
@media print {
|
908
|
+
.markdown-body * {
|
909
|
+
background: transparent !important;
|
910
|
+
color: black !important;
|
911
|
+
filter:none !important;
|
912
|
+
-ms-filter: none !important;
|
913
|
+
}
|
914
|
+
|
915
|
+
.markdown-body {
|
916
|
+
font-size:12pt;
|
917
|
+
max-width:100%;
|
918
|
+
outline:none;
|
919
|
+
border: 0;
|
920
|
+
}
|
921
|
+
|
922
|
+
.markdown-body a,
|
923
|
+
.markdown-body a:visited {
|
924
|
+
text-decoration: underline;
|
925
|
+
}
|
926
|
+
|
927
|
+
.markdown-body .headeranchor-link {
|
928
|
+
display: none;
|
929
|
+
}
|
930
|
+
|
931
|
+
.markdown-body a[href]:after {
|
932
|
+
content: " (" attr(href) ")";
|
933
|
+
}
|
934
|
+
|
935
|
+
.markdown-body abbr[title]:after {
|
936
|
+
content: " (" attr(title) ")";
|
937
|
+
}
|
938
|
+
|
939
|
+
.markdown-body .ir a:after,
|
940
|
+
.markdown-body a[href^="javascript:"]:after,
|
941
|
+
.markdown-body a[href^="#"]:after {
|
942
|
+
content: "";
|
943
|
+
}
|
944
|
+
|
945
|
+
.markdown-body pre {
|
946
|
+
white-space: pre;
|
947
|
+
white-space: pre-wrap;
|
948
|
+
word-wrap: break-word;
|
949
|
+
}
|
950
|
+
|
951
|
+
.markdown-body pre,
|
952
|
+
.markdown-body blockquote {
|
953
|
+
border: 1px solid #999;
|
954
|
+
padding-right: 1em;
|
955
|
+
page-break-inside: avoid;
|
956
|
+
}
|
957
|
+
|
958
|
+
.markdown-body .progress,
|
959
|
+
.markdown-body .progress-bar {
|
960
|
+
-moz-box-shadow: none;
|
961
|
+
-webkit-box-shadow: none;
|
962
|
+
box-shadow: none;
|
963
|
+
}
|
964
|
+
|
965
|
+
.markdown-body .progress {
|
966
|
+
border: 1px solid #ddd;
|
967
|
+
}
|
968
|
+
|
969
|
+
.markdown-body .progress-bar {
|
970
|
+
height: 22px;
|
971
|
+
border-right: 1px solid #ddd;
|
972
|
+
}
|
973
|
+
|
974
|
+
.markdown-body tr,
|
975
|
+
.markdown-body img {
|
976
|
+
page-break-inside: avoid;
|
977
|
+
}
|
978
|
+
|
979
|
+
.markdown-body img {
|
980
|
+
max-width: 100% !important;
|
981
|
+
}
|
982
|
+
|
983
|
+
.markdown-body p,
|
984
|
+
.markdown-body h2,
|
985
|
+
.markdown-body h3 {
|
986
|
+
orphans: 3;
|
987
|
+
widows: 3;
|
988
|
+
}
|
989
|
+
|
990
|
+
.markdown-body h2,
|
991
|
+
.markdown-body h3 {
|
992
|
+
page-break-after: avoid;
|
993
|
+
}
|
994
|
+
}
|
995
|
+
</style><style>/*GitHub*/
|
996
|
+
.codehilite {background-color:#fff;color:#333333;}
|
997
|
+
.codehilite .hll {background-color:#ffffcc;}
|
998
|
+
.codehilite .c{color:#999988;font-style:italic}
|
999
|
+
.codehilite .err{color:#a61717;background-color:#e3d2d2}
|
1000
|
+
.codehilite .k{font-weight:bold}
|
1001
|
+
.codehilite .o{font-weight:bold}
|
1002
|
+
.codehilite .cm{color:#999988;font-style:italic}
|
1003
|
+
.codehilite .cp{color:#999999;font-weight:bold}
|
1004
|
+
.codehilite .c1{color:#999988;font-style:italic}
|
1005
|
+
.codehilite .cs{color:#999999;font-weight:bold;font-style:italic}
|
1006
|
+
.codehilite .gd{color:#000000;background-color:#ffdddd}
|
1007
|
+
.codehilite .ge{font-style:italic}
|
1008
|
+
.codehilite .gr{color:#aa0000}
|
1009
|
+
.codehilite .gh{color:#999999}
|
1010
|
+
.codehilite .gi{color:#000000;background-color:#ddffdd}
|
1011
|
+
.codehilite .go{color:#888888}
|
1012
|
+
.codehilite .gp{color:#555555}
|
1013
|
+
.codehilite .gs{font-weight:bold}
|
1014
|
+
.codehilite .gu{color:#800080;font-weight:bold}
|
1015
|
+
.codehilite .gt{color:#aa0000}
|
1016
|
+
.codehilite .kc{font-weight:bold}
|
1017
|
+
.codehilite .kd{font-weight:bold}
|
1018
|
+
.codehilite .kn{font-weight:bold}
|
1019
|
+
.codehilite .kp{font-weight:bold}
|
1020
|
+
.codehilite .kr{font-weight:bold}
|
1021
|
+
.codehilite .kt{color:#445588;font-weight:bold}
|
1022
|
+
.codehilite .m{color:#009999}
|
1023
|
+
.codehilite .s{color:#dd1144}
|
1024
|
+
.codehilite .n{color:#333333}
|
1025
|
+
.codehilite .na{color:teal}
|
1026
|
+
.codehilite .nb{color:#0086b3}
|
1027
|
+
.codehilite .nc{color:#445588;font-weight:bold}
|
1028
|
+
.codehilite .no{color:teal}
|
1029
|
+
.codehilite .ni{color:purple}
|
1030
|
+
.codehilite .ne{color:#990000;font-weight:bold}
|
1031
|
+
.codehilite .nf{color:#990000;font-weight:bold}
|
1032
|
+
.codehilite .nn{color:#555555}
|
1033
|
+
.codehilite .nt{color:navy}
|
1034
|
+
.codehilite .nv{color:teal}
|
1035
|
+
.codehilite .ow{font-weight:bold}
|
1036
|
+
.codehilite .w{color:#bbbbbb}
|
1037
|
+
.codehilite .mf{color:#009999}
|
1038
|
+
.codehilite .mh{color:#009999}
|
1039
|
+
.codehilite .mi{color:#009999}
|
1040
|
+
.codehilite .mo{color:#009999}
|
1041
|
+
.codehilite .sb{color:#dd1144}
|
1042
|
+
.codehilite .sc{color:#dd1144}
|
1043
|
+
.codehilite .sd{color:#dd1144}
|
1044
|
+
.codehilite .s2{color:#dd1144}
|
1045
|
+
.codehilite .se{color:#dd1144}
|
1046
|
+
.codehilite .sh{color:#dd1144}
|
1047
|
+
.codehilite .si{color:#dd1144}
|
1048
|
+
.codehilite .sx{color:#dd1144}
|
1049
|
+
.codehilite .sr{color:#009926}
|
1050
|
+
.codehilite .s1{color:#dd1144}
|
1051
|
+
.codehilite .ss{color:#990073}
|
1052
|
+
.codehilite .bp{color:#999999}
|
1053
|
+
.codehilite .vc{color:teal}
|
1054
|
+
.codehilite .vg{color:teal}
|
1055
|
+
.codehilite .vi{color:teal}
|
1056
|
+
.codehilite .il{color:#009999}
|
1057
|
+
.codehilite .gc{color:#999;background-color:#EAF2F5}
|
1058
|
+
</style><title>flipper</title></head><body><article class="markdown-body"><h1 id="thisfeature-flipper-adapter">ThisFeature - Flipper Adapter<a class="headerlink" href="#thisfeature-flipper-adapter" title="Permanent link"></a></h1>
|
1059
|
+
<h2 id="installation">Installation<a class="headerlink" href="#installation" title="Permanent link"></a></h2>
|
1060
|
+
<div class="codehilite"><pre><span class="n">gem</span> <span class="err">'</span><span class="n">this_feature</span><span class="o">-</span><span class="n">adapters</span><span class="o">-</span><span class="n">flipper</span>
|
1061
|
+
</pre></div>
|
1062
|
+
|
1063
|
+
<h2 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link"></a></h2>
|
1064
|
+
<div class="codehilite"><pre><span class="c1"># config/initializers/this_feature.rb</span>
|
1065
|
+
<span class="nb">require</span> <span class="s1">'this_feature'</span>
|
1066
|
+
<span class="nb">require</span> <span class="s1">'this_feature/adapters/flipper'</span>
|
1067
|
+
|
1068
|
+
<span class="no">ThisFeature</span><span class="o">.</span><span class="n">configure</span> <span class="k">do</span> <span class="o">|</span><span class="n">config</span><span class="o">|</span>
|
1069
|
+
<span class="n">adapter</span> <span class="o">=</span> <span class="no">ThisFeature</span><span class="o">::</span><span class="no">Adapters</span><span class="o">::</span><span class="no">Flipper</span><span class="o">.</span><span class="n">new</span>
|
1070
|
+
<span class="n">config</span><span class="o">.</span><span class="n">adapters</span> <span class="o">=</span> <span class="o">[</span><span class="n">adapter</span><span class="o">]</span>
|
1071
|
+
<span class="n">config</span><span class="o">.</span><span class="n">default_adapter</span> <span class="o">=</span> <span class="n">adapter</span>
|
1072
|
+
<span class="k">end</span>
|
1073
|
+
</pre></div>
|
1074
|
+
|
1075
|
+
<p>An existing Flipper client can be optionally passed to the initializer:</p>
|
1076
|
+
<div class="codehilite"><pre>ThisFeature::Adapters::Flipper.new(client: my_existing_client)
|
1077
|
+
</pre></div>
|
1078
|
+
|
1079
|
+
<h2 id="api">API<a class="headerlink" href="#api" title="Permanent link"></a></h2>
|
1080
|
+
<p>The Flipper adapter supports the public API of <code>ThisFeature</code>, with the following notes:</p>
|
1081
|
+
<ul>
|
1082
|
+
<li>`on?: Supports the context argument, but not data.
|
1083
|
+
ThisFeature.flag(‘flag_name’).on? # is the flag is turned on?
|
1084
|
+
ThisFeature.flag(‘flag_name’).off? # is the flag is turned off?
|
1085
|
+
ThisFeature.flag(‘flag_name’).control? # is the adapter is using the control?
|
1086
|
+
ThisFeature.flag(‘flag_name’).present? # is the flag set at all?</li>
|
1087
|
+
</ul></article></body></html>
|