simple_xurrency 1.1.2

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.
data/.autotest ADDED
@@ -0,0 +1,8 @@
1
+ Autotest.add_hook(:initialize) {|at|
2
+ at.add_exception %r{^\.git} # ignore Version Control System
3
+ at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again...
4
+ at.clear_mappings # take out the default (test/test*rb)
5
+ at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
6
+ Dir['spec/**/*.rb']
7
+ }
8
+ }
data/.bundle/config ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: "1"
3
+ BUNDLE_WITHOUT: ""
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ *.rbc
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create use ruby-1.8.7@simple_currency > /dev/null
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source :gemcutter
2
+
3
+ gem "crack"
4
+
5
+ group :test do
6
+ gem "rspec", ">= 2.0.0.beta.20"
7
+ gem "fakeweb"
8
+ gem "rails"
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,45 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (2.3.8)
5
+ actionpack (= 2.3.8)
6
+ actionpack (2.3.8)
7
+ activesupport (= 2.3.8)
8
+ rack (~> 1.1.0)
9
+ activerecord (2.3.8)
10
+ activesupport (= 2.3.8)
11
+ activeresource (2.3.8)
12
+ activesupport (= 2.3.8)
13
+ activesupport (2.3.8)
14
+ crack (0.1.8)
15
+ diff-lcs (1.1.2)
16
+ fakeweb (1.3.0)
17
+ rack (1.1.0)
18
+ rails (2.3.8)
19
+ actionmailer (= 2.3.8)
20
+ actionpack (= 2.3.8)
21
+ activerecord (= 2.3.8)
22
+ activeresource (= 2.3.8)
23
+ activesupport (= 2.3.8)
24
+ rake (>= 0.8.3)
25
+ rake (0.8.7)
26
+ rspec (2.0.0.beta.22)
27
+ rspec-core (= 2.0.0.beta.22)
28
+ rspec-expectations (= 2.0.0.beta.22)
29
+ rspec-mocks (= 2.0.0.beta.22)
30
+ rspec-core (2.0.0.beta.22)
31
+ rspec-expectations (2.0.0.beta.22)
32
+ diff-lcs (>= 1.1.2)
33
+ rspec-mocks (2.0.0.beta.22)
34
+ rspec-core (= 2.0.0.beta.22)
35
+ rspec-expectations (= 2.0.0.beta.22)
36
+
37
+ PLATFORMS
38
+ java
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ crack
43
+ fakeweb
44
+ rails
45
+ rspec (>= 2.0.0.beta.20)
data/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ New BSD Licence
2
+
3
+ Copyright (c) 2010, Xurrency All rights reserved.
4
+
5
+ Authors: Oriol Gual, Josep M. Bach, Josep Jaume Rey, Alfonso Jimenez
6
+
7
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that
8
+ the following conditions are met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the
11
+ following disclaimer.
12
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
13
+ the following disclaimer in the documentation and/or other materials provided with the distribution.
14
+ * Neither the name of the Xurrency nor the names of its contributors may be used to endorse or promote
15
+ products derived from this software without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY XURRENCY.COM ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19
+ NO EVENT SHALL WEBLOGS SL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.rdoc ADDED
@@ -0,0 +1,46 @@
1
+ = simple_xurrency
2
+
3
+ A really easy interface to the Xurrency API. It's Ruby 1.8, 1.9 and JRuby compatible. This gem is a fork from simple_currency, made by Codegram.
4
+
5
+ == Usage
6
+
7
+ Just require it and all your numeric stuff gets this fancy DSL for free:
8
+
9
+ 30.eur.to_usd
10
+ # => 38.08
11
+
12
+ 150.eur.to_usd
13
+ # => 190.4
14
+ 239.usd.to_eur
15
+ # => 187.98
16
+
17
+ 1.eur.to_usd_updated_at
18
+ # => Fri Oct 08 22:54:00 UTC 2010
19
+
20
+ If you have a Xurrency API key, you can add it by doing:
21
+
22
+ SimpleXurrency.key = 'write_your_api_key'
23
+
24
+ If you want to find out how to adquire an API key, please go to http://xurrency.com/license
25
+
26
+ == Installation
27
+
28
+ === Rails 3
29
+
30
+ In your Gemfile:
31
+
32
+ gem "simple_xurrency"
33
+
34
+ === Not using Rails?
35
+
36
+ Then you have to manually install the gem:
37
+
38
+ gem install simple_xurrency
39
+
40
+ And manually require it as well:
41
+
42
+ require "simple_xurrency"
43
+
44
+ == License
45
+
46
+ See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ require 'rubygems'
3
+ require 'rake'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "simple_xurrency"
9
+ gem.summary = "A really easy interface to the Xurrency API"
10
+ gem.description = "A really easy interface to the Xurrency API. It's Ruby 1.8, 1.9 and JRuby compatible"
11
+ gem.email = "yo@alfonsojimenez.com"
12
+ gem.homepage = "http://github.com/alfonsojimenez/simple_xurrency"
13
+ gem.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey", "Alfonso Jimenez"]
14
+
15
+ gem.add_dependency 'crack', ">= 0.1.8"
16
+
17
+ gem.add_development_dependency "jeweler", '>= 1.4.0'
18
+ gem.add_development_dependency "rspec", '>= 2.0.0.beta.20'
19
+ gem.add_development_dependency "fakeweb", '>= 1.3.0'
20
+ gem.add_development_dependency "bundler", '>= 1.0.0'
21
+ end
22
+ Jeweler::GemcutterTasks.new
23
+ rescue LoadError
24
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
25
+ end
26
+
27
+ # Rake RSpec2 task stuff
28
+ gem 'rspec', '>= 2.0.0.beta.20'
29
+ gem 'rspec-expectations'
30
+
31
+ require 'rspec/core/rake_task'
32
+
33
+ desc "Run the specs under spec"
34
+ RSpec::Core::RakeTask.new do |t|
35
+ end
36
+
37
+ task :default => :spec
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.1.2
@@ -0,0 +1 @@
1
+ Autotest.add_discovery { "rspec2" }
@@ -0,0 +1,3 @@
1
+ class Numeric
2
+ include CurrencyConvertible
3
+ end
@@ -0,0 +1,46 @@
1
+ require 'simple_xurrency/currency_convertible'
2
+ require 'core_ext/numeric'
3
+
4
+ class SimpleXurrency
5
+ class << self
6
+ attr_accessor :key
7
+
8
+ def cache_enabled?
9
+ if @cache_enabled.nil?
10
+ @cache_enabled = true
11
+ end
12
+
13
+ @cache_enabled
14
+ end
15
+
16
+ def enable_cache
17
+ @cache_enabled = true
18
+ end
19
+
20
+ def disable_cache
21
+ @cache_enabled = false
22
+ end
23
+
24
+ def cache_get(key)
25
+ ret = nil
26
+
27
+ if @cache.is_a?(Hash)
28
+ ret = @cache[key]
29
+ end
30
+
31
+ ret
32
+ end
33
+
34
+ def cache_add(key, value)
35
+ if !@cache.is_a?(Hash)
36
+ @cache = Hash.new
37
+ end
38
+
39
+ @cache[key] = value
40
+ end
41
+
42
+ def cache_flush
43
+ @cache = Hash.new
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,121 @@
1
+ require 'open-uri'
2
+ require 'timeout'
3
+ require 'crack'
4
+
5
+ module CurrencyConvertible
6
+ def method_missing(method, *args, &block)
7
+ return _from(method.to_s) if method.to_s.length == 3
8
+
9
+ if @original && !(method.to_s =~ /^to_(utc|int|str|ary)/) && method.to_s =~/^to_/ && method.to_s.length == 6
10
+ return _to(method.to_s.gsub('to_',''))
11
+ end
12
+
13
+ if @original && !(method.to_s =~ /^(singleton_methods|protected_methods)/) && method.to_s =~/^to_[a-z]{3}_updated_at/ && method.to_s.length == 17
14
+ return _updated_at(method.to_s.slice(3..5))
15
+ end
16
+
17
+ super(method,*args,&block)
18
+ end
19
+
20
+ private
21
+
22
+ # Called from first currency metamethod to set the original currency.
23
+ #
24
+ # 30.eur # => Calls _from and sets @original to 'eur'
25
+ #
26
+ def _from(currency)
27
+ @original = currency
28
+ self
29
+ end
30
+
31
+ # Called from last currency metamethod to set the target currency.
32
+ #
33
+ # 30.eur.to_usd
34
+ # # => Calls _to and returns the final value, say 38.08
35
+ #
36
+ def _to(target)
37
+ raise unless @original # Must be called after a _from have set the @original currency
38
+
39
+ return 0.0 if self == 0 # Obviously
40
+
41
+ original = @original
42
+
43
+ amount = self
44
+
45
+ result = exchange(original, target, amount.abs)
46
+
47
+ result
48
+ end
49
+
50
+ # Called from first currency metamethod to set the original currency.
51
+ #
52
+ # 30.eur # => Calls _from and sets @original to 'eur'
53
+ #
54
+ def _updated_at(target)
55
+ result = rate(@original, target)
56
+
57
+ result[:updated_at]
58
+ end
59
+
60
+ # Main method (called by _to) which calls Xurrency strategies
61
+ # and returns a nice result.
62
+ #
63
+ def exchange(original, target, amount = 1)
64
+ if amount > 999_999_999 # Xurrency API does not support numbers bigger than this
65
+ amount = 1
66
+ multiplier = self.abs # Save a multiplier to apply it to the result later
67
+ end
68
+
69
+ negative = (self < 0)
70
+
71
+ result = rate(original, target)
72
+
73
+ result = sprintf("%.4f", result[:rate].to_f*amount*(multiplier || 1)).to_f
74
+
75
+ return -(result) if negative
76
+ result
77
+ end
78
+
79
+ # Calls Xurrency API to perform the exchange without a specific date (assuming today)
80
+ #
81
+ def rate(original, target)
82
+ if SimpleXurrency.cache_enabled?
83
+ cached_result = SimpleXurrency.cache_get("#{original}_#{target}")
84
+
85
+ if !cached_result.nil?
86
+ return cached_result
87
+ end
88
+ end
89
+
90
+ api_url = "http://xurrency.com/api/#{[original, target].join('/')}/1"
91
+
92
+ api_url << "?key=#{SimpleXurrency.key}" if !SimpleXurrency.key.nil?
93
+
94
+ uri = URI.parse(api_url)
95
+
96
+ retries = 10
97
+ json_response = nil
98
+ begin
99
+ Timeout::timeout(1){
100
+ json_response = uri.open.read || nil # Returns the raw response
101
+ }
102
+ rescue Timeout::Error
103
+ retries -= 1
104
+ retries > 0 ? sleep(0.42) && retry : raise
105
+ end
106
+
107
+ return nil unless json_response && parsed_response = Crack::JSON.parse(json_response)
108
+ if parsed_response['status'] == 'fail'
109
+ raise parsed_response['message']
110
+ end
111
+
112
+ value = Hash.new
113
+
114
+ value[:rate] = parsed_response['result']['value'].to_f
115
+ value[:updated_at] = parsed_response['result']['updated_at'].to_s
116
+
117
+ SimpleXurrency.cache_add("#{original}_#{target}", value) if SimpleXurrency.cache_enabled?
118
+
119
+ value
120
+ end
121
+ end
@@ -0,0 +1,75 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{simple_xurrency}
8
+ s.version = "1.1.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Oriol Gual", "Josep M. Bach", "Josep Jaume Rey", "Alfonso Jimenez"]
12
+ s.date = %q{2010-10-16}
13
+ s.description = %q{A really easy interface to the Xurrency API. It's Ruby 1.8, 1.9 and JRuby compatible}
14
+ s.email = %q{yo@alfonsojimenez.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".autotest",
21
+ ".bundle/config",
22
+ ".gitignore",
23
+ ".rspec",
24
+ ".rvmrc",
25
+ "Gemfile",
26
+ "Gemfile.lock",
27
+ "LICENSE",
28
+ "README.rdoc",
29
+ "Rakefile",
30
+ "VERSION",
31
+ "autotest/discover.rb",
32
+ "lib/core_ext/numeric.rb",
33
+ "lib/simple_xurrency.rb",
34
+ "lib/simple_xurrency/currency_convertible.rb",
35
+ "simple_xurrency.gemspec",
36
+ "spec/simple_xurrency_spec.rb",
37
+ "spec/spec_helper.rb"
38
+ ]
39
+ s.homepage = %q{http://github.com/alfonsojimenez/simple_xurrency}
40
+ s.rdoc_options = ["--charset=UTF-8"]
41
+ s.require_paths = ["lib"]
42
+ s.rubygems_version = %q{1.3.7}
43
+ s.summary = %q{A really easy interface to the Xurrency API}
44
+ s.test_files = [
45
+ "spec/simple_xurrency_spec.rb",
46
+ "spec/test.rb",
47
+ "spec/spec_helper.rb"
48
+ ]
49
+
50
+ if s.respond_to? :specification_version then
51
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
+ s.specification_version = 3
53
+
54
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
+ s.add_runtime_dependency(%q<crack>, [">= 0.1.8"])
56
+ s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
57
+ s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
58
+ s.add_development_dependency(%q<fakeweb>, [">= 1.3.0"])
59
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
60
+ else
61
+ s.add_dependency(%q<crack>, [">= 0.1.8"])
62
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
63
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
64
+ s.add_dependency(%q<fakeweb>, [">= 1.3.0"])
65
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
66
+ end
67
+ else
68
+ s.add_dependency(%q<crack>, [">= 0.1.8"])
69
+ s.add_dependency(%q<jeweler>, [">= 1.4.0"])
70
+ s.add_dependency(%q<rspec>, [">= 2.0.0.beta.20"])
71
+ s.add_dependency(%q<fakeweb>, [">= 1.3.0"])
72
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
73
+ end
74
+ end
75
+
@@ -0,0 +1,69 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "SimpleXurrency" do
4
+ before(:all) do
5
+ SimpleXurrency.disable_cache
6
+ end
7
+
8
+ describe "in its basic behavior" do
9
+ it "enhances instances of Numeric with currency methods" do
10
+ expect { 30.eur && 30.usd && 30.gbp }.to_not raise_error
11
+ end
12
+
13
+ it "handles zero values (by returning them straight away)" do
14
+ 0.usd.to_eur.should == 0.0
15
+ end
16
+
17
+ end
18
+
19
+ context "using Xurrency API for right-now exchange" do
20
+ it "returns a converted amount from one currency to another" do
21
+ amount = 2
22
+ rate = 1.5422
23
+
24
+ mock_xurrency_api('eur', 'usd', amount, rate, Time.now.utc)
25
+ amount.eur.to_usd.should == amount*rate
26
+
27
+ amount = 2
28
+ rate = 3.4874
29
+
30
+ mock_xurrency_api('gbp', 'chf', amount, rate, Time.now.utc)
31
+ amount.gbp.to_chf.should == amount*rate
32
+
33
+ rate = 0.6322
34
+
35
+ (0..100).each do |x|
36
+ mock_xurrency_api('usd', 'gbp', x, rate, Time.now.utc)
37
+ x.usd.to_gbp.to_s.should == (x*rate).to_s
38
+ end
39
+ end
40
+
41
+ it "raises any error returned by the api call" do
42
+ mock_xurrency_api('usd', 'xxx', 1, 1.5, Time.now.utc, :fail_with => "Currencies are not valid")
43
+ mock_xurrency_api('usd', 'eur', 1_000_000_000, 1.5, Time.now.utc)
44
+ mock_xurrency_api('usd', 'usd', 1, 1.5, Time.now.utc, :fail_with => "Currency codes are the same")
45
+
46
+ expect {1.usd.to_xxx}.to raise_error("Currencies are not valid")
47
+ expect {1_000_000_000.usd.to_eur}.to_not raise_error
48
+ expect {1.usd.to_usd}.to raise_error("Currency codes are the same")
49
+ end
50
+
51
+ it "handles a negative value returning a negative as well" do
52
+ mock_xurrency_api('usd', 'eur', 1, 1.5, Time.now.utc)
53
+
54
+ -1.usd.to_eur.should == -1.5
55
+ end
56
+
57
+ it "handles big amounts" do
58
+ mock_xurrency_api('usd', 'eur', 1, 1.5, Time.now.utc)
59
+
60
+ 1_000_000_000.usd.to_eur.should == 1_500_000_000
61
+ end
62
+
63
+ it "returns the updated date" do
64
+ mock_xurrency_api('usd', 'eur', 1, 1.5, '2010-10-04 00:00:00')
65
+
66
+ 1.usd.to_eur_updated_at.should == '2010-10-04 00:00:00'
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,22 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'rubygems'
5
+ require 'fakeweb'
6
+
7
+ require 'simple_xurrency'
8
+ require 'rspec'
9
+
10
+ module HelperMethods
11
+ def mock_xurrency_api(from_currency, to_currency, amount, result, updated_at, options = {})
12
+ args = [from_currency, to_currency, "1"]
13
+
14
+ response = "{\"result\":{\"value\":#{result},\"target\":\"#{to_currency}\",\"base\":\"#{from_currency}\",\"updated_at\":\"#{updated_at}\"},\"status\":\"ok\"}"
15
+
16
+ response = "{\"message\":\"#{options[:fail_with]}\", \"status\":\"fail\"\}" if options[:fail_with]
17
+
18
+ FakeWeb.register_uri(:get, "http://xurrency.com/api/#{args.join('/')}", :body => response)
19
+ end
20
+ end
21
+
22
+ RSpec.configuration.include(HelperMethods)
data/spec/test.rb ADDED
@@ -0,0 +1,26 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'rubygems'
5
+ require 'simple_xurrency'
6
+
7
+ SimpleXurrency.key = 'e8f1e8e57a297593c7db984024210b5f'
8
+
9
+ SimpleXurrency.disable_cache
10
+
11
+ if SimpleXurrency.cache_enabled?
12
+ puts 'si'
13
+ else
14
+ puts 'no'
15
+ end
16
+ 10.times do
17
+ puts 1.usd.to_eur_updated_at
18
+ end
19
+
20
+ #(0..100).each do |x|
21
+ # puts x.usd.to_eur
22
+ #end
23
+
24
+ #(0..100).each do |x|
25
+ # puts x.eur.to_usd
26
+ #end
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: simple_xurrency
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 2
10
+ version: 1.1.2
11
+ platform: ruby
12
+ authors:
13
+ - Oriol Gual
14
+ - Josep M. Bach
15
+ - Josep Jaume Rey
16
+ - Alfonso Jimenez
17
+ autorequire:
18
+ bindir: bin
19
+ cert_chain: []
20
+
21
+ date: 2010-10-16 00:00:00 +02:00
22
+ default_executable:
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
25
+ name: crack
26
+ prerelease: false
27
+ requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 11
33
+ segments:
34
+ - 0
35
+ - 1
36
+ - 8
37
+ version: 0.1.8
38
+ type: :runtime
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
41
+ name: jeweler
42
+ prerelease: false
43
+ requirement: &id002 !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ hash: 7
49
+ segments:
50
+ - 1
51
+ - 4
52
+ - 0
53
+ version: 1.4.0
54
+ type: :development
55
+ version_requirements: *id002
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ prerelease: false
59
+ requirement: &id003 !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 62196427
65
+ segments:
66
+ - 2
67
+ - 0
68
+ - 0
69
+ - beta
70
+ - 20
71
+ version: 2.0.0.beta.20
72
+ type: :development
73
+ version_requirements: *id003
74
+ - !ruby/object:Gem::Dependency
75
+ name: fakeweb
76
+ prerelease: false
77
+ requirement: &id004 !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 27
83
+ segments:
84
+ - 1
85
+ - 3
86
+ - 0
87
+ version: 1.3.0
88
+ type: :development
89
+ version_requirements: *id004
90
+ - !ruby/object:Gem::Dependency
91
+ name: bundler
92
+ prerelease: false
93
+ requirement: &id005 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 23
99
+ segments:
100
+ - 1
101
+ - 0
102
+ - 0
103
+ version: 1.0.0
104
+ type: :development
105
+ version_requirements: *id005
106
+ description: A really easy interface to the Xurrency API. It's Ruby 1.8, 1.9 and JRuby compatible
107
+ email: yo@alfonsojimenez.com
108
+ executables: []
109
+
110
+ extensions: []
111
+
112
+ extra_rdoc_files:
113
+ - LICENSE
114
+ - README.rdoc
115
+ files:
116
+ - .autotest
117
+ - .bundle/config
118
+ - .gitignore
119
+ - .rspec
120
+ - .rvmrc
121
+ - Gemfile
122
+ - Gemfile.lock
123
+ - LICENSE
124
+ - README.rdoc
125
+ - Rakefile
126
+ - VERSION
127
+ - autotest/discover.rb
128
+ - lib/core_ext/numeric.rb
129
+ - lib/simple_xurrency.rb
130
+ - lib/simple_xurrency/currency_convertible.rb
131
+ - simple_xurrency.gemspec
132
+ - spec/simple_xurrency_spec.rb
133
+ - spec/spec_helper.rb
134
+ - spec/test.rb
135
+ has_rdoc: true
136
+ homepage: http://github.com/alfonsojimenez/simple_xurrency
137
+ licenses: []
138
+
139
+ post_install_message:
140
+ rdoc_options:
141
+ - --charset=UTF-8
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ hash: 3
150
+ segments:
151
+ - 0
152
+ version: "0"
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ hash: 3
159
+ segments:
160
+ - 0
161
+ version: "0"
162
+ requirements: []
163
+
164
+ rubyforge_project:
165
+ rubygems_version: 1.3.7
166
+ signing_key:
167
+ specification_version: 3
168
+ summary: A really easy interface to the Xurrency API
169
+ test_files:
170
+ - spec/simple_xurrency_spec.rb
171
+ - spec/test.rb
172
+ - spec/spec_helper.rb