Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public/docs/**/*
docs/**/*
!docs/*.md
/vendor
/coverage
*.tar
*.tar.bz2
*.tar.gz
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ group :test do
gem 'minitest'
gem 'rack-test', require: false
gem 'rr', require: false
gem 'simplecov', require: false
end

if ENV['SELENIUM'] == '1'
Expand Down
13 changes: 12 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ GEM
sprockets-rails
tilt
date (3.5.1)
docile (1.4.1)
drb (2.2.3)
erb (6.0.1)
erubi (1.13.1)
Expand Down Expand Up @@ -99,7 +100,9 @@ GEM
nokogiri (>= 1.12.0)
method_source (1.1.0)
mini_portile2 (2.8.9)
minitest (5.27.0)
minitest (6.0.2)
drb (~> 2.0)
prism (~> 1.5)
multi_json (1.15.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
Expand All @@ -111,6 +114,7 @@ GEM
pp (0.6.3)
prettyprint
prettyprint (0.2.0)
prism (1.9.0)
progress (3.6.0)
progress_bar (1.3.4)
highline (>= 1.6)
Expand Down Expand Up @@ -174,6 +178,12 @@ GEM
sassc-embedded (1.80.8)
sass-embedded (~> 1.80)
securerandom (0.3.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
sinatra (3.2.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
Expand Down Expand Up @@ -253,6 +263,7 @@ DEPENDENCIES
redcarpet
rr
rss
simplecov
sinatra
sinatra-contrib
sprockets
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ thor console:docs # Start a REPL in the "Docs" module
thor test:all # Run all tests
thor test:docs # Run "Docs" tests
thor test:app # Run "App" tests
thor test:coverage # Run coverage report on "App" tests

# Assets
thor assets:compile # Compile assets (not required in development mode)
Expand Down
9 changes: 6 additions & 3 deletions lib/docs/filters/core/clean_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ class CleanTextFilter < Filter

def call
return html if context[:clean_text] == false
html.strip!
while html.gsub!(EMPTY_NODES_RGX, ''); end
html

# Clone frozen literal.
result = html.dup
result.strip!
while result.gsub!(EMPTY_NODES_RGX, ''); end
result
end
end
end
7 changes: 7 additions & 0 deletions lib/tasks/test.thor
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ class TestCLI < Thor
def app
require 'app_test'
end

desc 'coverage', 'Coverage report for core tests'
def coverage
ENV['COVERAGE'] = 'true'
require_relative '../../test/test_helper'
self.all
end
end
Loading
Loading