lookup 0.4.1 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -20
- data/Rakefile +1 -0
- data/doc/classes/APILookup/Api.src/M000010.html +40 -0
- data/doc/classes/APILookup/Api.src/M000011.html +21 -0
- data/doc/classes/APILookup.src/M000003.html +24 -0
- data/doc/classes/APILookup.src/M000004.html +22 -0
- data/doc/classes/APILookup.src/M000005.html +33 -0
- data/doc/classes/APILookup.src/M000006.html +21 -0
- data/doc/classes/APILookup.src/M000007.html +33 -0
- data/doc/classes/APILookup.src/M000008.html +35 -0
- data/doc/classes/APILookup.src/M000009.html +52 -0
- data/doc/classes/SetupTables.src/M000001.html +18 -0
- data/doc/classes/SetupTables.src/M000002.html +34 -0
- data/doc/files/lib/lookup_rb.html +112 -0
- data/doc/files/lib/lookup_sqlite3.html +0 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/lookup.rb +31 -24
- data/lib/models.rb +5 -3
- data/spec/apis/{rails → rails-2.3.8}/classes.html +0 -0
- data/spec/apis/{rails → rails-2.3.8}/methods.html +0 -0
- data/spec/apis/rails-3.0.0/classes.html +850 -0
- data/spec/apis/rails-3.0.0/methods.html +10185 -0
- data/spec/lookup_spec.rb +23 -12
- data/spec/regressions_spec.rb +1 -1
- data/spec/spec_helper.rb +10 -8
- metadata +59 -14
- data/lib/config.rb +0 -5
data/README.md
CHANGED
@@ -13,20 +13,16 @@ Then you'll be able to:
|
|
13
13
|
|
14
14
|
## Example usage:
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
* `lookup ActiveRecord::Base#
|
19
|
-
* `lookup ActiveRecord::Base#
|
20
|
-
* `lookup ActiveRecord::Base` (returns
|
21
|
-
* `lookup
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
* `lookup 1.9 Array#combination`
|
28
|
-
|
29
|
-
By default all APIs are searched.
|
16
|
+
This has changed since the pre-1.0 versions. From 1.0 onwards you **must** specify an API that you wish to search.
|
17
|
+
|
18
|
+
* `lookup v2.3.8 ActiveRecord::Base#new` (returns a single method from the Rails 2.3.8 API, since the method name is right)
|
19
|
+
* `lookup v3.0.0 ActiveRecord::Base#destroy` (returns two methods from the Rails 3.0.0 API, since there's two methods with that name)
|
20
|
+
* `lookup v2.3.8 ActiveRecord::Base#destro` (returns three methods, uses methods beginning with "destroy")
|
21
|
+
* `lookup v2.3.8 ActiveRecord::Base#d` (tells you to be more specific, because it can't open 35 tabs at once)
|
22
|
+
* `lookup v2.3.8 ActiveRecord::Base` (returns a single consant)
|
23
|
+
* `lookup v2.3.8 av::Base` ("av" maps to ActionView, so returns ActionView::Base constant)
|
24
|
+
* `lookup 1.8 Array#join` (Returns a single method from the Ruby 1.8.7 API)
|
25
|
+
* `lookup 1.9 Array#join` (Returns a single method from the Ruby 1.9 API)
|
30
26
|
|
31
27
|
## Options
|
32
28
|
|
@@ -37,9 +33,10 @@ It also takes options:
|
|
37
33
|
|
38
34
|
## How it finds them
|
39
35
|
|
40
|
-
1.
|
41
|
-
2. Checks if there's constants/methods with
|
42
|
-
3.
|
43
|
-
4.
|
44
|
-
5.
|
45
|
-
6.
|
36
|
+
1. Finds the specified API and uses it to scope future calls.
|
37
|
+
2. Checks if there's constants/methods with that exact name.
|
38
|
+
3. Checks if there's constants/methods with names beginning with that name.
|
39
|
+
4. Does a "fuzzy match" splitting the name and getting anything containing those letters in that order.
|
40
|
+
5. Opens your browser if you're running a DECENT_OPERATING_SYSTEM (may add support for things other than Mac later on)
|
41
|
+
6. ???
|
42
|
+
7. Profit
|
data/Rakefile
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>update_methods! (APILookup::Api)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/models.rb, line 25</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_methods!</span>
|
15
|
+
<span class="ruby-identifier">entries</span> = []
|
16
|
+
<span class="ruby-identifier">constants</span> = []
|
17
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"#{url}/fr_method_index.html"</span>))
|
18
|
+
|
19
|
+
<span class="ruby-comment cmt"># Actual HTML on Ruby doc site is invalid. </span>
|
20
|
+
<span class="ruby-comment cmt"># This makes it valid.</span>
|
21
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">HTML</span>(<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/<a(.*?)>(.*?)<\/a>/</span>) { <span class="ruby-node">"<a#{$1}>#{$2.gsub("<", "&lt;").gsub("&gt;", ">")}"</span> })
|
22
|
+
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">css</span>(<span class="ruby-value str">"a"</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
23
|
+
<span class="ruby-identifier">names</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">text</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">" "</span>)
|
24
|
+
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">names</span>.<span class="ruby-identifier">empty?</span>
|
25
|
+
<span class="ruby-identifier">method</span> = <span class="ruby-identifier">names</span>[<span class="ruby-value">0</span>]
|
26
|
+
<span class="ruby-identifier">constant</span> = <span class="ruby-identifier">names</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[\(|\)]/</span>, <span class="ruby-value str">""</span>)
|
27
|
+
<span class="ruby-comment cmt"># The same constant can be defined twice in different APIs, be wary!</span>
|
28
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/classes/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">constant</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"::"</span>, <span class="ruby-value str">"/"</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">".html"</span>
|
29
|
+
<span class="ruby-identifier">constant</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">constants</span>.<span class="ruby-identifier">find_or_create_by_hash</span>(<span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">constant</span>, <span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>)
|
30
|
+
|
31
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">a</span>[<span class="ruby-value str">"href"</span>]
|
32
|
+
<span class="ruby-identifier">constant</span>.<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">find_or_create_by_hash</span>(<span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">method</span>, <span class="ruby-identifier">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">url</span>)
|
33
|
+
<span class="ruby-keyword kw">end</span>
|
34
|
+
|
35
|
+
<span class="ruby-comment cmt"># entries.each_slice(100) do |methods|</span>
|
36
|
+
<span class="ruby-comment cmt"># LookupBase.connection.execute("INSERT INTO entries (name, url) ")</span>
|
37
|
+
<span class="ruby-comment cmt"># end</span>
|
38
|
+
<span class="ruby-keyword kw">end</span></pre>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>update_classes! (APILookup::Api)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/models.rb, line 51</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_classes!</span>
|
15
|
+
<span class="ruby-identifier">doc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">HTML</span>(<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"#{url}/fr_class_index.html"</span>)))
|
16
|
+
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">css</span>(<span class="ruby-value str">"a"</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
17
|
+
<span class="ruby-identifier">constant</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">constants</span>.<span class="ruby-identifier">find_or_create_by_name_and_url</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">text</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">a</span>[<span class="ruby-value str">"href"</span>])
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>update! (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 11</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update!</span>
|
15
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Updating API, this may take a minute or two. Please be patient!"</span>
|
16
|
+
[<span class="ruby-constant">Constant</span>, <span class="ruby-constant">Entry</span>, <span class="ruby-constant">Api</span>].<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">delete_all</span> }
|
17
|
+
|
18
|
+
<span class="ruby-identifier">update_api!</span>(<span class="ruby-value str">"Rails"</span>, <span class="ruby-value str">"http://api.rubyonrails.org"</span>)
|
19
|
+
<span class="ruby-identifier">update_api!</span>(<span class="ruby-value str">"Ruby 1.8.7"</span>, <span class="ruby-value str">"http://www.ruby-doc.org/core"</span>)
|
20
|
+
<span class="ruby-identifier">update_api!</span>(<span class="ruby-value str">"Ruby 1.9"</span>, <span class="ruby-value str">"http://ruby-doc.org/ruby-1.9"</span>)
|
21
|
+
|
22
|
+
<span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>update_api! (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 21</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_api!</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">url</span>)
|
15
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"Updating API for #{name}..."</span>
|
16
|
+
<span class="ruby-identifier">api</span> = <span class="ruby-constant">Api</span>.<span class="ruby-identifier">find_or_create_by_name_and_url</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">url</span>)
|
17
|
+
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">update_methods!</span>
|
18
|
+
<span class="ruby-identifier">api</span>.<span class="ruby-identifier">update_classes!</span>
|
19
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"DONE (with #{name})!"</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>find_constant (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 29</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_constant</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">entry</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
+
<span class="ruby-comment cmt"># Find by specific name.</span>
|
16
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">find_all_by_name</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">:include</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"entries"</span>)
|
17
|
+
<span class="ruby-comment cmt"># search for class methods, which is prolly what we want if we can find it</span>
|
18
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">find_all_by_name</span>(<span class="ruby-node">"#{name}::ClassMethods"</span>, <span class="ruby-identifier">:include</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"entries"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">empty?</span>
|
19
|
+
<span class="ruby-comment cmt"># Find by name beginning with <blah>.</span>
|
20
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">all</span>(<span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">"name LIKE ?"</span>, <span class="ruby-identifier">name</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"%"</span>], <span class="ruby-identifier">:include</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"entries"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">empty?</span>
|
21
|
+
<span class="ruby-comment cmt"># Find by fuzzy.</span>
|
22
|
+
<span class="ruby-identifier">match</span>=<span class="ruby-node">"%#{name.split("").join("%")}%"</span>
|
23
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-constant">Constant</span>.<span class="ruby-identifier">find_by_sql</span>(<span class="ruby-node">"select * from constants where name LIKE '#{match}'"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">empty?</span>
|
24
|
+
<span class="ruby-identifier">regex</span>=<span class="ruby-identifier">build_regex_from_constant</span>(<span class="ruby-identifier">name</span>)
|
25
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">regex</span> }
|
26
|
+
<span class="ruby-comment cmt"># Narrow it down to the constants that only contain the entry we are looking for.</span>
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">entry</span>
|
28
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">constant</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span><span class="ruby-identifier">constant</span>.<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">find_by_name</span>(<span class="ruby-identifier">entry</span>).<span class="ruby-identifier">nil?</span> }
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
30
|
+
<span class="ruby-identifier">constants</span>
|
31
|
+
<span class="ruby-keyword kw">end</span></pre>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>build_regex_from_constant (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 51</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_regex_from_constant</span>(<span class="ruby-identifier">name</span>)
|
15
|
+
<span class="ruby-identifier">parts</span>=<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"::"</span>).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
16
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">""</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">"[^:]*"</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"[^:]*"</span>
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
<span class="ruby-node">/#{parts.join("::")}/i</span>
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>smart_rails_constant_substitutions (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 58</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">smart_rails_constant_substitutions</span>(<span class="ruby-identifier">name</span>)
|
15
|
+
<span class="ruby-identifier">parts</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"::"</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">":"</span>)}.<span class="ruby-identifier">flatten</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">first</span>
|
17
|
+
<span class="ruby-identifier">rep</span> = <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">downcase</span>
|
18
|
+
<span class="ruby-comment cmt"># so it falls back on fuzzy and matches AR as well as ActiveResource</span>
|
19
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"ar"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActiveRecord"</span>
|
20
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"ares"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActiveResource"</span>
|
21
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"am"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActionMailer"</span>
|
22
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"as"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActiveSupport"</span>
|
23
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"ac"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActionController"</span>
|
24
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">"av"</span> <span class="ruby-keyword kw">then</span> <span class="ruby-value str">"ActionView"</span>
|
25
|
+
<span class="ruby-keyword kw">else</span>
|
26
|
+
<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">first</span>
|
27
|
+
<span class="ruby-keyword kw">end</span>
|
28
|
+
<span class="ruby-keyword kw">return</span> ([<span class="ruby-identifier">rep</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">parts</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]).<span class="ruby-identifier">join</span>(<span class="ruby-value str">"::"</span>)
|
29
|
+
<span class="ruby-keyword kw">end</span>
|
30
|
+
<span class="ruby-identifier">name</span>
|
31
|
+
<span class="ruby-keyword kw">end</span></pre>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>find_method (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 79</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_method</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">constant</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
+
<span class="ruby-identifier">methods</span> = []
|
16
|
+
<span class="ruby-comment cmt"># Full match</span>
|
17
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-constant">Entry</span>.<span class="ruby-identifier">find_all_by_name</span>(<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
|
18
|
+
<span class="ruby-comment cmt"># Start match</span>
|
19
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-constant">Entry</span>.<span class="ruby-identifier">all</span>(<span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">"name LIKE ?"</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"%"</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">empty?</span>
|
20
|
+
<span class="ruby-comment cmt"># Wildcard substitution</span>
|
21
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-constant">Entry</span>.<span class="ruby-identifier">find_by_sql</span>(<span class="ruby-node">"select * from entries where name LIKE '#{name.to_s.gsub("*", "%")}'"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">empty?</span>
|
22
|
+
<span class="ruby-comment cmt"># Fuzzy match</span>
|
23
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-constant">Entry</span>.<span class="ruby-identifier">find_by_sql</span>(<span class="ruby-node">"select * from entries where name LIKE '%#{name.to_s.split("").join("%")}%'"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">empty?</span>
|
24
|
+
|
25
|
+
<span class="ruby-comment cmt"># Weight the results, last result is the first one we want shown first</span>
|
26
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">sort_by</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">:weighting</span>)
|
27
|
+
|
28
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">constant</span>
|
29
|
+
<span class="ruby-identifier">constants</span> = <span class="ruby-identifier">find_constant</span>(<span class="ruby-identifier">constant</span>)
|
30
|
+
<span class="ruby-identifier">methods</span> = <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">constants</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">m</span>.<span class="ruby-identifier">constant</span>) }
|
31
|
+
<span class="ruby-keyword kw">end</span>
|
32
|
+
<span class="ruby-identifier">methods</span>
|
33
|
+
<span class="ruby-keyword kw">end</span></pre>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>search (APILookup)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/lookup.rb, line 100</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">options</span>={})
|
15
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:api</span>] <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/^1\.9/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">msg</span>)
|
16
|
+
<span class="ruby-value str">"Ruby 1.9"</span>
|
17
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-regexp re">/^1\.8/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">msg</span>)
|
18
|
+
<span class="ruby-value str">"Ruby 1.8.7"</span>
|
19
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-regexp re">/^Rails/i</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">msg</span>)
|
20
|
+
<span class="ruby-value str">"Rails"</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
|
23
|
+
<span class="ruby-identifier">msg</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^(.*?)\s/</span>, <span class="ruby-value str">""</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:api</span>]
|
24
|
+
|
25
|
+
<span class="ruby-identifier">splitter</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:splitter</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"#"</span>
|
26
|
+
<span class="ruby-identifier">parts</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">" "</span>)[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">split</span>(<span class="ruby-identifier">splitter</span>) }.<span class="ruby-identifier">flatten!</span>
|
27
|
+
<span class="ruby-comment cmt"># It's a constant! Oh... and there's nothing else in the string!</span>
|
28
|
+
<span class="ruby-identifier">first</span> = <span class="ruby-identifier">smart_rails_constant_substitutions</span>(<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">first</span>)
|
29
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/^[A-Z]/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">first</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
30
|
+
<span class="ruby-identifier">find_constant</span>(<span class="ruby-identifier">first</span>)
|
31
|
+
<span class="ruby-comment cmt"># It's a method!</span>
|
32
|
+
<span class="ruby-keyword kw">else</span>
|
33
|
+
<span class="ruby-comment cmt"># Right, so they only specified one argument. Therefore, we look everywhere.</span>
|
34
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
35
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-identifier">find_method</span>(<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">last</span>)
|
36
|
+
<span class="ruby-comment cmt"># Left, so they specified two arguments. First is probably a constant, so let's find that!</span>
|
37
|
+
<span class="ruby-keyword kw">else</span>
|
38
|
+
<span class="ruby-identifier">o</span> = <span class="ruby-identifier">find_method</span>(<span class="ruby-identifier">parts</span>.<span class="ruby-identifier">last</span>, <span class="ruby-identifier">first</span>)
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-identifier">o</span>
|
41
|
+
<span class="ruby-keyword kw">end</span>
|
42
|
+
|
43
|
+
<span class="ruby-identifier">output</span> = <span class="ruby-identifier">search</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">:splitter</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"."</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">splitter</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"."</span>
|
44
|
+
|
45
|
+
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:api</span>] <span class="ruby-operator">||=</span> [<span class="ruby-value str">"Ruby 1.8.7"</span>, <span class="ruby-value str">"Rails"</span>]
|
46
|
+
<span class="ruby-identifier">selected_output</span> = <span class="ruby-identifier">output</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:api</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">m</span>.<span class="ruby-identifier">api</span>.<span class="ruby-identifier">name</span>) }
|
47
|
+
<span class="ruby-identifier">selected_output</span> = <span class="ruby-identifier">output</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">selected_output</span>.<span class="ruby-identifier">empty?</span>
|
48
|
+
|
49
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">selected_output</span>
|
50
|
+
<span class="ruby-keyword kw">end</span></pre>
|
51
|
+
</body>
|
52
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>connection (SetupTables)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/models.rb, line 75</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">connection</span>
|
15
|
+
<span class="ruby-constant">APILookup</span><span class="ruby-operator">::</span><span class="ruby-constant">Api</span>.<span class="ruby-identifier">connection</span>
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>up (SetupTables)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/models.rb, line 79</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">up</span>
|
15
|
+
<span class="ruby-identifier">create_table</span> <span class="ruby-identifier">:apis</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
16
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-identifier">:name</span>, <span class="ruby-identifier">:url</span>
|
17
|
+
<span class="ruby-keyword kw">end</span>
|
18
|
+
|
19
|
+
<span class="ruby-identifier">create_table</span> <span class="ruby-identifier">:entries</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
20
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-identifier">:name</span>, <span class="ruby-identifier">:url</span>
|
21
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-identifier">:constant</span>
|
22
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-identifier">:weighting</span>, <span class="ruby-identifier">:default</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
23
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-identifier">:count</span>, <span class="ruby-identifier">:default</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
24
|
+
<span class="ruby-keyword kw">end</span>
|
25
|
+
|
26
|
+
<span class="ruby-identifier">create_table</span> <span class="ruby-identifier">:constants</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
27
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-identifier">:name</span>, <span class="ruby-identifier">:url</span>
|
28
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-identifier">:api</span>
|
29
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-identifier">:weighting</span>, <span class="ruby-identifier">:default</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
30
|
+
<span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-identifier">:count</span>, <span class="ruby-identifier">:default</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
31
|
+
<span class="ruby-keyword kw">end</span>
|
32
|
+
<span class="ruby-keyword kw">end</span></pre>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>File: lookup.rb</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="fileHeader">
|
50
|
+
<h1>lookup.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/lookup.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Sun Jul 04 09:34:49 +1000 2010</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
|
72
|
+
<div id="requires-list">
|
73
|
+
<h3 class="section-bar">Required files</h3>
|
74
|
+
|
75
|
+
<div class="name-list">
|
76
|
+
rubygems
|
77
|
+
net/http
|
78
|
+
active_record
|
79
|
+
nokogiri
|
80
|
+
find_by_hash
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if includes -->
|
91
|
+
|
92
|
+
<div id="section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if method_list -->
|
102
|
+
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<div id="validator-badges">
|
108
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
File without changes
|