static_association 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e9070d8b187c9b04c979f3f77244f5f0aff54bc9
4
+ data.tar.gz: 3a95140244d4d5413d29b86b517f847177a03182
5
+ SHA512:
6
+ metadata.gz: 11a3e13c6693ec96763180f4f1e7feff0d41bb6b8fd0ea8bac6f662c21cc23df81b1d2aa16e3107f887d44df54da0ab5be89e66d3e7b44b3f5dda73c94373d4b
7
+ data.tar.gz: cc67b525ced9dce9f6b56ec235b955c7a140cf98639738451f1d4ec95285db2e5e42e65e880bd3b1f717a6c9fbb8ffd1d4a00f5d90c96435c7d069ac79125af1
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.travis.yml ADDED
@@ -0,0 +1,20 @@
1
+ language: ruby
2
+ install: bundle install
3
+ script:
4
+ - bundle exec rake
5
+ rvm:
6
+ - 2.0.0
7
+ - 1.9.3
8
+ - 1.9.2
9
+ - 1.8.7
10
+ gemfile:
11
+ - gemfiles/3.0.gemfile
12
+ - gemfiles/3.1.gemfile
13
+ - gemfiles/3.2.gemfile
14
+ - gemfiles/4.0.gemfile
15
+ matrix:
16
+ exclude:
17
+ - rvm: 1.8.7
18
+ gemfile: gemfiles/4.0.gemfile
19
+ - rvm: 1.9.2
20
+ gemfile: gemfiles/4.0.gemfile
data/Appraisals ADDED
@@ -0,0 +1,17 @@
1
+ appraise "3.0" do
2
+ gem "i18n"
3
+ gem "activesupport", "3.0"
4
+ end
5
+
6
+ appraise "3.1" do
7
+ gem "i18n"
8
+ gem "activesupport", "3.1"
9
+ end
10
+
11
+ appraise "3.2" do
12
+ gem "activesupport", "3.2"
13
+ end
14
+
15
+ appraise "4.0" do
16
+ gem "activesupport", "4.0"
17
+ end
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in static_association.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Oliver Nightingale
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # StaticAssociation
2
+
3
+ Adds basic ActiveRecord like associations to static data.
4
+
5
+ This has been extracted from ProjectsDB and Hotleads, see the `BudgetCategory`, `Project` and `ArchiveReason`, `Lead` classes respectively for examples.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'static_association'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install static_association
20
+
21
+ ## Usage
22
+
23
+ ### Static Models
24
+
25
+ Create your static association class:
26
+
27
+ class Days
28
+ include StaticAssociation
29
+
30
+ attr_accessor :name
31
+
32
+ record id: 0 do |day|
33
+ day.name = :monday
34
+ end
35
+ end
36
+
37
+ Calling `record` will allow you to create an instance of this static model, a unique id is mandatory. The newly created object is yielded to the passed block.
38
+
39
+ The `Days` class will gain an `all` and `find` method.
40
+
41
+ ### Associations
42
+
43
+ Currently just a 'belongs to' association can be created. This behaviour can be mixed into an `ActiveRecord` model:
44
+
45
+ belongs_to_static :day
46
+
47
+ This assumes your model has a field `day_id`.
48
+
49
+ ## Contributing
50
+
51
+ 1. Fork it
52
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
53
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
54
+ 4. Run the tests (`rake`)
55
+ 5. Push to the branch (`git push origin my-new-feature`)
56
+ 6. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+ require 'appraisal'
4
+
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "i18n"
6
+ gem "activesupport", "3.0"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,36 @@
1
+ PATH
2
+ remote: /Users/olivernightingale/code/static_association
3
+ specs:
4
+ static_association (0.0.1)
5
+ activesupport (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.0.0)
11
+ appraisal (0.5.2)
12
+ bundler
13
+ rake
14
+ diff-lcs (1.2.4)
15
+ i18n (0.6.5)
16
+ rake (10.1.0)
17
+ rspec (2.14.1)
18
+ rspec-core (~> 2.14.0)
19
+ rspec-expectations (~> 2.14.0)
20
+ rspec-mocks (~> 2.14.0)
21
+ rspec-core (2.14.5)
22
+ rspec-expectations (2.14.3)
23
+ diff-lcs (>= 1.1.3, < 2.0)
24
+ rspec-mocks (2.14.3)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ activesupport (= 3.0)
31
+ appraisal
32
+ bundler (~> 1.3)
33
+ i18n
34
+ rake
35
+ rspec
36
+ static_association!
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "i18n"
6
+ gem "activesupport", "3.1"
7
+
8
+ gemspec :path=>"../"
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: /Users/olivernightingale/code/static_association
3
+ specs:
4
+ static_association (0.0.1)
5
+ activesupport (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.1.0)
11
+ multi_json (~> 1.0)
12
+ appraisal (0.5.2)
13
+ bundler
14
+ rake
15
+ diff-lcs (1.2.4)
16
+ i18n (0.6.5)
17
+ multi_json (1.8.0)
18
+ rake (10.1.0)
19
+ rspec (2.14.1)
20
+ rspec-core (~> 2.14.0)
21
+ rspec-expectations (~> 2.14.0)
22
+ rspec-mocks (~> 2.14.0)
23
+ rspec-core (2.14.5)
24
+ rspec-expectations (2.14.3)
25
+ diff-lcs (>= 1.1.3, < 2.0)
26
+ rspec-mocks (2.14.3)
27
+
28
+ PLATFORMS
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ activesupport (= 3.1)
33
+ appraisal
34
+ bundler (~> 1.3)
35
+ i18n
36
+ rake
37
+ rspec
38
+ static_association!
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "3.2"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: /Users/olivernightingale/code/static_association
3
+ specs:
4
+ static_association (0.0.1)
5
+ activesupport (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.0)
11
+ i18n (~> 0.6)
12
+ multi_json (~> 1.0)
13
+ appraisal (0.5.2)
14
+ bundler
15
+ rake
16
+ diff-lcs (1.2.4)
17
+ i18n (0.6.5)
18
+ multi_json (1.8.0)
19
+ rake (10.1.0)
20
+ rspec (2.14.1)
21
+ rspec-core (~> 2.14.0)
22
+ rspec-expectations (~> 2.14.0)
23
+ rspec-mocks (~> 2.14.0)
24
+ rspec-core (2.14.5)
25
+ rspec-expectations (2.14.3)
26
+ diff-lcs (>= 1.1.3, < 2.0)
27
+ rspec-mocks (2.14.3)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ activesupport (= 3.2)
34
+ appraisal
35
+ bundler (~> 1.3)
36
+ rake
37
+ rspec
38
+ static_association!
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "4.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,46 @@
1
+ PATH
2
+ remote: /Users/olivernightingale/code/static_association
3
+ specs:
4
+ static_association (0.0.1)
5
+ activesupport (>= 3.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (4.0.0)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ minitest (~> 4.2)
13
+ multi_json (~> 1.3)
14
+ thread_safe (~> 0.1)
15
+ tzinfo (~> 0.3.37)
16
+ appraisal (0.5.2)
17
+ bundler
18
+ rake
19
+ atomic (1.1.13)
20
+ diff-lcs (1.2.4)
21
+ i18n (0.6.5)
22
+ minitest (4.7.5)
23
+ multi_json (1.8.0)
24
+ rake (10.1.0)
25
+ rspec (2.14.1)
26
+ rspec-core (~> 2.14.0)
27
+ rspec-expectations (~> 2.14.0)
28
+ rspec-mocks (~> 2.14.0)
29
+ rspec-core (2.14.5)
30
+ rspec-expectations (2.14.3)
31
+ diff-lcs (>= 1.1.3, < 2.0)
32
+ rspec-mocks (2.14.3)
33
+ thread_safe (0.1.2)
34
+ atomic
35
+ tzinfo (0.3.37)
36
+
37
+ PLATFORMS
38
+ ruby
39
+
40
+ DEPENDENCIES
41
+ activesupport (= 4.0)
42
+ appraisal
43
+ bundler (~> 1.3)
44
+ rake
45
+ rspec
46
+ static_association!
@@ -0,0 +1,66 @@
1
+ require 'static_association/version'
2
+ require 'active_support/concern'
3
+ require 'active_support/ordered_hash'
4
+ require 'active_support/core_ext/module/delegation'
5
+ require 'active_support/core_ext/hash/keys'
6
+ require 'active_support/core_ext/string/inflections'
7
+
8
+ module StaticAssociation
9
+ extend ActiveSupport::Concern
10
+
11
+ class DuplicateID < StandardError; end
12
+ class RecordNotFound < StandardError; end
13
+
14
+ attr_reader :id
15
+
16
+ private
17
+
18
+ def initialize(id)
19
+ @id = id
20
+ end
21
+
22
+ module ClassMethods
23
+ include Enumerable
24
+
25
+ delegate :each, :to => :all
26
+
27
+ def index
28
+ @index ||= ActiveSupport::OrderedHash.new
29
+ end
30
+
31
+ def all
32
+ index.values
33
+ end
34
+
35
+ def find(id)
36
+ raise RecordNotFound unless index.has_key?(id)
37
+ index[id]
38
+ end
39
+
40
+ def record(settings)
41
+ settings.assert_valid_keys(:id)
42
+ id = settings.fetch(:id)
43
+ raise DuplicateID if index.has_key?(id)
44
+ record = self.new(id)
45
+ yield(record) if block_given?
46
+ index[id] = record
47
+ end
48
+ end
49
+
50
+ module AssociationHelpers
51
+ def belongs_to_static(name)
52
+ self.send(:define_method, name) do
53
+ begin
54
+ foreign_key = self.send("#{name}_id")
55
+ name.to_s.camelize.constantize.find(foreign_key) if foreign_key
56
+ rescue RecordNotFound
57
+ nil
58
+ end
59
+ end
60
+
61
+ self.send(:define_method, "#{name}=") do |assoc|
62
+ self.send("#{name}_id=", assoc.id)
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,3 @@
1
+ module StaticAssociation
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,17 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ require 'rubygems'
8
+ require 'bundler/setup'
9
+
10
+ require 'static_association'
11
+
12
+ RSpec.configure do |config|
13
+ config.treat_symbols_as_metadata_keys_with_true_values = true
14
+ config.run_all_when_everything_filtered = true
15
+ config.filter_run :focus
16
+ config.order = 'random'
17
+ end
@@ -0,0 +1,105 @@
1
+ require 'spec_helper'
2
+ require 'static_association'
3
+
4
+ describe StaticAssociation do
5
+
6
+ class DummyClass
7
+ include StaticAssociation
8
+ attr_accessor :name
9
+ end
10
+
11
+ after do
12
+ DummyClass.instance_variable_set("@index", {})
13
+ end
14
+
15
+ describe ".record" do
16
+ it "should add a record" do
17
+ expect {
18
+ DummyClass.record :id => 1 do |c|
19
+ c.name = 'asdf'
20
+ end
21
+ }.to change(DummyClass, :count).by(1)
22
+ end
23
+
24
+ context "id uniqueness" do
25
+ it "should raise an error with a duplicate id" do
26
+ expect {
27
+ DummyClass.record :id => 1 do |c|
28
+ c.name = 'asdf'
29
+ end
30
+
31
+ DummyClass.record :id => 1 do |c|
32
+ c.name = 'asdf'
33
+ end
34
+ }.to raise_error(StaticAssociation::DuplicateID)
35
+ end
36
+ end
37
+
38
+ context "sets up the instance" do
39
+ subject {
40
+ DummyClass.record :id => 1 do |c|
41
+ c.name = 'asdf'
42
+ end
43
+ }
44
+
45
+ its(:id) { should == 1 }
46
+ its(:name) { should == 'asdf' }
47
+ end
48
+
49
+ context "without a block" do
50
+ subject { DummyClass.record :id => 1 }
51
+
52
+ its(:id) { should == 1 }
53
+ its(:name) { should be_nil }
54
+ end
55
+
56
+ context "asserting valid keys" do
57
+ it "should raise an error" do
58
+ expect {
59
+ DummyClass.record :id => 1, :foo => :bar
60
+ }.to raise_error(ArgumentError)
61
+ end
62
+ end
63
+ end
64
+
65
+ describe ".find" do
66
+ before do
67
+ DummyClass.record :id => 1 do |c|
68
+ c.name = 'asdf'
69
+ end
70
+ end
71
+
72
+ context "record exists" do
73
+ subject { DummyClass.find(1) }
74
+
75
+ it { should be_kind_of(DummyClass) }
76
+ its(:id) { should == 1 }
77
+ end
78
+
79
+ context "record does not exist" do
80
+ it "should raise a StaticAssociation::RecordNotFoundError" do
81
+ expect {
82
+ DummyClass.find(:not_in_the_index)
83
+ }.to raise_error(StaticAssociation::RecordNotFound)
84
+ end
85
+ end
86
+ end
87
+
88
+ describe ".belongs_to_static" do
89
+ class AssociationClass
90
+ attr_accessor :dummy_class_id
91
+
92
+ extend StaticAssociation::AssociationHelpers
93
+ belongs_to_static :dummy_class
94
+ end
95
+
96
+ let(:associated_class) { AssociationClass.new }
97
+
98
+ it "creates reader method that uses the correct singularized class when finding static association" do
99
+ expect {
100
+ DummyClass.should_receive(:find)
101
+ }
102
+ associated_class.dummy_class
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'static_association/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "static_association"
8
+ spec.version = StaticAssociation::VERSION
9
+ spec.authors = ["Oliver Nightingale"]
10
+ spec.email = ["oliver.nightingale1@gmail.com"]
11
+ spec.description = %q{StaticAssociation adds a simple enum type that can act like an ActiveRecord association for static data.}
12
+ spec.summary = %q{ActiveRecord like associations for static data}
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "activesupport", ">= 3.0.0"
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.3"
23
+ spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "appraisal"
26
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: static_association
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Oliver Nightingale
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: appraisal
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: StaticAssociation adds a simple enum type that can act like an ActiveRecord
84
+ association for static data.
85
+ email:
86
+ - oliver.nightingale1@gmail.com
87
+ executables: []
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - .gitignore
92
+ - .travis.yml
93
+ - Appraisals
94
+ - Gemfile
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - gemfiles/3.0.gemfile
99
+ - gemfiles/3.0.gemfile.lock
100
+ - gemfiles/3.1.gemfile
101
+ - gemfiles/3.1.gemfile.lock
102
+ - gemfiles/3.2.gemfile
103
+ - gemfiles/3.2.gemfile.lock
104
+ - gemfiles/4.0.gemfile
105
+ - gemfiles/4.0.gemfile.lock
106
+ - lib/static_association.rb
107
+ - lib/static_association/version.rb
108
+ - spec/spec_helper.rb
109
+ - spec/static_association_spec.rb
110
+ - static_association.gemspec
111
+ homepage:
112
+ licenses:
113
+ - MIT
114
+ metadata: {}
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ requirements: []
130
+ rubyforge_project:
131
+ rubygems_version: 2.0.3
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: ActiveRecord like associations for static data
135
+ test_files:
136
+ - spec/spec_helper.rb
137
+ - spec/static_association_spec.rb