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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7880d575529722f1030ae06c06286f6610b7f7f8
4
- data.tar.gz: bbc81804dbb1836c2b50655fc6c8a80bb59564e9
2
+ SHA256:
3
+ metadata.gz: 85d2a7934c6ad9ff0ae65c4da40ee1a7f22de8c82cf457898e977153bb3f5fa6
4
+ data.tar.gz: 6ae09a270eaed5a03d87eb2a7999ef7310030ece13167efe32290ae56088cfdd
5
5
  SHA512:
6
- metadata.gz: 969794e2f204ec1fd1b8050a94bb56c367b84ba16498b950926437f108511f8c4eeefae30c943fb40de98cbf4bb4f8ba82ce499abbdf8ec01285a41fa98f7b76
7
- data.tar.gz: cbd7b5d52d931d55c3ec7cabd4f196c2f75aa18f151f846eaa34219bd73d1b8109544a3b2a87c5eafcd57752bb2df3c315624f6621a52c42b18e9558ce3b5d3b
6
+ metadata.gz: 5384a517144559f59493d78a1da1b5483680d89974495d91a58197b6fb5ff2655b2ca47a22e24b1e45fd074fa3f34abc00d47d727263ce7a8171ae3f80913835
7
+ data.tar.gz: ac6118fbbe095c820280e0d12304d2443a9d18ca486f652a645c3ebaae57d0e06c8d4f610faaf755f4107548db2e6658ce6c9d07e820acf3201dab92d53467fc
@@ -3,7 +3,8 @@ before_install:
3
3
  - gem install bundler
4
4
  rvm:
5
5
  - ruby-head
6
- - 2.4.0
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.0
23
+ - rvm: 2.4
21
24
  gemfile: gemfiles/rails_4.gemfile
22
- - rvm: 2.4.0
25
+ - rvm: 2.4
23
26
  gemfile: gemfiles/rails_4.1.gemfile
24
- - rvm: 2.4.0
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
@@ -19,3 +19,11 @@ end
19
19
  appraise "rails-5" do
20
20
  gem "rails", "~> 5.0.0"
21
21
  end
22
+
23
+ appraise "rails-5.1" do
24
+ gem "rails", "~> 5.1.0"
25
+ end
26
+
27
+ appraise "rails-5.2" do
28
+ gem "rails", "~> 5.2.0"
29
+ end
@@ -1,3 +1,8 @@
1
+ ## 3.2.0 (October 7, 2018)
2
+
3
+ * Support for Slim 4
4
+
5
+
1
6
  ## 3.1.3 (April 3, 2017)
2
7
 
3
8
  * Improved compatibility with Sprockets 4
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # slim-rails [![Build Status](https://travis-ci.org/slim-template/slim-rails.png?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)
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.
@@ -6,4 +6,4 @@ gem "rails", "~> 3.2"
6
6
  gem "minitest"
7
7
  gem "test-unit", "~> 3.0"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.1.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.0.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.2.0"
6
+
7
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 5.0.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -7,34 +7,36 @@ module Slim
7
7
  end
8
8
  end
9
9
 
10
- def self.register_engine(app, config)
11
- if ::Rails::VERSION::MAJOR == 3
12
- _register_engine3(app)
13
- else
14
- _register_engine(config)
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
- private
19
+ private
19
20
 
20
- def self._register_engine3(app)
21
- return unless app.assets
22
- return unless app.assets.respond_to?(:register_engine)
21
+ def _register_engine3(app)
22
+ return unless app.assets
23
+ return unless app.assets.respond_to?(:register_engine)
23
24
 
24
- app.assets.register_engine('.slim', Slim::Template)
25
- end
25
+ app.assets.register_engine('.slim', Slim::Template)
26
+ end
26
27
 
27
- def self._register_engine(config)
28
- return unless config.respond_to?(:assets)
28
+ def _register_engine(config)
29
+ return unless config.respond_to?(:assets)
29
30
 
30
- config.assets.configure do |env|
31
- if env.respond_to?(:register_transformer) && Sprockets::VERSION.to_i > 3
32
- env.register_mime_type 'text/slim', extensions: ['.slim', '.slim.html']#, charset: :html
33
- env.register_transformer 'text/slim', 'text/html', RegisterEngine::Transformer
34
- elsif env.respond_to?(:register_engine)
35
- args = ['.slim', Slim::Template]
36
- args << { silence_deprecation: true } if Sprockets::VERSION.start_with?('3')
37
- env.register_engine(*args)
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
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  module Rails
3
- VERSION = '3.1.3'
3
+ VERSION = '3.2.0'
4
4
  end
5
5
  end
@@ -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', ['~> 3.0']
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.1.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: 2017-10-05 00:00:00.000000000 Z
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.13
211
+ rubygems_version: 2.7.6
204
212
  signing_key:
205
213
  specification_version: 4
206
214
  summary: Slim templates generator for Rails 3+