thredded-markdown_coderay 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0e53bf20c59640b5e4c301e6d82c94b4de21a242
4
- data.tar.gz: 0d13156754ec8bd8a6fe8217f148d7fc76564408
2
+ SHA256:
3
+ metadata.gz: 71255bdd3403e81bb85b755036b7916e4f3f110f35f9e1ee177b5bd84555352a
4
+ data.tar.gz: 7f1e43316032b7376cd13b1598dbd784dbd4458c1b99738a74d1ff41fd348d09
5
5
  SHA512:
6
- metadata.gz: e31b62d8fa72c2b53fad286118a1102b7dc65cabba9a9ea560c59fb80f9781bbf6cdf2ca357936dcf4a975788be044a8adb15cdf3a7b45b3f46a55bfb33ac42c
7
- data.tar.gz: 39a0204a0057dbb81c6459b0f6dd33bd469179cbae6ca94769aef1fa07ed91780e3b4c007b80912791d1a0bec45ff1c9609ca1fff9bd279182df64ca7916d1d3
6
+ metadata.gz: d465fc722d15340edac29fd46d4e6f4e59afa85b61607a2dccfed75d76e0b54da5c22d3e914ccebcc9e8df26ce48c6ece8ef4f9a5677ff086d39b419dbec3863
7
+ data.tar.gz: 15f39c226a0aacddd92df9121928d0d5c0d4d925d07d688235d7a819f5133637bf37dd3440c3613848410bdf524517730b5057aa38d7213f838c8f3cd7045231
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module MarkdownCoderay
4
5
  class InstallGenerator < Rails::Generators::Base
@@ -10,25 +11,27 @@ module Thredded
10
11
  public_task :install
11
12
 
12
13
  def install
13
- copy_file '_thredded-coderay.scss',
14
- 'app/assets/stylesheets/_thredded-coderay.scss'
15
- append_to_file 'app/assets/stylesheets/application.scss', <<~'SCSS'
16
- @import "thredded-coderay";
17
- SCSS
14
+ copy_file '_layout.scss',
15
+ 'app/assets/stylesheets/coderay/_layout.scss'
16
+ copy_file '_day.scss',
17
+ 'app/assets/stylesheets/coderay/_day.scss'
18
+ copy_file '_night.scss',
19
+ 'app/assets/stylesheets/coderay/_night.scss'
20
+ add_import_if_file_exists 'application.scss', 'coderay/day'
21
+ add_import_if_file_exists 'day.scss', 'coderay/day'
22
+ add_import_if_file_exists 'night.scss', 'coderay/night'
23
+ add_import_if_file_exists 'email.scss', 'coderay/day'
18
24
  end
19
25
 
20
26
  private
21
27
 
22
- def coderay_css
23
- require 'coderay'
24
- CodeRay::Encoders[:html]::CSS.new(:default).stylesheet
25
- end
28
+ def add_import_if_file_exists(file, import)
29
+ path = File.join('app', 'assets', 'stylesheets', file)
30
+ return unless File.exist?(path)
26
31
 
27
- def indent(multiplier, content)
28
- spaces = ' ' * multiplier
29
- content.each_line.map do |line|
30
- line.blank? ? line : "#{spaces}#{line}"
31
- end.join
32
+ append_to_file path, <<~SCSS
33
+ @import "#{import}";
34
+ SCSS
32
35
  end
33
36
  end
34
37
  end
@@ -0,0 +1,367 @@
1
+ @import "./layout";
2
+
3
+ .CodeRay {
4
+ color: #333;
5
+
6
+ pre {
7
+ padding: 1em;
8
+ }
9
+
10
+ .line-numbers {
11
+ color: #AAA;
12
+ a {
13
+ color: #AAA;
14
+ }
15
+ tt {
16
+ font-weight: bold;
17
+ }
18
+ .highlighted {
19
+ color: red;
20
+ }
21
+ }
22
+ span.line-numbers {
23
+ padding: 0 10px 0 0;
24
+ }
25
+
26
+ ol {
27
+ font-size: 10pt;
28
+ li {
29
+ white-space: pre;
30
+ }
31
+ }
32
+
33
+ .debug {
34
+ color: white !important;
35
+ background: blue !important;
36
+ }
37
+
38
+ .annotation {
39
+ color: #007;
40
+ }
41
+
42
+ .attribute {
43
+ &-name {
44
+ color: #f08;
45
+ }
46
+ &-value {
47
+ color: #700;
48
+ }
49
+ }
50
+
51
+ .binary {
52
+ color: #509;
53
+ font-weight: bold
54
+ }
55
+
56
+ .comment {
57
+ color: #998;
58
+ font-style: italic;
59
+ }
60
+
61
+ .char {
62
+ color: #04D;
63
+ .content {
64
+ color: #04D;
65
+ }
66
+ .delimiter {
67
+ color: #039;
68
+ }
69
+ }
70
+
71
+ .class {
72
+ color: #458;
73
+ font-weight: bold;
74
+ }
75
+
76
+ .complex {
77
+ color: #A08;
78
+ font-weight: bold;
79
+ }
80
+
81
+ .constant {
82
+ color: teal;
83
+ }
84
+
85
+ .color {
86
+ color: #0A0;
87
+ }
88
+
89
+ .class-variable {
90
+ color: #369;
91
+ }
92
+
93
+ .decorator {
94
+ color: #B0B;
95
+ }
96
+
97
+ .definition {
98
+ color: #099;
99
+ font-weight: bold;
100
+ }
101
+
102
+ .directive {
103
+ color: #088;
104
+ font-weight: bold;
105
+ }
106
+
107
+ .delimiter {
108
+ color: black;
109
+ }
110
+
111
+ .doc {
112
+ color: #970;
113
+ }
114
+
115
+ .doctype {
116
+ color: #34b;
117
+ }
118
+
119
+ .doc-string {
120
+ color: #D42;
121
+ font-weight: bold;
122
+ }
123
+
124
+ .escape {
125
+ color: #666;
126
+ font-weight: bold;
127
+ }
128
+
129
+ .entity {
130
+ color: #800;
131
+ font-weight: bold;
132
+ }
133
+
134
+ .error {
135
+ color: #F00;
136
+ background-color: #FAA;
137
+ }
138
+
139
+ .exception {
140
+ color: #C00;
141
+ font-weight: bold;
142
+ }
143
+
144
+ .filename {
145
+ color: #099;
146
+ }
147
+
148
+ .function {
149
+ color: #900;
150
+ font-weight: bold;
151
+ }
152
+
153
+ .global-variable {
154
+ color: teal;
155
+ font-weight: bold;
156
+ }
157
+
158
+ .hex {
159
+ color: #058;
160
+ font-weight: bold;
161
+ }
162
+
163
+ .integer {
164
+ color: #099;
165
+ }
166
+
167
+ .include {
168
+ color: #B44;
169
+ font-weight: bold;
170
+ }
171
+
172
+ .inline {
173
+ color: black;
174
+ }
175
+
176
+ .inline .inline {
177
+ background: #ccc
178
+ }
179
+
180
+ .inline .inline .inline {
181
+ background: #bbb;
182
+ }
183
+
184
+ .inline .inline-delimiter {
185
+ color: #D14;
186
+ }
187
+
188
+ .inline-delimiter {
189
+ color: #D14;
190
+ }
191
+
192
+ .important {
193
+ color: #f00;
194
+ }
195
+
196
+ .interpreted {
197
+ color: #B2B;
198
+ font-weight: bold;
199
+ }
200
+
201
+ .instance-variable {
202
+ color: teal;
203
+ }
204
+
205
+ .label {
206
+ color: #970;
207
+ font-weight: bold;
208
+ }
209
+
210
+ .local-variable {
211
+ color: #963;
212
+ }
213
+
214
+ .octal {
215
+ color: #40E;
216
+ font-weight: bold;
217
+ }
218
+
219
+ .operator {
220
+ }
221
+
222
+ .predefined-constant {
223
+ font-weight: bold;
224
+ }
225
+
226
+ .predefined {
227
+ color: #369;
228
+ font-weight: bold;
229
+ }
230
+
231
+ .preprocessor {
232
+ color: #579;
233
+ }
234
+
235
+ .pseudo-class {
236
+ color: #00C;
237
+ font-weight: bold;
238
+ }
239
+
240
+ .predefined-type {
241
+ color: #074;
242
+ font-weight: bold;
243
+ }
244
+
245
+ .reserved, .keyword {
246
+ color: #000;
247
+ font-weight: bold;
248
+ }
249
+
250
+ .key {
251
+ color: #808;
252
+ .delimiter {
253
+ color: #606;
254
+ }
255
+ .char {
256
+ color: #80f;
257
+ }
258
+ }
259
+
260
+ .value {
261
+ color: #088;
262
+ }
263
+
264
+ .regexp {
265
+ background-color: #fff0ff;
266
+ .content {
267
+ color: #808;
268
+ }
269
+ .delimiter {
270
+ color: #404;
271
+ }
272
+ .modifier {
273
+ color: #C2C;
274
+ }
275
+ .function {
276
+ color: #404;
277
+ font-weight: bold
278
+ }
279
+ }
280
+
281
+ .string {
282
+ color: #D20;
283
+ .string {
284
+
285
+ }
286
+ .string .string {
287
+ background-color: #ffd0d0
288
+ }
289
+ .content {
290
+ color: #D14;
291
+ }
292
+ .char {
293
+ color: #D14;
294
+ }
295
+ .delimiter {
296
+ color: #D14;
297
+ }
298
+ }
299
+
300
+ .shell {
301
+ color: #D14;
302
+ .content {
303
+ }
304
+ .delimiter {
305
+ color: #D14;
306
+ }
307
+ }
308
+
309
+ .symbol {
310
+ color: #990073;
311
+ .content {
312
+ color: #A60;
313
+ }
314
+ .delimiter {
315
+ color: #630;
316
+ }
317
+ }
318
+
319
+ .tag {
320
+ color: #070;
321
+ &-special {
322
+ color: #D70;
323
+ font-weight: bold;
324
+ }
325
+ }
326
+
327
+ .type {
328
+ color: #339;
329
+ font-weight: bold;
330
+ }
331
+
332
+ .variable {
333
+ color: #036;
334
+ }
335
+
336
+ .insert {
337
+ background: #afa;
338
+ .insert {
339
+ color: #080;
340
+ font-weight: bold;
341
+ }
342
+ }
343
+
344
+ .delete {
345
+ background: #faa;
346
+ .delete {
347
+ color: #800;
348
+ font-weight: bold;
349
+ }
350
+ }
351
+
352
+ .change {
353
+ color: #aaf;
354
+ background: #007;
355
+ .change {
356
+ color: #66f;
357
+ }
358
+ }
359
+
360
+ .head {
361
+ color: #f8f;
362
+ background: #505;
363
+ .head {
364
+ color: #f4f;
365
+ }
366
+ }
367
+ }
@@ -0,0 +1,44 @@
1
+ span.CodeRay {
2
+ white-space: pre;
3
+ border: 0;
4
+ padding: 2px
5
+ }
6
+
7
+ table.CodeRay {
8
+ border-collapse: collapse;
9
+ width: 100%;
10
+ padding: 2px;
11
+ td {
12
+ padding: 1em 0.5em;
13
+ vertical-align: top;
14
+ }
15
+ }
16
+
17
+ .CodeRay {
18
+ margin: 0 0 0.75rem 0;
19
+
20
+ pre {
21
+ margin: 0;
22
+ }
23
+
24
+ .line-numbers {
25
+ text-align: right;
26
+ user-select: none;
27
+ pre {
28
+ word-break: normal;
29
+ }
30
+ }
31
+
32
+ .line {
33
+ display: block;
34
+ float: left;
35
+ width: 100%;
36
+ }
37
+
38
+ .code {
39
+ width: 100%;
40
+ pre {
41
+ overflow: auto;
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,382 @@
1
+ @import "./layout";
2
+
3
+ .CodeRay {
4
+ $bg: hsl(220, 13%, 18%);
5
+ $comment: hsl(240, 0%, 39%);
6
+ $fg: hsl(220, 14%, 71%);
7
+ $line-number: hsl(218, 5%, 37%);
8
+ $yellow: hsl(39, 67%, 69%);
9
+ $orange: hsl(29, 54%, 61%);
10
+ $red: hsl(5, 48%, 51%);
11
+ $magenta: hsl(355, 65%, 65%);
12
+ $purple: hsl(286, 60%, 67%);
13
+ $blue: hsl(207, 82%, 66%);
14
+ $cyan: hsl(187, 47%, 55%);
15
+ $green: hsl(95, 38%, 62%);
16
+ $border: hsl(221, 9%, 26%);
17
+
18
+ background-color: $bg;
19
+ border: 1px solid $border;
20
+ border-radius: 5px;
21
+ color: $fg;
22
+
23
+ pre {
24
+ background-color: $bg;
25
+ color: $fg;
26
+ border: 0 solid $border;
27
+ padding: 0.7em 1em;
28
+ }
29
+
30
+ .line-numbers {
31
+ color: $line-number;
32
+ a {
33
+ background-color: $line-number !important;
34
+ color: $comment !important;
35
+ text-decoration: none !important;
36
+ &:target {
37
+ color: $blue !important;
38
+ }
39
+ }
40
+ .highlighted {
41
+ color: $red !important;
42
+ a {
43
+ color: $red !important;
44
+ }
45
+ }
46
+ }
47
+ span.line-numbers {
48
+ padding: 0 13px 0 0;
49
+ }
50
+
51
+ .debug {
52
+ color: $bg !important;
53
+ background: $blue !important;
54
+ }
55
+ .annotation {
56
+ color: $blue;
57
+ }
58
+ .attribute{
59
+ &-name {
60
+ color: $orange;
61
+ }
62
+ &-value {
63
+ color: $green;
64
+ }
65
+ }
66
+ .binary {
67
+ color: $purple;
68
+ .char {
69
+ color: $purple;
70
+ }
71
+ .delimiter {
72
+ color: $purple;
73
+ }
74
+ }
75
+
76
+ .char {
77
+ color: $red;
78
+ .content {
79
+ color: $red;
80
+ }
81
+ .delimiter {
82
+ color: $red;
83
+ }
84
+ }
85
+
86
+ .class {
87
+ color: $yellow;
88
+ &-variable {
89
+ color: $red;
90
+ }
91
+ }
92
+
93
+ .color {
94
+ color: $green;
95
+ }
96
+
97
+ .comment {
98
+ color: $comment;
99
+ font-style: italic;
100
+ .char {
101
+ color: $fg;
102
+ }
103
+ .delimiter {
104
+ color: $fg;
105
+ }
106
+ }
107
+
108
+ .constant {
109
+ color: $yellow;
110
+ }
111
+
112
+ .decorator {
113
+ color: $magenta;
114
+ }
115
+
116
+ .definition {
117
+ color: $cyan;
118
+ }
119
+
120
+ .delimiter {
121
+ color: $comment;
122
+ }
123
+
124
+ .directive {
125
+ color: $cyan;
126
+ }
127
+
128
+ .docstring {
129
+ color: $orange;
130
+ }
131
+
132
+ .doctype {
133
+ color: $blue;
134
+ }
135
+
136
+ .done {
137
+ text-decoration: line-through;
138
+ color: $comment;
139
+ }
140
+
141
+ .entity {
142
+ color: $red;
143
+ }
144
+
145
+ .error {
146
+ color: $bg;
147
+ background-color: $red;
148
+ }
149
+
150
+ .escape {
151
+ color: $comment;
152
+ }
153
+
154
+ .exception {
155
+ color: $red;
156
+ }
157
+
158
+ .float {
159
+ color: $orange;
160
+ }
161
+
162
+ .function {
163
+ color: $blue;
164
+ .delimiter {
165
+ color: $blue;
166
+ }
167
+ }
168
+
169
+ .global-variable {
170
+ color: $orange;
171
+ }
172
+
173
+ .hex {
174
+ color: $blue;
175
+ }
176
+
177
+ .id {
178
+ color: $blue;
179
+ }
180
+
181
+ .include {
182
+ color: $magenta;
183
+ }
184
+
185
+ .inline {
186
+ color: $green;
187
+ &-delimiter {
188
+ color: $magenta;
189
+ }
190
+ }
191
+
192
+ .instance-variable {
193
+ color: $magenta;
194
+ }
195
+
196
+ .integer {
197
+ color: $orange;
198
+ }
199
+
200
+ .imaginary {
201
+ color: $red;
202
+ }
203
+
204
+ .important {
205
+ color: $red;
206
+ }
207
+
208
+ .key {
209
+ color: $cyan;
210
+ .char {
211
+ color: $cyan;
212
+ }
213
+ .delimiter {
214
+ color: $cyan;
215
+ }
216
+ }
217
+
218
+ .keyword {
219
+ color: $purple;
220
+ }
221
+
222
+ .label {
223
+ color: $yellow;
224
+ }
225
+
226
+ .local-variable {
227
+ color: $fg;
228
+ }
229
+
230
+ .map {
231
+ .content {
232
+ color: $purple;
233
+ }
234
+ .delimiter {
235
+ color: $purple;
236
+ }
237
+ }
238
+
239
+ .namespace {
240
+ color: $purple;
241
+ }
242
+
243
+ .octal {
244
+ color: $purple;
245
+ }
246
+
247
+ .operator {
248
+ }
249
+
250
+ .predefined {
251
+ color: $blue;
252
+ &-constant {
253
+ color: $orange;
254
+ }
255
+ &-type {
256
+ color: $green;
257
+ }
258
+ }
259
+
260
+ .preprocessor {
261
+ color: $purple;
262
+ }
263
+
264
+ .pseudo-class {
265
+ color: $blue;
266
+ }
267
+
268
+ .regexp {
269
+ .content {
270
+ color: $purple;
271
+ }
272
+ .delimiter {
273
+ color: $purple;
274
+ }
275
+ .modifier {
276
+ color: $purple;
277
+ }
278
+ }
279
+
280
+ .reserved {
281
+ color: $green;
282
+ }
283
+
284
+ .shell {
285
+ .content {
286
+ color: $green;
287
+ }
288
+ .delimiter {
289
+ color: $green;
290
+ }
291
+ }
292
+
293
+ .string {
294
+ .char {
295
+ color: $green;
296
+ }
297
+ .content {
298
+ color: $green;
299
+ }
300
+ .delimiter {
301
+ color: $green;
302
+ }
303
+ .modifier {
304
+ color: $orange;
305
+ }
306
+ }
307
+
308
+ .symbol {
309
+ color: $cyan;
310
+ .content {
311
+ color: $cyan;
312
+ }
313
+ .delimiter {
314
+ color: $cyan;
315
+ }
316
+ }
317
+
318
+ .tag {
319
+ color: $red;
320
+ }
321
+
322
+ .type {
323
+ color: $purple;
324
+ }
325
+
326
+ .value {
327
+ color: $orange;
328
+ }
329
+
330
+ .variable {
331
+ color: $blue;
332
+ }
333
+
334
+ .insert {
335
+ background-color: hsla(120, 100%, 50%, 0.2);
336
+ .insert {
337
+ color: $green;
338
+ }
339
+ .eyecatcher {
340
+ background-color: hsla(120, 100%, 50%, 0.2);
341
+ border: 1px solid hsla(120, 100%, 25%, 0.5);
342
+ margin: -1px;
343
+ border-top: none;
344
+ border-bottom-left-radius: 5px;
345
+ border-bottom-right-radius: 5px;
346
+ }
347
+ }
348
+
349
+ .delete {
350
+ background: hsla(0, 100%, 50%, 0.12);
351
+ .delete {
352
+ color: $red;
353
+ background: transparent;
354
+ }
355
+ .eyecatcher {
356
+ background-color: hsla(0, 100%, 50%, 0.2);
357
+ border: 1px solid hsla(0, 100%, 45%, 0.5);
358
+ margin: -1px;
359
+ border-bottom: none;
360
+ border-top-left-radius: 5px;
361
+ border-top-right-radius: 5px;
362
+ }
363
+ }
364
+
365
+ .change {
366
+ color: $purple;
367
+ background: $blue;
368
+ .change {
369
+ color: $purple;
370
+ }
371
+ }
372
+
373
+ .head {
374
+ color: $purple;
375
+ .head {
376
+ color: $purple;
377
+ }
378
+ .filename {
379
+ color: $purple;
380
+ }
381
+ }
382
+ }
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module MarkdownCoderay
4
5
  class Railtie < Rails::Railtie
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module MarkdownCoderay
4
- VERSION = '0.1.0'
5
+ VERSION = '1.0.0'
5
6
  end
6
7
  end
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'thredded/markdown_coderay/version'
3
4
  require 'thredded/markdown_coderay/railtie' if defined?(Rails)
5
+ require 'kramdown'
6
+ require 'kramdown-syntax-coderay'
4
7
 
5
8
  module Thredded
6
9
  module MarkdownCoderay
@@ -10,7 +13,7 @@ module Thredded
10
13
  def setup!
11
14
  assert_pipeline_contains! 'Thredded::HtmlPipeline::KramdownFilter'
12
15
  Thredded::HtmlPipeline::KramdownFilter.options.update(options)
13
- %w(div span code table td ol).each do |tag|
16
+ %w[div span code table td ol].each do |tag|
14
17
  whitelist_attribute! tag, 'class'
15
18
  end
16
19
  end
@@ -19,6 +22,7 @@ module Thredded
19
22
 
20
23
  def assert_pipeline_contains!(name)
21
24
  return if pipeline_contains?(name)
25
+
22
26
  raise "#{self.class.name} requires #{name} in" \
23
27
  'Thredded::ContentFormatter.pipeline_filters'
24
28
  end
@@ -31,6 +35,7 @@ module Thredded
31
35
  whitelist_attr = Thredded::ContentFormatter.whitelist[:attributes]
32
36
  whitelist_attr[tag] ||= []
33
37
  return if whitelist_attr[tag].include?(attribute)
38
+
34
39
  whitelist_attr[tag] << attribute
35
40
  end
36
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thredded-markdown_coderay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2022-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay
@@ -24,34 +24,62 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: kramdown-syntax-coderay
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.5'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rubocop
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '0.45'
61
+ version: 1.22.1
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: '0.45'
68
+ version: 1.22.1
41
69
  - !ruby/object:Gem::Dependency
42
- name: rspec
70
+ name: rubocop-rspec
43
71
  requirement: !ruby/object:Gem::Requirement
44
72
  requirements:
45
73
  - - "~>"
46
74
  - !ruby/object:Gem::Version
47
- version: '3.5'
75
+ version: 2.5.0
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
80
  - - "~>"
53
81
  - !ruby/object:Gem::Version
54
- version: '3.5'
82
+ version: 2.5.0
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: simplecov
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +108,8 @@ dependencies:
80
108
  - - ">="
81
109
  - !ruby/object:Gem::Version
82
110
  version: 0.8.0
83
- description: Highlights code syntax in your Markdown posts via Coderay.
111
+ description: A Thredded plugin that highlights code syntax in your Markdown posts
112
+ via Coderay.
84
113
  email:
85
114
  - glex.spb@gmail.com
86
115
  executables: []
@@ -90,7 +119,9 @@ files:
90
119
  - LICENSE.txt
91
120
  - README.md
92
121
  - lib/generators/thredded/markdown_coderay/install_generator.rb
93
- - lib/templates/thredded/markdown_coderay/install/_thredded-coderay.scss
122
+ - lib/templates/thredded/markdown_coderay/install/_day.scss
123
+ - lib/templates/thredded/markdown_coderay/install/_layout.scss
124
+ - lib/templates/thredded/markdown_coderay/install/_night.scss
94
125
  - lib/thredded/markdown_coderay.rb
95
126
  - lib/thredded/markdown_coderay/railtie.rb
96
127
  - lib/thredded/markdown_coderay/version.rb
@@ -98,24 +129,23 @@ homepage: https://github.com/thredded/thredded-markdown_coderay
98
129
  licenses:
99
130
  - MIT
100
131
  metadata: {}
101
- post_install_message:
132
+ post_install_message:
102
133
  rdoc_options: []
103
134
  require_paths:
104
135
  - lib
105
136
  required_ruby_version: !ruby/object:Gem::Requirement
106
137
  requirements:
107
- - - "~>"
138
+ - - ">="
108
139
  - !ruby/object:Gem::Version
109
- version: '2.3'
140
+ version: '2.5'
110
141
  required_rubygems_version: !ruby/object:Gem::Requirement
111
142
  requirements:
112
143
  - - ">="
113
144
  - !ruby/object:Gem::Version
114
145
  version: '0'
115
146
  requirements: []
116
- rubyforge_project:
117
- rubygems_version: 2.6.8
118
- signing_key:
147
+ rubygems_version: 3.2.32
148
+ signing_key:
119
149
  specification_version: 4
120
150
  summary: Thredded Markdown code blocks highlighting via Coderay.
121
151
  test_files: []
@@ -1,139 +0,0 @@
1
- .thredded--post--content {
2
- .CodeRay {
3
- margin: 1rem 0;
4
- }
5
-
6
- .CodeRay {
7
- color: #333;
8
- }
9
-
10
- .CodeRay pre {
11
- margin: 0;
12
- padding: 1em;
13
- }
14
-
15
- div.CodeRay { }
16
- span.CodeRay { white-space: pre; border: 0; padding: 2px }
17
-
18
- table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
19
- table.CodeRay td {
20
- padding: 1em 0.5em;
21
- vertical-align: top;
22
- }
23
-
24
- .CodeRay .line-numbers {
25
- color: #AAA;
26
- text-align: right;
27
- user-select: none;
28
- }
29
-
30
- .CodeRay .line-numbers pre {
31
- word-break: normal;
32
- }
33
-
34
- .CodeRay .line-numbers a {
35
- color: #AAA;
36
- }
37
-
38
- .CodeRay .line-numbers tt { font-weight: bold }
39
- .CodeRay .line-numbers .highlighted { color: red }
40
- .CodeRay .line { display: block; float: left; width: 100%; }
41
- .CodeRay span.line-numbers { padding: 0 10px 0 0 }
42
- .CodeRay .code { width: 100% }
43
-
44
- ol.CodeRay { font-size: 10pt }
45
- ol.CodeRay li { white-space: pre }
46
-
47
- .CodeRay .code pre { overflow: auto }
48
- .CodeRay .debug { color:white ! important; background:blue ! important; }
49
-
50
- .CodeRay .annotation { color:#007 }
51
- .CodeRay .attribute-name { color:#f08 }
52
- .CodeRay .attribute-value { color:#700 }
53
- .CodeRay .binary { color:#509; font-weight:bold }
54
- .CodeRay .comment { color:#998; font-style: italic;}
55
- .CodeRay .char { color:#04D }
56
- .CodeRay .char .content { color:#04D }
57
- .CodeRay .char .delimiter { color:#039 }
58
- .CodeRay .class { color:#458; font-weight:bold }
59
- .CodeRay .complex { color:#A08; font-weight:bold }
60
- .CodeRay .constant { color:teal; }
61
- .CodeRay .color { color:#0A0 }
62
- .CodeRay .class-variable { color:#369 }
63
- .CodeRay .decorator { color:#B0B; }
64
- .CodeRay .definition { color:#099; font-weight:bold }
65
- .CodeRay .directive { color:#088; font-weight:bold }
66
- .CodeRay .delimiter { color:black }
67
- .CodeRay .doc { color:#970 }
68
- .CodeRay .doctype { color:#34b }
69
- .CodeRay .doc-string { color:#D42; font-weight:bold }
70
- .CodeRay .escape { color:#666; font-weight:bold }
71
- .CodeRay .entity { color:#800; font-weight:bold }
72
- .CodeRay .error { color:#F00; background-color:#FAA }
73
- .CodeRay .exception { color:#C00; font-weight:bold }
74
- .CodeRay .filename { color:#099; }
75
- .CodeRay .function { color:#900; font-weight:bold }
76
- .CodeRay .global-variable { color:teal; font-weight:bold }
77
- .CodeRay .hex { color:#058; font-weight:bold }
78
- .CodeRay .integer { color:#099; }
79
- .CodeRay .include { color:#B44; font-weight:bold }
80
- .CodeRay .inline { color: black }
81
- .CodeRay .inline .inline { background: #ccc }
82
- .CodeRay .inline .inline .inline { background: #bbb }
83
- .CodeRay .inline .inline-delimiter { color: #D14; }
84
- .CodeRay .inline-delimiter { color: #D14; }
85
- .CodeRay .important { color:#f00; }
86
- .CodeRay .interpreted { color:#B2B; font-weight:bold }
87
- .CodeRay .instance-variable { color:teal }
88
- .CodeRay .label { color:#970; font-weight:bold }
89
- .CodeRay .local-variable { color:#963 }
90
- .CodeRay .octal { color:#40E; font-weight:bold }
91
- .CodeRay .operator { }
92
- .CodeRay .predefined-constant { font-weight:bold }
93
- .CodeRay .predefined { color:#369; font-weight:bold }
94
- .CodeRay .preprocessor { color:#579; }
95
- .CodeRay .pseudo-class { color:#00C; font-weight:bold }
96
- .CodeRay .predefined-type { color:#074; font-weight:bold }
97
- .CodeRay .reserved, .keyword { color:#000; font-weight:bold }
98
-
99
- .CodeRay .key { color: #808; }
100
- .CodeRay .key .delimiter { color: #606; }
101
- .CodeRay .key .char { color: #80f; }
102
- .CodeRay .value { color: #088; }
103
-
104
- .CodeRay .regexp { background-color:#fff0ff }
105
- .CodeRay .regexp .content { color:#808 }
106
- .CodeRay .regexp .delimiter { color:#404 }
107
- .CodeRay .regexp .modifier { color:#C2C }
108
- .CodeRay .regexp .function { color:#404; font-weight: bold }
109
-
110
- .CodeRay .string { color: #D20; }
111
- .CodeRay .string .string { }
112
- .CodeRay .string .string .string { background-color:#ffd0d0 }
113
- .CodeRay .string .content { color: #D14; }
114
- .CodeRay .string .char { color: #D14; }
115
- .CodeRay .string .delimiter { color: #D14; }
116
-
117
- .CodeRay .shell { color:#D14 }
118
- .CodeRay .shell .content { }
119
- .CodeRay .shell .delimiter { color:#D14 }
120
-
121
- .CodeRay .symbol { color:#990073 }
122
- .CodeRay .symbol .content { color:#A60 }
123
- .CodeRay .symbol .delimiter { color:#630 }
124
-
125
- .CodeRay .tag { color:#070 }
126
- .CodeRay .tag-special { color:#D70; font-weight:bold }
127
- .CodeRay .type { color:#339; font-weight:bold }
128
- .CodeRay .variable { color:#036 }
129
-
130
- .CodeRay .insert { background: #afa; }
131
- .CodeRay .delete { background: #faa; }
132
- .CodeRay .change { color: #aaf; background: #007; }
133
- .CodeRay .head { color: #f8f; background: #505 }
134
-
135
- .CodeRay .insert .insert { color: #080; font-weight:bold }
136
- .CodeRay .delete .delete { color: #800; font-weight:bold }
137
- .CodeRay .change .change { color: #66f; }
138
- .CodeRay .head .head { color: #f4f; }
139
- }