ruby_doc 1.0.4 → 1.0.5
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +13 -2
- data/lib/ruby_doc/data/data_extras.rb +15 -14
- data/lib/ruby_doc/data/doc.rb +0 -4
- data/lib/ruby_doc/data/meth.rb +1 -1
- data/lib/ruby_doc/ui/CLI.rb +3 -3
- data/lib/ruby_doc/ui/UI.rb +5 -4
- data/lib/ruby_doc/version.rb +1 -1
- data/ruby_doc.gemspec +1 -1
- metadata +4 -5
- data/lib/ruby_doc.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c237aefe4c8fa84a38bd46a16fd71b2bc178ef4dbcf76346d870746cb63dda3
|
4
|
+
data.tar.gz: b2242a14be9496afc6cb7af8c3a3a450d941e714668834696848f9b6856b4bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 844266d3611c7e5f4fc9a5f24b2d37044dce0af8bd728c0efd0bca07eefe2bc4fcc83f69cdc27bac3fc366f84005ab8fbbdd9b6d3bcb4d648afe7b7baeec68c0
|
7
|
+
data.tar.gz: 380b0a0a280637c3433c9b8ffebfc875a72d18beb6a69bda31e0b63c5fa70b0074cc2b2f057c0edc508374fcf3754650de8b3505253c1c2957e7e565cec4f4b0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,17 @@
|
|
1
1
|
# ALPHA RUBY DOC
|
2
|
-
[](http://forthebadge.com)
|
3
|
-
[](http://forthebadge.com)
|
4
2
|
|
3
|
+

|
4
|
+

|
5
|
+

|
6
|
+
|
7
|
+

|
8
|
+
[](https://badge.fury.io/rb/ruby_doc)
|
9
|
+
[](https://rubygems.org/gems/ruby_doc)
|
10
|
+

|
11
|
+
[](https://github.com/AlphaDaniel/alpha-ruby_doc/commits/master)
|
12
|
+
[](http://a1phacoding.com/)
|
13
|
+
|
14
|
+
---
|
5
15
|
## A CLI Gem That Scrapes Ruby Documentation
|
6
16
|
|
7
17
|

|
@@ -26,6 +36,7 @@ Ever get tired of leaving your editor / environment to google a method, or more
|
|
26
36
|
### Coming Soon:
|
27
37
|
* Search by method name ([See Notes](https://github.com/AlphaDaniel/alpha-ruby_doc/blob/master/Notes.md))
|
28
38
|
* Multiple Doc sources
|
39
|
+
* Display Syntax
|
29
40
|
|
30
41
|
---
|
31
42
|
## INSTALLATION
|
@@ -1,8 +1,8 @@
|
|
1
|
-
module DataExtras
|
1
|
+
module DataExtras # = foreign method
|
2
2
|
#=====================================================================
|
3
|
-
|
3
|
+
#HELPERS
|
4
4
|
#=====================================================================
|
5
|
-
#@all set/get maker
|
5
|
+
#@all set/get maker for Doc & Meth
|
6
6
|
def self.extended(base)
|
7
7
|
base.class_variable_set(:@@all, [])
|
8
8
|
end
|
@@ -19,7 +19,9 @@ module DataExtras
|
|
19
19
|
def uie
|
20
20
|
RubyDoc::CLI::UI
|
21
21
|
end
|
22
|
-
|
22
|
+
#=====================================================================
|
23
|
+
#PAGINATOR
|
24
|
+
#=====================================================================
|
23
25
|
#PageLister
|
24
26
|
def list(page)
|
25
27
|
page.each_with_index{|doc, index| uie.outputD(doc, index)}
|
@@ -28,10 +30,9 @@ module DataExtras
|
|
28
30
|
def self.list(page)
|
29
31
|
page.each_with_index{|doc, index| uie.outputD(doc, index)}
|
30
32
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
def self.nextPage(currentPg)
|
33
|
+
|
34
|
+
#PageShuttle
|
35
|
+
def self.nextPage(currentPg)
|
35
36
|
case currentPg
|
36
37
|
when "Page1"
|
37
38
|
page2
|
@@ -43,10 +44,10 @@ module DataExtras
|
|
43
44
|
last
|
44
45
|
end
|
45
46
|
end
|
46
|
-
|
47
|
+
#==============================PaginateAll============================
|
47
48
|
def paginateALL
|
48
49
|
uie.sepL#
|
49
|
-
list(Doc.all[0..499])
|
50
|
+
list(Doc.all[0..499])#
|
50
51
|
puts uie.sepR#
|
51
52
|
|
52
53
|
uie.browseMenu#
|
@@ -55,7 +56,7 @@ module DataExtras
|
|
55
56
|
#================================Page 2===============================
|
56
57
|
def self.page2
|
57
58
|
uie.sepL#
|
58
|
-
list(Doc.all[500..999])
|
59
|
+
list(Doc.all[500..999])#
|
59
60
|
puts uie.sepR#
|
60
61
|
|
61
62
|
uie.browseMenu#
|
@@ -64,7 +65,7 @@ module DataExtras
|
|
64
65
|
#================================Page 3===============================
|
65
66
|
def self.page3
|
66
67
|
uie.sepL#
|
67
|
-
list(Doc.all[1000..1499])
|
68
|
+
list(Doc.all[1000..1499])#
|
68
69
|
puts uie.sepR#
|
69
70
|
|
70
71
|
uie.browseMenu#
|
@@ -73,7 +74,7 @@ module DataExtras
|
|
73
74
|
#================================Page 4===============================
|
74
75
|
def self.page4
|
75
76
|
uie.sepL#
|
76
|
-
list(Doc.all[1500..1999])
|
77
|
+
list(Doc.all[1500..1999])#
|
77
78
|
puts uie.sepR#
|
78
79
|
|
79
80
|
uie.browseMenu#
|
@@ -82,7 +83,7 @@ module DataExtras
|
|
82
83
|
#===============================Page Last=============================
|
83
84
|
def self.last
|
84
85
|
uie.sepL#
|
85
|
-
list(Doc.all[2000..Doc.all.length])
|
86
|
+
list(Doc.all[2000..Doc.all.length])#
|
86
87
|
puts uie.sepR#
|
87
88
|
|
88
89
|
uie.viewMenu#
|
data/lib/ruby_doc/data/doc.rb
CHANGED
@@ -12,9 +12,5 @@ class Doc
|
|
12
12
|
@@all << self
|
13
13
|
self.methods = []
|
14
14
|
end
|
15
|
-
#==========================================================
|
16
|
-
def self.find(name)
|
17
|
-
self.all.find{|doc| doc.name.downcase == name.downcase}
|
18
|
-
end
|
19
15
|
#==========================================================
|
20
16
|
end
|
data/lib/ruby_doc/data/meth.rb
CHANGED
data/lib/ruby_doc/ui/CLI.rb
CHANGED
@@ -2,15 +2,15 @@ module RubyDoc
|
|
2
2
|
#==============================================
|
3
3
|
module CLI
|
4
4
|
#===============Load Init Data================#
|
5
|
-
def self.iLoad
|
5
|
+
def self.iLoad
|
6
6
|
puts "\nThanks For Using ALPHA™ Ruby Docs!".cyan
|
7
7
|
puts "One Moment Please As We Set Things Up\n".cyan
|
8
8
|
Scraper.loadDOCS
|
9
9
|
start
|
10
10
|
end
|
11
11
|
#==============================================
|
12
|
-
def self.start
|
13
|
-
UI.signature
|
12
|
+
def self.start
|
13
|
+
UI.signature#
|
14
14
|
UI.greeting
|
15
15
|
end
|
16
16
|
#==============================================
|
data/lib/ruby_doc/ui/UI.rb
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
+
#==================requires====================
|
1
2
|
require_relative './ui_extras'
|
2
3
|
require_relative '../data/data_extras.rb'
|
3
|
-
|
4
|
+
#==============================================
|
4
5
|
module RubyDoc::CLI
|
5
6
|
#==================modules=====================
|
6
7
|
class UI
|
7
8
|
extend UIExtras#
|
8
|
-
#inheriting: mainMenu, mainControl
|
9
|
+
#inheriting: mainMenu, mainControl, signature
|
9
10
|
extend DataExtras
|
10
11
|
#inheriting: paginateALL, superSEARCH(),
|
11
12
|
#displayMeth(), display()
|
12
13
|
#==============================================
|
13
14
|
def self.greeting
|
14
15
|
mainMenu#
|
15
|
-
mainControl#
|
16
|
+
mainControl# =>
|
16
17
|
end
|
17
18
|
|
18
19
|
def self.main_Shuttle(iN)
|
19
20
|
iN == "b" ? paginateALL : superSEARCH(iN)
|
20
21
|
end
|
21
22
|
|
22
|
-
def self.search_Shuttle(iN, matches)
|
23
|
+
def self.search_Shuttle(iN, matches)
|
23
24
|
iN == "m" ? greeting : display(matches[iN.to_i-1])
|
24
25
|
end
|
25
26
|
|
data/lib/ruby_doc/version.rb
CHANGED
data/ruby_doc.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["daniel.nunez.nyc@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{A CLI Gem that scrapes Ruby documentation.}
|
13
|
-
spec.description = %q{Ever get tired of leaving your editor/environment to google a method, or more in depth info on a class or module? This gem aims to make Ruby referencing quick and more importantly, LOCAL
|
13
|
+
spec.description = %q{Ever get tired of leaving your editor/environment to google a method, or more in depth info on a class or module? This gem aims to make Ruby referencing quick and more importantly, LOCAL. Ruby Doc scrapes Ruby documentation and allows users to quickly reference Ruby Language methods and additional information all on your terminal. Have a query? run, hunt, and done. Never lose momentum, keep all things in your line of sight and get right back to coding. Enjoy.}
|
14
14
|
spec.homepage = "https://github.com/AlphaDaniel/Alpha-Ruby_Doc"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Nunez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,9 +108,9 @@ dependencies:
|
|
108
108
|
version: 1.8.1
|
109
109
|
description: Ever get tired of leaving your editor/environment to google a method,
|
110
110
|
or more in depth info on a class or module? This gem aims to make Ruby referencing
|
111
|
-
quick and more importantly, LOCAL
|
111
|
+
quick and more importantly, LOCAL. Ruby Doc scrapes Ruby documentation and allows
|
112
112
|
users to quickly reference Ruby Language methods and additional information all
|
113
|
-
your terminal. Have a query? run, hunt, and done. Never lose momentum, keep all
|
113
|
+
on your terminal. Have a query? run, hunt, and done. Never lose momentum, keep all
|
114
114
|
things in your line of sight and get right back to coding. Enjoy.
|
115
115
|
email:
|
116
116
|
- daniel.nunez.nyc@gmail.com
|
@@ -131,7 +131,6 @@ files:
|
|
131
131
|
- bin/ruby_doc
|
132
132
|
- bin/setup
|
133
133
|
- config/environment.rb
|
134
|
-
- lib/ruby_doc.rb
|
135
134
|
- lib/ruby_doc/data/data_extras.rb
|
136
135
|
- lib/ruby_doc/data/doc.rb
|
137
136
|
- lib/ruby_doc/data/meth.rb
|
data/lib/ruby_doc.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require_relative '../config/environment'
|