currency_spy 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,149 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: README.rdoc [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
43
+
44
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
45
+
46
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
47
+
48
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
49
+
50
+ <li class="file"><a href="./nbproject/private/rake-d_txt.html">rake-d.txt</a></li>
51
+
52
+ </ul>
53
+ </div>
54
+
55
+
56
+ <div id="classindex-section" class="section project-section">
57
+ <h3 class="section-header">Class Index
58
+ <span class="search-toggle"><img src="./images/find.png"
59
+ height="16" width="16" alt="[+]"
60
+ title="show/hide quicksearch" /></span></h3>
61
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
62
+ <fieldset>
63
+ <legend>Quicksearch</legend>
64
+ <input type="text" name="quicksearch" value=""
65
+ class="quicksearch-field" />
66
+ </fieldset>
67
+ </form>
68
+
69
+ <ul class="link-list">
70
+
71
+ <li><a href="./CurrencySpy.html">CurrencySpy</a></li>
72
+
73
+ <li><a href="./CurrencySpy/DnbNord.html">CurrencySpy::DnbNord</a></li>
74
+
75
+ <li><a href="./CurrencySpy/Nbp.html">CurrencySpy::Nbp</a></li>
76
+
77
+ <li><a href="./CurrencySpy/Scraper.html">CurrencySpy::Scraper</a></li>
78
+
79
+ <li><a href="./CurrencySpy/Walutomat.html">CurrencySpy::Walutomat</a></li>
80
+
81
+ </ul>
82
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
83
+ </div>
84
+
85
+
86
+ </div>
87
+ </div>
88
+
89
+ <div id="documentation">
90
+ <h1><a href="CurrencySpy.html">CurrencySpy</a></h1>
91
+ <p>
92
+ This is a simple gem composed of simple classes using the Mechanize parser
93
+ to fetch currency rates from various websites. It&#8217;s main purpose was
94
+ to collect the data for a small bank loan comparison site. I&#8217;ve
95
+ decided to publish this as a standalone gem in case anybody wishes to fetch
96
+ some rates in their application. My classes deal mainly with Polish
97
+ websites. Feel free to write more or request a source.
98
+ </p>
99
+ <h2>Requirements</h2>
100
+ <p>
101
+ The gem uses Mechanize to parse sites. I recommend using bundler to easily
102
+ install any dependencies. Please consult the gemspec for a list of
103
+ dependencies (including test and development environment).
104
+ </p>
105
+ <h2>Installation</h2>
106
+ <p>
107
+ The plugin can be installed from rubygems:
108
+ </p>
109
+ <pre>
110
+ sudo gem install currency_spy
111
+ </pre>
112
+ <p>
113
+ To install the dependencies:
114
+ </p>
115
+ <pre>
116
+ bundle
117
+ </pre>
118
+ <p>
119
+ You can also clone my GitHub repository
120
+ (git://github.com/lbadura/currency_spy.git) and build the gem yourself and
121
+ / or hack on it.
122
+ </p>
123
+ <h2>Usage</h2>
124
+ <pre>
125
+ The usage is really simple. To fetch rates from given source just instantiate
126
+ a class which represents that source and call fetch_rates on it:
127
+ nbp = CurrencySpy::Nbp.new
128
+ rates = nbp.fetch_rates
129
+ =&gt; {:buy_rate=&gt;3.8482, :sell_rate=&gt;3.926, :rate_time=&gt;#&lt;DateTime:2011-01-07T00:00:00+00:00 (4911137/2,0/1,2299161)&gt;}
130
+ </pre>
131
+ <h2>Credits</h2>
132
+ <p>
133
+ Feel free to contact me at lukasz@niebo.net. My website: <a
134
+ href="http://www.badurowie.org">www.badurowie.org</a>
135
+ </p>
136
+ <p>
137
+ Copyright &#169; 2011 Lukasz Badura. Released under the MIT license.
138
+ </p>
139
+
140
+ </div>
141
+
142
+ <div id="validator-badges">
143
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
144
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
145
+ Rdoc Generator</a> 1.1.6</small>.</p>
146
+ </div>
147
+ </body>
148
+ </html>
149
+
data/doc/Rakefile.html ADDED
@@ -0,0 +1,103 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: Rakefile [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
43
+
44
+ <li class="file"><a href="./LICENSE.html">LICENSE</a></li>
45
+
46
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
47
+
48
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
49
+
50
+ <li class="file"><a href="./nbproject/private/rake-d_txt.html">rake-d.txt</a></li>
51
+
52
+ </ul>
53
+ </div>
54
+
55
+
56
+ <div id="classindex-section" class="section project-section">
57
+ <h3 class="section-header">Class Index
58
+ <span class="search-toggle"><img src="./images/find.png"
59
+ height="16" width="16" alt="[+]"
60
+ title="show/hide quicksearch" /></span></h3>
61
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
62
+ <fieldset>
63
+ <legend>Quicksearch</legend>
64
+ <input type="text" name="quicksearch" value=""
65
+ class="quicksearch-field" />
66
+ </fieldset>
67
+ </form>
68
+
69
+ <ul class="link-list">
70
+
71
+ <li><a href="./CurrencySpy.html">CurrencySpy</a></li>
72
+
73
+ <li><a href="./CurrencySpy/DnbNord.html">CurrencySpy::DnbNord</a></li>
74
+
75
+ <li><a href="./CurrencySpy/Nbp.html">CurrencySpy::Nbp</a></li>
76
+
77
+ <li><a href="./CurrencySpy/Scraper.html">CurrencySpy::Scraper</a></li>
78
+
79
+ <li><a href="./CurrencySpy/Walutomat.html">CurrencySpy::Walutomat</a></li>
80
+
81
+ </ul>
82
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
83
+ </div>
84
+
85
+
86
+ </div>
87
+ </div>
88
+
89
+ <div id="documentation">
90
+ <p>
91
+ require &#8216;bundler&#8217; Bundler::GemHelper.install_tasks
92
+ </p>
93
+
94
+ </div>
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
99
+ Rdoc Generator</a> 1.1.6</small>.</p>
100
+ </div>
101
+ </body>
102
+ </html>
103
+
data/doc/created.rid ADDED
@@ -0,0 +1,17 @@
1
+ Wed, 12 Jan 2011 19:47:48 +0100
2
+ ./nbproject/private/rake-d.txt Wed, 12 Jan 2011 12:34:24 +0100
3
+ ./Rakefile Sat, 01 Jan 2011 18:23:40 +0100
4
+ ./LICENSE Sat, 08 Jan 2011 17:21:16 +0100
5
+ ./spec/dnb_nord_spec.rb Wed, 12 Jan 2011 17:01:27 +0100
6
+ ./spec/walutomat_spec.rb Mon, 10 Jan 2011 10:11:18 +0100
7
+ ./spec/scraper_spec.rb Mon, 10 Jan 2011 10:11:18 +0100
8
+ ./spec/spec_helper.rb Sat, 08 Jan 2011 13:47:42 +0100
9
+ ./spec/nbp_spec.rb Mon, 10 Jan 2011 10:11:18 +0100
10
+ ./Gemfile Sat, 01 Jan 2011 18:23:40 +0100
11
+ ./README.rdoc Mon, 10 Jan 2011 10:11:18 +0100
12
+ ./lib/currency_spy.rb Wed, 12 Jan 2011 19:32:16 +0100
13
+ ./lib/currency_spy/version.rb Wed, 12 Jan 2011 19:47:11 +0100
14
+ ./lib/currency_spy/nbp.rb Wed, 12 Jan 2011 17:29:21 +0100
15
+ ./lib/currency_spy/dnb_nord.rb Wed, 12 Jan 2011 19:23:22 +0100
16
+ ./lib/currency_spy/scraper.rb Wed, 12 Jan 2011 19:45:54 +0100
17
+ ./lib/currency_spy/walutomat.rb Wed, 12 Jan 2011 19:15:38 +0100
data/doc/index.html ADDED
@@ -0,0 +1,106 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>RDoc Documentation</title>
10
+
11
+ <link type="text/css" media="screen" href="rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
14
+ <script src="js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
15
+ <script src="js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
16
+ <script src="js/darkfish.js" type="text/javascript" charset="utf-8"></script>
17
+
18
+ </head>
19
+ <body class="indexpage">
20
+
21
+
22
+ <h1>RDoc Documentation</h1>
23
+
24
+
25
+ <p>This is the API documentation for 'RDoc Documentation'.</p>
26
+
27
+
28
+
29
+
30
+ <h2>Files</h2>
31
+ <ul>
32
+
33
+ <li class="file"><a href="Gemfile.html">Gemfile</a></li>
34
+
35
+ <li class="file"><a href="LICENSE.html">LICENSE</a></li>
36
+
37
+ <li class="file"><a href="README_rdoc.html">README.rdoc</a></li>
38
+
39
+ <li class="file"><a href="Rakefile.html">Rakefile</a></li>
40
+
41
+ <li class="file"><a href="nbproject/private/rake-d_txt.html">rake-d.txt</a></li>
42
+
43
+ </ul>
44
+
45
+
46
+ <h2 id="classes">Classes/Modules</h2>
47
+ <ul>
48
+
49
+ <li class="module"><a href="CurrencySpy.html">CurrencySpy</a></li>
50
+
51
+ <li class="class"><a href="CurrencySpy/DnbNord.html">CurrencySpy::DnbNord</a></li>
52
+
53
+ <li class="class"><a href="CurrencySpy/Nbp.html">CurrencySpy::Nbp</a></li>
54
+
55
+ <li class="class"><a href="CurrencySpy/Scraper.html">CurrencySpy::Scraper</a></li>
56
+
57
+ <li class="class"><a href="CurrencySpy/Walutomat.html">CurrencySpy::Walutomat</a></li>
58
+
59
+ </ul>
60
+
61
+ <h2 id="methods">Methods</h2>
62
+ <ul>
63
+
64
+ <li><a href="CurrencySpy.html#method-c-datestr">::datestr &mdash; CurrencySpy</a></li>
65
+
66
+ <li><a href="CurrencySpy/Walutomat.html#method-c-new">::new &mdash; CurrencySpy::Walutomat</a></li>
67
+
68
+ <li><a href="CurrencySpy/Scraper.html#method-c-new">::new &mdash; CurrencySpy::Scraper</a></li>
69
+
70
+ <li><a href="CurrencySpy/DnbNord.html#method-c-new">::new &mdash; CurrencySpy::DnbNord</a></li>
71
+
72
+ <li><a href="CurrencySpy/Nbp.html#method-c-new">::new &mdash; CurrencySpy::Nbp</a></li>
73
+
74
+ <li><a href="CurrencySpy/DnbNord.html#method-i-buy_rate">#buy_rate &mdash; CurrencySpy::DnbNord</a></li>
75
+
76
+ <li><a href="CurrencySpy/Nbp.html#method-i-buy_rate">#buy_rate &mdash; CurrencySpy::Nbp</a></li>
77
+
78
+ <li><a href="CurrencySpy/Scraper.html#method-i-check_currency_code_validity">#check_currency_code_validity &mdash; CurrencySpy::Scraper</a></li>
79
+
80
+ <li><a href="CurrencySpy/Scraper.html#method-i-fetch_rates">#fetch_rates &mdash; CurrencySpy::Scraper</a></li>
81
+
82
+ <li><a href="CurrencySpy/Walutomat.html#method-i-medium_rate">#medium_rate &mdash; CurrencySpy::Walutomat</a></li>
83
+
84
+ <li><a href="CurrencySpy/Scraper.html#method-i-page">#page &mdash; CurrencySpy::Scraper</a></li>
85
+
86
+ <li><a href="CurrencySpy/Walutomat.html#method-i-rate_time">#rate_time &mdash; CurrencySpy::Walutomat</a></li>
87
+
88
+ <li><a href="CurrencySpy/Nbp.html#method-i-rate_time">#rate_time &mdash; CurrencySpy::Nbp</a></li>
89
+
90
+ <li><a href="CurrencySpy/DnbNord.html#method-i-rate_time">#rate_time &mdash; CurrencySpy::DnbNord</a></li>
91
+
92
+ <li><a href="CurrencySpy/Nbp.html#method-i-sell_rate">#sell_rate &mdash; CurrencySpy::Nbp</a></li>
93
+
94
+ <li><a href="CurrencySpy/DnbNord.html#method-i-sell_rate">#sell_rate &mdash; CurrencySpy::DnbNord</a></li>
95
+
96
+ <li><a href="CurrencySpy/DnbNord.html#method-i-url">#url &mdash; CurrencySpy::DnbNord</a></li>
97
+
98
+ </ul>
99
+
100
+ <div id="validator-badges">
101
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
102
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
103
+ Rdoc Generator</a> 1.1.6</small>.</p>
104
+ </div>
105
+ </body>
106
+ </html>
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: dnb_nord.rb [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="../../js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="../../js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="../../js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="../../js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file file-popup">
24
+ <div id="metadata">
25
+ <dl>
26
+ <dt class="modified-date">Last Modified</dt>
27
+ <dd class="modified-date">2011-01-12 19:23:22 +0100</dd>
28
+
29
+
30
+ <dt class="requires">Requires</dt>
31
+ <dd class="requires">
32
+ <ul>
33
+
34
+ </ul>
35
+ </dd>
36
+
37
+
38
+
39
+ </dl>
40
+ </div>
41
+
42
+ <div id="documentation">
43
+
44
+ <div class="description">
45
+ <h2>Description</h2>
46
+
47
+ </div>
48
+
49
+ </div>
50
+ </body>
51
+ </html>
52
+
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: nbp.rb [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="../../js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="../../js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="../../js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="../../js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file file-popup">
24
+ <div id="metadata">
25
+ <dl>
26
+ <dt class="modified-date">Last Modified</dt>
27
+ <dd class="modified-date">2011-01-12 17:29:21 +0100</dd>
28
+
29
+
30
+ <dt class="requires">Requires</dt>
31
+ <dd class="requires">
32
+ <ul>
33
+
34
+ </ul>
35
+ </dd>
36
+
37
+
38
+
39
+ </dl>
40
+ </div>
41
+
42
+ <div id="documentation">
43
+
44
+ <div class="description">
45
+ <h2>Description</h2>
46
+
47
+ </div>
48
+
49
+ </div>
50
+ </body>
51
+ </html>
52
+