ycurrency 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 1.0.1 / 01.03.2012
2
+
3
+ * Updated currencyd to use http://www.google.com/finance/converter?a=1&from=CHF&to=EUR
4
+
1
5
  === 1.0.0 / 21.12.2010
2
6
 
3
7
  * ycurrency is used in oddb.org and de.oddb.org.
data/Manifest.txt CHANGED
@@ -1,10 +1,9 @@
1
1
  History.txt
2
- InstalledFiles
3
2
  LICENCE.txt
4
3
  Manifest.txt
5
4
  README.txt
6
5
  Rakefile
7
6
  bin/currencyd
8
- config.save
9
7
  install.rb
10
8
  lib/currency.rb
9
+ lib/version.rb
data/README.txt CHANGED
@@ -4,9 +4,10 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Simple local DRb-service for Currency-Conversion. The project name at
8
- http://scm.ywesee.com is currency but the project name at Rubyforge and
9
- Rubygems is ycurrency as the name "currency" was already taken.
7
+ Simple local DRb-service for Currency-Conversion.
8
+
9
+ [[The project name at http://scm.ywesee.com is currency but the project name at Rubyforge and
10
+ Rubygems is ycurrency as the name "currency" was already taken.]]
10
11
 
11
12
  == INSTALL:
12
13
 
data/lib/currency.rb CHANGED
@@ -1,22 +1,21 @@
1
1
  #!/usr/bin/env ruby
2
+ # Currency -- de.oddb.org -- 22.11.2011 -- mhatakeyama@ywesee.com
2
3
  # Currency -- de.oddb.org -- 26.02.2007 -- hwyss@ywesee.com
3
4
 
4
5
  require 'thread'
5
6
  require 'net/http'
6
7
 
7
- VERSION = '1.0.0'
8
-
9
8
  module Currency
10
9
  @rates = {}
11
10
  @mutex = Mutex.new
12
11
  def Currency.extract_rate(html)
13
- if(match = /1\s+[^<>=]+=\s+(\d+\.\d+)/.match(html))
12
+ if(match = /\<span class=bld\>(\d+\.\d+) \w+\<\/span\>/.match(html))
14
13
  match[1]
15
14
  end
16
15
  end
17
16
  def Currency.get_html(origin, target)
18
17
  Net::HTTP.start('www.google.com') { |session|
19
- session.get("/search?q=1+#{origin.upcase}+in+#{target.upcase}").body
18
+ session.get("/finance/converter?a=1&from=#{origin.upcase}&to=#{target.upcase}").body
20
19
  }
21
20
  end
22
21
  def Currency.rate(origin, target)
data/lib/version.rb ADDED
@@ -0,0 +1 @@
1
+ VERSION = '1.0.1'
metadata CHANGED
@@ -1,99 +1,85 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ycurrency
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Masaomi Hatakeyama, Zeno R.R. Davatz
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-12-21 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: hoe
12
+ date: 2012-03-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: &8690880 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.10'
22
+ type: :development
23
23
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: *8690880
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ requirement: &8690160 !ruby/object:Gem::Requirement
25
28
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 47
30
- segments:
31
- - 2
32
- - 8
33
- - 0
34
- version: 2.8.0
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '2.13'
35
33
  type: :development
36
- version_requirements: *id001
37
- description: |-
38
- Simple local DRb-service for Currency-Conversion. The project name at
39
- http://scm.ywesee.com is currency but the project name at Rubyforge and
40
- Rubygems is ycurrency as the name "currency" was already taken.
41
- email:
34
+ prerelease: false
35
+ version_requirements: *8690160
36
+ description: ! "Simple local DRb-service for Currency-Conversion. \n\n[[The project
37
+ name at http://scm.ywesee.com is currency but the project name at Rubyforge and\nRubygems
38
+ is ycurrency as the name \"currency\" was already taken.]]"
39
+ email:
42
40
  - mhatakeyama@ywesee.com, zdavatz@ywesee.com
43
- executables:
41
+ executables:
44
42
  - currencyd
45
43
  extensions: []
46
-
47
- extra_rdoc_files:
44
+ extra_rdoc_files:
48
45
  - History.txt
49
46
  - LICENCE.txt
50
47
  - Manifest.txt
51
48
  - README.txt
52
- files:
49
+ files:
53
50
  - History.txt
54
- - InstalledFiles
55
51
  - LICENCE.txt
56
52
  - Manifest.txt
57
53
  - README.txt
58
54
  - Rakefile
59
55
  - bin/currencyd
60
- - config.save
61
56
  - install.rb
62
57
  - lib/currency.rb
63
- has_rdoc: true
58
+ - lib/version.rb
64
59
  homepage: http://scm.ywesee.com/?p=currency/.git;a=summary
65
60
  licenses: []
66
-
67
61
  post_install_message:
68
- rdoc_options:
62
+ rdoc_options:
69
63
  - --main
70
64
  - README.txt
71
- require_paths:
65
+ require_paths:
72
66
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
67
+ required_ruby_version: !ruby/object:Gem::Requirement
74
68
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- hash: 3
79
- segments:
80
- - 0
81
- version: "0"
82
- required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
74
  none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
91
79
  requirements: []
92
-
93
80
  rubyforge_project: ycurrency
94
- rubygems_version: 1.3.7
81
+ rubygems_version: 1.8.15
95
82
  signing_key:
96
83
  specification_version: 3
97
84
  summary: Simple local DRb-service for Currency-Conversion
98
85
  test_files: []
99
-
data/InstalledFiles DELETED
@@ -1,2 +0,0 @@
1
- /usr/bin//currencyd
2
- /usr/lib/ruby/site_ruby/1.8//currency.rb
data/config.save DELETED
@@ -1,12 +0,0 @@
1
- site-ruby=$prefix/lib/ruby/site_ruby/1.8
2
- prefix=/usr
3
- ruby-prog=/usr/bin/ruby18
4
- ruby-path=/usr/bin/ruby18
5
- make-prog=make
6
- site-ruby-common=$prefix/lib/ruby/site_ruby
7
- rb-dir=$site-ruby
8
- without-ext=no
9
- std-ruby=$prefix/lib/ruby/1.8
10
- bin-dir=$prefix/bin
11
- data-dir=$prefix/share
12
- so-dir=$prefix/lib/ruby/site_ruby/1.8/i686-linux