mongoid_money 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/{README.rdoc → README.markdown} +38 -4
  2. metadata +4 -4
@@ -1,8 +1,42 @@
1
- = mongoid_money
1
+ # mongoid_money
2
2
 
3
- Description goes here.
3
+ ## Description
4
4
 
5
- == Contributing to mongoid_money
5
+ A simple gem that creates a Money datatype for Mongoid.
6
+
7
+ ## Installation
8
+
9
+ Include the gem in your Gemfile
10
+
11
+ gem 'mongoid_money'
12
+
13
+ ## Usage
14
+
15
+ Now you can do things in your Mongoid documents like
16
+
17
+ field :price, :type => Money, :default => 9.99.dollars
18
+
19
+ or
20
+
21
+ field :price, :type => Money, :default => 10.dollars
22
+
23
+ or
24
+
25
+ field :price, :type => Money, :default => 99.cents
26
+
27
+ All Money values are converted and stored in mongo as cents.
28
+
29
+ You can also query against your Money fields. Just do the following:
30
+
31
+ Item.where(:price => 5.dollars)
32
+
33
+ or
34
+
35
+ Item.where(:price.gt => 10.dollars)
36
+
37
+
38
+
39
+ ## Contributing to mongoid_money
6
40
 
7
41
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
42
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
@@ -12,7 +46,7 @@ Description goes here.
12
46
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
47
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
48
 
15
- == Copyright
49
+ ## Copyright
16
50
 
17
51
  Copyright (c) 2011 Jeff Bozek. See LICENSE.txt for
18
52
  further details.
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mongoid_money
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Bozek
@@ -142,13 +142,13 @@ extensions: []
142
142
 
143
143
  extra_rdoc_files:
144
144
  - LICENSE.txt
145
- - README.rdoc
145
+ - README.markdown
146
146
  files:
147
147
  - lib/mongoid_money.rb
148
148
  - lib/mongoid_money/conversions.rb
149
149
  - lib/mongoid_money/money.rb
150
150
  - LICENSE.txt
151
- - README.rdoc
151
+ - README.markdown
152
152
  - spec/conversion_spec.rb
153
153
  - spec/money_spec.rb
154
154
  - spec/spec_helper.rb
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
- hash: -1985478583530141391
170
+ hash: 3569987943039113472
171
171
  segments:
172
172
  - 0
173
173
  version: "0"