slim-rails 3.7.0 → 4.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
2
  SHA256:
3
- metadata.gz: b5cc57cd0be673d5ceb521c08dd5b3877e73f79842dd4766341f35872287fe1d
4
- data.tar.gz: 54e93a2b7a14023c34eb815b753bbd1a29454fbc0402186d70bc09fe82a06abc
3
+ metadata.gz: af27b2590d96b6394a46f392188b8853e2f6099ea5e5c386a16f14106ce7631b
4
+ data.tar.gz: 1ef0c42346ad933e803a4eefb9bb23b37f267180f99cd2acba90753d20588c11
5
5
  SHA512:
6
- metadata.gz: 3c848a2695899792ba05f695a519bf8454c8c6129a8c0a2fb2889526e8f0a16d5dc39578dc5123f2b2bc64f3a1e785073637ceff124759db9815d8c7cf19e76b
7
- data.tar.gz: 41f330acf34c5d0493fbea601e44539f6fc99a4a5ac5bc4818da49ff4a3fb109eed0d5398ca59859a6fdce16e88bffe7aefcc9331997b1c5c61d5b7750539f26
6
+ metadata.gz: 17ddd58b1d67e04dc05787e4a4b89d3fcbaea1619320353a920ce4d9190eee8a3fbf95871bfe5f891a5f66634d8f0721ee7bda6073b825230956bb1df01679bc
7
+ data.tar.gz: dd051090b0259003607c0876df5d1fffb02230d7393391ba4ecc11ebf6870b5b51ced80d46c2cb721c6125acdbf78c9e58570866f5a8e392a9f0ed8580478112
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 4.0.0 (December 11, 2025)
2
+
3
+ - Add support for Rails Annotations and CodeStatistics ([#206])
4
+ - Drop support for Ruby 2.7 and Rails older than 7 ([205])
5
+ - Add Rails 8.1 to CI Matrix ([#204])
6
+
7
+ ## 3.7.0 (December 29, 2024)
8
+
9
+ - Support Rails 8.0 authentication generator ([#201])
10
+ - Update CI matrix for Rails 7.2 / 8.0 and Ruby 3.3 / 3.4 ([#197], [#200])
11
+
12
+ ## 3.6.3 (October 24, 2023)
13
+
14
+ - Fix ActionView::SyntaxErrorInTemplate when scaffolding with namespace ([#193])
15
+ - Update CI matrix for Rails 7.1 ([#194])
16
+
17
+ ## 3.6.2 (March 9, 2023)
18
+
19
+ - Update gemspec to be compatible with slim 5.1 ([#191])
20
+ - README: Separate out details from main things ([#190])
21
+
1
22
  ## 3.6.1 (February 14, 2023)
2
23
 
3
24
  - Fix to avoid depending on the failed Slim 5.0.0 release ([#188])
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # slim-rails [![Gem Version](https://img.shields.io/gem/v/slim-rails.svg)](http://rubygems.org/gems/slim-rails) [![Build Status](https://github.com/slim-template/slim-rails/actions/workflows/main.yml/badge.svg)](https://github.com/slim-template/slim-rails/actions/workflows/main.yml) [![Code Climate](https://codeclimate.com/github/slim-template/slim-rails/badges/gpa.svg)](https://codeclimate.com/github/slim-template/slim-rails)
1
+ # slim-rails [![Gem Version](https://img.shields.io/gem/v/slim-rails.svg)](http://rubygems.org/gems/slim-rails) [![Build Status](https://github.com/slim-template/slim-rails/actions/workflows/main.yml/badge.svg)](https://github.com/slim-template/slim-rails/actions/workflows/main.yml)
2
2
 
3
3
  slim-rails provides Slim generators for Rails:
4
4
 
@@ -20,7 +20,7 @@ Every time you generate a controller or scaffold, you'll get Slim templates.
20
20
 
21
21
  If you have existing `.erb` templates, check out our guide [How to convert your `.erb` templates to `.slim`](https://github.com/slim-template/slim/wiki/Template-Converters-ERB-to-SLIM) on how to achieve this.
22
22
 
23
- This gem is [tested with Ruby on Rails 5.2+](/.github/workflows/main.yml).
23
+ This gem is [tested with Ruby on Rails 7.0+](/.github/workflows/main.yml).
24
24
 
25
25
  ## History
26
26
 
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  module Rails
3
- VERSION = "3.7.0"
3
+ VERSION = "4.0.0"
4
4
  end
5
5
  end
data/lib/slim-rails.rb CHANGED
@@ -33,6 +33,27 @@ module Slim
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ if ::Rails::VERSION::MAJOR >= 8 && ::Rails::VERSION::MINOR >= 2
38
+ initializer "slim_rails.configure_code_statistics" do
39
+ require "rails/code_statistics"
40
+
41
+ ::Rails::CodeStatistics.register_extension("slim")
42
+ end
43
+ end
44
+
45
+ initializer "slim_rails.configure_source_annotation" do
46
+ annotation_class = if ::Rails::VERSION::MAJOR >= 6
47
+ require "rails/source_annotation_extractor"
48
+ ::Rails::SourceAnnotationExtractor::Annotation
49
+ else
50
+ ::SourceAnnotationExtractor::Annotation
51
+ end
52
+
53
+ annotation_class.register_extensions("slim") do |tag|
54
+ /\s*\/\s*(#{tag}):?\s*(.*)$/
55
+ end
56
+ end
36
57
  end
37
58
  end
38
59
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonardo Almeida
8
8
  - Janusz Mordarski
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-12-29 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: actionpack
@@ -65,20 +64,6 @@ dependencies:
65
64
  - - "<"
66
65
  - !ruby/object:Gem::Version
67
66
  version: '6.0'
68
- - !ruby/object:Gem::Dependency
69
- name: sprockets-rails
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: '0'
75
- type: :development
76
- prerelease: false
77
- version_requirements: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
67
  - !ruby/object:Gem::Dependency
83
68
  name: slim_lint
84
69
  requirement: !ruby/object:Gem::Requirement
@@ -218,7 +203,6 @@ homepage: https://github.com/slim-template/slim-rails
218
203
  licenses:
219
204
  - MIT
220
205
  metadata: {}
221
- post_install_message:
222
206
  rdoc_options: []
223
207
  require_paths:
224
208
  - lib
@@ -226,15 +210,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
210
  requirements:
227
211
  - - ">="
228
212
  - !ruby/object:Gem::Version
229
- version: 2.0.0
213
+ version: 3.0.0
230
214
  required_rubygems_version: !ruby/object:Gem::Requirement
231
215
  requirements:
232
216
  - - ">="
233
217
  - !ruby/object:Gem::Version
234
218
  version: '0'
235
219
  requirements: []
236
- rubygems_version: 3.5.23
237
- signing_key:
220
+ rubygems_version: 3.7.2
238
221
  specification_version: 4
239
222
  summary: Slim templates generator for Rails
240
223
  test_files: []