munificent 2.0.1 → 2.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 713a0dc64c44c4bee25e0b047556e7f4eb7a4ee57b93c818d7f3022031116fc6
4
- data.tar.gz: 5903bf9e9e572d8208ef3656f21ae087c51fb355f29cd6b7147eaaaf5a261b4e
3
+ metadata.gz: 342de290198e0a3620175b8be52d56cda5e0ec637c024cba658bd84c012d0e0c
4
+ data.tar.gz: f74501c8561c19484fa93b9aad33912fd7e95c339db05eebe3b1caff35b49049
5
5
  SHA512:
6
- metadata.gz: a1b20e42b100b52f8572f58497af8832e6bfac7a04547e9e229bb00e2515a7b0417fe49316b54ad1766e26c76ad9ef1b700d69c55f4b3aaec4bed5feb84dda5e
7
- data.tar.gz: a41c4721b4a0c58ee4b04c187b88ac16847cbc45b66949d7699aefbc40db52a84ff57b86a5a2f8a67dcfd54f0e71d30c91af583c93fd7f6b3d0346925e8c8f92
6
+ metadata.gz: 2eb467e3f62cd5e8629ea7bc1587188faba0b409b2ad3f69bfe9a82eb2c60bbac454689356e88c86b14e0d11e2aba4e750bfaf8cb35971905afc850740a69a24
7
+ data.tar.gz: 9ea04f0a2cf48fb93bc4d7c20d3ed17f4d7e35176a22af5f6b127ba93c6425b92b42bc771033d75e05a5b70cf1a90af4923c9091ec61b8aa349f5908844f164f
@@ -1,11 +1,7 @@
1
- require "aasm"
2
-
3
1
  module Munificent
4
2
  class ApplicationRecord < ActiveRecord::Base
5
3
  self.abstract_class = true
6
4
 
7
- include AASM
8
-
9
5
  scope :where_money, -> (monies) {
10
6
  conditions = monies.each_with_object({}) { |(field_prefix, money), hash|
11
7
  hash["#{field_prefix}_decimals"] = money.cents
@@ -15,6 +15,8 @@ module Munificent
15
15
  end
16
16
  end
17
17
 
18
+ require "aasm"
19
+ include AASM
18
20
  aasm column: :state do
19
21
  state :draft, initial: true
20
22
  state :live
@@ -20,6 +20,8 @@ module Munificent
20
20
 
21
21
  validates :amount, presence: true, "munificent/donation_amount": true
22
22
 
23
+ require "aasm"
24
+ include AASM
23
25
  aasm column: :state do
24
26
  state :pending, initial: true
25
27
  state :cancelled
@@ -11,6 +11,8 @@ module Munificent
11
11
  PRO_SE = "pro_se".freeze,
12
12
  ].freeze
13
13
 
14
+ require "aasm"
15
+ include AASM
14
16
  aasm column: :state do
15
17
  state :inactive, initial: true
16
18
  state :active
@@ -1,3 +1,3 @@
1
1
  module Munificent
2
- VERSION = "2.0.1".freeze
2
+ VERSION = "2.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: munificent
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Crosby-McCullough
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aasm
@@ -487,7 +487,7 @@ licenses:
487
487
  metadata:
488
488
  homepage_uri: https://github.com/SmartCasual/munificent
489
489
  source_code_uri: https://github.com/SmartCasual/munificent
490
- changelog_uri: https://github.com/SmartCasual/munificent/blob/2.0.1/CHANGELOG.md
490
+ changelog_uri: https://github.com/SmartCasual/munificent/blob/2.0.2/CHANGELOG.md
491
491
  rubygems_mfa_required: 'true'
492
492
  post_install_message:
493
493
  rdoc_options: []