orm_adapter-dynamoid 0.0.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.
@@ -0,0 +1,18 @@
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
18
+ vendor
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 arukoh
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.
@@ -0,0 +1,29 @@
1
+ # OrmAdapter::Dynamoid
2
+
3
+ Adds [dynamoid](https://github.com/Veraticus/Dynamoid) adapter to [orm_adapter](https://github.com/ianwhite/orm_adapter/) which provides a single point of entry for using basic features of popular ruby ORMs.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'orm_adapter-dynamoid'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install orm_adapter-dynamoid
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env rake
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ require "bundler/gem_tasks"
5
+ require 'rspec/core/rake_task'
6
+ require "orm_adapter/version"
7
+
8
+ task :default => :spec
9
+
10
+ RSpec::Core::RakeTask.new(:spec)
@@ -0,0 +1,9 @@
1
+ require 'orm_adapter'
2
+ require "orm_adapter-dynamoid/version"
3
+ require 'orm_adapter-dynamoid/dynamoid' if defined?(Dynamoid::Document)
4
+
5
+ module OrmAdapter
6
+ module Dynamoid
7
+ # Your code goes here...
8
+ end
9
+ end
@@ -0,0 +1,73 @@
1
+ require 'dynamoid'
2
+
3
+ module Dynamoid
4
+ module Errors
5
+ class DocumentNotFound < StandardError; end
6
+ end
7
+ end
8
+
9
+ module Dynamoid
10
+ module Document
11
+ module ClassMethods
12
+ include OrmAdapter::ToAdapter
13
+ end
14
+
15
+ class OrmAdapter < ::OrmAdapter::Base
16
+ # get a list of column names for a given class
17
+ def column_names
18
+ klass.attributes.keys
19
+ end
20
+
21
+ # @see OrmAdapter::Base#get!
22
+ def get!(id)
23
+ klass.find_by_id(wrap_key(id)) || raise(Dynamoid::Document::DocumentNotFound)
24
+ end
25
+
26
+ # @see OrmAdapter::Base#get
27
+ def get(id)
28
+ klass.where(klass.hash_key => wrap_key(id)).first
29
+ end
30
+
31
+ # @see OrmAdapter::Base#find_first
32
+ def find_first(options = {})
33
+ conditions, order = extract_conditions!(options)
34
+ # klass.limit(1).where(conditions_to_fields(conditions)).order_by(order).first
35
+ klass.where(conditions_to_fields(conditions)).limit(1).first
36
+ end
37
+
38
+ # @see OrmAdapter::Base#find_all
39
+ def find_all(options = {})
40
+ conditions, order, limit, offset = extract_conditions!(options)
41
+ # klass.where(conditions_to_fields(conditions)).order_by(order).limit(limit).offset(offset)
42
+ klass.where(conditions_to_fields(conditions)).limit(limit)
43
+ end
44
+
45
+ # @see OrmAdapter::Base#create!
46
+ def create!(attributes = {})
47
+ klass.create!(attributes)
48
+ end
49
+
50
+ # @see OrmAdapter::Base#destroy
51
+ def destroy(object)
52
+ object.destroy if valid_object?(object)
53
+ end
54
+
55
+ protected
56
+
57
+ def conditions_to_fields(conditions)
58
+ conditions.inject({}) do |fields, (key, value)|
59
+ if value.is_a?(Dynamoid::Document) && assoc_key = association_key(key)
60
+ fields.merge(assoc_key => Set[value.id])
61
+ else
62
+ fields.merge(key => value)
63
+ end
64
+ end
65
+ end
66
+
67
+ def association_key(key)
68
+ k = "#{key}_ids"
69
+ column_names.find{|c| c == k || c == k.to_sym}
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,5 @@
1
+ module OrmAdapter
2
+ module Dynamoid
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/orm_adapter-dynamoid/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = "arukoh"
6
+ gem.email = "arukoh10@gmail.com"
7
+ gem.description = "Adds dynamoid (https://github.com/Veraticus/Dynamoid) adapter to orm_adapter (https://github.com/ianwhite/orm_adapter/) which provides a single point of entry for using basic features of popular ruby ORMs."
8
+ gem.summary = "Adds dynamoid ORM adapter to the orm_adapter project"
9
+ gem.homepage = "https://github.com/arukoh/orm_adapter-dynamoid"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "orm_adapter-dynamoid"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = OrmAdapter::Dynamoid::VERSION
17
+
18
+ gem.add_dependency "orm_adapter"
19
+ gem.add_dependency "dynamoid", ">= 0.4.1"
20
+
21
+ gem.add_development_dependency "rake", ">= 0.8.7"
22
+ gem.add_development_dependency "rspec", ">= 2.4.0"
23
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+ require 'example_app_shared'
3
+ require 'models'
4
+
5
+ if !defined?(Dynamoid)
6
+ puts "** require 'dynamoid' to run the specs in #{__FILE__}"
7
+ exit 1
8
+ end
9
+
10
+ Dynamoid.configure do |config|
11
+ config.adapter = 'local'
12
+ config.namespace = "orm_adapter-dynamoid_test"
13
+ config.logger = Logger.new($stdout)
14
+ config.logger.level = Logger::ERROR
15
+ end
16
+
17
+ module DynamoidOrmSpec
18
+ # here be the specs!
19
+ describe Dynamoid::Document::OrmAdapter do
20
+ before do
21
+ # User.each{|u| u.destroy}
22
+ # Note.each{|n| n.destroy}
23
+ Dynamoid::Adapter.create_table(User.table_name, User.hash_key, :range_key => User.range_key)
24
+ Dynamoid::Adapter.create_table(Note.table_name, Note.hash_key, :range_key => Note.range_key)
25
+ end
26
+
27
+ it_should_behave_like "example app with orm_adapter" do
28
+ let(:user_class) { User }
29
+ let(:note_class) { Note }
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,240 @@
1
+ # to test your new orm_adapter, make an example app that matches the functionality
2
+ # found in the existing specs for example, look at spec/orm_adapter/adapters/active_record_spec.rb
3
+ #
4
+ # Then you can execute this shared spec as follows:
5
+ #
6
+ # it_should_behave_like "execute app with orm_adapter" do
7
+ # let(:user_class) { User }
8
+ # let(:note_class) { Note }
9
+ #
10
+ # # optionaly define the following functions if the ORM does not support
11
+ # # this syntax - this should NOT use the orm_adapter, because we're testing that
12
+ # def create_model(klass, attrs = {})
13
+ # klass.create!(attrs)
14
+ # end
15
+ #
16
+ # def reload_model(model)
17
+ # model.class.find(model.id)
18
+ # end
19
+ # end
20
+ #
21
+ shared_examples_for "example app with orm_adapter" do
22
+
23
+ def create_model(klass, attrs = {})
24
+ klass.create!(attrs)
25
+ end
26
+
27
+ def reload_model(model)
28
+ model.class.find(model.id)
29
+ end
30
+
31
+ describe "an ORM class" do
32
+ subject { note_class }
33
+
34
+ it "#to_adapter should return an adapter instance" do
35
+ subject.to_adapter.should be_a(OrmAdapter::Base)
36
+ end
37
+
38
+ it "#to_adapter should return an adapter for the receiver" do
39
+ subject.to_adapter.klass.should == subject
40
+ end
41
+
42
+ it "#to_adapter should be cached" do
43
+ subject.to_adapter.object_id.should == subject.to_adapter.object_id
44
+ end
45
+ end
46
+
47
+ describe "adapter instance" do
48
+ let(:note_adapter) { note_class.to_adapter }
49
+ let(:user_adapter) { user_class.to_adapter }
50
+
51
+ describe "#get!(id)" do
52
+ it "should return the instance with id if it exists" do
53
+ user = create_model(user_class)
54
+ user_adapter.get!(user.id).should == user
55
+ end
56
+
57
+ it "should allow to_key like arguments" do
58
+ user = create_model(user_class)
59
+ user_adapter.get!(user.to_key).should == user
60
+ end
61
+
62
+ it "should raise an error if there is no instance with that id" do
63
+ lambda { user_adapter.get!("nonexistent id") }.should raise_error
64
+ end
65
+ end
66
+
67
+ describe "#get(id)" do
68
+ it "should return the instance with id if it exists" do
69
+ user = create_model(user_class)
70
+ user_adapter.get(user.id).should == user
71
+ end
72
+
73
+ it "should allow to_key like arguments" do
74
+ user = create_model(user_class)
75
+ user_adapter.get(user.to_key).should == user
76
+ end
77
+
78
+ it "should return nil if there is no instance with that id" do
79
+ user_adapter.get("nonexistent id").should be_nil
80
+ end
81
+ end
82
+
83
+ describe "#find_first" do
84
+ describe "(conditions)" do
85
+ it "should return first model matching conditions, if it exists" do
86
+ user = create_model(user_class, :name => "Fred")
87
+ user_adapter.find_first(:name => "Fred").should == user
88
+ end
89
+
90
+ it "should return nil if no conditions match" do
91
+ user_adapter.find_first(:name => "Betty").should == nil
92
+ end
93
+
94
+ it 'should return the first model if no conditions passed' do
95
+ user = create_model(user_class)
96
+ create_model(user_class)
97
+ user_adapter.find_first.should == user
98
+ end
99
+
100
+ it "when conditions contain associated object, should return first model if it exists" do
101
+ user = create_model(user_class)
102
+ note = create_model(note_class, :owner => user)
103
+ note_adapter.find_first(:owner => user).should == note
104
+ end
105
+
106
+ it "understands :id as a primary key condition (allowing scoped finding)" do
107
+ create_model(user_class, :name => "Fred")
108
+ user = create_model(user_class, :name => "Fred")
109
+ user_adapter.find_first(:id => user.id, :name => "Fred").should == user
110
+ user_adapter.find_first(:id => user.id, :name => "Not Fred").should be_nil
111
+ end
112
+ end
113
+
114
+ # describe "(:order => <order array>)" do
115
+ # it "should return first model in specified order" do
116
+ # user1 = create_model(user_class, :name => "Fred", :rating => 1)
117
+ # user2 = create_model(user_class, :name => "Fred", :rating => 2)
118
+ # user_adapter.find_first(:order => [:name, [:rating, :desc]]).should == user2
119
+ # end
120
+ # end
121
+
122
+ # describe "(:conditions => <conditions hash>, :order => <order array>)" do
123
+ # it "should return first model matching conditions, in specified order" do
124
+ # user1 = create_model(user_class, :name => "Fred", :rating => 1)
125
+ # user2 = create_model(user_class, :name => "Fred", :rating => 2)
126
+ # user_adapter.find_first(:conditions => {:name => "Fred"}, :order => [:rating, :desc]).should == user2
127
+ # end
128
+ # end
129
+ end
130
+
131
+ describe "#find_all" do
132
+ describe "(conditions)" do
133
+ it "should return only models matching conditions" do
134
+ user1 = create_model(user_class, :name => "Fred")
135
+ user2 = create_model(user_class, :name => "Fred")
136
+ user3 = create_model(user_class, :name => "Betty")
137
+ user_adapter.find_all(:name => "Fred").should == [user1, user2]
138
+ end
139
+
140
+ it "should return all models if no conditions passed" do
141
+ user1 = create_model(user_class, :name => "Fred")
142
+ user2 = create_model(user_class, :name => "Fred")
143
+ user3 = create_model(user_class, :name => "Betty")
144
+ user_adapter.find_all.should == [user1, user2, user3]
145
+ end
146
+
147
+ it "should return empty array if no conditions match" do
148
+ user_adapter.find_all(:name => "Fred").should == []
149
+ end
150
+
151
+ it "when conditions contain associated object, should return first model if it exists" do
152
+ user1, user2 = create_model(user_class), create_model(user_class)
153
+ note1 = create_model(note_class, :owner => user1)
154
+ note2 = create_model(note_class, :owner => user2)
155
+ note_adapter.find_all(:owner => user2).should == [note2]
156
+ end
157
+ end
158
+
159
+ # describe "(:order => <order array>)" do
160
+ # it "should return all models in specified order" do
161
+ # user1 = create_model(user_class, :name => "Fred", :rating => 1)
162
+ # user2 = create_model(user_class, :name => "Fred", :rating => 2)
163
+ # user3 = create_model(user_class, :name => "Betty", :rating => 1)
164
+ # user_adapter.find_all(:order => [:name, [:rating, :desc]]).should == [user3, user2, user1]
165
+ # end
166
+ # end
167
+
168
+ # describe "(:conditions => <conditions hash>, :order => <order array>)" do
169
+ # it "should return only models matching conditions, in specified order" do
170
+ # user1 = create_model(user_class, :name => "Fred", :rating => 1)
171
+ # user2 = create_model(user_class, :name => "Fred", :rating => 2)
172
+ # user3 = create_model(user_class, :name => "Betty", :rating => 1)
173
+ # user_adapter.find_all(:conditions => {:name => "Fred"}, :order => [:rating, :desc]).should == [user2, user1]
174
+ # end
175
+ # end
176
+
177
+ describe "(:limit => <number of items>)" do
178
+ it "should return a limited set of matching models" do
179
+ user1 = create_model(user_class, :name => "Fred", :rating => 1)
180
+ user2 = create_model(user_class, :name => "Fred", :rating => 2)
181
+ user3 = create_model(user_class, :name => "Betty", :rating => 1)
182
+ user_adapter.find_all(:limit => 1).should == [user1]
183
+ user_adapter.find_all(:limit => 2).should == [user1, user2]
184
+ end
185
+ end
186
+
187
+ # describe "(:offset => <offset number>) with limit (as DataMapper doesn't allow offset on its own)" do
188
+ # it "should return an offset set of matching models" do
189
+ # user1 = create_model(user_class, :name => "Fred", :rating => 1)
190
+ # user2 = create_model(user_class, :name => "Fred", :rating => 2)
191
+ # user3 = create_model(user_class, :name => "Betty", :rating => 1)
192
+ # user_adapter.find_all(:limit => 3, :offset => 0).should == [user1, user2, user3]
193
+ # user_adapter.find_all(:limit => 3, :offset => 1).should == [user2, user3]
194
+ # user_adapter.find_all(:limit => 1, :offset => 1).should == [user2]
195
+ # end
196
+ # end
197
+ end
198
+
199
+ describe "#create!(attributes)" do
200
+ it "should create a model with the passed attributes" do
201
+ user = user_adapter.create!(:name => "Fred")
202
+ reload_model(user).name.should == "Fred"
203
+ end
204
+
205
+ it "should raise error when create fails" do
206
+ lambda { user_adapter.create!(:user => create_model(note_class)) }.should raise_error
207
+ end
208
+
209
+ it "when attributes contain an associated object, should create a model with the attributes" do
210
+ user = create_model(user_class)
211
+ note = note_adapter.create!(:owner => user)
212
+ reload_model(note).owner.should == user
213
+ end
214
+
215
+ it "when attributes contain an has_many assoc, should create a model with the attributes" do
216
+ notes = [create_model(note_class), create_model(note_class)]
217
+ user = user_adapter.create!(:notes => notes)
218
+ reload_model(user).notes.should == notes
219
+ end
220
+ end
221
+
222
+ describe "#destroy(instance)" do
223
+ it "should destroy the instance if it exists" do
224
+ user = create_model(user_class)
225
+ user_adapter.destroy(user).should == user
226
+ user_adapter.get(user.id).should be_nil
227
+ end
228
+
229
+ it "should return nil if passed with an invalid instance" do
230
+ user_adapter.destroy("nonexistent instance").should be_nil
231
+ end
232
+
233
+ it "should not destroy the instance if it doesn't match the model class" do
234
+ user = create_model(user_class)
235
+ note_adapter.destroy(user).should be_nil
236
+ user_adapter.get(user.id).should == user
237
+ end
238
+ end
239
+ end
240
+ end
@@ -0,0 +1,12 @@
1
+ class User
2
+ include Dynamoid::Document
3
+ field :name
4
+ field :rating
5
+ has_many :notes
6
+ end
7
+
8
+ class Note
9
+ include Dynamoid::Document
10
+ field :body, :default => "made by orm"
11
+ belongs_to :owner, :class => User
12
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
3
+
4
+ require 'rubygems'
5
+ require 'rspec'
6
+ require 'dynamoid'
7
+ require 'orm_adapter'
8
+ require 'orm_adapter-dynamoid'
metadata ADDED
@@ -0,0 +1,133 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: orm_adapter-dynamoid
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - arukoh
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-30 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: orm_adapter
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: dynamoid
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.4.1
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.4.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.8.7
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.7
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 2.4.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 2.4.0
78
+ description: Adds dynamoid (https://github.com/Veraticus/Dynamoid) adapter to orm_adapter
79
+ (https://github.com/ianwhite/orm_adapter/) which provides a single point of entry
80
+ for using basic features of popular ruby ORMs.
81
+ email: arukoh10@gmail.com
82
+ executables: []
83
+ extensions: []
84
+ extra_rdoc_files: []
85
+ files:
86
+ - .gitignore
87
+ - Gemfile
88
+ - LICENSE
89
+ - README.md
90
+ - Rakefile
91
+ - lib/orm_adapter-dynamoid.rb
92
+ - lib/orm_adapter-dynamoid/dynamoid.rb
93
+ - lib/orm_adapter-dynamoid/version.rb
94
+ - orm_adapter-dynamoid.gemspec
95
+ - spec/dynamoid_spec.rb
96
+ - spec/example_app_shared.rb
97
+ - spec/models.rb
98
+ - spec/spec_helper.rb
99
+ homepage: https://github.com/arukoh/orm_adapter-dynamoid
100
+ licenses: []
101
+ post_install_message:
102
+ rdoc_options: []
103
+ require_paths:
104
+ - lib
105
+ required_ruby_version: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ segments:
112
+ - 0
113
+ hash: 559551681
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ none: false
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ segments:
121
+ - 0
122
+ hash: 559551681
123
+ requirements: []
124
+ rubyforge_project:
125
+ rubygems_version: 1.8.24
126
+ signing_key:
127
+ specification_version: 3
128
+ summary: Adds dynamoid ORM adapter to the orm_adapter project
129
+ test_files:
130
+ - spec/dynamoid_spec.rb
131
+ - spec/example_app_shared.rb
132
+ - spec/models.rb
133
+ - spec/spec_helper.rb