mongoid_sortable_relation 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 477483627f1e0806bcc9d9f901613d897a69f696
4
- data.tar.gz: 7de40f9ebdd7efa69728f654755304f58dd6dfd5
3
+ metadata.gz: 398e7eba3749decb72a3ecdd00fd59f685314a15
4
+ data.tar.gz: 9d1b6cb9d3367af1f6de1997a7b45933d9dbbdc6
5
5
  SHA512:
6
- metadata.gz: 26da733006630ea67858857fe54468ef0291740467ba8b6a9dd239d30579a0c24c38739c300e4659699870d0f0a2bbdbc63afb81f7c628a9beab23f0b32dc304
7
- data.tar.gz: e42439a89a2194843da7254e72c2b809be5901664283df54680f33a7d298804ed1990626c3c6a083de50522b9670622f44b91f7d5b2daf24f5927039628f878f
6
+ metadata.gz: 98ea75732303f23be81998167c529a0b54607d289f284c08357e93f0291338897259b560a1be3a0bf07b00be54204bf25ede4f5d04a46666ee8a86f6b836979f
7
+ data.tar.gz: 82e69ec660495f1a07a098ecf83ac21ad6a8ded781a49c22192d38f5aa904561daf48c24276473b724484d562a831fa186560dd41b2bf8dd1cc8938ea06be896
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module MongoidSortableRelation
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
@@ -3,15 +3,15 @@ require 'spec_helper'
3
3
  describe 'Many to many sortable relation' do
4
4
 
5
5
  let(:post) do
6
- FactoryGirl.create :post
6
+ Post.create
7
7
  end
8
8
 
9
9
  describe 'get relations' do
10
10
 
11
11
  let!(:tags) do
12
- tag1 = FactoryGirl.create :tag, :name => 'Name1'
13
- tag2 = FactoryGirl.create :tag, :name => 'Name2'
14
- tag3 = FactoryGirl.create :tag, :name => 'Name3'
12
+ tag1 = Tag.create :name => 'Name1'
13
+ tag2 = Tag.create :name => 'Name2'
14
+ tag3 = Tag.create :name => 'Name3'
15
15
  post.tags = [tag2, tag1, tag3]
16
16
  post.save
17
17
  end
@@ -3,15 +3,15 @@ require 'spec_helper'
3
3
  describe 'One to many sortable relation' do
4
4
 
5
5
  let(:user) do
6
- FactoryGirl.create :user
6
+ User.create
7
7
  end
8
8
 
9
9
  describe 'get relations' do
10
10
 
11
11
  let!(:posts) do
12
- FactoryGirl.create :post, :user => user, :title => 'Title1', :user_position => 2
13
- FactoryGirl.create :post, :user => user, :title => 'Title2', :user_position => 1
14
- FactoryGirl.create :post, :user => user, :title => 'Title3', :user_position => 3
12
+ Post.create :user => user, :title => 'Title1', :user_position => 2
13
+ Post.create :user => user, :title => 'Title2', :user_position => 1
14
+ Post.create :user => user, :title => 'Title3', :user_position => 3
15
15
  end
16
16
 
17
17
  it 'returns ordered relations' do
@@ -5,9 +5,9 @@ describe Origin::Optional do
5
5
  describe '#prepend_order_by' do
6
6
 
7
7
  let!(:users) do
8
- FactoryGirl.create :user, :name => 'Name1', :age => 2
9
- FactoryGirl.create :user, :name => 'Name2', :age => 1
10
- FactoryGirl.create :user, :name => 'Name3', :age => 2
8
+ User.create :name => 'Name1', :age => 2
9
+ User.create :name => 'Name2', :age => 1
10
+ User.create :name => 'Name3', :age => 2
11
11
  end
12
12
 
13
13
  it 'adds order' do
data/spec/spec_helper.rb CHANGED
@@ -5,10 +5,8 @@ MODELS = File.join(File.dirname(__FILE__), 'app/models')
5
5
  $LOAD_PATH.unshift(MODELS)
6
6
 
7
7
  require 'mongoid_sortable_relation'
8
- require 'action_controller'
9
8
  require 'rspec'
10
9
  require 'database_cleaner'
11
- require 'factory_girl_rails'
12
10
 
13
11
  ENV['MONGOID_SPEC_HOST'] ||= 'localhost'
14
12
  ENV['MONGOID_SPEC_PORT'] ||= '27017'
@@ -25,9 +23,6 @@ CONFIG = {
25
23
  }
26
24
  }
27
25
 
28
- FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
29
- FactoryGirl.reload
30
-
31
26
  Mongoid.configure do |config|
32
27
  config.load_configuration(CONFIG)
33
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_sortable_relation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Melanitskiy
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: mongoid
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mongoid_criteria_filter
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: It adds possibility for sorting relation
@@ -58,9 +58,6 @@ files:
58
58
  - spec/app/models/post.rb
59
59
  - spec/app/models/tag.rb
60
60
  - spec/app/models/user.rb
61
- - spec/factories/post.rb
62
- - spec/factories/tag.rb
63
- - spec/factories/user.rb
64
61
  - spec/models/many_to_many_spec.rb
65
62
  - spec/models/metadata_spec.rb
66
63
  - spec/models/one_to_many_spec.rb
@@ -76,12 +73,12 @@ require_paths:
76
73
  - lib
77
74
  required_ruby_version: !ruby/object:Gem::Requirement
78
75
  requirements:
79
- - - ">="
76
+ - - '>='
80
77
  - !ruby/object:Gem::Version
81
78
  version: '0'
82
79
  required_rubygems_version: !ruby/object:Gem::Requirement
83
80
  requirements:
84
- - - ">="
81
+ - - '>='
85
82
  - !ruby/object:Gem::Version
86
83
  version: '0'
87
84
  requirements: []
@@ -96,9 +93,6 @@ test_files:
96
93
  - spec/models/many_to_many_spec.rb
97
94
  - spec/models/one_to_many_spec.rb
98
95
  - spec/spec_helper.rb
99
- - spec/factories/post.rb
100
- - spec/factories/user.rb
101
- - spec/factories/tag.rb
102
96
  - spec/app/models/post.rb
103
97
  - spec/app/models/user.rb
104
98
  - spec/app/models/tag.rb
@@ -1,7 +0,0 @@
1
- FactoryGirl.define do
2
-
3
- factory :post do
4
- title 'Title'
5
- end
6
-
7
- end
@@ -1,8 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- FactoryGirl.define do
3
-
4
- factory :tag do
5
- name 'Name'
6
- end
7
-
8
- end
@@ -1,8 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- FactoryGirl.define do
3
-
4
- factory :user do
5
- name 'John'
6
- end
7
-
8
- end