sinatra-contrib 3.0.4 → 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: '0480ed11ff7910bbc3cad6ca40df8277e8d96e2c591ad26df23d9528746d854f'
4
- data.tar.gz: c365eb9d67f305fbd713e0a43cf103489e2376c661f562588bb9d380ce6aca26
3
+ metadata.gz: f0bffd33869745287a4ebe72f36cb2f7f5261f4875d6527ea5ae0c6bf4c0b7ab
4
+ data.tar.gz: 14bde99fedc38325348371a7b8cb414177598d0f7f8040267cfd6e97c2cb72df
5
5
  SHA512:
6
- metadata.gz: '069ca7cdc408a403a303e614a1acdd2a5d2d6d88e1a614efabdfaf1867c809a4423ef1d348ca353cd0f2bf956623939391a3289c424484983c3bcce5b671cdce'
7
- data.tar.gz: 064b83c313a157664df4ae403cdfea907432e31f524b0ef2801b1683a1456f1bd6fe179447ee5c06bf1304f6326e2fe61337db38ef0448156229aa193f30c579
6
+ metadata.gz: a7223b638c4ba32d08624d6e81262e783790d05cf54f6cfdd13f1dbe7b830cfc2759aa90a76ce8da7939166eb987ae2313160a74384d86401dfcab8946824647
7
+ data.tar.gz: 075d7c1e54fd52e20ca534ff6e5daadddea714dadbf7fc6fa0ec194414af7e6093c01f0af012f834c33da0fa2d3c41a1f7a4c4029bf4e9a29909e8bc643e13d3
data/README.md CHANGED
@@ -157,7 +157,7 @@ end
157
157
  ### Documentation
158
158
 
159
159
  For more info check the [official docs](http://www.sinatrarb.com/contrib/) and
160
- [api docs](http://www.rubydoc.info/gems/sinatra-contrib).
160
+ [api docs](https://www.rubydoc.info/gems/sinatra-contrib).
161
161
 
162
162
  [sinatra-reloader]: http://www.sinatrarb.com/contrib/reloader
163
163
  [sinatra-namespace]: http://www.sinatrarb.com/contrib/namespace
@@ -167,7 +167,7 @@ For more info check the [official docs](http://www.sinatrarb.com/contrib/) and
167
167
  [sinatra-webdav]: http://www.sinatrarb.com/contrib/webdav
168
168
  [sinatra-runner]: http://www.sinatrarb.com/contrib/runner
169
169
  [sinatra-extension]: http://www.sinatrarb.com/contrib/extension
170
- [sinatra-test-helpers]: https://github.com/sinatra/sinatra/blob/master/sinatra-contrib/lib/sinatra/test_helpers.rb
170
+ [sinatra-test-helpers]: https://github.com/sinatra/sinatra/blob/main/sinatra-contrib/lib/sinatra/test_helpers.rb
171
171
  [sinatra-required-params]: http://www.sinatrarb.com/contrib/required_params
172
172
  [sinatra-custom-logger]: http://www.sinatrarb.com/contrib/custom_logger
173
173
  [sinatra-multi-route]: http://www.sinatrarb.com/contrib/multi_route
@@ -176,5 +176,5 @@ For more info check the [official docs](http://www.sinatrarb.com/contrib/) and
176
176
  [sinatra-config-file]: http://www.sinatrarb.com/contrib/config_file
177
177
  [sinatra-link-header]: http://www.sinatrarb.com/contrib/link_header
178
178
  [sinatra-capture]: http://www.sinatrarb.com/contrib/capture
179
- [sinatra-engine-tracking]: https://github.com/sinatra/sinatra/blob/master/sinatra-contrib/lib/sinatra/engine_tracking.rb
179
+ [sinatra-engine-tracking]: https://github.com/sinatra/sinatra/blob/main/sinatra-contrib/lib/sinatra/engine_tracking.rb
180
180
 
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ task release: :gemspec do
69
69
  gem push sinatra-contrib*.gem &&
70
70
  git commit --allow-empty -a -m '#{Sinatra::Contrib::VERSION} release' &&
71
71
  git tag -s v#{Sinatra::Contrib::VERSION} -m '#{Sinatra::Contrib::VERSION} release' &&
72
- git push && (git push origin master || true) &&
72
+ git push && (git push origin main || true) &&
73
73
  git push --tags && (git push origin --tags || true)
74
74
  SH
75
75
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sinatra
4
4
  module Contrib
5
- VERSION = '3.0.3'
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],
@@ -25,7 +25,7 @@ module Sinatra
25
25
  #
26
26
  # Body of last_response
27
27
  #
28
- # @see http://www.rubydoc.info/github/rack/rack/master/Rack/Response#body-instance_method
28
+ # @see https://www.rubydoc.info/github/rack/rack/main/Rack/Response#body-instance_method
29
29
  # @return [String] body of the last response
30
30
 
31
31
  # @!method headers
@@ -104,7 +104,7 @@ module Sinatra
104
104
  # @!group Instance Methods delegated to rack_mock_session
105
105
  # @!method cookie_jar
106
106
  #
107
- # Returns a {http://www.rubydoc.info/github/rack-test/rack-test/Rack/Test/CookieJar Rack::Test::CookieJar}.
107
+ # Returns a {https://www.rubydoc.info/github/rack/rack-test/Rack/Test/CookieJar Rack::Test::CookieJar}.
108
108
  #
109
109
  # @return [Rack::Test::CookieJar]
110
110
  def_delegators :rack_mock_session, :cookie_jar
@@ -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'] + [
@@ -29,7 +29,7 @@ RubyGems 2.0 or newer is required to protect against public gem pushes. You can
29
29
  end
30
30
 
31
31
  s.metadata = {
32
- 'source_code_uri' => 'https://github.com/sinatra/sinatra/tree/master/sinatra-contrib',
32
+ 'source_code_uri' => 'https://github.com/sinatra/sinatra/tree/main/sinatra-contrib',
33
33
  'homepage_uri' => 'http://sinatrarb.com/contrib/',
34
34
  'documentation_uri' => 'https://www.rubydoc.info/gems/sinatra-contrib',
35
35
  'rubygems_mfa_required' => 'true'
@@ -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.4
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: 2022-11-25 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.4
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.4
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.4
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.4
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
@@ -286,7 +300,7 @@ homepage: http://sinatrarb.com/contrib/
286
300
  licenses:
287
301
  - MIT
288
302
  metadata:
289
- source_code_uri: https://github.com/sinatra/sinatra/tree/master/sinatra-contrib
303
+ source_code_uri: https://github.com/sinatra/sinatra/tree/main/sinatra-contrib
290
304
  homepage_uri: http://sinatrarb.com/contrib/
291
305
  documentation_uri: https://www.rubydoc.info/gems/sinatra-contrib
292
306
  rubygems_mfa_required: 'true'
@@ -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.2.3
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: []