rireader 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +15 -0
  2. data/README.md +42 -0
  3. data/lib/rireader.rbw +51 -0
  4. data/rireader.gemspec +28 -0
  5. metadata +49 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzViZDIzZWU1NDlhNTNiMjk2ZDkxZmQxZDJmMGQxNGUzMTI2MTRjMg==
5
+ data.tar.gz: !binary |-
6
+ ZGYxZTM3MWIyMjgwNmRjM2IwYjljN2Q0MmE0NTgxZjRlNzIzNzhkNA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZDAyYzc1ZmE0YTJlMDI5YzI3ZGMwZmVlYjkxNDIyN2I0Njk3NTA1NDE5NWZh
10
+ MTMxM2MzYTg0ZjJiNWU4NTlmZTMwMWM1MjdjMjUyOTU1NTAyODBkNjg3MGZk
11
+ YjllZmM2OTIzYmY4ZDdhNTg4Y2I1ZDM5YmUxODk1MjdhNDI0Yzc=
12
+ data.tar.gz: !binary |-
13
+ YmYyOGQyZjY1YTdkYjE2MTg1MTI0NzRiMTIxOTNlOGEyNmU2NTI5YmMwOTgx
14
+ MmMzMTczNjJhODYyYTkzNmFhYWRiOWRlNWNlYTc2MjYwMmYxZTFkNGZkYTE0
15
+ ODc3NTAxOTM2NmI4YWJhZTEyMGI2OTg5MDFiZjFkYjY1YzM1YmU=
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ Rireader is a graphical user interface to read ri documentation.
2
+
3
+ Ruby has a wonderful reference of the language and all available libraries: ri.
4
+
5
+ ri stands for “Ruby Interactive”, which is a tool to navigate documentation.
6
+
7
+ Getting Started
8
+ ==========
9
+ If you have Ruby installed, you should have all that’s necessary to use ri. If you are have troubles, look at “Troubleshooting” below.
10
+
11
+ To try it out, enter the name of the class or method you want documentation about in the entry field and click the buttom=n "get ri documentation". The documentation will be displayed in the text field.
12
+
13
+ Typing "Array" should show you the docs for the Array class. If you type "Array.min", the program will provide the documentation for Array’s min instance method. To be very specific about things, use a :: or # for class and instance methods rather than the generic ..
14
+
15
+ Example:
16
+
17
+ Array::wrap # class method lookup
18
+ Array#min # instance method lookup
19
+
20
+ One really useful feature of the tool is the suggestions ri provides when you enter only part of what you are looking for. Try it out:
21
+
22
+ Enumerable.each
23
+ ```
24
+ Enumerable.each not found, maybe you meant:
25
+
26
+ Enumerable#each_cons
27
+ Enumerable#each_entry
28
+ Enumerable#each_slice
29
+ Enumerable#each_with_index
30
+ Enumerable#each_with_object
31
+ ```
32
+ Troubleshooting
33
+ ==========
34
+ If you are not in an RVM project and you are unable to find ri documentation, try this:
35
+ ```
36
+ gem install rdoc rdoc-data
37
+ rdoc-data --install
38
+ ````
39
+ If you are in an RVM project, this should clear things up.
40
+ ```
41
+ rvm docs generate-ri
42
+ ```
data/lib/rireader.rbw ADDED
@@ -0,0 +1,51 @@
1
+ require 'tk'
2
+
3
+ $var = TkVariable.new
4
+
5
+ root = TkRoot.new{title "Rireader"}
6
+ root['geometry'] = '1540x700+1+1'
7
+
8
+ label = TkLabel.new{ text "Enter method or class name >>"
9
+ borderwidth 5
10
+ font TkFont.new('times 14 bold')
11
+ background "yellow"
12
+ relief "groove"
13
+ }.pack('padx' => 60, 'pady' => 45, 'expand' => 'y')
14
+
15
+ entry = TkEntry.new{
16
+ textvariable $var
17
+ }
18
+
19
+ text = TkText.new(root){
20
+ background "black"
21
+ foreground "white"
22
+ width 72
23
+ height 20
24
+ font TkFont.new('tahoma 16 bold')
25
+ }
26
+
27
+ button = TkButton.new{
28
+ text "get ri documentation"
29
+ borderwidth 5
30
+ font TkFont.new('times 14 bold')
31
+ background "green"
32
+ relief "groove"
33
+ command(proc {
34
+ content = `ri --all --format=markdown "#$var"`
35
+ text.delete('1.0', 'end');
36
+ text.insert('1.0', "#{content}" )
37
+ }
38
+ )
39
+ }.pack('padx' => 30, 'pady' => 15)
40
+
41
+ scrollbar = TkScrollbar.new(root){command proc{|*args| text.yview(*args)}}
42
+ text.yscrollcommand(proc{|first, last| scrollbar.set(first, last)})
43
+
44
+ label.grid( 'row' => 0, 'column' => 0, 'sticky' => 'W')
45
+ entry.grid( 'row' => 0, 'column' => 1, 'sticky' => 'W')
46
+ button.grid( 'row' => 0, 'column' => 2, 'sticky' => 'WE')
47
+ text.grid( 'row' => 1, 'columnspan' => 3)
48
+ scrollbar.grid('row' => 1, 'column' => 4, 'sticky' =>'NS')
49
+
50
+ Tk.mainloop
51
+
data/rireader.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "rireader"
5
+ s.version = "0.1.0"
6
+ s.licenses = ['MIT']
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Sabry Abdel Fattah"]
9
+ s.date = "2015-03-03"
10
+ s.description = "Rireader is a graphical user interface to read ri documentation."
11
+ s.email = "sabryabdelfattah@gmail.com"
12
+ s.extra_rdoc_files = ["README.md"]
13
+ s.files = ["rireader.gemspec", "lib/rireader.rbw", "README.md"]
14
+ s.homepage = "http://sabryfattah.com"
15
+ s.rdoc_options = ["--main", "README.md"]
16
+ s.require_paths = ["lib"]
17
+ s.rubygems_version = "1.8.29"
18
+ s.summary = "Rireader is a graphical user interface to read ri documentation. "
19
+
20
+ if s.respond_to? :specification_version then
21
+ s.specification_version = 3
22
+
23
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
+ else
25
+ end
26
+ else
27
+ end
28
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rireader
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sabry Abdel Fattah
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Rireader is a graphical user interface to read ri documentation.
14
+ email: sabryabdelfattah@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files:
18
+ - README.md
19
+ files:
20
+ - README.md
21
+ - lib/rireader.rbw
22
+ - rireader.gemspec
23
+ homepage: http://sabryfattah.com
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options:
29
+ - --main
30
+ - README.md
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.5
46
+ signing_key:
47
+ specification_version: 3
48
+ summary: Rireader is a graphical user interface to read ri documentation.
49
+ test_files: []