mongoid-compatibility 0.3.1 → 0.4.0

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: 873f442a8ff9a2b84c0d38cafd5a802ce0a28466
4
- data.tar.gz: e9545691f356f72e835059e32913e3e4e30e8a28
3
+ metadata.gz: c32e8333d20b93c010788f9ee345e7bc496cf30a
4
+ data.tar.gz: 76827fe2f469908a875afc246ed2693abe4a2a7f
5
5
  SHA512:
6
- metadata.gz: dfc225ab3375d9edbf93dbe5f6174e6fdbe6cd588e2ef353b0809ae69fc1d70751566d1888765f01558e3f3c85f27360a5830d70bba544b92e03e700ca3ae17b
7
- data.tar.gz: cdc4bf29128fc0660567c4c5491e3325b305934630c74c790d45124d36347e14fe09b202ac36a4e2ba7414df9e176bd66417439f34fd80631d369d851f0e6c06
6
+ metadata.gz: 85c70c14684f4bf0222634e529b0957fbb0e544c4ff81a44f9d5cae9fb04724c4f62290d3000232dd158aabec1a8d37c9b74859027f811c5acb2d32469bbcd81
7
+ data.tar.gz: a20d6f466a42dc1d017e7897165d9e599e2ea26084e4e538c3312159ba06bb9eeb109bc5d6656ba3b5891aa2ed77e2065612746c278de45597e0d0b33fe23b85
@@ -1,9 +1,10 @@
1
1
  rvm:
2
+ - 2.3.1
2
3
  - 2.2
3
4
  - 2.1.1
4
5
  - 2.0.0
5
6
  - 1.9.3
6
- - rbx-2.2.10
7
+ - rbx-2
7
8
  - jruby-19mode
8
9
 
9
10
  services:
@@ -15,3 +16,10 @@ env:
15
16
  - MONGOID_VERSION=4
16
17
  - MONGOID_VERSION=5
17
18
 
19
+ matrix:
20
+ include:
21
+ - rvm: 2.3.1
22
+ env:
23
+ - MONGOID_VERSION=6
24
+ allow_failures:
25
+ - rvm: rbx-2
@@ -1,3 +1,10 @@
1
+ ### Next Release
2
+ * Your contribution here!
3
+
4
+ ### 0.4.0 (2016/05/21)
5
+
6
+ * Compatibility with Mongoid 6 prerelease - [@phyllisstein](https://github.com/phyllisstein).
7
+
1
8
  ### 0.3.1 (2015/09/25)
2
9
 
3
10
  * Compatibility with Mongoid 2 - [@dblock](https://github.com/dblock).
data/Gemfile CHANGED
@@ -3,6 +3,8 @@ source 'http://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  case version = ENV['MONGOID_VERSION'] || '5.0'
6
+ when /^6/
7
+ gem 'mongoid', github: 'mongodb/mongoid'
6
8
  when /^5/
7
9
  gem 'mongoid', '~> 5.0'
8
10
  when /^4/
data/README.md CHANGED
@@ -6,7 +6,7 @@ Mongoid::Compatibility
6
6
  [![Dependency Status](https://gemnasium.com/dblock/mongoid-compatibility.svg)](https://gemnasium.com/dblock/mongoid-compatibility)
7
7
  [![Code Climate](https://codeclimate.com/github/dblock/mongoid-compatibility.svg)](https://codeclimate.com/github/dblock/mongoid-compatibility)
8
8
 
9
- Compatibility helpers for Mongoid 2, 3, 4 and 5.
9
+ Compatibility helpers for Mongoid versions 2, 3, 4, and 5, and the **prerelease** version 6.
10
10
 
11
11
  ### Install
12
12
 
@@ -34,6 +34,9 @@ Mongoid::Compatibility::Version.mongoid4?
34
34
 
35
35
  Mongoid::Compatibility::Version.mongoid5?
36
36
  # => is this Mongoid 5.x?
37
+
38
+ Mongoid::Compatibility::Version.mongoid6?
39
+ # => is this Mongoid 6.x?
37
40
  ```
38
41
 
39
42
  #### Mongoid::Compatibility::ObjectId
@@ -0,0 +1,43 @@
1
+ # Releasing `mongoid-compatibility`
2
+ ## Guidelines
3
+ Generally, `mongoid-compatibility` should be released with enthusiasm but care. Release bug fixes as added, features as desired, and breaking API changes as absolutely necessary.
4
+
5
+ ## This is how we do it.
6
+ 1. Run the test suite in your local environment first, and ensure that everything's passing.
7
+
8
+ ```bash
9
+ bundle install
10
+ rake
11
+ ```
12
+
13
+ 2. Run the test suite on [Travis](https://travis-ci.org) to be certain that your changes work in a variety of environments. Only merge and release when all tests are passing.
14
+
15
+ 3. Bump the version in [`lib/mongoid/compatibility/self.rb`](lib/mongoid/compatibility/self.rb).
16
+
17
+ * If the release fixes bugs or adds features with negligible impact, increment the third number (e.g., `0.3.2` → `0.3.3`).
18
+ * If the release adds significant new features, increment the second number and zero out the third (e.g., `0.3.2` → `0.4.0`).
19
+ * If the release adds breaking API changes, increment the first number and zero out the second and third (e.g., `0.3.2` → `1.0.0`).
20
+
21
+ You've gotta know it---it's semantic!
22
+
23
+ 4. Add a header for the new version to [`CHANGELOG.md`](CHANGELOG.md) and list all the changes your release will include underneath it, crediting contributors as appropriate.
24
+
25
+ 6. Update the [`README`](README.md) to document any new features. Remove any warnings indicating that users are reading the documentation for an unreleased version.
26
+
27
+ 7. Commit your changes...
28
+
29
+ ```bash
30
+ git add README.md CHANGELOG.md lib/mongoid/compatibility/self.rb
31
+ git commit -m "Preparing for release, 0.4.0."
32
+ git push origin master
33
+ ```
34
+
35
+ 8. ...and do the thing!
36
+
37
+ ```bash
38
+ rake release
39
+ #=> mongoid-compatibility 0.4.0 built to pkg/mongoid-compatibility-0.4.0.gem
40
+ #=> Tagged 0.4.0.
41
+ #=> Pushed git commits and tags.
42
+ #=> Pushed mongoid-compatibility 0.4.0 to rubygems.org.
43
+ ```
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Compatibility
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -2,7 +2,7 @@ module Mongoid
2
2
  module Compatibility
3
3
  module Version
4
4
  module ClassMethods
5
- (2..5).each do |v|
5
+ (2..6).each do |v|
6
6
  const_set "V#{v}", Mongoid::VERSION =~ Regexp.new("^#{v}\.")
7
7
 
8
8
  define_method "mongoid#{v}?" do
@@ -0,0 +1,8 @@
1
+ test:
2
+ clients:
3
+ default:
4
+ database: mongoid-compatibility
5
+ hosts:
6
+ - localhost:27017
7
+ options:
8
+ raise_not_found_error: false
@@ -12,7 +12,7 @@ describe Mongoid::Compatibility::Version do
12
12
  it 'defines version methods' do
13
13
  expect(Mongoid::Compatibility::Version.methods - Object.methods).to_not eq []
14
14
  end
15
- (2..5).each do |v|
15
+ (2..6).each do |v|
16
16
  context "mongoid #{v}" do
17
17
  it "responds to mongoid#{v}?" do
18
18
  expect(Mongoid::Compatibility::Version).to respond_to("mongoid#{v}?")
@@ -8,6 +8,8 @@ elsif Mongoid::Compatibility::Version.mongoid4?
8
8
  Mongoid.load! 'spec/config/mongoid4.yml'
9
9
  elsif Mongoid::Compatibility::Version.mongoid5?
10
10
  Mongoid.load! 'spec/config/mongoid5.yml'
11
+ elsif Mongoid::Compatibility::Version.mongoid6?
12
+ Mongoid.load! 'spec/config/mongoid6.yml'
11
13
  else
12
14
  fail "unsupported Mongoid version #{Mongoid::VERSION}"
13
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-compatibility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -54,6 +54,7 @@ files:
54
54
  - Gemfile
55
55
  - LICENSE.md
56
56
  - README.md
57
+ - RELEASING.md
57
58
  - Rakefile
58
59
  - lib/mongoid-compatibility.rb
59
60
  - lib/mongoid/compatibility.rb
@@ -66,6 +67,7 @@ files:
66
67
  - spec/config/mongoid3.yml
67
68
  - spec/config/mongoid4.yml
68
69
  - spec/config/mongoid5.yml
70
+ - spec/config/mongoid6.yml
69
71
  - spec/mongoid/compatibility/object_id_spec.rb
70
72
  - spec/mongoid/compatibility/self_spec.rb
71
73
  - spec/mongoid/compatibility/version_spec.rb
@@ -91,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  version: 1.3.6
92
94
  requirements: []
93
95
  rubyforge_project:
94
- rubygems_version: 2.2.2
96
+ rubygems_version: 2.6.4
95
97
  signing_key:
96
98
  specification_version: 4
97
99
  summary: Compatibility helpers for Mongoid.