Skip to content

Commit

Permalink
Add mdl 0.7.0 to the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
dshevtsov committed Nov 12, 2019
1 parent 1547608 commit 200d684
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 8 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gem 'wdm', platform: :mswin

group :test do
gem 'html-proofer'
gem 'mdl', '0.7.0'
gem 'launchy'
end

Expand Down
20 changes: 15 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/magento-devdocs/devdocs-theme.git
revision: 5e99a84dd5692d3ee4c1985b9f48824eeede8cfd
revision: 7628949ce6d16a6232a0582b32465757a6e446a9
specs:
devdocs (5)
jekyll (>= 3.3)
devdocs (7)
jekyll (>= 4.0)

GEM
remote: https://rubygems.org/
Expand All @@ -27,7 +27,7 @@ GEM
exifr (1.3.6)
faraday (0.17.0)
multipart-post (>= 1.2, < 3)
ffi (1.11.1)
ffi (1.11.2)
filesize (0.2.0)
forwardable-extended (2.6.0)
fspath (3.1.2)
Expand Down Expand Up @@ -102,11 +102,19 @@ GEM
listen (3.2.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mdl (0.7.0)
kramdown (~> 2.0)
kramdown-parser-gfm (~> 1.0)
mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4)
mercenary (0.3.6)
mini_portile2 (2.4.0)
mixlib-cli (2.1.1)
mixlib-config (3.0.1)
tomlrb
multipart-post (2.1.1)
netrc (0.11.0)
nokogiri (1.10.4)
nokogiri (1.10.5)
mini_portile2 (~> 2.4.0)
octokit (4.14.0)
sawyer (~> 0.8.0, >= 0.5.3)
Expand All @@ -130,6 +138,7 @@ GEM
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (0.20.3)
tomlrb (1.2.8)
typhoeus (1.3.1)
ethon (>= 0.9.0)
unicode-display_width (1.6.0)
Expand Down Expand Up @@ -158,6 +167,7 @@ DEPENDENCIES
jekyll-sitemap
jekyll-titles-from-headings
launchy
mdl (= 0.7.0)
wdm
whatsup_github

Expand Down
29 changes: 29 additions & 0 deletions bin/mdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'mdl' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("mdl", "mdl")
2 changes: 1 addition & 1 deletion rakelib/check.rake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace :check do
abort 'Cannot find any modified .md files.'.magenta if modified_md_files.empty?
path = modified_md_files.join(' ')
end
report = `mdl #{path}`
report = `bin/mdl #{path}`
puts report.yellow
puts 'The rules are defined in _checks/styles/style-rules-dev'.magenta
end
Expand Down
4 changes: 2 additions & 2 deletions rakelib/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ namespace :test do
desc 'Test Markdown style with mdl'
task :md do
puts 'Testing Markdown style with mdl ...'.magenta
output = `mdl --style=_checks/styles/style-rules-prod --ignore-front-matter --git-recurse -- .`
output = `bin/mdl --style=_checks/styles/style-rules-prod --ignore-front-matter --git-recurse -- .`
puts output.yellow
abort "The Markdown linter has found #{output.lines.count} issues".red unless output.empty?
abort "The Markdown linter detected #{output.lines.count - 2} issue(s)".red unless output.empty?
puts 'No issues found'.magenta
end
end

0 comments on commit 200d684

Please sign in to comment.