pug-rails 3.0.0.rc3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@
4
4
  require "digest/sha1"
5
5
 
6
6
  module Jade
7
+ # :nodoc:
7
8
  module Sprockets
8
9
  class << self
9
10
  def compile(source, options = {})
@@ -16,9 +17,9 @@ module Jade
16
17
  # https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
17
18
  #
18
19
  class Transformer
19
- def initialize(filename, &block)
20
+ def initialize(filename)
20
21
  @filename = filename
21
- @source = block.call
22
+ @source = yield
22
23
  end
23
24
 
24
25
  def render(context, _)
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Pug
5
+ # :nodoc:
5
6
  class Railtie < Rails::Railtie
6
7
  config.pug = Pug.config
7
8
  config.pug.pretty = Rails.env.development?
@@ -12,7 +13,7 @@ module Pug
12
13
  # Sprockets 2.x, 3.x, and 4.x.
13
14
  # https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#registering-all-versions-of-sprockets-in-processors
14
15
  if env.respond_to?(:register_transformer)
15
- env.register_mime_type "text/x-pug", extensions: [".pug"]
16
+ env.register_mime_type "text/x-pug", extensions: [".pug"]
16
17
  env.register_transformer "text/x-pug", "application/javascript+function", Pug::Sprockets::Transformer
17
18
  end
18
19
 
@@ -33,6 +34,7 @@ module Pug
33
34
  end
34
35
 
35
36
  private
37
+
36
38
  def access_assets_config(app)
37
39
  yield app.config.assets
38
40
  end
@@ -4,6 +4,7 @@
4
4
  require "digest/sha1"
5
5
 
6
6
  module Pug
7
+ # :nodoc:
7
8
  module Sprockets
8
9
  class << self
9
10
  def compile(source, options = {})
@@ -16,9 +17,9 @@ module Pug
16
17
  # https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
17
18
  #
18
19
  class Transformer
19
- def initialize(filename, &block)
20
+ def initialize(filename)
20
21
  @filename = filename
21
- @source = block.call
22
+ @source = yield
22
23
  end
23
24
 
24
25
  def render(context, _)
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
- PUG_RAILS_GEM_VERSION = "3.0.0.rc3"
4
+ PUG_RAILS_GEM_VERSION = "3.0.0"
@@ -8,8 +8,10 @@ Gem::Specification.new do |s|
8
8
  s.version = PUG_RAILS_GEM_VERSION
9
9
  s.author = "Yaroslav Konoplov"
10
10
  s.email = "eahome00@gmail.com"
11
- s.summary = "Pug/Jade template engine integration with Rails asset pipeline."
12
- s.description = "Pug/Jade template engine integration with Rails asset pipeline."
11
+ s.summary = "Make Jade / Pug play well with Sprockets."
12
+ s.description = "pug-rails is a gem that allows you to easily integrate " \
13
+ "Jade / Pug template engine " \
14
+ "with Rails asset packaging system known as Sprockets."
13
15
  s.homepage = "https://github.com/yivo/pug-rails"
14
16
  s.license = "MIT"
15
17
 
@@ -17,10 +19,6 @@ Gem::Specification.new do |s|
17
19
  s.test_files = `git ls-files -z -- {test,spec,features}/*`.split("\x0")
18
20
  s.require_paths = ["lib"]
19
21
 
20
- s.add_dependency "pug-ruby", "~> 2.0.0.rc3"
22
+ s.add_dependency "pug-ruby", "~> 2.0.0"
21
23
  s.add_development_dependency "bundler", "~> 1.7"
22
- s.add_development_dependency "rake", "~> 10.0"
23
- s.add_development_dependency "appraisal", "~> 2.1"
24
- s.add_development_dependency "test-unit", "~> 3.1"
25
- s.add_development_dependency "nokogiri", "~> 1.6", "< 1.7"
26
24
  end
@@ -44,7 +44,7 @@ module TestHelper
44
44
  require "rake/sprocketstask"
45
45
  Rake::SprocketsTask.new do |t|
46
46
  t.environment = app.assets
47
- t.output = "#{app.config.paths["public"].to_a[0]}#{app.config.assets.prefix}"
47
+ t.output = "#{ app.config.paths["public"].to_a[0] }#{ app.config.assets.prefix }"
48
48
  t.assets = app.config.assets.precompile
49
49
  end
50
50
  else
@@ -37,6 +37,7 @@ class PugRailsTest < Test::Unit::TestCase
37
37
  end
38
38
  end
39
39
 
40
+ # rubocop:disable Lint/AmbiguousRegexpLiteral
40
41
  def test_runtime
41
42
  app = create_rails_application
42
43
  app.initialize!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pug-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-15 00:00:00.000000000 Z
11
+ date: 2017-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pug-ruby
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.rc3
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0.rc3
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,75 +38,16 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '10.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: appraisal
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.1'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.1'
69
- - !ruby/object:Gem::Dependency
70
- name: test-unit
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '3.1'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '3.1'
83
- - !ruby/object:Gem::Dependency
84
- name: nokogiri
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.6'
90
- - - "<"
91
- - !ruby/object:Gem::Version
92
- version: '1.7'
93
- type: :development
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- requirements:
97
- - - "~>"
98
- - !ruby/object:Gem::Version
99
- version: '1.6'
100
- - - "<"
101
- - !ruby/object:Gem::Version
102
- version: '1.7'
103
- description: Pug/Jade template engine integration with Rails asset pipeline.
41
+ description: pug-rails is a gem that allows you to easily integrate Jade / Pug template
42
+ engine with Rails asset packaging system known as Sprockets.
104
43
  email: eahome00@gmail.com
105
44
  executables: []
106
45
  extensions: []
107
46
  extra_rdoc_files: []
108
47
  files:
109
48
  - ".gitignore"
49
+ - ".rubocop.yml"
50
+ - ".ruby-version"
110
51
  - ".travis.yml"
111
52
  - Appraisals
112
53
  - Gemfile
@@ -159,15 +100,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
100
  version: '0'
160
101
  required_rubygems_version: !ruby/object:Gem::Requirement
161
102
  requirements:
162
- - - ">"
103
+ - - ">="
163
104
  - !ruby/object:Gem::Version
164
- version: 1.3.1
105
+ version: '0'
165
106
  requirements: []
166
107
  rubyforge_project:
167
108
  rubygems_version: 2.6.13
168
109
  signing_key:
169
110
  specification_version: 4
170
- summary: Pug/Jade template engine integration with Rails asset pipeline.
111
+ summary: Make Jade / Pug play well with Sprockets.
171
112
  test_files:
172
113
  - test/fixtures/javascripts/application-1.js
173
114
  - test/fixtures/javascripts/application-1.js.expected