booklab-sml 0.2.3 → 0.2.4

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: 788082a5399970d31fe1b96e30f8c2163907f60fdbb7316779b41e800ca6063b
4
- data.tar.gz: d621ccbf43de6cede1f544bdb2627d76676133bc74a8807fd4c9110964218c55
3
+ metadata.gz: 56fc0a29cbc671196acb289d7f236f5b103617373041ec2b23feb34ac78db6de
4
+ data.tar.gz: 1db16cd7128beaab435ec2339ed05719453271a0187abd4d007a65fd084d659d
5
5
  SHA512:
6
- metadata.gz: 0f32ea2dfb58ecca1e842a389e99b2ca468cd4b62865a0b779b7d2a19d73964d34e61c29d928475370a1c5277591503282b8ed5b34a0ea4dd4dbef25ee8dcc54
7
- data.tar.gz: f5fa90ab211e8741634676684d7078fcaafb78e80751490ce37440b40b3898436ba2fb100c25c98b73ea00d25bd44aeee40d567f32e572c5ba04a62b3b9e3e68
6
+ metadata.gz: 513e3886c4d2d3076dbb3d4d461fb10f166fb4c69edaca308c05c56be2dddb1f7b69c6d0919349db34186482c4de41d1d1724f9585ad505c72c0a88dc9870bce
7
+ data.tar.gz: 8ce59ab35e7be50e55e2caaf15f614781aea7ee98ede4fe7bf69ffa14c9832e80f906445b6d4e954ba758709bf7a1553250a2e10dde4f21c0000e4485f242e3b
data/Rakefile CHANGED
@@ -24,6 +24,7 @@ Rake::TestTask.new(:test) do |t|
24
24
  t.libs << "test"
25
25
  t.pattern = "test/**/*_test.rb"
26
26
  t.verbose = false
27
+ t.warning = false
27
28
  end
28
29
 
29
30
  task default: :test
@@ -8,7 +8,6 @@ module BookLab::SML::Rules
8
8
 
9
9
  def self.to_html(node, opts = {})
10
10
  renderer = opts[:renderer]
11
- attrs = attributes(node)
12
11
  children = renderer.children_to_html(node)
13
12
 
14
13
  %(<tr>#{children}</tr>)
@@ -11,10 +11,10 @@ module BookLab::SML::Rules
11
11
 
12
12
  return "" if attrs[:src].blank?
13
13
 
14
- video_attrs = html_attrs({
14
+ video_attrs = html_attrs(
15
15
  width: attrs[:width],
16
16
  height: attrs[:height]
17
- })
17
+ )
18
18
 
19
19
  out = <<~HTML
20
20
  <video controls preload="no"#{video_attrs}>
@@ -1,13 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "booklab/sml/rules/base"
4
+
3
5
  module BookLab::SML
4
6
  module Rules
5
7
  def self.all
6
8
  return @rules if defined? @rules
7
9
  rules = []
8
10
  Dir.glob(::File.expand_path("rules/*.rb", __dir__)).each do |path|
9
- require path
10
11
  rule_name = ::File.basename(path, ".rb")
12
+ require "booklab/sml/rules/#{rule_name}"
13
+
11
14
  next if rule_name == "base"
12
15
  rules << "BookLab::SML::Rules::#{rule_name.classify}".constantize
13
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module BookLab
4
4
  module SML
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
data/lib/booklab-sml.rb CHANGED
@@ -2,13 +2,12 @@
2
2
 
3
3
  require "active_support/concern"
4
4
  require "booklab/sml/version"
5
+ require "booklab/sml/utils"
5
6
  require "booklab/sml/rules"
6
7
  require "booklab/sml/config"
7
- require "booklab/sml/utils"
8
8
  require "booklab/sml/renderer"
9
9
  require "booklab/sml/base"
10
10
 
11
-
12
11
  module BookLab
13
12
  module SML
14
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booklab-sml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee