mongoid-ids 0.1.7 → 0.1.8

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: e9972a9121c4854be14d38fe4e5c21c51af16e9c
4
- data.tar.gz: 1c210ceb6bdb7e6388572ccd5a0145f9baa44b75
3
+ metadata.gz: ac42f7033c60036a717aa13d3076285c4d2f4ecb
4
+ data.tar.gz: bf66711631977614ef00f8176d4afaa2173fe0e6
5
5
  SHA512:
6
- metadata.gz: 8f2549a80a6c1599e8d1ab9f471691aca2b6601e173532c73e5632fbc9ef1bb118fc21faf27d2447e978a5f0d29007a40818c8a3a5bf1a1a385bf8a9b4548652
7
- data.tar.gz: 6257c1b856c9e43c1179d65c703ab61cf0f73abd21d7f6bd78d0d3d9d02b391ddd45d813e8084706d14c7f99534321eda92ef6adfc133eb3f1d6a509d45ab95f
6
+ metadata.gz: e05723462b39494112a9af07fc95a6a0daf9e57d0e5480fd599a9ece1c9d123b4e8436b218f22b48dd4867da22c1b2de3d5a0d4d8590e3f5924fc4fd8bb6be99
7
+ data.tar.gz: 9ba40c3708070e09d143c3f89f28f2baf1e5b273269f9eb57cc9059be6e81c48fc4015d0bec797811326edcc5064e4aef4f453ce246719052a3c013d7e597e6b
data/Gemfile CHANGED
@@ -1,10 +1,9 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
5
  group :test do
6
- gem 'rspec', '~> 3.1.0'
7
- gem "codeclimate-test-reporter", require: nil
8
- gem 'database_cleaner'
9
- gem 'mongoid-rspec', '~> 2.0.0'
6
+ gem 'rspec', '>= 3.2.0'
7
+ gem 'codeclimate-test-reporter', require: nil
8
+ gem 'mongoid-rspec', '>= 2.0.0'
10
9
  end
data/README.md CHANGED
@@ -1,16 +1,20 @@
1
- # Mongoid::Ids
2
- [![Code Climate](https://codeclimate.com/github/nofxx/mongoid-ids.png)](https://codeclimate.com/github/nofxx/mongoid-ids)
1
+ Mongoid::Ids
2
+ ============
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/mongoid-ids.png)](http://badge.fury.io/rb/mongoid-ids)
3
5
  [![Dependency Status](https://gemnasium.com/nofxx/mongoid-ids.svg)](https://gemnasium.com/nofxx/mongoid-ids)
4
6
  [![Build Status](https://secure.travis-ci.org/nofxx/mongoid-ids.png)](http://travis-ci.org/nofxx/mongoid-ids)
7
+ [![Code Climate](https://codeclimate.com/github/nofxx/mongoid-ids.png)](https://codeclimate.com/github/nofxx/mongoid-ids)
8
+ [![Coverage Status](https://coveralls.io/repos/nofxx/mongoid-ids/badge.svg)](https://coveralls.io/r/nofxx/mongoid-ids)
5
9
 
6
10
  ## Mongoid::Token || Mongoid::Ids
7
11
 
8
- This gem is a fork that changes the default behaviour of original
9
- Mongoid::Token: instead of custom fields it changes _id by default.
10
- But you may still use tokens on custom fields.
12
+ This gem is a fork that changes the original behaviour of Mongoid::Token:
13
+ Instead of a custom field it changes the `_id` field by default.
14
+ And you may still use tokens on custom fields.
11
15
 
12
16
 
13
- ## Short snappy tokens for Mongoid documents
17
+ ## Short snappy token ids for Mongoid documents
14
18
 
15
19
  This library is a quick and simple way to generate unique, random ids
16
20
  for your mongoid documents, in the cases where you can't, or don't want
@@ -50,6 +54,9 @@ And that's it! There's lots of configuration options too - which are all
50
54
  listed [below](#configuration). By default, the `token` method will
51
55
  create tokens 4 characters long, containing random alphanumeric characters.
52
56
 
57
+ **Notice: Every Mongoid overriding has been removed (#find and #to_param).**
58
+
59
+
53
60
  ## Custom/Extra fields
54
61
 
55
62
 
@@ -214,8 +221,7 @@ token retry_count: 0
214
221
 
215
222
  # Notes
216
223
 
217
- This gem just changes the Mongoid::Token behaviour, use it if you don't
218
- need to change ids:
224
+ This gem just changes the Mongoid::Token behaviour, which is found at:
219
225
 
220
226
  http://github.com/thetron/mongoid_token
221
227
 
@@ -1,6 +1,5 @@
1
1
  $: << File.expand_path("../../lib", __FILE__)
2
2
 
3
- require 'database_cleaner'
4
3
  require 'mongoid'
5
4
  require 'mongoid/ids'
6
5
  require 'benchmark'
@@ -9,8 +8,6 @@ Mongoid.configure do |config|
9
8
  config.connect_to("mongoid_ids_benchmark2")
10
9
  end
11
10
 
12
- DatabaseCleaner.strategy = :truncation
13
-
14
11
  # start benchmarks
15
12
 
16
13
  TOKEN_LENGTH = 5
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Ids
3
- VERSION = '0.1.7'
3
+ VERSION = '0.1.8'
4
4
  end
5
5
  end
data/mongoid-ids.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.description = %q(Mongoid token is a gem for creating random, unique tokens for mongoid documents. Highly configurable and great for making URLs a little more compact.)
14
14
 
15
15
  s.rubyforge_project = 'mongoid-ids'
16
- s.add_dependency 'mongoid', '~> 4.0.0'
16
+ s.add_dependency 'mongoid', '> 4.0.0'
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-ids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Bruning
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-09 00:00:00.000000000 Z
12
+ date: 2015-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">"
19
19
  - !ruby/object:Gem::Version
20
20
  version: 4.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 4.0.0
28
28
  description: Mongoid token is a gem for creating random, unique tokens for mongoid
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project: mongoid-ids
81
- rubygems_version: 2.4.5
81
+ rubygems_version: 2.4.7
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: A little random, unique token generator for Mongoid documents.
@@ -90,4 +90,3 @@ test_files:
90
90
  - spec/mongoid/ids/options_spec.rb
91
91
  - spec/mongoid/token_spec.rb
92
92
  - spec/spec_helper.rb
93
- has_rdoc: