slim-rails 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/lib/generators/slim/scaffold/templates/edit.html.slim +1 -1
- data/lib/generators/slim/scaffold/templates/show.html.slim +1 -1
- data/lib/slim-rails/register_engine.rb +2 -1
- data/lib/slim-rails/version.rb +1 -1
- data/test/lib/generators/slim/mailer_generator_test.rb +42 -19
- data/test/lib/slim-rails_assets_test.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58702acaa6eeaa618e33f7501f6c8c7b3fef8b1e
|
4
|
+
data.tar.gz: 9198aa4393859365c718113355149193e902c51d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f4299a92cb45950dbf44341a3f4914c1d9283162e15a3fb474c9cf0467340f767b8512ec2901e8bd04465ecea05022f869db01e6da5f472be5945d2440740a1
|
7
|
+
data.tar.gz: ffdff25c354ce662d1487e709434945985e83978ac8f3bb79b8ba1b427282dc64988ada6fb9582f6c1171a2fe8afa12edab0e703c0181d783f2d9256109f13da
|
data/.travis.yml
CHANGED
@@ -3,7 +3,9 @@ before_install:
|
|
3
3
|
- gem install bundler
|
4
4
|
rvm:
|
5
5
|
- ruby-head
|
6
|
-
- 2.
|
6
|
+
- 2.4.0
|
7
|
+
- 2.3
|
8
|
+
- 2.2
|
7
9
|
- 2.1
|
8
10
|
- 2.0
|
9
11
|
gemfile:
|
@@ -11,9 +13,21 @@ gemfile:
|
|
11
13
|
- gemfiles/rails_4.gemfile
|
12
14
|
- gemfiles/rails_4.1.gemfile
|
13
15
|
- gemfiles/rails_4.2.gemfile
|
16
|
+
- gemfiles/rails_5.gemfile
|
14
17
|
matrix:
|
15
18
|
allow_failures:
|
16
19
|
- rvm: ruby-head
|
20
|
+
- rvm: 2.4.0
|
21
|
+
gemfile: gemfiles/rails_4.gemfile
|
22
|
+
- rvm: 2.4.0
|
23
|
+
gemfile: gemfiles/rails_4.1.gemfile
|
24
|
+
- rvm: 2.4.0
|
25
|
+
gemfile: gemfiles/rails_4.2.gemfile
|
26
|
+
exclude:
|
27
|
+
- rvm: 2.1
|
28
|
+
gemfile: gemfiles/rails_5.gemfile
|
29
|
+
- rvm: 2.0
|
30
|
+
gemfile: gemfiles/rails_5.gemfile
|
17
31
|
addons:
|
18
32
|
code_climate:
|
19
33
|
repo_token: 294f0ec8183176c0259b75eb21b38414508616985a7b39fc48fec9dfcf40a52e
|
@@ -30,7 +30,8 @@ module Slim
|
|
30
30
|
config.assets.configure do |env|
|
31
31
|
if env.respond_to?(:register_transformer)
|
32
32
|
env.register_mime_type 'text/slim', extensions: ['.slim', '.slim.html']#, charset: :html
|
33
|
-
env.register_preprocessor 'text/slim',
|
33
|
+
env.register_preprocessor 'text/slim', RegisterEngine::Transformer
|
34
|
+
env.register_preprocessor 'text/html', RegisterEngine::Transformer
|
34
35
|
end
|
35
36
|
|
36
37
|
if env.respond_to?(:register_engine)
|
data/lib/slim-rails/version.rb
CHANGED
@@ -12,36 +12,59 @@ class Slim::Generators::MailerGeneratorTest < Rails::Generators::TestCase
|
|
12
12
|
test "should invoke template engine" do
|
13
13
|
run_generator
|
14
14
|
|
15
|
-
|
15
|
+
rails_version = ::Rails.version.to_s
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
if rails_version >= '5.0'
|
18
|
+
assert_file "app/views/notifier_mailer/foo.html.slim" do |view|
|
19
|
+
assert_match %r(app/views/notifier_mailer/foo\.html\.slim), view
|
20
|
+
assert_match(/\= @greeting/, view)
|
19
21
|
end
|
20
22
|
|
21
|
-
assert_file "app/views/
|
22
|
-
assert_match(
|
23
|
+
assert_file "app/views/notifier_mailer/bar.html.slim" do |view|
|
24
|
+
assert_match %r(app/views/notifier_mailer/bar\.html\.slim), view
|
25
|
+
assert_match(/\= @greeting/, view)
|
23
26
|
end
|
24
27
|
|
25
|
-
assert_file "app/views/
|
26
|
-
assert_match %r(app/views/
|
27
|
-
assert_match(
|
28
|
+
assert_file "app/views/notifier_mailer/foo.text.slim" do |view|
|
29
|
+
assert_match %r(app/views/notifier_mailer/foo\.text\.slim), view
|
30
|
+
assert_match(/@greeting/, view)
|
28
31
|
end
|
29
32
|
|
30
|
-
assert_file "app/views/
|
31
|
-
assert_match %r(app/views/
|
32
|
-
assert_match(
|
33
|
+
assert_file "app/views/notifier_mailer/bar.text.slim" do |view|
|
34
|
+
assert_match %r(app/views/notifier_mailer/bar\.text\.slim), view
|
35
|
+
assert_match(/@greeting/, view)
|
33
36
|
end
|
37
|
+
else
|
38
|
+
if rails_version >= '4.2'
|
39
|
+
assert_file "app/views/layouts/mailer.text.slim" do |view|
|
40
|
+
assert_match(/\= yield/, view)
|
41
|
+
end
|
34
42
|
|
35
|
-
|
43
|
+
assert_file "app/views/layouts/mailer.html.slim" do |view|
|
44
|
+
assert_match(/\= yield/, view)
|
45
|
+
end
|
36
46
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
47
|
+
assert_file "app/views/notifier/foo.html.slim" do |view|
|
48
|
+
assert_match %r(app/views/notifier/foo\.html\.slim), view
|
49
|
+
assert_match(/\= @greeting/, view)
|
50
|
+
end
|
41
51
|
|
42
|
-
|
43
|
-
|
44
|
-
|
52
|
+
assert_file "app/views/notifier/bar.html.slim" do |view|
|
53
|
+
assert_match %r(app/views/notifier/bar\.html\.slim), view
|
54
|
+
assert_match(/\= @greeting/, view)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
assert_file "app/views/notifier/foo.text.slim" do |view|
|
60
|
+
assert_match %r(app/views/notifier/foo\.text\.slim), view
|
61
|
+
assert_match(/@greeting/, view)
|
62
|
+
end
|
63
|
+
|
64
|
+
assert_file "app/views/notifier/bar.text.slim" do |view|
|
65
|
+
assert_match %r(app/views/notifier/bar\.text\.slim), view
|
66
|
+
assert_match(/@greeting/, view)
|
67
|
+
end
|
45
68
|
end
|
46
69
|
end
|
47
70
|
end
|
@@ -11,7 +11,8 @@ class Slim::Rails::AssetsTest < ActiveSupport::TestCase
|
|
11
11
|
require 'slim-rails'
|
12
12
|
class DummyApp < ::Rails::Application
|
13
13
|
config.root = #{dir.inspect}
|
14
|
-
config.assets.enabled = true
|
14
|
+
config.assets.enabled = true if #{use_sprockets}
|
15
|
+
config.eager_load = false
|
15
16
|
end
|
16
17
|
DummyApp.initialize!
|
17
18
|
#{code}
|
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.
|
4
|
+
version: 3.1.2
|
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: 2017-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
201
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.
|
202
|
+
rubygems_version: 2.5.2
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: Slim templates generator for Rails 3+
|