mongoid-slugify 0.2.0 → 0.3.0

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: ee34888fc56b34db526225ea77a91d71ae56dd75
4
- data.tar.gz: 80b4beff147eee4750ca115dc1fcde4c9b0bf26b
3
+ metadata.gz: a0548b564c7445355d3d881385414c9d5adb0d38
4
+ data.tar.gz: fea97db6af7b7a92cc34f6e8a716e3e840adf43c
5
5
  SHA512:
6
- metadata.gz: 809636ab758c08cbbcc2594120b5d74cb0423f82017dd51efd5147c96252bc73960fd3f83f8551aa944704c15ec0b9fad1c76258a08735e3b7d5d63cb9a82651
7
- data.tar.gz: bde6531b8cd3eb0fda3a17f0288cd80501eb2964dfd195d4252659e5213356fb3c81b2115e60b24103bb6387ca4b9c3838ea6cef17bbabd03416bb12844269e2
6
+ metadata.gz: 25673ab81504e6ce382987f5cffafc3d6a975c8bb05e21db1ff3abc49ddd813f1b620518a20197403ca8d33820c504646c2737a0586d8acb83063dfd4802364f
7
+ data.tar.gz: 59a640b28605e172226d917c3371001351fbf3cd42eeff9ae55d82dc8a1a2a9172187b20389a930482748ba1b2ee969f33e8d495753cc67f0685a198eea4b24e
data/.travis.yml CHANGED
@@ -3,24 +3,12 @@ services: mongodb
3
3
  gemfile:
4
4
  - gemfiles/mongoid2.gemfile
5
5
  - gemfiles/mongoid3.gemfile
6
+ - gemfiles/mongoid4.gemfile
6
7
  rvm:
7
- - 1.8.7
8
- - 1.9.2
9
- - 1.9.3
10
- - rbx-18mode
11
- - rbx-19mode
12
- - jruby-18mode
13
- - jruby-19mode
14
- - ree
15
- matrix:
16
- exclude:
17
- - rvm: 1.8.7
18
- gemfile: gemfiles/mongoid3.gemfile
19
- - rvm: rbx-18mode
20
- gemfile: gemfiles/mongoid3.gemfile
21
- - rvm: jruby-18mode
22
- gemfile: gemfiles/mongoid3.gemfile
23
- - rvm: ree
24
- gemfile: gemfiles/mongoid3.gemfile
25
- - rvm: 1.9.2
26
- gemfile: gemfiles/mongoid3.gemfile
8
+ - "1.9.3"
9
+ - "2.0.0"
10
+ - "2.1"
11
+ - "2.2"
12
+ - "rbx-19mode"
13
+ - "jruby-19mode"
14
+ sudo: false
data/Appraisals CHANGED
@@ -10,3 +10,7 @@ end
10
10
  appraise 'mongoid4' do
11
11
  gem 'mongoid', '~> 4.0'
12
12
  end
13
+
14
+ appraise 'mongoid5' do
15
+ gem 'mongoid', '~> 5.0'
16
+ end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Slugify
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -16,10 +16,11 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Mongoid::Slugify::VERSION
17
17
 
18
18
  gem.add_runtime_dependency 'activesupport', '>= 3.0', '< 5.0'
19
- gem.add_runtime_dependency 'mongoid', '>= 2.0', '< 5.0'
19
+ gem.add_runtime_dependency 'mongoid', '>= 2.0', '< 6.0'
20
20
 
21
21
  gem.add_development_dependency 'rake'
22
22
  gem.add_development_dependency 'rspec'
23
23
  gem.add_development_dependency 'database_cleaner'
24
+
24
25
  gem.add_development_dependency 'appraisal'
25
26
  end
data/spec/spec_helper.rb CHANGED
@@ -1,18 +1,22 @@
1
- p ENV['BUNDLE_GEMFILE']
2
-
3
1
  require "bundler/setup"
4
2
  Bundler.require(:default, :development)
5
3
 
6
- Mongoid.configure do |config|
7
- if Mongoid::Slugify.at_least_mongoid3?
8
- config.sessions[:default] = HashWithIndifferentAccess.new({ :database => 'mongoid_slugify_test', :hosts => ['localhost:27017'] })
9
- else
4
+ if Gem::Version.new(Mongoid::VERSION) < Gem::Version.new('3.0.0')
5
+ Mongoid.configure do |config|
10
6
  config.master = Mongo::Connection.new.db('mongoid_slugify_test')
11
7
  end
8
+ elsif Gem::Version.new(Mongoid::VERSION) < Gem::Version.new('5.0.0')
9
+ Mongoid.configure do |config|
10
+ config.sessions[:default] = HashWithIndifferentAccess.new({ :database => 'mongoid_slugify_test', :hosts => ['localhost:27017'] })
11
+ end
12
+ else
13
+ Mongoid.configure do |config|
14
+ config.clients.default = { :hosts => ['localhost:27017'], database: 'my_db' }
15
+ end
16
+ Mongo::Logger.logger.level = Logger::INFO
12
17
  end
13
18
 
14
- DatabaseCleaner.strategy = :truncation
15
- DatabaseCleaner.orm = Mongoid::Slugify.at_least_mongoid3? ? :moped : :mongoid
19
+ DatabaseCleaner[:mongoid, { :connection => 'mongoid_slugify_test' }].strategy = :truncation
16
20
 
17
21
  RSpec.configure do |config|
18
22
  config.expect_with(:rspec) { |c| c.syntax = :should }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-slugify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Forkert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-17 00:00:00.000000000 Z
11
+ date: 2020-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '2.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.0'
42
+ version: '6.0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '2.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '5.0'
52
+ version: '6.0'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rake
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.4.5
150
+ rubygems_version: 2.5.2.3
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Managing slugs in Mongoid models