yard-doctest 0.1.13 → 0.1.14

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
2
  SHA256:
3
- metadata.gz: 1081e697fbcd5c8029f9aec98ad2e0650bf5951443ea892981d7ae8f1938315e
4
- data.tar.gz: 34c404efd74f038987bb7a3dea81abb3d1904d3ee0749b95f47f9b43b4f6d700
3
+ metadata.gz: 4952a0dc4b12093ceb7ae21eae44e735412b0c7e5b17e1b71d435f2fbbdce964
4
+ data.tar.gz: 6b583b324be15b5519435a021293691a3266ce039789928c19bcb59d4a67d4e0
5
5
  SHA512:
6
- metadata.gz: 0c0333567ed98b350c4fc6034c216e6c1cf55ccf4ba37e566f287c16069c5ceb37d77bab63eb7b3edbb7b29f4e829332ede2c4df432d5b7450fbdb3e5c132513
7
- data.tar.gz: bbc5144b74b3ee0821cf8977f3f8d8b2950621b423dd0dd89b8dc36c04824d172f2d061f78baf22618ebbe8020366a4082dd5801019abf93ea43a4a53fc7cdaf
6
+ metadata.gz: 0560d34f0aeaa28034eaa640e0319539098a1848820696044a1cf805f5f77aeca07206d94394cc74b1dc75a1a3f375cb60d91e51c8d623b200dc33d0a2279b4d
7
+ data.tar.gz: 1092ec6db552c0355bdf7765df7581b6d29ec555ad33143b5a150721f1830083703f823d6f13e8157ec4c4fd5768ee702b7a00b7dcb89551a90724a39262c474
@@ -1,4 +1,2 @@
1
1
  rvm:
2
2
  - 2.4.3
3
-
4
- before_script: bundle exec yard config -a autoload_plugins yard-doctest
@@ -1,3 +1,8 @@
1
+ ## 0.1.14
2
+
3
+ * Allow to use without Rake installed. If you want to use Rake task, please add
4
+ `require 'yard/doctest/rake'` to your Rakefile (#8)
5
+
1
6
  ## 0.1.13
2
7
 
3
8
  * Ignore files excluded in .yardopts (#7)
data/README.md CHANGED
@@ -87,12 +87,12 @@ end
87
87
 
88
88
  You can run tests for all the examples you've documented.
89
89
 
90
- First of all, you need to tell YARD to automatically load `yard-doctest` (as well as other plugins):
90
+ First of all, you need to tell YARD to automatically load `yard-doctest` (as well as other plugins).
91
+ To do so, add yard-doctest as an automatically loaded plugin in your `.yardops`:
91
92
 
92
93
  ```bash
93
- $ bundle exec yard config load_plugins true
94
- # if you don't want to load other plugins
95
- $ bundle exec yard config -a autoload_plugins yard-doctest
94
+ # .yardopts
95
+ --plugin yard-doctest
96
96
  ```
97
97
 
98
98
  Next, you'll need to create test helper, which will be required before each of your test. Think about it as `spec_helper.rb` in RSpec or `env.rb` in Cucumber. You should require everything necessary for your examples to run there.
@@ -312,7 +312,8 @@ There is also a Rake task for you:
312
312
 
313
313
  ```ruby
314
314
  # Rakefile
315
- require 'yard-doctest'
315
+ require 'yard/doctest/rake'
316
+
316
317
  YARD::Doctest::RakeTask.new do |task|
317
318
  task.doctest_opts = %w[-v]
318
319
  task.pattern = 'lib/**/*.rb'
@@ -5,6 +5,15 @@ Feature: yard doctest
5
5
  I want to automatically parse YARD's @example tags
6
6
  And use them as tests
7
7
  Just like doctest in Python
8
+
9
+ Background:
10
+ # YARD stopped auto-loading all plugins at 0.6.2, so anything newer needs
11
+ # the plugin explicitly loaded. A simple way to do this is to always have
12
+ # a `.yardopts` that loads `yard-doctest`.
13
+ Given a file named ".yardopts" with:
14
+ """
15
+ --plugin yard-doctest
16
+ """
8
17
 
9
18
  Scenario: adds new command to yard
10
19
  When I run `bundle exec yard --help`
@@ -367,7 +376,7 @@ Feature: yard doctest
367
376
  """
368
377
  And a file named "Rakefile" with:
369
378
  """
370
- require 'yard-doctest'
379
+ require 'yard/doctest/rake'
371
380
  YARD::Doctest::RakeTask.new do |task|
372
381
  task.doctest_opts = %w[-v]
373
382
  task.pattern = 'app/**/*.rb'
@@ -721,6 +730,7 @@ Feature: yard doctest
721
730
  """
722
731
  And a file named ".yardopts" with:
723
732
  """
733
+ --plugin yard-doctest
724
734
  --exclude lib/lib.rb
725
735
  """
726
736
  When I run `bundle exec yard doctest`
@@ -4,7 +4,6 @@ require 'minitest/spec'
4
4
 
5
5
  require 'yard/cli/doctest'
6
6
  require 'yard/doctest/example'
7
- require 'yard/doctest/rake'
8
7
  require 'yard/doctest/version'
9
8
 
10
9
  module YARD
@@ -1,5 +1,5 @@
1
1
  module YARD
2
2
  module Doctest
3
- VERSION = '0.1.13'
3
+ VERSION = '0.1.14'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-doctest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-10 00:00:00.000000000 Z
11
+ date: 2019-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard