pry-doc 0.5.0 → 0.5.1

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
  SHA1:
3
- metadata.gz: 11f38a31ba3ead1b864b64cba1b7146472936140
4
- data.tar.gz: 7749f753ea7c619c50058b0f7f4595e0818c2b89
3
+ metadata.gz: fa855e924fac8a0f2f7175001c299f893d90dbde
4
+ data.tar.gz: 2bc036797815fbdaaca39319292cfddd46ef7576
5
5
  SHA512:
6
- metadata.gz: fe8b6222f6973e2930491082358fc98b56977c6f58ab1183387794ad3b50d0691780ae499265caea57c97c92612fd6f825f69ef668dcee86149780749f3e774e
7
- data.tar.gz: 2bd90d59d35e767ff1b3811a27def8b6a453e2c17e0f57b1e84cc0ec802a8b2d75fdf80d086ecd1c36ef5a24d08d5bcaea8c90c4f66bd3f461a430d74f17828d
6
+ metadata.gz: e68884b7a98c31daa988926cbc20324d6661ec0e57ad550fc8e3a480b36ebd74ee5ec0a74bd4001814f40bd2097fb50acdb2ab72b208687b8b071f0f5ed0b45e
7
+ data.tar.gz: 55360cd98cdd98bcfe6d667f78ef5c27e097956130059888692a53b5c88eaf791c1ffce628c62824943201d8122b630ae2eeb2e81598841b2d2467d4510a644e
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  Pry Doc changelog
2
2
  =================
3
3
 
4
+ ### v0.5.1 (December 26, 2013)
5
+
6
+ * **Important:** previous version `v0.5.0` does _not_ support Ruby 2.1.0. This
7
+ version does!
8
+ * Pry Doc has a logo now (embedded in the README)
9
+
4
10
  ### v0.5.0 (December 25, 2013)
5
11
 
6
12
  * **Important:** added support for Ruby 2.1.0. The docs are super fresh!
data/README.md CHANGED
@@ -1,73 +1,64 @@
1
- pry-doc
2
- =======
1
+ ![Pry Doc][logo]
3
2
 
4
- (C) John Mair (banisterfiend) 2013
3
+ * Repository: [https://github.com/pry/pry-doc][repo]
4
+ * Wiki: [https://github.com/pry/pry-doc/wiki][wiki]
5
5
 
6
- _Provides YARD and extended documentation support for Pry_
6
+ Description
7
+ -----------
7
8
 
8
- * Install the [gem](https://rubygems.org/gems/pry-doc): `gem install pry-doc`
9
- * Read the [documentation](http://rdoc.info/github/pry/pry-doc/master/file/README.md)
10
- * See the [source code](http://github.com/pry/pry-doc)
9
+ Pry Doc is a plugin for [Pry][pry]. It provides extended documentation support
10
+ for Pry.
11
11
 
12
- Example: Provide access to Ruby core documentation and source code from within Pry
13
- --------
12
+ Installation
13
+ ------------
14
14
 
15
- [1] pry(main)> show-doc puts
15
+ All you need is to install the gem. The `pry-doc` plugin will be detected and
16
+ used automatically.
16
17
 
17
- From: io.c (C Method):
18
- Owner: Kernel
19
- Visibility: private
20
- Signature: puts(*arg1)
21
- Number of lines: 3
18
+ gem install pry-doc
22
19
 
23
- Equivalent to
20
+ Synopsis
21
+ --------
24
22
 
25
- $stdout.puts(obj, ...)
26
- [2] pry(main)> show-source puts
23
+ Pry Doc extends two core Pry commands: `show-doc` and `show-source` (aliased as
24
+ `?` and `$` respectively).
27
25
 
28
- From: io.c (C Method):
29
- Owner: Kernel
30
- Visibility: private
31
- Number of lines: 8
26
+ For example, in vanilla Pry it’s impossible to get the documentation for the
27
+ `loop` method (it’s a method, by the way). However, Pry Doc solves that problem.
32
28
 
33
- static VALUE
34
- rb_f_puts(int argc, VALUE *argv, VALUE recv)
35
- {
36
- if (recv == rb_stdout) {
37
- return rb_io_puts(argc, argv, recv);
38
- }
39
- return rb_funcall2(rb_stdout, rb_intern("puts"), argc, argv);
40
- }
41
- [3] pry(main)>
29
+ ![show-source][show-doc]
42
30
 
43
- Contact
44
- -------
31
+ Let's check the source code of the `loop` method.
45
32
 
46
- Problems or questions contact me at [github](http://github.com/banister)
33
+ ![show-doc][show-source]
47
34
 
35
+ Generally speaking, you can retrieve most of the MRI documentation and
36
+ accompanying source code. Pry Doc is also smart enough to get any documentation
37
+ for methods and class implemented in C.
48
38
 
49
- License
50
- -------
39
+ Limitations
40
+ -----------
51
41
 
52
- (The MIT License)
42
+ Pry Doc supports the following Rubies:
53
43
 
54
- Copyright (c) 2013 John Mair (banisterfiend)
44
+ * MRI 1.8
45
+ * MRI 1.9
46
+ * MRI 2.0
47
+ * MRI 2.1
55
48
 
56
- Permission is hereby granted, free of charge, to any person obtaining
57
- a copy of this software and associated documentation files (the
58
- 'Software'), to deal in the Software without restriction, including
59
- without limitation the rights to use, copy, modify, merge, publish,
60
- distribute, sublicense, and/or sell copies of the Software, and to
61
- permit persons to whom the Software is furnished to do so, subject to
62
- the following conditions:
49
+ Getting Help
50
+ ------------
51
+
52
+ Simply file an issue or visit `#pry` at `irc.freenode.net`.
53
+
54
+ License
55
+ -------
63
56
 
64
- The above copyright notice and this permission notice shall be
65
- included in all copies or substantial portions of the Software.
57
+ The project uses the MIT Licencse. See LICENSE file for more information.
66
58
 
67
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
68
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
70
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
71
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
72
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
73
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
59
+ [logo]: http://img-fotki.yandex.ru/get/6724/98991937.13/0_9faaa_26ec83af_orig "Pry Doc"
60
+ [pry]: https://github.com/pry/pry
61
+ [show-source]: http://img-fotki.yandex.ru/get/9303/98991937.13/0_9faac_aa86e189_orig "show-source extended by Pry Doc"
62
+ [show-doc]: http://img-fotki.yandex.ru/get/9058/98991937.13/0_9faab_68d7a43a_orig "show-doc extended by Pry Doc"
63
+ [repo]: https://github.com/pry/pry-doc
64
+ [wiki]: https://github.com/pry/pry-doc/wiki
data/lib/pry-doc.rb CHANGED
@@ -6,13 +6,24 @@ direc = File.dirname(__FILE__)
6
6
  require "#{direc}/pry-doc/version"
7
7
  require "yard"
8
8
 
9
+ module PryDoc
10
+
11
+ def self.load_yardoc(version)
12
+ path = "#{File.dirname(__FILE__)}/pry-doc/core_docs_#{ version }"
13
+ YARD::Registry.load_yardoc(path)
14
+ end
15
+
16
+ end
17
+
9
18
  case RUBY_VERSION
19
+ when /\A2\.1/
20
+ PryDoc.load_yardoc('21')
10
21
  when /\A2\.0/
11
- YARD::Registry.load_yardoc("#{File.dirname(__FILE__)}/pry-doc/core_docs_20")
22
+ PryDoc.load_yardoc('20')
12
23
  when /\A1\.9/
13
- YARD::Registry.load_yardoc("#{File.dirname(__FILE__)}/pry-doc/core_docs_19")
24
+ PryDoc.load_yardoc('19')
14
25
  else
15
- YARD::Registry.load_yardoc("#{File.dirname(__FILE__)}/pry-doc/core_docs_18")
26
+ PryDoc.load_yardoc('18')
16
27
  end
17
28
 
18
29
  class Pry
@@ -1,3 +1,3 @@
1
1
  module PryDoc
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair (banisterfiend)
@@ -29,7 +29,7 @@ cert_chain:
29
29
  WgU0k85lanm1mxaZwCtAWgtppKhbDM2xI74woW7PaGRF4JaeF7kV601CFs7UxVy2
30
30
  sooul8M+4MWStBzb
31
31
  -----END CERTIFICATE-----
32
- date: 2013-12-25 00:00:00.000000000 Z
32
+ date: 2013-12-26 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: yard
@@ -1475,7 +1475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1475
1475
  version: '0'
1476
1476
  requirements: []
1477
1477
  rubyforge_project:
1478
- rubygems_version: 2.0.3
1478
+ rubygems_version: 2.0.14
1479
1479
  signing_key:
1480
1480
  specification_version: 4
1481
1481
  summary: Provides YARD and extended documentation support for Pry
metadata.gz.sig CHANGED
Binary file