brdinheiro 2.1.8 → 2.1.9
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/Rakefile +3 -10
- data/lib/brdinheiro/dinheiro_util.rb +14 -8
- data/lib/brdinheiro/version.rb +1 -1
- data/test/br_dinheiro_test.rb +1 -0
- data/test/test_helper.rb +3 -5
- metadata +6 -6
data/Rakefile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require 'rubygems'
|
2
3
|
require 'rake'
|
3
4
|
require 'rake/testtask'
|
@@ -86,15 +87,7 @@ end
|
|
86
87
|
# end
|
87
88
|
#
|
88
89
|
|
89
|
-
desc "Publish the release
|
90
|
+
desc "Publish the new release"
|
90
91
|
task :release => [ :package ] do
|
91
|
-
|
92
|
-
require 'rake/contrib/rubyforgepublisher'
|
93
|
-
|
94
|
-
packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
|
95
|
-
|
96
|
-
rubyforge = RubyForge.new
|
97
|
-
rubyforge.configure
|
98
|
-
rubyforge.login
|
99
|
-
rubyforge.add_release("brazilian-rails", PKG_NAME, "REL #{PKG_VERSION}", *packages)
|
92
|
+
system("cd pkg/ && gem push #{PKG_NAME}-#{PKG_VERSION}.gem")
|
100
93
|
end
|
@@ -1,4 +1,16 @@
|
|
1
1
|
module DinheiroUtil
|
2
|
+
|
3
|
+
# Ao incluir o modulo, cria aliases para_dinheiro
|
4
|
+
def self.included(base)
|
5
|
+
base.class_eval do
|
6
|
+
# Alias para para_dinheiro
|
7
|
+
alias_method :real, :para_dinheiro
|
8
|
+
|
9
|
+
# Alias para para_dinheiro
|
10
|
+
alias_method :reais, :para_dinheiro
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
2
14
|
# Transforma numero em dinheiro
|
3
15
|
#
|
4
16
|
# Exemplo:
|
@@ -6,13 +18,7 @@ module DinheiroUtil
|
|
6
18
|
def para_dinheiro
|
7
19
|
Dinheiro.new(self)
|
8
20
|
end
|
9
|
-
|
10
|
-
# Alias para para_dinheiro
|
11
|
-
alias_method :reais, :para_dinheiro
|
12
|
-
|
13
|
-
# Alias para para_dinheiro
|
14
|
-
alias_method :real, :para_dinheiro
|
15
|
-
|
21
|
+
|
16
22
|
# Retorna string formatada com simbolo monetario
|
17
23
|
#
|
18
24
|
# Exemplo:
|
@@ -42,4 +48,4 @@ module DinheiroUtil
|
|
42
48
|
end
|
43
49
|
|
44
50
|
Numeric.send(:include, DinheiroUtil)
|
45
|
-
String.send(:include, DinheiroUtil)
|
51
|
+
String.send(:include, DinheiroUtil)
|
data/lib/brdinheiro/version.rb
CHANGED
data/test/br_dinheiro_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -17,9 +17,7 @@ end
|
|
17
17
|
|
18
18
|
class Test::Unit::TestCase
|
19
19
|
def assert_false(boolean, message=nil)
|
20
|
-
|
21
|
-
|
22
|
-
assert_block(build_message(message, "<?> is not false.", boolean)) { !boolean }
|
23
|
-
end
|
20
|
+
assert_block("assert should not be called with a block.") { !block_given? }
|
21
|
+
assert_block(build_message(message, "<?> is not false.", boolean)) { !boolean }
|
24
22
|
end
|
25
|
-
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brdinheiro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Marcos Tapaj\xC3\xB3s"
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-04
|
15
|
+
date: 2009-12-04 00:00:00 -02:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -58,7 +58,6 @@ files:
|
|
58
58
|
- README
|
59
59
|
- CHANGELOG
|
60
60
|
- MIT-LICENSE
|
61
|
-
- lib/brdinheiro
|
62
61
|
- lib/brdinheiro/dinheiro.rb
|
63
62
|
- lib/brdinheiro/dinheiro_active_record.rb
|
64
63
|
- lib/brdinheiro/dinheiro_util.rb
|
@@ -66,7 +65,6 @@ files:
|
|
66
65
|
- lib/brdinheiro/nil_class.rb
|
67
66
|
- lib/brdinheiro/version.rb
|
68
67
|
- lib/brdinheiro.rb
|
69
|
-
- test/active_record
|
70
68
|
- test/active_record/base_without_table.rb
|
71
69
|
- test/br_dinheiro_test.rb
|
72
70
|
- test/dinheiro_active_record_test.rb
|
@@ -75,6 +73,8 @@ files:
|
|
75
73
|
- test/test_helper.rb
|
76
74
|
has_rdoc: true
|
77
75
|
homepage: http://www.improveit.com.br/software_livre/brazilian_rails
|
76
|
+
licenses: []
|
77
|
+
|
78
78
|
post_install_message:
|
79
79
|
rdoc_options: []
|
80
80
|
|
@@ -95,9 +95,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
requirements:
|
96
96
|
- brnumeros
|
97
97
|
rubyforge_project: brdinheiro
|
98
|
-
rubygems_version: 1.3.
|
98
|
+
rubygems_version: 1.3.5
|
99
99
|
signing_key:
|
100
|
-
specification_version:
|
100
|
+
specification_version: 3
|
101
101
|
summary: "brdinheiro \xC3\xA9 uma das gems que compoem o Brazilian Rails"
|
102
102
|
test_files: []
|
103
103
|
|