fixture_group 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: 0bae4c5d91f627ff5c18ac6023ea2154516ec483
4
- data.tar.gz: 940a5f32ca62f092a6311f528eb14bfeba011026
3
+ metadata.gz: aedffba52507378c718571d04278968995072fc6
4
+ data.tar.gz: 119527c5c06641d4d92b396527938d9cdad9b8db
5
5
  SHA512:
6
- metadata.gz: aa989ccc0aeb447b49bc21accb153aac48f128c86736275ba0686846397fb09674516cab769b33c5268ec9991ce907ec93e82674b9629230cd66546f03bd2b22
7
- data.tar.gz: 5852e9950e371fc700bfd1195c51d1fa2d242bffdf0179b841ceb8cbc4df0bb7dcbeff9fcb92d935fbc56bf3c05f59f2a271eb8cdacaf2353c68a2d86178ed5a
6
+ metadata.gz: d83dd5987d8b29d28648e53cbe5ca08bbfd8ca9d27a655dbc947721e5571e76e0d42436af57e85c27b9bdcb9d77c81f6d0ccde6171827c25233f327e522a12eb
7
+ data.tar.gz: a8fd8deb618195cf853f6ccdb9514fd4a05170c2b4bc0cc320b67352135dce80b70fbb7dfece55eba2808a69210ce4413324ae117fa4380eaa4ca0e129618336
@@ -1,3 +1,8 @@
1
+ ## 0.1.2
2
+
3
+ * Performance improvement
4
+ * Refactoring
5
+
1
6
  ## 0.1.1
2
7
 
3
8
  * Fixed #2 Fixture accessor doesn't work
@@ -1,23 +1,15 @@
1
1
  module FixtureGroup
2
2
  module FixtureSetPatch
3
- extend ActiveSupport::Concern
3
+ def fixture_is_cached?(connection, table_name)
4
+ fixture_dirnames = FixtureGroup.fixture_group_dirnames
4
5
 
5
- included do
6
- class << self
7
- alias_method_chain :fixture_is_cached?, :ignoring_fixture_group
8
- end
9
- end
10
-
11
- class_methods do
12
- def fixture_is_cached_with_ignoring_fixture_group?(connection, table_name)
13
- fixture_dirnames = FixtureGroup.fixture_group_dirnames
14
-
15
- unless fixture_dirnames.find { |dir| table_name.to_s =~ /^#{dir}/ }
16
- fixture_is_cached_without_ignoring_fixture_group?(connection, table_name)
17
- end
6
+ unless fixture_dirnames.find { |dir| table_name.to_s =~ /^#{dir}/ }
7
+ super(connection, table_name)
18
8
  end
19
9
  end
20
10
  end
21
11
  end
22
12
 
23
- ActiveRecord::FixtureSet.send :include, FixtureGroup::FixtureSetPatch
13
+ class << ActiveRecord::FixtureSet
14
+ prepend FixtureGroup::FixtureSetPatch
15
+ end
@@ -1,3 +1,3 @@
1
1
  module FixtureGroup
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -0,0 +1,2 @@
1
+ user_x:
2
+ login: user_x
@@ -0,0 +1,10 @@
1
+ require_relative 'integration_helper'
2
+
3
+ class OriginalFixturesTest < ActiveSupport::TestCase
4
+ fixtures :users
5
+
6
+ test 'load fixtures properly' do
7
+ assert_equal 1, User.count
8
+ assert_equal 'user_x', users(:user_x).login
9
+ end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixture_group
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katsuya HIDAKA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -96,8 +96,10 @@ files:
96
96
  - test/integration/fixtures/for_case_a/items.yml
97
97
  - test/integration/fixtures/for_case_b/subcase/categories.yml
98
98
  - test/integration/fixtures/for_case_b/subcase/items.yml
99
+ - test/integration/fixtures/users.yml
99
100
  - test/integration/integration_helper.rb
100
101
  - test/integration/nested_fixtures_test.rb
102
+ - test/integration/original_fixtures_test.rb
101
103
  - test/integration/select_fixtures_test.rb
102
104
  - test/test_helper.rb
103
105
  homepage: https://github.com/hidakatsuya/fixture_group
@@ -120,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
122
  version: '0'
121
123
  requirements: []
122
124
  rubyforge_project:
123
- rubygems_version: 2.4.5
125
+ rubygems_version: 2.4.6
124
126
  signing_key:
125
127
  specification_version: 4
126
128
  summary: An extension of the ActiveRecord Fixtures that make possible to create fixtures
@@ -136,8 +138,10 @@ test_files:
136
138
  - test/integration/fixtures/for_case_a/items.yml
137
139
  - test/integration/fixtures/for_case_b/subcase/categories.yml
138
140
  - test/integration/fixtures/for_case_b/subcase/items.yml
141
+ - test/integration/fixtures/users.yml
139
142
  - test/integration/integration_helper.rb
140
143
  - test/integration/nested_fixtures_test.rb
144
+ - test/integration/original_fixtures_test.rb
141
145
  - test/integration/select_fixtures_test.rb
142
146
  - test/test_helper.rb
143
147
  has_rdoc: