turnip_formatter 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/turnip_formatter/template/index.erb +2 -0
- data/lib/turnip_formatter/template.rb +19 -1
- data/lib/turnip_formatter/version.rb +1 -1
- metadata +19 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 73823f2153a35f9e59d8cbfe8ee8e97f046bfaa0
|
4
|
+
data.tar.gz: 0734392d3cd6238a8199bb6358dcd2f027e1ccc4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 608461c8ad1c7eff9cefea68bec261adafe7522503b910edd7b8851e64e9ff81fed79d746addbba424f6addfe20e4d0f4c799c2ddfe67db341f089ab56c52e17
|
7
|
+
data.tar.gz: a5a8814b79266ca3d1bed8cbaaddb5f2154875305f808321469eb1f4d200494fc0be2ee264a7ae29b33ab71195572bc091e25f71a336f211fd904c11ce8db3e8
|
@@ -26,6 +26,14 @@ module TurnipFormatter
|
|
26
26
|
css_list << Sass::Engine.new(scss_string, scss_option).render
|
27
27
|
end
|
28
28
|
|
29
|
+
def add_css_file(file)
|
30
|
+
if URI(file).scheme
|
31
|
+
css_file_list << file
|
32
|
+
else
|
33
|
+
add_scss_file(file)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
29
37
|
def add_scss_file(path)
|
30
38
|
css_list << Sass::Engine.for_file(path, scss_option).render
|
31
39
|
end
|
@@ -44,6 +52,12 @@ module TurnipFormatter
|
|
44
52
|
css_list.join("\n")
|
45
53
|
end
|
46
54
|
|
55
|
+
def css_file_render
|
56
|
+
css_file_list.map do |file|
|
57
|
+
"<link rel=\"stylesheet\" href=\"#{file}\">"
|
58
|
+
end.join("\n")
|
59
|
+
end
|
60
|
+
|
47
61
|
def js_list
|
48
62
|
@js_list ||= []
|
49
63
|
end
|
@@ -56,6 +70,10 @@ module TurnipFormatter
|
|
56
70
|
@css_list ||= []
|
57
71
|
end
|
58
72
|
|
73
|
+
def css_file_list
|
74
|
+
@css_file_list ||= []
|
75
|
+
end
|
76
|
+
|
59
77
|
def scss_option
|
60
78
|
{ syntax: :scss, style: :compressed }
|
61
79
|
end
|
@@ -64,6 +82,6 @@ module TurnipFormatter
|
|
64
82
|
end
|
65
83
|
|
66
84
|
(File.dirname(__FILE__) + '/template').tap do |dirname|
|
67
|
-
TurnipFormatter::Template.
|
85
|
+
TurnipFormatter::Template.add_css_file(dirname + '/turnip_formatter.scss')
|
68
86
|
TurnipFormatter::Template.add_js_file(dirname + '/turnip_formatter.js')
|
69
87
|
end
|
metadata
CHANGED
@@ -1,52 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnip_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.9
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Wataru MIYAGUNI
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: turnip
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sass
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: bundler
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,65 +55,57 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rake
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - '>='
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - '>='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec-html-matchers
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - '>='
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - '>='
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: coveralls
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - '>='
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - '>='
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: guard-rspec
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - '>='
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - '>='
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
description: RSpec custom formatter for Turnip
|
@@ -224,33 +209,26 @@ files:
|
|
224
209
|
homepage: https://github.com/gongo/turnip_formatter
|
225
210
|
licenses:
|
226
211
|
- MIT
|
212
|
+
metadata: {}
|
227
213
|
post_install_message:
|
228
214
|
rdoc_options: []
|
229
215
|
require_paths:
|
230
216
|
- lib
|
231
217
|
required_ruby_version: !ruby/object:Gem::Requirement
|
232
|
-
none: false
|
233
218
|
requirements:
|
234
|
-
- -
|
219
|
+
- - '>='
|
235
220
|
- !ruby/object:Gem::Version
|
236
221
|
version: '0'
|
237
|
-
segments:
|
238
|
-
- 0
|
239
|
-
hash: 2706079068200732782
|
240
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
|
-
none: false
|
242
223
|
requirements:
|
243
|
-
- -
|
224
|
+
- - '>='
|
244
225
|
- !ruby/object:Gem::Version
|
245
226
|
version: '0'
|
246
|
-
segments:
|
247
|
-
- 0
|
248
|
-
hash: 2706079068200732782
|
249
227
|
requirements: []
|
250
228
|
rubyforge_project:
|
251
|
-
rubygems_version:
|
229
|
+
rubygems_version: 2.0.14
|
252
230
|
signing_key:
|
253
|
-
specification_version:
|
231
|
+
specification_version: 4
|
254
232
|
summary: RSpec custom formatter for Turnip
|
255
233
|
test_files:
|
256
234
|
- spec/rspec/core/formatters/turnip_formatter_spec.rb
|