pry-doc 0.6.0 → 1.3.0

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.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +119 -0
  3. data/.gitignore +6 -0
  4. data/CHANGELOG.md +78 -0
  5. data/README.md +9 -8
  6. data/Rakefile +59 -12
  7. data/lib/pry-doc/{core_docs_20 → docs/20}/checksums +0 -0
  8. data/lib/pry-doc/{core_docs_20 → docs/20}/object_types +0 -0
  9. data/lib/pry-doc/{core_docs_20 → docs/20}/objects/root.dat +0 -0
  10. data/lib/pry-doc/{core_docs_19 → docs/20}/proxy_types +0 -0
  11. data/lib/pry-doc/{core_docs_21 → docs/21}/checksums +0 -0
  12. data/lib/pry-doc/{core_docs_21 → docs/21}/object_types +0 -0
  13. data/lib/pry-doc/{core_docs_21 → docs/21}/objects/root.dat +0 -0
  14. data/lib/pry-doc/{core_docs_20 → docs/21}/proxy_types +0 -0
  15. data/lib/pry-doc/docs/22/checksums +474 -0
  16. data/lib/pry-doc/docs/22/object_types +0 -0
  17. data/lib/pry-doc/{core_docs_19 → docs/22}/objects/root.dat +0 -0
  18. data/lib/pry-doc/{core_docs_21 → docs/22}/proxy_types +0 -0
  19. data/lib/pry-doc/docs/23/checksums +481 -0
  20. data/lib/pry-doc/docs/23/object_types +0 -0
  21. data/lib/pry-doc/docs/23/objects/root.dat +0 -0
  22. data/lib/pry-doc/docs/23/proxy_types +0 -0
  23. data/lib/pry-doc/docs/24/checksums +486 -0
  24. data/lib/pry-doc/docs/24/complete +0 -0
  25. data/lib/pry-doc/docs/24/object_types +0 -0
  26. data/lib/pry-doc/docs/24/objects/root.dat +0 -0
  27. data/lib/pry-doc/docs/24/proxy_types +0 -0
  28. data/lib/pry-doc/docs/25/checksums +493 -0
  29. data/lib/pry-doc/docs/25/complete +0 -0
  30. data/lib/pry-doc/docs/25/object_types +0 -0
  31. data/lib/pry-doc/docs/25/objects/root.dat +0 -0
  32. data/lib/pry-doc/docs/25/proxy_types +0 -0
  33. data/lib/pry-doc/docs/26/checksums +501 -0
  34. data/lib/pry-doc/docs/26/complete +0 -0
  35. data/lib/pry-doc/docs/26/object_types +0 -0
  36. data/lib/pry-doc/docs/26/objects/root.dat +0 -0
  37. data/lib/pry-doc/docs/26/proxy_types +0 -0
  38. data/lib/pry-doc/docs/27/checksums +506 -0
  39. data/lib/pry-doc/docs/27/complete +0 -0
  40. data/lib/pry-doc/docs/27/object_types +0 -0
  41. data/lib/pry-doc/docs/27/objects/root.dat +0 -0
  42. data/lib/pry-doc/docs/27/proxy_types +0 -0
  43. data/lib/pry-doc/docs/30/checksums +557 -0
  44. data/lib/pry-doc/docs/30/complete +0 -0
  45. data/lib/pry-doc/docs/30/object_types +0 -0
  46. data/lib/pry-doc/docs/30/objects/root.dat +0 -0
  47. data/lib/pry-doc/docs/30/proxy_types +0 -0
  48. data/lib/pry-doc/docs/31/checksums +522 -0
  49. data/lib/pry-doc/docs/31/complete +0 -0
  50. data/lib/pry-doc/docs/31/object_types +0 -0
  51. data/lib/pry-doc/docs/31/objects/root.dat +0 -0
  52. data/lib/pry-doc/docs/31/proxy_types +0 -0
  53. data/lib/pry-doc/pry_ext/method_info.rb +231 -0
  54. data/lib/pry-doc/pry_ext/show_source_with_c_internals/c_file.rb +91 -0
  55. data/lib/pry-doc/pry_ext/show_source_with_c_internals/code_fetcher.rb +89 -0
  56. data/lib/pry-doc/pry_ext/show_source_with_c_internals/etag_parser.rb +58 -0
  57. data/lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb +92 -0
  58. data/lib/pry-doc/pry_ext/show_source_with_c_internals/symbol_extractor.rb +111 -0
  59. data/lib/pry-doc/pry_ext/show_source_with_c_internals.rb +54 -0
  60. data/lib/pry-doc/version.rb +1 -1
  61. data/lib/pry-doc.rb +17 -223
  62. data/libexec/linux/etags-32 +0 -0
  63. data/libexec/linux/etags-64 +0 -0
  64. data/libexec/windows/etags.exe +0 -0
  65. data/pry-doc.gemspec +7 -4
  66. data/spec/fixtures/c_source/TAGS +22 -0
  67. data/spec/fixtures/c_source/goodbye.c +4 -0
  68. data/spec/fixtures/c_source/hello.c +43 -0
  69. data/spec/gem_with_cext/gems/ext/sample.c +5 -7
  70. data/spec/gem_with_cext/gems/lib/sample.rb +5 -5
  71. data/spec/helper.rb +8 -1
  72. data/spec/pry-doc_spec.rb +253 -46
  73. metadata +90 -30
  74. data/lib/pry-doc/core_docs_19/checksums +0 -226
  75. data/lib/pry-doc/core_docs_19/object_types +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c3545540a708f50be59360dfa68a102ad4dbd5fd
4
- data.tar.gz: a18cfc4d067a54f802752910ed80548288aea22e
2
+ SHA256:
3
+ metadata.gz: f6073f2a11f2a53536d734f67326598e7bbb6cc4b353fcac80c50296b6cacc2b
4
+ data.tar.gz: d769c7c9b394abc2e489d55775b17d238a38e12cac190c313bb0b1209f92a871
5
5
  SHA512:
6
- metadata.gz: b9362fea2cf197810c4ec31fbf53035d94540865dcab1a9a53965d6bdb48b8c0379617604e43f1acf1cc003e2adf1beaca61f364bbad4869d3576ff6703f05a7
7
- data.tar.gz: 5e6dc588a2fce74f62fd74287c9a50996f88f052f117658e8b1bb3a8238806de5f97488153bd5452f8e7777ab62d9a42a08b90536a7286a6b82c57f18506422d
6
+ metadata.gz: 2f1e51125226b6aa0625c336f04ab06eae312875d32f5d2cef8938ffb83077b69a160a264927fa79999f49596a9bfb3049384f61f24a48bc05c5b26cd34ea826
7
+ data.tar.gz: 90dc46503c7a94b8fd92e0c8be2c78ed4004991bfaf5c21aac4821b6a8b1564fdb6d56647f309b65ec37be800d1aa720f27556708355886c4f5d007bf47bf3dc
@@ -0,0 +1,119 @@
1
+ version: 2
2
+ references:
3
+ repo_restore_cache: &repo_restore_cache
4
+ restore_cache:
5
+ keys:
6
+ - repo-{{ .Environment.CIRCLE_SHA1 }}
7
+
8
+ repo_save_cache: &repo_save_cache
9
+ save_cache:
10
+ key: repo-{{ .Environment.CIRCLE_SHA1 }}-{{ epoch }}
11
+ paths:
12
+ - ~/pry-doc
13
+
14
+ bundle_install: &bundle_install
15
+ run:
16
+ name: Install Bundler dependencies
17
+ command: bundle install --path ~/pry-doc/vendor/bundle --jobs 15
18
+
19
+ unit: &unit
20
+ run:
21
+ name: Run unit tests
22
+ command: bundle exec rake
23
+
24
+ jobs:
25
+ "ruby-2.0":
26
+ docker:
27
+ - image: kyrylo/ruby-2.0.0p648
28
+ working_directory: /home/circleci/pry-doc
29
+ steps:
30
+ - checkout
31
+ - <<: *repo_restore_cache
32
+ - <<: *bundle_install
33
+ - <<: *unit
34
+ "ruby-2.1":
35
+ docker:
36
+ - image: circleci/ruby:2.1
37
+ working_directory: ~/pry-doc
38
+ steps:
39
+ - checkout
40
+ - <<: *repo_restore_cache
41
+ - <<: *bundle_install
42
+ - <<: *unit
43
+ "ruby-2.2":
44
+ docker:
45
+ - image: circleci/ruby:2.2
46
+ working_directory: ~/pry-doc
47
+ steps:
48
+ - checkout
49
+ - <<: *repo_restore_cache
50
+ - <<: *bundle_install
51
+ - <<: *unit
52
+ "ruby-2.3":
53
+ docker:
54
+ - image: circleci/ruby:2.3
55
+ working_directory: ~/pry-doc
56
+ steps:
57
+ - checkout
58
+ - <<: *repo_restore_cache
59
+ - <<: *bundle_install
60
+ - <<: *unit
61
+ "ruby-2.4":
62
+ docker:
63
+ - image: circleci/ruby:2.4
64
+ working_directory: ~/pry-doc
65
+ steps:
66
+ - checkout
67
+ - <<: *repo_restore_cache
68
+ - <<: *bundle_install
69
+ - <<: *unit
70
+ "ruby-2.5":
71
+ docker:
72
+ - image: circleci/ruby:2.5
73
+ working_directory: ~/pry-doc
74
+ steps:
75
+ - checkout
76
+ - <<: *repo_restore_cache
77
+ - <<: *bundle_install
78
+ - <<: *unit
79
+ "ruby-2.6":
80
+ docker:
81
+ - image: circleci/ruby:2.6
82
+ working_directory: ~/pry-doc
83
+ steps:
84
+ - checkout
85
+ - <<: *repo_restore_cache
86
+ - <<: *bundle_install
87
+ - <<: *unit
88
+ "ruby-2.7":
89
+ docker:
90
+ - image: circleci/ruby:2.7.0
91
+ working_directory: ~/pry-doc
92
+ steps:
93
+ - checkout
94
+ - <<: *repo_restore_cache
95
+ - <<: *bundle_install
96
+ - <<: *unit
97
+ "ruby-3.0":
98
+ docker:
99
+ - image: circleci/ruby:3.0
100
+ working_directory: ~/pry-doc
101
+ steps:
102
+ - checkout
103
+ - <<: *repo_restore_cache
104
+ - <<: *bundle_install
105
+ - <<: *unit
106
+
107
+ workflows:
108
+ version: 2
109
+ build:
110
+ jobs:
111
+ - "ruby-2.0"
112
+ - "ruby-2.1"
113
+ - "ruby-2.2"
114
+ - "ruby-2.3"
115
+ - "ruby-2.4"
116
+ - "ruby-2.5"
117
+ - "ruby-2.6"
118
+ - "ruby-2.7"
119
+ - "ruby-3.0"
data/.gitignore CHANGED
@@ -8,3 +8,9 @@ pkg/
8
8
  *.gem
9
9
  Gemfile.lock
10
10
  *~
11
+ sample.bundle
12
+
13
+ .bundle/
14
+ vendor/bundle/
15
+
16
+ rubies
data/CHANGELOG.md CHANGED
@@ -1,6 +1,74 @@
1
1
  Pry Doc changelog
2
2
  =================
3
3
 
4
+ ### master
5
+
6
+ ### [v1.3.0][v1.3.0] (January 12, 2022)
7
+
8
+ * Added Ruby 3.1 support ([#120](https://github.com/pry/pry-doc/pull/120))
9
+
10
+ ### [v1.2.0][v1.2.0] (March 2, 2021)
11
+
12
+ * Added Ruby 3.0 support ([#107](https://github.com/pry/pry-doc/pull/107))
13
+ * Fixed the `_pry_ is deprecated, use pry_instance instead` deprecation warning
14
+ ([#111](https://github.com/pry/pry-doc/pull/111))
15
+
16
+ ### [v1.1.0][v1.1.0] (March 28, 2020)
17
+
18
+ * Added Ruby 2.7 support ([#94](https://github.com/pry/pry-doc/pull/94))
19
+ * Improved Ruby 2.7 suport for certain methods
20
+ ([#100](https://github.com/pry/pry-doc/pull/100))
21
+ * Fixed ``NoMethodError: undefined method `namespace_name'``
22
+ ([#97](https://github.com/pry/pry-doc/pull/97))
23
+
24
+ ### [v1.0.0][v1.0.0] (December 27, 2018)
25
+
26
+ * Added suport for Ruby 2.6 docs ([#90](https://github.com/pry/pry-doc/pull/90))
27
+
28
+ ### [v0.13.5][v0.13.5] (November 8, 2018)
29
+
30
+ * Fixed deprecation warnings emitted by Pry v0.12.0
31
+ ([#87](https://github.com/pry/pry-doc/pull/87))
32
+ * Fixed MRI 2.0 regression ([#88](https://github.com/pry/pry-doc/pull/88))
33
+
34
+ ### [v0.12.0][v0.12.0] (January 21, 2018)
35
+
36
+ * Added suport for Ruby 2.5 docs ([#75](https://github.com/pry/pry-doc/pull/75))
37
+
38
+ ### [v0.11.1][v0.11.1] (August 8, 2017)
39
+
40
+ * Specified minimum required Ruby version in the gemspec
41
+ ([#70](https://github.com/pry/pry-doc/pull/70))
42
+
43
+ ### [v0.11.0][v0.11.0] (August 8, 2017)
44
+
45
+ * **IMPORTANT:** Drop support for Ruby 1.9.3
46
+ ([#68](https://github.com/pry/pry-doc/pull/68))
47
+ * Stopped raising exception when Pry Doc doesn't support current Ruby version
48
+ (we print a warning instead) ([#65](https://github.com/pry/pry-doc/pull/65))
49
+
50
+ ### [v0.10.0][v0.10.0] (December 31, 2016)
51
+
52
+ * Added support for Ruby 2.4 docs
53
+ ([#46](https://github.com/pry/pry-doc/pull/46))
54
+
55
+ ### [v0.9.0][v0.9.0] (June 30, 2016)
56
+
57
+ * **Important:** Added support for Ruby 2.3 docs
58
+ ([#35](https://github.com/pry/pry-doc/pull/35))
59
+ * Warn when Pry Doc doesn't support current Ruby version
60
+ ([#31](https://github.com/pry/pry-doc/pull/31))
61
+
62
+ ### v0.8.0 (June 14, 2015)
63
+
64
+ * Reverted to 0.6.0 approach for packaging Ruby core docs.
65
+ * Generated docs for Ruby 2.2
66
+
67
+ ### v0.7.0 (April 1, 2014)
68
+
69
+ * 0.7.0 tried a new approach to packaging Ruby core docs, which turned out to
70
+ have issues with cross-version compatibility. It's since been yanked.
71
+
4
72
  ### v0.6.0 (March 8, 2014)
5
73
 
6
74
  * **Important:** dropped Ruby 1.8.7 support.
@@ -42,3 +110,13 @@ Pry Doc changelog
42
110
  * Signed the gem with a cryptographic signature
43
111
 
44
112
  [yard648]: https://github.com/lsegal/yard/issues/648
113
+ [v0.9.0]: https://github.com/pry/pry-doc/releases/tag/v0.9.0
114
+ [v0.10.0]: https://github.com/pry/pry-doc/releases/tag/v0.10.0
115
+ [v0.11.0]: https://github.com/pry/pry-doc/releases/tag/v0.11.0
116
+ [v0.11.1]: https://github.com/pry/pry-doc/releases/tag/v0.11.1
117
+ [v0.12.0]: https://github.com/pry/pry-doc/releases/tag/v0.12.0
118
+ [v0.13.5]: https://github.com/pry/pry-doc/releases/tag/v0.13.5
119
+ [v1.0.0]: https://github.com/pry/pry-doc/releases/tag/v1.0.0
120
+ [v1.1.0]: https://github.com/pry/pry-doc/releases/tag/v1.1.0
121
+ [v1.2.0]: https://github.com/pry/pry-doc/releases/tag/v1.2.0
122
+ [v1.3.0]: https://github.com/pry/pry-doc/releases/tag/v1.3.0
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ![Pry Doc][logo]
2
2
 
3
+ [![Circle Build Status](https://circleci.com/gh/pry/pry-doc.svg?style=shield)](https://circleci.com/gh/pry/pry-doc)
4
+
3
5
  * Repository: [https://github.com/pry/pry-doc][repo]
4
6
  * Wiki: [https://github.com/pry/pry-doc/wiki][wiki]
5
7
 
@@ -12,11 +14,13 @@ for Pry.
12
14
  Installation
13
15
  ------------
14
16
 
15
- All you need is to install the gem. The `pry-doc` plugin will be detected and
16
- used automatically.
17
+ Install the gem using the below command.
17
18
 
18
19
  gem install pry-doc
19
20
 
21
+ To automatically load `pry-doc` upon starting `pry`, add the command `require 'pry-doc'` to your `pryrc`.
22
+ You can read more about it in Pry's [README file][pry-overview].
23
+
20
24
  Synopsis
21
25
  --------
22
26
 
@@ -39,11 +43,7 @@ for methods and classes implemented in C.
39
43
  Limitations
40
44
  -----------
41
45
 
42
- Pry Doc supports the following Rubies:
43
-
44
- * MRI 1.9
45
- * MRI 2.0
46
- * MRI 2.1
46
+ Pry Doc supports Ruby 2.0 and above.
47
47
 
48
48
  Getting Help
49
49
  ------------
@@ -53,10 +53,11 @@ Simply file an issue or visit `#pry` at `irc.freenode.net`.
53
53
  License
54
54
  -------
55
55
 
56
- The project uses the MIT Licencse. See LICENSE file for more information.
56
+ The project uses the MIT License. See LICENSE file for more information.
57
57
 
58
58
  [logo]: http://img-fotki.yandex.ru/get/6724/98991937.13/0_9faaa_26ec83af_orig "Pry Doc"
59
59
  [pry]: https://github.com/pry/pry
60
+ [pry-overview]: https://github.com/pry/pry#overview
60
61
  [show-source]: http://img-fotki.yandex.ru/get/9303/98991937.13/0_9faac_aa86e189_orig "show-source extended by Pry Doc"
61
62
  [show-doc]: http://img-fotki.yandex.ru/get/9058/98991937.13/0_9faab_68d7a43a_orig "show-doc extended by Pry Doc"
62
63
  [repo]: https://github.com/pry/pry-doc
data/Rakefile CHANGED
@@ -1,3 +1,9 @@
1
+ require 'rspec/core/rake_task'
2
+ RSpec::Core::RakeTask.new(:spec)
3
+
4
+ task default: :spec
5
+ task test: :spec
6
+
1
7
  dlext = RbConfig::CONFIG['DLEXT']
2
8
  direc = File.dirname(__FILE__)
3
9
 
@@ -7,18 +13,24 @@ require 'latest_ruby'
7
13
  require 'rake/clean'
8
14
  require "#{direc}/lib/#{PROJECT_NAME}/version"
9
15
 
10
- desc "run tests"
11
- task :test do
12
- sh "bacon -k #{direc}/spec/pry-doc_spec.rb"
16
+ desc "start pry with fixture c file"
17
+ task :pry_fixture do
18
+ sh %{pry -I./lib -r pry-doc -e "Pry::CInternals::CodeFetcher.ruby_source_folder = './spec/fixtures/c_source'"}
13
19
  end
14
- task :spec => :test
15
20
 
16
- task :default => :test
21
+ desc "start pry with pry-doc code loaded"
22
+ task :pry do
23
+ sh "pry -I./lib -r pry-doc"
24
+ end
17
25
 
26
+ desc "generate fixture etags"
27
+ task :etags do
28
+ sh 'etags --no-members spec/fixtures/c_source/*.c -o spec/fixtures/c_source/TAGS'
29
+ end
18
30
  desc "reinstall gem"
19
31
  task :reinstall => :gems do
20
32
  sh "gem uninstall pry-doc" rescue nil
21
- sh "gem install #{direc}/pkg/pry-doc-#{PryDoc::VERSION}.gem"
33
+ sh "gem install #{direc}/pkg/pry-doc-#{PryDoc::VERSION}.gem --no-document"
22
34
  end
23
35
 
24
36
  desc "build all platform gems at once"
@@ -73,7 +85,7 @@ def generate_yard
73
85
  end
74
86
 
75
87
  def replace_existing_docs(ver)
76
- system %|mkdir -p ../../../lib/pry-doc/core_docs_#{ ver } && cp -r .yardoc/* "$_"|
88
+ system %|mkdir -p ../../../lib/pry-doc/docs/#{ver} && cp -r .yardoc/* ../../../lib/pry-doc/docs/#{ver}|
77
89
  Dir.chdir(File.expand_path(File.dirname(__FILE__)))
78
90
  end
79
91
 
@@ -90,11 +102,6 @@ def generate_docs_for(ruby_ver, latest_ruby)
90
102
  clean_up
91
103
  end
92
104
 
93
- desc "Generate the latest Ruby 1.9 docs"
94
- task "gen19" do
95
- generate_docs_for('19', Latest.ruby19)
96
- end
97
-
98
105
  desc "Generate the latest Ruby 2.0 docs"
99
106
  task "gen20" do
100
107
  generate_docs_for('20', Latest.ruby20)
@@ -104,3 +111,43 @@ desc "Generate the latest Ruby 2.1 docs"
104
111
  task "gen21" do
105
112
  generate_docs_for('21', Latest.ruby21)
106
113
  end
114
+
115
+ desc "Generate the latest Ruby 2.2 docs"
116
+ task "gen22" do
117
+ generate_docs_for('22', Latest.ruby22)
118
+ end
119
+
120
+ desc "Generate the latest Ruby 2.3 docs"
121
+ task "gen23" do
122
+ generate_docs_for('23', Latest.ruby23)
123
+ end
124
+
125
+ desc "Generate the latest Ruby 2.4 docs"
126
+ task "gen24" do
127
+ generate_docs_for('24', Latest.ruby24)
128
+ end
129
+
130
+ desc "Generate the latest Ruby 2.5 docs"
131
+ task "gen25" do
132
+ generate_docs_for('25', Latest.ruby25)
133
+ end
134
+
135
+ desc "Generate the latest Ruby 2.6 docs"
136
+ task "gen26" do
137
+ generate_docs_for('26', Latest.ruby26)
138
+ end
139
+
140
+ desc "Generate the latest Ruby 2.7 docs"
141
+ task "gen27" do
142
+ generate_docs_for('27', Latest.ruby27)
143
+ end
144
+
145
+ desc "Generate the latest Ruby 3.0 docs"
146
+ task "gen30" do
147
+ generate_docs_for('30', Latest.ruby30)
148
+ end
149
+
150
+ desc "Generate the latest Ruby 3.1 docs"
151
+ task "gen31" do
152
+ generate_docs_for('31', Latest.ruby31)
153
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes