fixtury 0.3.1 → 0.3.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: 28d8d17251e3c566a77365c589274b5f28f6cfac17c3b126a0047e6b696368ec
4
- data.tar.gz: 8dab12b727161634b90ed49e56a025bfe72aade50c90509ee08ebfd4faac2d17
3
+ metadata.gz: 11c65dc0db10367bf67f7d421ccc76e7b647a5bf73357431bc85dbd788667b00
4
+ data.tar.gz: 7042ed9b891e4fd0e2bdcade6cc0145160e5fb1dd6394d2bcd8de612ecceb1f8
5
5
  SHA512:
6
- metadata.gz: fb5841b70b7ae8cac95e6f8cc6a1c32c47d71f356c3be0275dc463f1d6c1b5f88447e51807d48632bdb68b425e7bc9ead3293519085cc9416d45a027cf1c7abc
7
- data.tar.gz: 662570f9d0adcea15b6198eed3deb5fb4aab0639d206941687ea9a230f121ab7d1c82da895ac7c39e6459262ad3c3562cbfcfcb6d3ba7839a90a6380549776ba
6
+ metadata.gz: ed2b328ac82a6506a9c0d4fb26e049ee249cae994dd4406d2896c0b4be8e270dc54fef1a5f94a887077abc5a9a964a6412bea23bccce7ead21c600c70c2f4374
7
+ data.tar.gz: 18888bd37fdd508552353f5aa4d076f5bedd4ccf4420d7fc914450dcbaf5ea0c1cb29b428af3c94c3c617fd64359831f43594f65e3e9d300166329e0155e3b11
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fixtury (0.3.0)
4
+ fixtury (0.3.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,6 +11,9 @@ module Fixtury
11
11
  included do
12
12
  class_attribute :fixtury_dependencies
13
13
  self.fixtury_dependencies = Set.new
14
+
15
+ class_attribute :local_fixtury_dependencies
16
+ self.local_fixtury_dependencies = Set.new
14
17
  end
15
18
 
16
19
  module ClassMethods
@@ -32,7 +35,7 @@ module Fixtury
32
35
 
33
36
  names.each do |fixture_name|
34
37
  ns.fixture(fixture_name, &definition)
35
- self.fixtury_dependencies += ["/#{namespace}/#{fixture_name}"]
38
+ self.local_fixtury_dependencies += ["/#{namespace}/#{fixture_name}"]
36
39
  end
37
40
 
38
41
  # otherwise, just record the dependency
@@ -76,7 +79,7 @@ module Fixtury
76
79
  name = name.to_s
77
80
 
78
81
  local_alias = "/#{self.class.fixtury_namespace}/#{name}"
79
- if self.fixtury_dependencies.include?(local_alias)
82
+ if self.local_fixtury_dependencies.include?(local_alias)
80
83
  return fixtury_store.get(local_alias, execution_context: self)
81
84
  end
82
85
 
@@ -103,7 +106,7 @@ module Fixtury
103
106
 
104
107
  # piggybacking activerecord fixture setup for now.
105
108
  def setup_fixtures(*args)
106
- if fixtury_dependencies.any?
109
+ if fixtury_dependencies.any? || local_fixtury_dependencies.any?
107
110
  setup_fixtury_fixtures
108
111
  else
109
112
  super
@@ -112,7 +115,7 @@ module Fixtury
112
115
 
113
116
  # piggybacking activerecord fixture setup for now.
114
117
  def teardown_fixtures(*args)
115
- if fixtury_dependencies.any?
118
+ if fixtury_dependencies.any? || local_fixtury_dependencies.any?
116
119
  teardown_fixtury_fixtures
117
120
  else
118
121
  super
@@ -143,7 +146,7 @@ module Fixtury
143
146
  end
144
147
 
145
148
  def load_all_fixtury_fixtures!
146
- fixtury_dependencies.each do |name|
149
+ (fixtury_dependencies | local_fixtury_dependencies).each do |name|
147
150
  fixtury(name) unless fixtury_loaded?(name)
148
151
  end
149
152
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fixtury
4
4
 
5
- VERSION = "0.3.1"
5
+ VERSION = "0.3.2"
6
6
 
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixtury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Nelson