hamlit-rails 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 923d6da52faf432fa8b046d53e4f0435a5a8eb13
4
- data.tar.gz: 26557c042b45dae2630b089571232df258171759
2
+ SHA256:
3
+ metadata.gz: a34fa5b1d8ec968ef13f9196cc2a0d0cffd98bd6112c204b09e3434712ab72b9
4
+ data.tar.gz: efd950241b08a20902b506ef2a00d1e4e5c5ce1a9781bbb042ed5423b1fa9477
5
5
  SHA512:
6
- metadata.gz: ca729828bcca46845c7c0d49869c383a28bd52aca73b41cf297da5ff645b0d46b5068b62c6eeef08c80d51f7686c1c065e5c8e1d2376fe37e7c902ae2aa91a0a
7
- data.tar.gz: 83bfb82d25c4d3a31c013f6156f46d935553a66d194ca67c9e22cfc894c44a330694ddc467589d8be55628b71087cf316ae347ceb066e5c311015a03a28908d4
6
+ metadata.gz: c274442a9aad510e18e442444898b07391fb3e1a6c9ceafd0419349a8090cccdf1564c0292049a669ee528404c9435a3a5465f046a65606b9605ba929f4e96f7
7
+ data.tar.gz: c7c58c2faa966a233175c843788853dad8c1830f6fb44188b237db713d9cf0a66524089c23b0b6973fba2d20b2b96760a898bbdfdad3d1231758bbf1b6636ae5
data/lib/hamlit-rails.rb CHANGED
@@ -43,7 +43,13 @@ module Haml
43
43
  # provided directly by railties 3.2..4.1 but was dropped in 4.2.
44
44
  if Gem::Requirement.new(">= 4.2").satisfied_by?(Gem::Version.new(::Rails.version))
45
45
  initializer 'hamlit_rails.configure_source_annotation' do
46
- SourceAnnotationExtractor::Annotation.register_extensions('haml') do |tag|
46
+ if Gem::Requirement.new(">= 6.0").satisfied_by?(Gem::Version.new(::Rails.version))
47
+ annotation_class = ::Rails::SourceAnnotationExtractor::Annotation
48
+ else
49
+ annotation_class = SourceAnnotationExtractor::Annotation
50
+ end
51
+
52
+ annotation_class.register_extensions('haml') do |tag|
47
53
  /\s*-#\s*(#{tag}):?\s*(.*)/
48
54
  end
49
55
  end
@@ -1,5 +1,5 @@
1
1
  module Hamlit
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meng Fung
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2019-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hamlit
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  version: '0'
209
209
  requirements: []
210
210
  rubyforge_project:
211
- rubygems_version: 2.5.2
211
+ rubygems_version: 2.7.6
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: hamlit and rails