event_sourced_accounting 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: e28546ed4b08b5d9b469930f571e4569117beb0d
4
- data.tar.gz: eb9c05d4dae1d65d80b7bcc5fae05f7562219232
3
+ metadata.gz: 90b7c29e9bf0e521aa32cdbeffad3aae4e3d9087
4
+ data.tar.gz: 8c527303a6d14bfde792881745ca58db57d3c237
5
5
  SHA512:
6
- metadata.gz: ae325b397c7c0c356b5d98da5880de818a348a7565c485b4f671a1d7560bf8538b0c712eab2e0b70e27773d782965c8e559c3ab14ae9814aec721cdf1263717e
7
- data.tar.gz: debb565a7e5e6d23c81904cbf5d789ff2a874e87f0a206920262fbab7b60bce600989824cbfc194396d6f69f44400b4628f6127042fa9a98b3bf2aff1c90c5e4
6
+ metadata.gz: e5a2550c5b782488edd4332acae07da7d206bee352c5d25aefc9175deed45295fd03fb065bdebc77d4f3a0124a03dd81250d3b7b799b40ae34bf8acc7cc868b7
7
+ data.tar.gz: a8f097694820cf6b0b9f9f228894df5fd393545fc18b8cabcc42a58b75fa7f968913f43f2642e200ca84ae31e1266685769e2a00bbf9c6f550640b151822710d
data/README.markdown CHANGED
@@ -1,5 +1,4 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/event_sourced_accounting.svg)](http://badge.fury.io/rb/event_sourced_accounting)
2
- [![Dependency Status](https://gemnasium.com/lnagel/event-sourced-accounting.svg)](https://gemnasium.com/lnagel/event-sourced-accounting)
3
2
  [![Build Status](https://api.travis-ci.org/lnagel/event-sourced-accounting.svg)](https://travis-ci.org/lnagel/event-sourced-accounting)
4
3
  [![Code Climate](https://img.shields.io/codeclimate/github/lnagel/event-sourced-accounting.svg)](https://codeclimate.com/github/lnagel/event-sourced-accounting)
5
4
  [![Code Climate](https://img.shields.io/codeclimate/coverage/github/lnagel/event-sourced-accounting.svg)](https://codeclimate.com/github/lnagel/event-sourced-accounting)
@@ -71,6 +71,8 @@ module ESA
71
71
  def check_freshness(depth=0)
72
72
  if self.is_update_needed?
73
73
  self.update!
74
+ else
75
+ self.update_freshness_timestamp!
74
76
  end
75
77
 
76
78
  if depth > 0 and self.last_transaction_time.present?
@@ -107,6 +109,11 @@ module ESA
107
109
  self.save if self.can_be_persisted?
108
110
  end
109
111
 
112
+ def update_freshness_timestamp!
113
+ self.freshness = Time.zone.now
114
+ self.save if self.can_be_persisted?
115
+ end
116
+
110
117
  def subcontext_namespaces
111
118
  self.subcontexts.pluck(:namespace).compact.uniq
112
119
  end
data/lib/esa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ESA
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_sourced_accounting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lenno Nagel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails