initial-test-data 0.6.0.beta → 0.6.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: e1bf27ea213a7bc0c569b4aafee43d63322da79c
4
- data.tar.gz: 58c059b207f0b088f3eeebe7988f75604d17a5e3
3
+ metadata.gz: 17e4ed2b4b7f72aa9b55839d7771a582dfb9dbc8
4
+ data.tar.gz: 914fd4f5d95b6415a48bd4204531fc7b114449f6
5
5
  SHA512:
6
- metadata.gz: 0746355dd9578d1e0397fb8fde9cf464b0ba88ceda4c983f58adedde632756891838b806cf3e80135ad0accf7cf3733ad0062ea1dda9befb0d50116d6f1edcd2
7
- data.tar.gz: 76478cb5e62ab7664bcbbf8f048f72b62d594bf3b95103036609abe82d9391e25d8361aa263671ce22be35055d948e19c013c1b426ba23890418a1aaf1d6bcb6
6
+ metadata.gz: df868f6ca90b921fcd5796ed02e8e151f9a7b8d15c713e7f873d62c8f41976b68073c91b024480fb12f01b9ffa410768a49e50ae8e379fa214668b720c13ee37
7
+ data.tar.gz: c2543a2efe311b5e727bbb8eafcd9b909789db9f2cac854d5523e7662e4ac8268b694d61effa3d334fa96694b830af2b3a7f47a6142080461529a21da56d569b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG - initial-test-data
2
2
 
3
+ ## 0.6.0 (February 28, 2016)
4
+
5
+ * Allow the Factory Girl to generate sequences correctly.
6
+
3
7
  ## 0.5.0 (February 14, 2016)
4
8
 
5
9
  * Change method name from `load` to `import`.
@@ -1,12 +1,13 @@
1
1
  require 'active_support'
2
2
 
3
3
  module FactoryGirl
4
- class Sequence
5
- def initialize_with_patch(name, *args, &proc)
4
+ module SequenceWithCachedEnumerator
5
+ def initialize(name, *args, &proc)
6
6
  options = args.extract_options!
7
7
  enumerator = args.first || InitialTestData::SequenceEnumerator.new(name)
8
- initialize_without_patch(name, enumerator, options, &proc)
8
+ super(name, enumerator, options, &proc)
9
9
  end
10
- alias_method_chain :initialize, :patch
11
10
  end
11
+
12
+ Sequence.send(:prepend, SequenceWithCachedEnumerator)
12
13
  end
@@ -42,6 +42,11 @@ module InitialTestData
42
42
  end
43
43
  end
44
44
 
45
+ def clear
46
+ @enumerators.clear
47
+ @cached_values = nil
48
+ end
49
+
45
50
  def save
46
51
  hash = {}
47
52
  enumerators.each do |name, enums|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: initial-test-data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.beta
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsutomu KURODA
@@ -142,9 +142,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  version: '2.0'
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ">"
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 1.3.1
147
+ version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
150
  rubygems_version: 2.5.1