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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 730249022955562dd8f32bc57713909e0e34e84c
4
- data.tar.gz: 4ac7a9296a96b94e8106df5d1bef4423dfbe2e7b
3
+ metadata.gz: 58702acaa6eeaa618e33f7501f6c8c7b3fef8b1e
4
+ data.tar.gz: 9198aa4393859365c718113355149193e902c51d
5
5
  SHA512:
6
- metadata.gz: 20768a544ba036ed3351a9acbcabe7b6fcd18cf7ec50e5f4383f476d42b957b613f96c800e0e1c43d9782f79e228c80127f2b2b6d8842b3e26d8b1b9e34feb6f
7
- data.tar.gz: d0b3b687b462254b194daaa07ff77c17ce1104007f74d33ec71bb7d9a30a64958cf3823eaae7c61ca4e4ee1659a5f8ce0782378f5b628196d286c0da3b88adc8
6
+ metadata.gz: 5f4299a92cb45950dbf44341a3f4914c1d9283162e15a3fb474c9cf0467340f767b8512ec2901e8bd04465ecea05022f869db01e6da5f472be5945d2440740a1
7
+ data.tar.gz: ffdff25c354ce662d1487e709434945985e83978ac8f3bb79b8ba1b427282dc64988ada6fb9582f6c1171a2fe8afa12edab0e703c0181d783f2d9256109f13da
@@ -3,7 +3,9 @@ before_install:
3
3
  - gem install bundler
4
4
  rvm:
5
5
  - ruby-head
6
- - 2.2.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
@@ -3,6 +3,6 @@ h1 Editing <%= singular_table_name %>
3
3
  == render 'form'
4
4
 
5
5
  = link_to 'Show', @<%= singular_table_name %>
6
- '|
6
+ ' |
7
7
  = link_to 'Back', <%= index_helper %>_path
8
8
 
@@ -7,5 +7,5 @@ p
7
7
  <% end -%>
8
8
 
9
9
  = link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>)
10
- '|
10
+ ' |
11
11
  = link_to 'Back', <%= index_helper %>_path
@@ -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', 'text/html', RegisterEngine::Transformer
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)
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  module Rails
3
- VERSION = "3.1.1"
3
+ VERSION = '3.1.2'
4
4
  end
5
5
  end
@@ -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
- if ::Rails.version.to_s >= '4.2'
15
+ rails_version = ::Rails.version.to_s
16
16
 
17
- assert_file "app/views/layouts/mailer.text.slim" do |view|
18
- assert_match(/\= yield/, view)
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/layouts/mailer.html.slim" do |view|
22
- assert_match(/\= yield/, view)
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/notifier/foo.html.slim" do |view|
26
- assert_match %r(app/views/notifier/foo\.html\.slim), view
27
- assert_match(/\= @greeting/, view)
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/notifier/bar.html.slim" do |view|
31
- assert_match %r(app/views/notifier/bar\.html\.slim), view
32
- assert_match(/\= @greeting/, view)
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
- end
43
+ assert_file "app/views/layouts/mailer.html.slim" do |view|
44
+ assert_match(/\= yield/, view)
45
+ end
36
46
 
37
- assert_file "app/views/notifier/foo.text.slim" do |view|
38
- assert_match %r(app/views/notifier/foo\.text\.slim), view
39
- assert_match(/@greeting/, view)
40
- end
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
- assert_file "app/views/notifier/bar.text.slim" do |view|
43
- assert_match %r(app/views/notifier/bar\.text\.slim), view
44
- assert_match(/@greeting/, view)
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.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: 2016-08-29 00:00:00.000000000 Z
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.6.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+