faml 0.7.2 → 0.7.3
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 +4 -4
- data/.rubocop.yml +7 -1
- data/CHANGELOG.md +4 -0
- data/ext/attribute_builder/extconf.rb +5 -1
- data/faml.gemspec +1 -1
- data/lib/faml/compiler.rb +2 -2
- data/lib/faml/helpers.rb +1 -1
- data/lib/faml/static_hash_parser.rb +2 -3
- data/lib/faml/stats.rb +7 -9
- data/lib/faml/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c1985c1c33828570eb9a4e6ce654e873d2c14d2
|
4
|
+
data.tar.gz: ff0d4c7edf3e8d35afaafc6724d4ae1d93e1a252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d921fc14f34d6f885d4d0d6d13d82a8a6713274dc93d534b0ba5853d95019f486e569c3c23dd0cd56db991c4ce1cd3375ca30538ac7562caa89d50a4396a0a
|
7
|
+
data.tar.gz: ce97e6f0f4f989fa04d754b0635dc2852cfa538b73df19fb737bfa076c21ec42297c6b6f1bcbbbc71ddcdd95b593fb143c4d8b04cd22494c115a64d1f5ee6900
|
data/.rubocop.yml
CHANGED
@@ -46,7 +46,13 @@ Style/RaiseArgs:
|
|
46
46
|
Style/SignalException:
|
47
47
|
Enabled: false
|
48
48
|
|
49
|
-
Style/
|
49
|
+
Style/TrailingCommaInLiteral:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
Style/TrailingCommaInArguments:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
Style/ConditionalAssignment:
|
50
56
|
Enabled: false
|
51
57
|
|
52
58
|
Style/TrailingWhitespace:
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
4
|
$CFLAGS << ' -Wall -W'
|
5
|
-
$CXXFLAGS
|
5
|
+
if $CXXFLAGS
|
6
|
+
# $CXXFLAGS might be undefined
|
7
|
+
# https://github.com/ruby/ruby/pull/492
|
8
|
+
$CXXFLAGS << ' -Wall -W'
|
9
|
+
end
|
6
10
|
houdini_dir = File.expand_path('../../vendor/houdini', __dir__)
|
7
11
|
$INCFLAGS << " -I#{houdini_dir}"
|
8
12
|
|
data/faml.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'rake-compiler'
|
37
37
|
spec.add_development_dependency 'redcarpet'
|
38
38
|
spec.add_development_dependency 'rspec', '>= 3.3'
|
39
|
-
spec.add_development_dependency 'rubocop'
|
39
|
+
spec.add_development_dependency 'rubocop', '>= 0.36.0'
|
40
40
|
spec.add_development_dependency 'sass'
|
41
41
|
spec.add_development_dependency 'simplecov', '>= 0.9.0'
|
42
42
|
spec.add_development_dependency 'slim' # for benchmark
|
data/lib/faml/compiler.rb
CHANGED
@@ -14,8 +14,8 @@ module Faml
|
|
14
14
|
DEFAULT_AUTO_CLOSE_TAGS = %w[
|
15
15
|
area base basefont br col command embed frame hr img input isindex keygen
|
16
16
|
link menuitem meta param source track wbr
|
17
|
-
]
|
18
|
-
DEFAULT_PRESERVE_TAGS = %w[pre textarea code]
|
17
|
+
].freeze
|
18
|
+
DEFAULT_PRESERVE_TAGS = %w[pre textarea code].freeze
|
19
19
|
|
20
20
|
define_options(
|
21
21
|
autoclose: DEFAULT_AUTO_CLOSE_TAGS,
|
data/lib/faml/helpers.rb
CHANGED
@@ -15,9 +15,8 @@ module Faml
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def parse(text)
|
18
|
-
|
19
|
-
builder.emit_file_line_as_literals = false
|
20
|
-
parser = ::Parser::CurrentRuby.new(builder)
|
18
|
+
parser = ::Parser::CurrentRuby.default_parser
|
19
|
+
parser.builder.emit_file_line_as_literals = false
|
21
20
|
parser.diagnostics.consumer = nil
|
22
21
|
buffer = ::Parser::Source::Buffer.new('(faml)')
|
23
22
|
buffer.source = text
|
data/lib/faml/stats.rb
CHANGED
@@ -117,16 +117,14 @@ module Faml
|
|
117
117
|
if static_hash_parser.parse("{#{ast.new_attributes}#{ast.old_attributes}}")
|
118
118
|
if static_hash_parser.dynamic_attributes.empty?
|
119
119
|
info.static_attribute_count += 1
|
120
|
+
elsif static_hash_parser.dynamic_attributes.key?('data') || static_hash_parser.dynamic_attributes.key?(:data)
|
121
|
+
info.dynamic_attribute_with_data_count += 1
|
122
|
+
elsif ast.old_attributes && ast.old_attributes.include?("\n")
|
123
|
+
info.dynamic_attribute_with_newline_count += 1
|
124
|
+
elsif ast.new_attributes && ast.new_attributes.include?("\n")
|
125
|
+
info.dynamic_attribute_with_newline_count += 1
|
120
126
|
else
|
121
|
-
|
122
|
-
info.dynamic_attribute_with_data_count += 1
|
123
|
-
elsif ast.old_attributes && ast.old_attributes.include?("\n")
|
124
|
-
info.dynamic_attribute_with_newline_count += 1
|
125
|
-
elsif ast.new_attributes && ast.new_attributes.include?("\n")
|
126
|
-
info.dynamic_attribute_with_newline_count += 1
|
127
|
-
else
|
128
|
-
info.dynamic_attribute_count += 1
|
129
|
-
end
|
127
|
+
info.dynamic_attribute_count += 1
|
130
128
|
end
|
131
129
|
else
|
132
130
|
call_ast = Parser::CurrentRuby.parse("call(#{ast.new_attributes}#{ast.old_attributes})")
|
data/lib/faml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: escape_utils
|
@@ -240,14 +240,14 @@ dependencies:
|
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
243
|
+
version: 0.36.0
|
244
244
|
type: :development
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
248
|
- - ">="
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
250
|
+
version: 0.36.0
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
252
|
name: sass
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
@@ -521,7 +521,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
521
521
|
version: '0'
|
522
522
|
requirements: []
|
523
523
|
rubyforge_project:
|
524
|
-
rubygems_version: 2.5.
|
524
|
+
rubygems_version: 2.4.5.1
|
525
525
|
signing_key:
|
526
526
|
specification_version: 4
|
527
527
|
summary: Faster implementation of Haml template language.
|