mongoid-publishing_logic 0.2.2 → 0.3.0

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: cf73ed3fc8c091e7da5fb3df85a9ce194f094598
4
- data.tar.gz: 307523c0d200172351f6c7c3fcc75ba409e09287
3
+ metadata.gz: 731f5503f87a48edf3d45fdede892ac010cd75b2
4
+ data.tar.gz: 58f5b7d92c6936a614614eac482c8d7ccb368b54
5
5
  SHA512:
6
- metadata.gz: 6adbb3838e89d3c665b6ee0dd1009780d16582056b4b208fc00ddabd7f125d24a0d3e94b0a40e015662cb017765c7efcece68203367bb6c44a788ccf47e7fd02
7
- data.tar.gz: af0d9f4eb49b310f1a1079955d3db13040c550a9bd362e5907aefa53cbc6f9601ddc551fe2694b57fa63838a85c4733a5087a0a4b70bc8de491de3e6f7031807
6
+ metadata.gz: 535f4b817c9cc4103c226bf95844cb8fd936e43ab44e5f404ab554be885bb4c89d1e50493ee0d07d6c7f33ae1682ac7f82028c8db2545595b2d0119a63df7a09
7
+ data.tar.gz: 37f6021c9512b020e7d3291d017cbba73a8c3f674eee99122da75aaf2ba99fec449fead5f4a2dc6ba0e6a4387e65005e98ba3c844b39e83e23d0b52abeb60491
@@ -56,11 +56,11 @@ module Mongoid
56
56
  }
57
57
  end
58
58
 
59
- def published?(locale=I18n.locale)
59
+ def published?(locale: I18n.locale, ignore_active_status: false)
60
60
  locale_was = I18n.locale
61
61
  begin
62
62
  I18n.locale = locale
63
- super()
63
+ super(ignore_active_status: ignore_active_status)
64
64
  ensure
65
65
  I18n.locale = locale_was
66
66
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module PublishingLogic
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -55,7 +55,7 @@ module Mongoid
55
55
  }
56
56
  end
57
57
 
58
- def published?(ignore_active_status = false)
58
+ def published?(ignore_active_status: false)
59
59
  if ignore_active_status || PublishingLogic.active?
60
60
  published_flag && (
61
61
  (publishing_date.nil? || publishing_date <= Date.today) &&
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-publishing_logic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Reinert