slim-rails 3.1.3 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +21 -4
- data/Appraisals +8 -0
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/gemfiles/rails_3.gemfile +1 -1
- data/gemfiles/rails_4.1.gemfile +1 -1
- data/gemfiles/rails_4.2.gemfile +1 -1
- data/gemfiles/rails_4.gemfile +1 -1
- data/gemfiles/rails_5.1.gemfile +7 -0
- data/gemfiles/rails_5.2.gemfile +7 -0
- data/gemfiles/rails_5.gemfile +1 -1
- data/lib/slim-rails/register_engine.rb +24 -22
- data/lib/slim-rails/version.rb +1 -1
- data/slim-rails.gemspec +1 -1
- metadata +13 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 85d2a7934c6ad9ff0ae65c4da40ee1a7f22de8c82cf457898e977153bb3f5fa6
|
4
|
+
data.tar.gz: 6ae09a270eaed5a03d87eb2a7999ef7310030ece13167efe32290ae56088cfdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5384a517144559f59493d78a1da1b5483680d89974495d91a58197b6fb5ff2655b2ca47a22e24b1e45fd074fa3f34abc00d47d727263ce7a8171ae3f80913835
|
7
|
+
data.tar.gz: ac6118fbbe095c820280e0d12304d2443a9d18ca486f652a645c3ebaae57d0e06c8d4f610faaf755f4107548db2e6658ce6c9d07e820acf3201dab92d53467fc
|
data/.travis.yml
CHANGED
@@ -3,7 +3,8 @@ before_install:
|
|
3
3
|
- gem install bundler
|
4
4
|
rvm:
|
5
5
|
- ruby-head
|
6
|
-
- 2.
|
6
|
+
- 2.5
|
7
|
+
- 2.4
|
7
8
|
- 2.3
|
8
9
|
- 2.2
|
9
10
|
- 2.1
|
@@ -14,20 +15,36 @@ gemfile:
|
|
14
15
|
- gemfiles/rails_4.1.gemfile
|
15
16
|
- gemfiles/rails_4.2.gemfile
|
16
17
|
- gemfiles/rails_5.gemfile
|
18
|
+
- gemfiles/rails_5.1.gemfile
|
19
|
+
- gemfiles/rails_5.2.gemfile
|
17
20
|
matrix:
|
18
21
|
allow_failures:
|
19
22
|
- rvm: ruby-head
|
20
|
-
- rvm: 2.4
|
23
|
+
- rvm: 2.4
|
21
24
|
gemfile: gemfiles/rails_4.gemfile
|
22
|
-
- rvm: 2.4
|
25
|
+
- rvm: 2.4
|
23
26
|
gemfile: gemfiles/rails_4.1.gemfile
|
24
|
-
- rvm: 2.4
|
27
|
+
- rvm: 2.4
|
28
|
+
gemfile: gemfiles/rails_4.2.gemfile
|
29
|
+
- rvm: 2.5
|
30
|
+
gemfile: gemfiles/rails_4.gemfile
|
31
|
+
- rvm: 2.5
|
32
|
+
gemfile: gemfiles/rails_4.1.gemfile
|
33
|
+
- rvm: 2.5
|
25
34
|
gemfile: gemfiles/rails_4.2.gemfile
|
26
35
|
exclude:
|
27
36
|
- rvm: 2.1
|
28
37
|
gemfile: gemfiles/rails_5.gemfile
|
38
|
+
- rvm: 2.1
|
39
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
40
|
+
- rvm: 2.1
|
41
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
29
42
|
- rvm: 2.0
|
30
43
|
gemfile: gemfiles/rails_5.gemfile
|
44
|
+
- rvm: 2.0
|
45
|
+
gemfile: gemfiles/rails_5.1.gemfile
|
46
|
+
- rvm: 2.0
|
47
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
31
48
|
addons:
|
32
49
|
code_climate:
|
33
50
|
repo_token: 294f0ec8183176c0259b75eb21b38414508616985a7b39fc48fec9dfcf40a52e
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# slim-rails [![Build Status](https://travis-ci.org/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://travis-ci.org/slim-template/slim-rails.svg?branch=master)](https://travis-ci.org/slim-template/slim-rails) [![Code Climate](https://codeclimate.com/github/slim-template/slim-rails/badges/gpa.svg)](https://codeclimate.com/github/slim-template/slim-rails)
|
2
2
|
|
3
3
|
slim-rails provides Slim generators for Rails 3+. It was based on
|
4
4
|
[haml-rails](http://github.com/indirect/haml-rails) and it does basically the
|
@@ -20,4 +20,4 @@ And that's it.
|
|
20
20
|
|
21
21
|
From the version 0.2.0, there is no need to include gem "slim" in your Gemfile.
|
22
22
|
|
23
|
-
Every time you generate a controller or scaffold, you'll get Slim templates.
|
23
|
+
Every time you generate a controller or scaffold, you'll get Slim templates.
|
data/gemfiles/rails_3.gemfile
CHANGED
data/gemfiles/rails_4.1.gemfile
CHANGED
data/gemfiles/rails_4.2.gemfile
CHANGED
data/gemfiles/rails_4.gemfile
CHANGED
data/gemfiles/rails_5.gemfile
CHANGED
@@ -7,34 +7,36 @@ module Slim
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
class << self
|
11
|
+
def register_engine(app, config)
|
12
|
+
if ::Rails::VERSION::MAJOR == 3
|
13
|
+
_register_engine3(app)
|
14
|
+
else
|
15
|
+
_register_engine(config)
|
16
|
+
end
|
15
17
|
end
|
16
|
-
end
|
17
18
|
|
18
|
-
|
19
|
+
private
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
def _register_engine3(app)
|
22
|
+
return unless app.assets
|
23
|
+
return unless app.assets.respond_to?(:register_engine)
|
23
24
|
|
24
|
-
|
25
|
-
|
25
|
+
app.assets.register_engine('.slim', Slim::Template)
|
26
|
+
end
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
def _register_engine(config)
|
29
|
+
return unless config.respond_to?(:assets)
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
config.assets.configure do |env|
|
32
|
+
if env.respond_to?(:register_transformer) && Sprockets::VERSION.to_i > 3
|
33
|
+
env.register_mime_type 'text/slim', extensions: ['.slim', '.slim.html']#, charset: :html
|
34
|
+
env.register_transformer 'text/slim', 'text/html', RegisterEngine::Transformer
|
35
|
+
elsif env.respond_to?(:register_engine)
|
36
|
+
args = ['.slim', Slim::Template]
|
37
|
+
args << { silence_deprecation: true } if Sprockets::VERSION.start_with?('3')
|
38
|
+
env.register_engine(*args)
|
39
|
+
end
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
data/lib/slim-rails/version.rb
CHANGED
data/slim-rails.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_runtime_dependency 'actionpack', ['>= 3.1']
|
25
25
|
spec.add_runtime_dependency 'railties', ['>= 3.1']
|
26
|
-
spec.add_runtime_dependency 'slim', ['
|
26
|
+
spec.add_runtime_dependency 'slim', ['>= 3.0', '< 5.0']
|
27
27
|
|
28
28
|
spec.add_development_dependency 'sprockets-rails'
|
29
29
|
spec.add_development_dependency 'rocco'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Almeida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -42,16 +42,22 @@ dependencies:
|
|
42
42
|
name: slim
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '5.0'
|
48
51
|
type: :runtime
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
|
-
- - "
|
55
|
+
- - ">="
|
53
56
|
- !ruby/object:Gem::Version
|
54
57
|
version: '3.0'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '5.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: sprockets-rails
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,6 +161,8 @@ files:
|
|
155
161
|
- gemfiles/rails_4.1.gemfile
|
156
162
|
- gemfiles/rails_4.2.gemfile
|
157
163
|
- gemfiles/rails_4.gemfile
|
164
|
+
- gemfiles/rails_5.1.gemfile
|
165
|
+
- gemfiles/rails_5.2.gemfile
|
158
166
|
- gemfiles/rails_5.gemfile
|
159
167
|
- lib/generators/slim/controller/controller_generator.rb
|
160
168
|
- lib/generators/slim/controller/templates/view.html.slim
|
@@ -200,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
208
|
version: '0'
|
201
209
|
requirements: []
|
202
210
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.6
|
211
|
+
rubygems_version: 2.7.6
|
204
212
|
signing_key:
|
205
213
|
specification_version: 4
|
206
214
|
summary: Slim templates generator for Rails 3+
|