mongoid-tags 1.0.1 → 1.1.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: 7e3eb9baee67d9b7ae556513ac312dd049525f18
4
- data.tar.gz: f9beb4fb65822bdcb5ec00906c78df6488cd5e32
3
+ metadata.gz: 20edc410641cf609150b1c719a786077ddb81f46
4
+ data.tar.gz: 76e8f279f834314d93d2d910ff6ab9919fb2378a
5
5
  SHA512:
6
- metadata.gz: 25b4eddb05114dec566fc132905f3c1642d198152d6d81f27d84308649b9606820342d02db631262712b7b5aeda453a90caba60416d83f5de4870c79b1d741b1
7
- data.tar.gz: c063e5d92856c6fab1f2cf381084e28bb361ccd0144027600d9baa20961602c674f7c4840bf6337fb4ab10b1d20339e4476b26624c0dea4c915da3146b7c4e5e
6
+ metadata.gz: 2565b3d743c735affb26b306d722582bd60bb33161bfc7d33d2029cdaa0cc4a7fed0dbe78fb5812ec4b2ae935b468afec99cb403081cc88be6b40230767d6ca0
7
+ data.tar.gz: faca6df0ef2e88397f7fd9f21b7db43f2de93e5a942df91c389da24181bf9c3457e565bd041f9829448de974a1a884c39f730d1ad2138630f15d09789db51545
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ services: mongodb
3
+
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.0
8
+ - 2.2.0
9
+
10
+ gemfile:
11
+ - Gemfile
12
+ - gemfiles/mongoid_4.Gemfile
13
+ - gemfiles/mongoid_5.Gemfile
data/Gemfile CHANGED
@@ -1,6 +1,2 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
-
4
- gem 'minitest'
5
- gem 'rake'
6
- gem 'yard'
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2014 Mario Uher
1
+ Copyright (c) 2012-2015 Mario Uher
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mongoid-tags
1
+ # mongoid-tags [![Build Status](https://travis-ci.org/haihappen/mongoid-tags.svg?branch=master)](https://travis-ci.org/haihappen/mongoid-tags)
2
2
 
3
3
  Mongoid::Tags adds a simple tagging system to your Mongoid documents,
4
4
  and allows you to query them using a boolean search syntax.
@@ -34,9 +34,12 @@ Document.tagged('(+foo +bar) baz')
34
34
 
35
35
  # Documents tagged foo and bar, or foo and baz
36
36
  Document.tagged('(+foo +bar)(+foo +baz)')
37
+
38
+ # Chaining calls
39
+ Document.where(published: true).tagged('foo').desc(:created_at)
37
40
  ```
38
41
 
39
- Be sure to checkout test/integration_test.rb for more examples. By the way, `tagged` returns a `Mongoid::Criteria` object so you can chain it to your existing criteria, e.g: `Document.where(published: true).tagged('foo').desc(:created_at)`
42
+ Be sure to checkout test/integration_test.rb for more examples.
40
43
 
41
44
  ## Contributing
42
45
 
@@ -50,6 +53,6 @@ Be sure to checkout test/integration_test.rb for more examples. By the way, `tag
50
53
 
51
54
  (The MIT license)
52
55
 
53
- Copyright (c) 2012-2014 Mario Uher
56
+ Copyright (c) 2012-2015 Mario Uher
54
57
 
55
58
  See LICENSE.md.
data/Rakefile CHANGED
@@ -6,6 +6,7 @@ rescue LoadError
6
6
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
7
  end
8
8
 
9
+ require 'yard'
9
10
  YARD::Rake::YardocTask.new(:doc)
10
11
 
11
12
  require 'rake/testtask'
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec path: '../'
3
+
4
+ gem 'mongoid', '~> 4.0'
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec path: '../'
3
+
4
+ gem 'mongoid', '~> 5.0'
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Tags
3
- VERSION = '1.0.1'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
data/mongoid-tags.gemspec CHANGED
@@ -18,6 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency 'activesupport', '~> 4.0'
21
- spec.add_dependency 'mongoid', '~> 4.0'
21
+ spec.add_dependency 'mongoid', '>= 4.0.0', '<= 6.0.0'
22
22
  spec.add_dependency 'treetop', '~> 1.5'
23
+
24
+ spec.add_development_dependency 'minitest', '~> 5.0'
25
+ spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'yard', '~> 0.8'
23
27
  end
@@ -7,7 +7,7 @@ require_relative 'test_helper'
7
7
  end
8
8
  end
9
9
 
10
- # Litte helper which helps to DRY tests.
10
+ # Little helper which helps to DRY tests.
11
11
  def include?(*tags)
12
12
  proc do |document|
13
13
  tags.any? do |tag|
data/test/mongoid.yml CHANGED
@@ -1,4 +1,10 @@
1
1
  test:
2
+ clients:
3
+ default:
4
+ database: mongoid_tags_test
5
+ hosts:
6
+ - localhost:27017
7
+ # TODO Remove Mongoid 4.0 support
2
8
  sessions:
3
9
  default:
4
10
  database: mongoid_tags_test
data/test/test_helper.rb CHANGED
@@ -6,6 +6,10 @@ require 'minitest/spec'
6
6
 
7
7
  require 'mongoid/tags'
8
8
 
9
+ if defined?(Mongo)
10
+ Mongo::Logger.logger.level = Logger::INFO
11
+ end
12
+
9
13
  class Document
10
14
  include Mongoid::Document
11
15
  include Mongoid::Tags
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Uher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-22 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: mongoid
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '4.0'
33
+ version: 4.0.0
34
+ - - "<="
35
+ - !ruby/object:Gem::Version
36
+ version: 6.0.0
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: '4.0'
43
+ version: 4.0.0
44
+ - - "<="
45
+ - !ruby/object:Gem::Version
46
+ version: 6.0.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: treetop
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +58,48 @@ dependencies:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: '1.5'
61
+ - !ruby/object:Gem::Dependency
62
+ name: minitest
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '5.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '5.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rake
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '10.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '10.0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: yard
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.8'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0.8'
55
103
  description: Mongoid::Tags adds a simple tagging system to your Mongoid documents,
56
104
  and allows you to query them using a boolean search syntax.
57
105
  email: uher.mario@gmail.com
@@ -60,12 +108,14 @@ extensions: []
60
108
  extra_rdoc_files: []
61
109
  files:
62
110
  - ".gitignore"
111
+ - ".travis.yml"
63
112
  - ".yardopts"
64
- - CHANGELOG.md
65
113
  - Gemfile
66
114
  - LICENSE.md
67
115
  - README.md
68
116
  - Rakefile
117
+ - gemfiles/mongoid_4.Gemfile
118
+ - gemfiles/mongoid_5.Gemfile
69
119
  - lib/mongoid/tags.rb
70
120
  - lib/mongoid/tags.tt
71
121
  - lib/mongoid/tags/version.rb
@@ -94,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
144
  version: '0'
95
145
  requirements: []
96
146
  rubyforge_project:
97
- rubygems_version: 2.2.2
147
+ rubygems_version: 2.5.0
98
148
  signing_key:
99
149
  specification_version: 4
100
150
  summary: Simple tagging system with boolean search.
data/CHANGELOG.md DELETED
@@ -1,20 +0,0 @@
1
- # Not released
2
- * Adds subqueries. See README.md for examples.
3
-
4
- # 0.3.0 (February 12, 2014)
5
- * Use Rake::FileList.
6
- * Removes Gemfile warning.
7
- * Simplifies tests a lot.
8
-
9
- # 0.2.0 (December 31, 2012)
10
- * Use require_relative.
11
-
12
- # 0.1.1 (December 22, 2012)
13
- * Updated gemspec.
14
-
15
- # 0.1.0 (December 22, 2012)
16
- * Added integration specs.
17
- * Added more infos to README.md.
18
-
19
- # 0.0.1 (December 22, 2012)
20
- * First version.