bridgetown-haml 1.1.1 → 2.0.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
2
  SHA256:
3
- metadata.gz: a7729db7acb68d239adec06a3caa01b0d30dab58eefe13b435f8f3bf06b6ccc2
4
- data.tar.gz: b1ea37db26bd78fcc9034ae559d9da57256375ae975b17e12710dbea3f86dd7e
3
+ metadata.gz: 827345d279383a29038c57908b534b843e0a234973dc1216b48287076fc9a0b8
4
+ data.tar.gz: b7d6ad4c36d1ec3bf28d0adb857704c54d48e1b77c1f0ca432b52c4d4f9840ee
5
5
  SHA512:
6
- metadata.gz: 222daeeef93f781e17ec33b2b3101bb9793cfc61314fbe579d08531b81bcd2d0b769447155c4d4d5cef9f62f363954984b28f32c5d299ae4e0f3839343a8bf22
7
- data.tar.gz: 2266504a415a2c5a8f4231260efb582b096786316c7905d4577796abfc6fe57873b7bb46b335608d9cc97052bc7ad983a50526b14d6f223ef9fcdca4a11ec57a
6
+ metadata.gz: c0c9a36d60b55aa6d994b27ac6d9aeab2573260e353dfdf8337701d6c95dcf43967d33cfb09ccd9f263202092cdc07cf2c6f6cda2788958f57f486410fbd8d43
7
+ data.tar.gz: 58ff41d405ff0378e04a71d2e230f68f8d98fc8192514ce0407baa99c5dab5bf44d2b1d05e7bf4be24a04e05b2de4e4826d1d37e2750bc0e9864d7df543bcb7e
data/.rubocop.yml CHANGED
@@ -4,19 +4,20 @@ inherit_gem:
4
4
  rubocop-bridgetown: .rubocop.yml
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.5
8
- Include:
9
- - lib/**/*.rb
7
+ TargetRubyVersion: 2.7
10
8
 
11
9
  Exclude:
12
10
  - .gitignore
13
11
  - .rspec
14
12
  - .rubocop.yml
15
13
 
14
+ - Rakefile
15
+ - "*.gemspec"
16
16
  - Gemfile.lock
17
17
  - CHANGELOG.md
18
18
  - LICENSE.txt
19
19
  - README.md
20
20
 
21
21
  - script/**/*
22
+ - spec/**/*
22
23
  - vendor/**/*
data/CHANGELOG.md CHANGED
@@ -1,17 +1,21 @@
1
- # main
1
+ # Changelog
2
2
 
3
- # 1.1.1 / 2020-11-01
3
+ ## 2.0.0 / 2022-01-22
4
+
5
+ * Upgrade to initializers system in Bridgetown 1.2
6
+
7
+ ## 1.1.1 / 2020-11-01
4
8
 
5
9
  * Set template_engine frontmatter when matching on extension alone
6
10
 
7
- # 1.1.0 / 2020-10-30
11
+ ## 1.1.0 / 2020-10-30
8
12
 
9
13
  * Updated for compatibilty with Bridgetown 0.18
10
14
 
11
- # 1.0.1 / 2020-07-24
15
+ ## 1.0.1 / 2020-07-24
12
16
 
13
17
  * Fix broken link to GitHub repo
14
18
 
15
- # 1.0.0 / 2020-07-24
19
+ ## 1.0.0 / 2020-07-24
16
20
 
17
21
  * First release of the bridgetown-haml plugin
data/README.md CHANGED
@@ -2,19 +2,25 @@
2
2
 
3
3
  A Bridgetown plugin to provide support for [Haml templates](http://haml.info/).
4
4
 
5
- _Requires Bridgetown 0.18 or greater._
6
-
7
- ## Installation
5
+ ## Installation for Bridgetown 1.2+
8
6
 
9
7
  Run this command to add this plugin to your site's Gemfile:
10
8
 
11
9
  ```shell
12
- $ bundle add bridgetown-haml -g bridgetown_plugins
10
+ $ bundle add bridgetown-haml
13
11
  ```
14
12
 
13
+ And then add the initializer to your configuration in `config/initializers.rb`:
14
+
15
+ ```ruby
16
+ init :"bridgetown-haml"
17
+ ```
18
+
19
+ (For Bridgetown 1.1 or earlier, [read these instructions](https://github.com/bridgetownrb/bridgetown-slim/tree/v1.1.1).)
20
+
15
21
  ## Usage
16
22
 
17
- Simply name your page, layout, or partial with a `.haml` extension. The available features will be fairly analogous to [the ERB support](https://www.bridgetownrb.com/docs/erb-and-beyond#haml-and-slim) in Bridgetown, including support for helpers, partials, and rendering Liquid components. You can even [embed Markdown and other template languages](https://github.com/haml/haml/blob/master/REFERENCE.md#filters-filters) using standard Haml syntax.
23
+ Simply name your page, layout, or partial with a `.haml` extension. The available features will be fairly analogous to [the ERB support](https://www.bridgetownrb.com/docs/template-engines/erb-and-beyond#haml-and-slim) in Bridgetown, including support for helpers, partials, and rendering Liquid components. You can even [embed Markdown and other template languages](https://github.com/haml/haml/blob/master/REFERENCE.md#filters-filters) using standard Haml syntax.
18
24
 
19
25
  You can also add `template_engine: haml` to your file's front matter and use any extension you want. For example, you could add `data.xml` to your source folder and simply make sure the front matter contains `template_engine: haml`.
20
26
 
@@ -15,14 +15,14 @@ Gem::Specification.new do |spec|
15
15
  spec.test_files = spec.files.grep(%r!^spec/!)
16
16
  spec.require_paths = ["lib"]
17
17
 
18
- spec.required_ruby_version = ">= 2.5.0"
18
+ spec.required_ruby_version = ">= 2.7.0"
19
19
 
20
- spec.add_dependency "bridgetown", ">= 0.18", "< 2.0"
21
- spec.add_dependency "haml", ">= 5.1.2"
20
+ spec.add_dependency "bridgetown", ">= 1.2.0.beta5", "< 2.0"
21
+ spec.add_dependency "haml", ">= 6.0.0"
22
22
 
23
23
  spec.add_development_dependency "bundler"
24
24
  spec.add_development_dependency "nokogiri", "~> 1.6"
25
- spec.add_development_dependency "rake", "~> 12.0"
25
+ spec.add_development_dependency "rake", "~> 13.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
28
28
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "tilt/haml"
3
+ require "haml"
4
4
 
5
5
  module Bridgetown
6
6
  class HamlView < RubyTemplateView
@@ -11,9 +11,9 @@ module Bridgetown
11
11
  partial_segments.last.sub!(%r!^!, "_")
12
12
  partial_name = partial_segments.join("/")
13
13
 
14
- Tilt::HamlTemplate.new(
14
+ Haml::Template.new(
15
15
  site.in_source_dir(site.config[:partials_dir], "#{partial_name}.haml")
16
- ).render(self, options)
16
+ ).render(self, options).html_safe
17
17
  end
18
18
  end
19
19
 
@@ -34,7 +34,7 @@ module Bridgetown
34
34
 
35
35
  haml_view = Bridgetown::HamlView.new(convertible)
36
36
 
37
- haml_renderer = Tilt::HamlTemplate.new(convertible.relative_path) { content }
37
+ haml_renderer = Haml::Template.new(convertible.relative_path) { content }
38
38
 
39
39
  if convertible.is_a?(Bridgetown::Layout)
40
40
  haml_renderer.render(haml_view) do
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownHaml
4
- VERSION = "1.1.1"
4
+ VERSION = "2.0.0"
5
5
  end
@@ -1,4 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bridgetown"
4
- require "bridgetown-haml/haml_templates"
4
+
5
+ Bridgetown.initializer :"bridgetown-haml" do
6
+ require "bridgetown-haml/haml_templates"
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-01 00:00:00.000000000 Z
11
+ date: 2023-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.18'
19
+ version: 1.2.0.beta5
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.18'
29
+ version: 1.2.0.beta5
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.1.2
39
+ version: 6.0.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 5.1.2
46
+ version: 6.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '12.0'
81
+ version: '13.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '12.0'
88
+ version: '13.0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rspec
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -114,7 +114,7 @@ dependencies:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0.2'
117
- description:
117
+ description:
118
118
  email: maintainers@bridgetownrb.com
119
119
  executables: []
120
120
  extensions: []
@@ -136,7 +136,7 @@ homepage: https://github.com/bridgetownrb/bridgetown-haml
136
136
  licenses:
137
137
  - MIT
138
138
  metadata: {}
139
- post_install_message:
139
+ post_install_message:
140
140
  rdoc_options: []
141
141
  require_paths:
142
142
  - lib
@@ -144,15 +144,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 2.5.0
147
+ version: 2.7.0
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.1.4
155
- signing_key:
154
+ rubygems_version: 3.3.3
155
+ signing_key:
156
156
  specification_version: 4
157
157
  summary: A Bridgetown plugin which provides support for Haml templates.
158
158
  test_files: []