initial-test-data 0.2.0 → 0.2.1

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: e71815d11df0137cc431aa647a0206f349d8b139
4
- data.tar.gz: c5ed391b3f9397eb2e3a4ece4080e5313da7323c
3
+ metadata.gz: c6721d973f28cf59c8bf8bc3018f514be62745a2
4
+ data.tar.gz: 90d123ca554811506d4e7c50abbe99c7d7e3e194
5
5
  SHA512:
6
- metadata.gz: d74ef5c2c47b518f555bc7e49873053a075de03dc0d2714661f5706f058b7c2f4e3e8673455e158c8e4579e2c6c62e79263df34c232250f2ab9ee3aa1d83557a
7
- data.tar.gz: 5bd974fabef2f8bdf51cb24fe6f2ec3cd6bcd08dd575eebbef4c1359ef97d31961ae058fb58532fae845fb225f832a6552bd3679165038ac1e97f7f109e09f32
6
+ metadata.gz: ad2e4f4a141f0211bb45e90ff2e0c065d95a0a702e421a483931f79e425f5aa0a861f2145de0e14dd8db383cd982fe09b9a114eec9bdb8e928bac62cff2f4e6f
7
+ data.tar.gz: 42c25ea8331b0a6b78c0331a4dba569412026ed9af2e18b1af8e291689224a5e28ee1a556c7430d15ea79d029001ef67e5aaf8b0036378cdd5c3e5cfb2a558ad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG - initial-test-data
2
2
 
3
+ ## 0.2.1 (January 31, 2016)
4
+
5
+ * Fix bug that the `_initial_data_digest` table gets truncated.
6
+
3
7
  ## 0.2.0 (January 31, 2016)
4
8
 
5
9
  * The class method `InitialTestData.load` treats the last hash argument
@@ -6,7 +6,7 @@ class InitialTestData
6
6
 
7
7
  class << self
8
8
  def load(*args)
9
- @database_cleaner_strategy_options = args.extract_options!
9
+ @options = args.extract_options!
10
10
  @dir = args[0] || 'test'
11
11
 
12
12
  klass = define_class
@@ -49,7 +49,15 @@ class InitialTestData
49
49
  end
50
50
 
51
51
  def initialize_data
52
- DatabaseCleaner.strategy = :truncation, @database_cleaner_strategy_options
52
+ strategy_options = @options.slice(:only, :except)
53
+ unless strategy_options.has_key?(:only)
54
+ strategy_options[:except] ||= []
55
+ unless strategy_options[:except].include?(DIGEST_TABLE_NAME)
56
+ strategy_options[:except] << DIGEST_TABLE_NAME
57
+ end
58
+ end
59
+
60
+ DatabaseCleaner.strategy = :truncation, strategy_options
53
61
  DatabaseCleaner.clean
54
62
 
55
63
  yaml_path = Rails.root.join(@dir, 'initial_data', '_index.yml')
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsutomu KURODA