sinatra-contrib 3.0.6 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1dd46868aed6165f3940802775216257f876a7b2d943133a84e88ec18f320be
4
- data.tar.gz: be4fc1981c54bc23315f7785b918750abaee125fd7b2c9c36e8803c109520226
3
+ metadata.gz: f0bffd33869745287a4ebe72f36cb2f7f5261f4875d6527ea5ae0c6bf4c0b7ab
4
+ data.tar.gz: 14bde99fedc38325348371a7b8cb414177598d0f7f8040267cfd6e97c2cb72df
5
5
  SHA512:
6
- metadata.gz: 643788f4f6cdcdf0fb575b67c2e59d273c30988ca07adf6a42e94043266b2ad5f574bb2586280e7f6e071f9dda9a60cbfb47efedd353c544c56e3175dc728649
7
- data.tar.gz: 25efe6011774ca9aa1cdeb3e011e28430aed7041995008e438b95a8419228fb8019658a401a1a6b7d827ff225cc0240b4c80cd92de601578f5b2b548ec505121
6
+ metadata.gz: a7223b638c4ba32d08624d6e81262e783790d05cf54f6cfdd13f1dbe7b830cfc2759aa90a76ce8da7939166eb987ae2313160a74384d86401dfcab8946824647
7
+ data.tar.gz: 075d7c1e54fd52e20ca534ff6e5daadddea714dadbf7fc6fa0ec194414af7e6093c01f0af012f834c33da0fa2d3c41a1f7a4c4029bf4e9a29909e8bc643e13d3
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sinatra
4
4
  module Contrib
5
- VERSION = '3.0.6'
5
+ VERSION = '3.1.0'
6
6
  end
7
7
  end
@@ -27,6 +27,16 @@ module Sinatra
27
27
  @current_engine == :haml
28
28
  end
29
29
 
30
+ # @return [Boolean] Returns true if current engine is `:sass`.
31
+ def sass?
32
+ @current_engine == :sass
33
+ end
34
+
35
+ # @return [Boolean] Returns true if current engine is `:scss`.
36
+ def scss?
37
+ @current_engine == :scss
38
+ end
39
+
30
40
  # @return [Boolean] Returns true if current engine is `:builder`.
31
41
  def builder?
32
42
  @current_engine == :builder
@@ -210,7 +210,7 @@ module Sinatra
210
210
  end
211
211
 
212
212
  def template_cache
213
- super.fetch(:nested, @namespace) { Tilt::Cache.new }
213
+ super.fetch(:nested, @namespace) { TemplateCache.new }
214
214
  end
215
215
 
216
216
  def redirect_to(uri, *args)
@@ -229,7 +229,7 @@ module Sinatra
229
229
  attr_reader :base, :templates
230
230
 
231
231
  ALLOWED_ENGINES = %i[
232
- erb erubi haml hamlit builder nokogiri
232
+ erb erubi haml hamlit builder nokogiri sass scss
233
233
  liquid markdown rdoc asciidoc markaby
234
234
  rabl slim yajl
235
235
  ]
@@ -249,6 +249,7 @@ module Sinatra
249
249
 
250
250
  def self.engines
251
251
  engines = {
252
+ css: %i[sass scss],
252
253
  xml: %i[builder nokogiri],
253
254
  html: %i[erb erubi haml hamlit slim liquid
254
255
  mab markdown rdoc],
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.description = 'Collection of useful Sinatra extensions'
9
9
  s.homepage = 'http://sinatrarb.com/contrib/'
10
10
  s.license = 'MIT'
11
- s.summary = s.description
11
+ s.summary = "#{s.description}."
12
12
  s.authors = ['https://github.com/sinatra/sinatra/graphs/contributors']
13
13
  s.email = 'sinatrarb@googlegroups.com'
14
14
  s.files = Dir['lib/**/*.rb'] + [
@@ -54,5 +54,6 @@ RubyGems 2.0 or newer is required to protect against public gem pushes. You can
54
54
  s.add_development_dependency 'rake', '>= 12.3.3'
55
55
  s.add_development_dependency 'redcarpet'
56
56
  s.add_development_dependency 'rspec', '~> 3'
57
+ s.add_development_dependency 'sass-embedded', '~> 1.54'
57
58
  s.add_development_dependency 'slim'
58
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://github.com/sinatra/sinatra/graphs/contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-11 00:00:00.000000000 Z
11
+ date: 2023-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.6
47
+ version: 3.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.6
54
+ version: 3.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sinatra
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.6
61
+ version: 3.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 3.0.6
68
+ version: 3.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tilt
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -234,6 +234,20 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '3'
237
+ - !ruby/object:Gem::Dependency
238
+ name: sass-embedded
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '1.54'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '1.54'
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: slim
239
253
  requirement: !ruby/object:Gem::Requirement
@@ -305,8 +319,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
319
  - !ruby/object:Gem::Version
306
320
  version: '0'
307
321
  requirements: []
308
- rubygems_version: 3.4.10
322
+ rubygems_version: 3.4.18
309
323
  signing_key:
310
324
  specification_version: 4
311
- summary: Collection of useful Sinatra extensions
325
+ summary: Collection of useful Sinatra extensions.
312
326
  test_files: []