fantastic_currency 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,4 +1,4 @@
1
+ Manifest
1
2
  README.textile
2
3
  Rakefile
3
4
  lib/fantastic_currency.rb
4
- Manifest
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('fantastic_currency', '0.1.0') do |p|
5
+ Echoe.new('fantastic_currency', '0.1.1') do |p|
6
6
  p.description = "Manage currencies with Active Record"
7
7
  p.url = "http://github.com/iamcalledrob/FantasticCurrency"
8
8
  p.author = "Rob Mason"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fantastic_currency}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob Mason"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Manage currencies with Active Record}
11
11
  s.email = %q{info+gems@slightlyfantastic.com}
12
12
  s.extra_rdoc_files = ["README.textile", "lib/fantastic_currency.rb"]
13
- s.files = ["README.textile", "Rakefile", "lib/fantastic_currency.rb", "Manifest", "fantastic_currency.gemspec"]
13
+ s.files = ["Manifest", "README.textile", "Rakefile", "lib/fantastic_currency.rb", "fantastic_currency.gemspec"]
14
14
  s.homepage = %q{http://github.com/iamcalledrob/FantasticCurrency}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fantastic_currency", "--main", "README.textile"]
16
16
  s.require_paths = ["lib"]
@@ -19,6 +19,7 @@ module FantasticCurrency
19
19
  :after_unit => " ",
20
20
  :convert_to => nil,
21
21
  :precise_input => false,
22
+ :full_symbols => true
22
23
  }.merge(options)
23
24
 
24
25
  if options[:precise_input] == true
@@ -56,7 +57,8 @@ module FantasticCurrency
56
57
  :separator => options[:separator])
57
58
 
58
59
  if options[:display_unit] == true
59
- options[:before_unit] + active_currency[:symbol] + options[:after_unit] + value_as_string
60
+ unit_to_display = options[:full_symbols] ? active_currency[:symbol] : active_currency[:symbol_short] || active_currency[:symbol]
61
+ options[:before_unit] + unit_to_display + options[:after_unit] + value_as_string
60
62
  else
61
63
  value_as_string
62
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fantastic_currency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Mason
@@ -23,10 +23,10 @@ extra_rdoc_files:
23
23
  - README.textile
24
24
  - lib/fantastic_currency.rb
25
25
  files:
26
+ - Manifest
26
27
  - README.textile
27
28
  - Rakefile
28
29
  - lib/fantastic_currency.rb
29
- - Manifest
30
30
  - fantastic_currency.gemspec
31
31
  has_rdoc: true
32
32
  homepage: http://github.com/iamcalledrob/FantasticCurrency