acts-as-taggable-on-mongoid 6.0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +63 -0
  3. data/.gitignore +54 -0
  4. data/.reek.yml +8 -0
  5. data/.rspec +2 -0
  6. data/.rubocop.yml +59 -0
  7. data/.ruby-version +1 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +10 -0
  10. data/Gemfile.lock +203 -0
  11. data/LICENSE.txt +21 -0
  12. data/PULL_REQUEST_TEMPLATE.md +11 -0
  13. data/README.md +741 -0
  14. data/Rakefile +8 -0
  15. data/acts-as-taggable-on-mongoid.gemspec +54 -0
  16. data/bin/console +14 -0
  17. data/bin/setup +8 -0
  18. data/codecov.yml +3 -0
  19. data/config/pronto-circleci.yml +7 -0
  20. data/lib/acts-as-taggable-on-mongoid.rb +80 -0
  21. data/lib/acts_as_taggable_on_mongoid/configuration.rb +94 -0
  22. data/lib/acts_as_taggable_on_mongoid/default_parser.rb +120 -0
  23. data/lib/acts_as_taggable_on_mongoid/errors/duplicate_tag_error.rb +9 -0
  24. data/lib/acts_as_taggable_on_mongoid/generic_parser.rb +44 -0
  25. data/lib/acts_as_taggable_on_mongoid/models/tag.rb +103 -0
  26. data/lib/acts_as_taggable_on_mongoid/models/tagging.rb +80 -0
  27. data/lib/acts_as_taggable_on_mongoid/tag_list.rb +169 -0
  28. data/lib/acts_as_taggable_on_mongoid/taggable.rb +131 -0
  29. data/lib/acts_as_taggable_on_mongoid/taggable/changeable.rb +71 -0
  30. data/lib/acts_as_taggable_on_mongoid/taggable/core.rb +219 -0
  31. data/lib/acts_as_taggable_on_mongoid/taggable/list_tags.rb +45 -0
  32. data/lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition.rb +189 -0
  33. data/lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb +77 -0
  34. data/lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/changeable.rb +140 -0
  35. data/lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/names.rb +39 -0
  36. data/lib/acts_as_taggable_on_mongoid/taggable/utils/tag_list_diff.rb +121 -0
  37. data/lib/acts_as_taggable_on_mongoid/version.rb +5 -0
  38. metadata +352 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1f6ce2d51035fb3fb89a0fb231fed320cf3e2cad
4
+ data.tar.gz: 97b5143f687988711ee7899914bd34524ead070c
5
+ SHA512:
6
+ metadata.gz: 1a2f8d3abef2f906dc49195efb0220f3bc90edd0f10ff35296efaf365f113bbad7f0533bf14506b883a7b327a4d627b2169af6078df91402bbdcfa8c4b67409a
7
+ data.tar.gz: e26e1cc6db0bc21dc6341362e6789621410f651a61feb6e2ee34fe9550041ad8cf568ffd230e953f2dc03369d779d3300e04931717334fccd4e4a9d6ab515289
@@ -0,0 +1,63 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # specify the version you desire here
10
+ - image: circleci/ruby:2.3.4-node-browsers
11
+ environment:
12
+ PRONTO_GITHUB_ACCESS_TOKEN: testing
13
+ - image: mongo:3.6.7-jessie
14
+
15
+ working_directory: ~/repo
16
+
17
+ steps:
18
+ - checkout
19
+
20
+ # Download and cache dependencies
21
+ - restore_cache:
22
+ keys:
23
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
24
+ # fallback to using the latest cache if no exact match is found
25
+ - v1-dependencies-
26
+
27
+ - run:
28
+ name: Install system dependencies
29
+ command: |
30
+ sudo apt-get update
31
+ sudo apt-get install cmake
32
+
33
+ - run:
34
+ name: install dependencies
35
+ command: |
36
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
37
+
38
+ - save_cache:
39
+ paths:
40
+ - ./venv
41
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
42
+
43
+ - run:
44
+ name: pronto
45
+ command: echo ${PRONTO_GITHUB_ACCESS_TOKEN} && bundle exec pronto-circleci
46
+
47
+ # run tests!
48
+ - run:
49
+ name: run tests
50
+ command: |
51
+ mkdir /tmp/test-results
52
+
53
+ bundle exec rspec --format progress \
54
+ --format RspecJunitFormatter \
55
+ --out /tmp/test-results/rspec.xml \
56
+ --format progress
57
+
58
+ # collect reports
59
+ - store_test_results:
60
+ path: /tmp/test-results
61
+ - store_artifacts:
62
+ path: /tmp/test-results
63
+ destination: test-results
@@ -0,0 +1,54 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
51
+
52
+ .idea/
53
+ .rspec_status
54
+ cornucopia_report/
@@ -0,0 +1,8 @@
1
+ ---
2
+ detectors:
3
+ # TooManyStatements is covered by RuboCop.
4
+ TooManyStatements:
5
+ enabled: false
6
+ NilCheck:
7
+ enabled: false
8
+ exclude: []
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,59 @@
1
+ # https://github.com/bbatsov/rubocop/blob/master/config/default.yml
2
+
3
+ Documentation:
4
+ Enabled: false
5
+
6
+ AllCops:
7
+ TargetRubyVersion: 2.3
8
+ Exclude:
9
+ - "bin/**/*"
10
+
11
+ LineLength:
12
+ Max: 150
13
+
14
+ ## Multi-line method chaining should be done with leading dots.
15
+ Layout/DotPosition:
16
+ EnforcedStyle: trailing
17
+
18
+ Layout/MultilineMethodCallIndentation:
19
+ Enabled: false
20
+
21
+ Layout/MultilineOperationIndentation:
22
+ Enabled: false
23
+
24
+ Metrics/MethodLength:
25
+ Max: 15
26
+
27
+ StringLiterals:
28
+ EnforcedStyle: double_quotes
29
+
30
+ IndentHash:
31
+ EnforcedStyle: consistent
32
+
33
+ # Indentation of `when`.
34
+ Layout/CaseIndentation:
35
+ EnforcedStyle: case
36
+ SupportedStyles:
37
+ - case
38
+ - end
39
+ IndentOneStep: true
40
+ # By default, the indentation width from Style/IndentationWidth is used
41
+ # But it can be overridden by setting this parameter
42
+ # This only matters if IndentOneStep is true
43
+ IndentationWidth: ~
44
+
45
+ Metrics/ClassLength:
46
+ Max: 150
47
+
48
+ Metrics/ModuleLength:
49
+ Max: 150
50
+
51
+ Metrics/BlockLength:
52
+ Exclude:
53
+ - "spec/**/*"
54
+ - "*.gemspec"
55
+
56
+ Naming/FileName:
57
+ Exclude:
58
+ - "lib/acts-as-taggable-on-mongoid.rb"
59
+ - "acts-as-taggable-on-mongoid.gemspec"
@@ -0,0 +1 @@
1
+ 2.3.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at admin@cardtapp.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { "https://github.com/CardTapp/acts-as-taggable-on-mongoid" }
6
+
7
+ # Specify your gem's dependencies in acts-as-taggable-on-mongoid.gemspec
8
+ gemspec
9
+
10
+ gem "gem-release"
@@ -0,0 +1,203 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ acts-as-taggable-on-mongoid (6.0.1.1)
5
+ activesupport (~> 4.2)
6
+ mongoid (~> 5.2)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (4.2.10)
12
+ activesupport (= 4.2.10)
13
+ builder (~> 3.1)
14
+ activesupport (4.2.10)
15
+ i18n (~> 0.7)
16
+ minitest (~> 5.1)
17
+ thread_safe (~> 0.3, >= 0.3.4)
18
+ tzinfo (~> 1.1)
19
+ addressable (2.5.2)
20
+ public_suffix (>= 2.0.2, < 4.0)
21
+ ast (2.4.0)
22
+ axiom-types (0.1.1)
23
+ descendants_tracker (~> 0.0.4)
24
+ ice_nine (~> 0.11.0)
25
+ thread_safe (~> 0.3, >= 0.3.1)
26
+ brakeman (4.3.1)
27
+ bson (4.3.0)
28
+ builder (3.2.3)
29
+ code_analyzer (0.4.8)
30
+ sexp_processor
31
+ codeclimate-engine-rb (0.4.1)
32
+ virtus (~> 1.0)
33
+ codecov (0.1.10)
34
+ json
35
+ simplecov
36
+ url
37
+ coercible (1.0.0)
38
+ descendants_tracker (~> 0.0.1)
39
+ colorize (0.8.1)
40
+ concurrent-ruby (1.0.5)
41
+ cornucopia (0.1.53)
42
+ activesupport (< 5.0)
43
+ database_cleaner (1.7.0)
44
+ descendants_tracker (0.0.4)
45
+ thread_safe (~> 0.3, >= 0.3.1)
46
+ diff-lcs (1.3)
47
+ docile (1.3.1)
48
+ equalizer (0.0.11)
49
+ erubis (2.7.0)
50
+ faraday (0.15.2)
51
+ multipart-post (>= 1.2, < 3)
52
+ fasterer (0.4.1)
53
+ colorize (~> 0.7)
54
+ ruby_parser (~> 3.11.0)
55
+ gem-release (2.0.1)
56
+ gitlab (4.5.0)
57
+ httparty (>= 0.14.0)
58
+ terminal-table (>= 1.5.1)
59
+ httparty (0.16.2)
60
+ multi_xml (>= 0.5.2)
61
+ i18n (0.9.5)
62
+ concurrent-ruby (~> 1.0)
63
+ ice_nine (0.11.2)
64
+ jaro_winkler (1.5.1)
65
+ json (2.1.0)
66
+ kwalify (0.7.2)
67
+ minitest (5.11.3)
68
+ mongo (2.6.2)
69
+ bson (>= 4.3.0, < 5.0.0)
70
+ mongoid (5.4.0)
71
+ activemodel (~> 4.0)
72
+ mongo (>= 2.5.1, < 3.0.0)
73
+ origin (~> 2.3)
74
+ tzinfo (>= 0.3.37)
75
+ multi_xml (0.6.0)
76
+ multipart-post (2.0.0)
77
+ octokit (4.11.0)
78
+ sawyer (~> 0.8.0, >= 0.5.3)
79
+ origin (2.3.1)
80
+ parallel (1.12.1)
81
+ parser (2.5.1.2)
82
+ ast (~> 2.4.0)
83
+ powerpack (0.1.2)
84
+ pronto (0.9.5)
85
+ gitlab (~> 4.0, >= 4.0.0)
86
+ httparty (>= 0.13.7)
87
+ octokit (~> 4.7, >= 4.7.0)
88
+ rainbow (~> 2.1)
89
+ rugged (~> 0.24, >= 0.23.0)
90
+ thor (~> 0.19.0)
91
+ pronto-brakeman (0.9.1)
92
+ brakeman (>= 3.2.0)
93
+ pronto (~> 0.9.0)
94
+ pronto-circleci (1.0.1)
95
+ pronto (~> 0.9)
96
+ pronto-fasterer (0.9.0)
97
+ fasterer (~> 0.3, >= 0.3.0)
98
+ pronto (~> 0.9.0)
99
+ pronto-rails_best_practices (0.9.0)
100
+ pronto (~> 0.9.0)
101
+ rails_best_practices (~> 1.16, >= 1.15.0)
102
+ pronto-reek (0.9.1)
103
+ pronto (~> 0.9.0)
104
+ reek (>= 4.2, < 6.0)
105
+ pronto-rubocop (0.9.1)
106
+ pronto (~> 0.9.0)
107
+ rubocop (~> 0.50, >= 0.49.1)
108
+ public_suffix (3.0.3)
109
+ rails_best_practices (1.19.3)
110
+ activesupport
111
+ code_analyzer (>= 0.4.8)
112
+ erubis
113
+ i18n
114
+ json
115
+ require_all (~> 2.0)
116
+ ruby-progressbar
117
+ rainbow (2.2.2)
118
+ rake
119
+ rake (10.5.0)
120
+ reek (5.0.2)
121
+ codeclimate-engine-rb (~> 0.4.0)
122
+ kwalify (~> 0.7.0)
123
+ parser (>= 2.5.0.0, < 2.6, != 2.5.1.1)
124
+ rainbow (>= 2.0, < 4.0)
125
+ require_all (2.0.0)
126
+ rspec (3.8.0)
127
+ rspec-core (~> 3.8.0)
128
+ rspec-expectations (~> 3.8.0)
129
+ rspec-mocks (~> 3.8.0)
130
+ rspec-core (3.8.0)
131
+ rspec-support (~> 3.8.0)
132
+ rspec-expectations (3.8.1)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.8.0)
135
+ rspec-mocks (3.8.0)
136
+ diff-lcs (>= 1.2.0, < 2.0)
137
+ rspec-support (~> 3.8.0)
138
+ rspec-support (3.8.0)
139
+ rspec_junit_formatter (0.3.0)
140
+ rspec-core (>= 2, < 4, != 2.12.0)
141
+ rubocop (0.59.0)
142
+ jaro_winkler (~> 1.5.1)
143
+ parallel (~> 1.10)
144
+ parser (>= 2.5, != 2.5.1.1)
145
+ powerpack (~> 0.1)
146
+ rainbow (>= 2.2.2, < 4.0)
147
+ ruby-progressbar (~> 1.7)
148
+ unicode-display_width (~> 1.0, >= 1.0.1)
149
+ ruby-progressbar (1.10.0)
150
+ ruby_parser (3.11.0)
151
+ sexp_processor (~> 4.9)
152
+ rugged (0.27.4)
153
+ sawyer (0.8.1)
154
+ addressable (>= 2.3.5, < 2.6)
155
+ faraday (~> 0.8, < 1.0)
156
+ sexp_processor (4.11.0)
157
+ simplecov (0.16.1)
158
+ docile (~> 1.1)
159
+ json (>= 1.8, < 3)
160
+ simplecov-html (~> 0.10.0)
161
+ simplecov-html (0.10.2)
162
+ simplecov-rcov (0.2.3)
163
+ simplecov (>= 0.4.1)
164
+ terminal-table (1.8.0)
165
+ unicode-display_width (~> 1.1, >= 1.1.1)
166
+ thor (0.19.4)
167
+ thread_safe (0.3.6)
168
+ tzinfo (1.2.5)
169
+ thread_safe (~> 0.1)
170
+ unicode-display_width (1.4.0)
171
+ url (0.3.2)
172
+ virtus (1.0.5)
173
+ axiom-types (~> 0.1)
174
+ coercible (~> 1.0)
175
+ descendants_tracker (~> 0.0, >= 0.0.3)
176
+ equalizer (~> 0.0, >= 0.0.9)
177
+
178
+ PLATFORMS
179
+ ruby
180
+
181
+ DEPENDENCIES
182
+ acts-as-taggable-on-mongoid!
183
+ bundler (~> 1.16)
184
+ codecov (~> 0.1.0, ~> 0.1)
185
+ cornucopia
186
+ database_cleaner
187
+ gem-release
188
+ pronto
189
+ pronto-brakeman
190
+ pronto-circleci
191
+ pronto-fasterer
192
+ pronto-rails_best_practices
193
+ pronto-reek
194
+ pronto-rubocop
195
+ rake (~> 10.0)
196
+ rspec (~> 3.0)
197
+ rspec_junit_formatter (~> 0.3.0)
198
+ rubocop
199
+ simplecov
200
+ simplecov-rcov
201
+
202
+ BUNDLED WITH
203
+ 1.16.4