make_taggable 0.7.0 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dummyrc +17 -0
- data/.github/workflows/ci.yml +140 -0
- data/.github/workflows/standard-ci.yml +27 -0
- data/.gitignore +2 -1
- data/CONTRIBUTING.md +5 -31
- data/README.md +20 -9
- data/Rakefile +2 -0
- data/gemfiles/rails_5.gemfile +9 -0
- data/gemfiles/rails_6.gemfile +9 -0
- data/gemfiles/rails_6_1.gemfile +9 -0
- data/gemfiles/rails_master.gemfile +9 -0
- data/lib/make_taggable.rb +1 -1
- data/lib/make_taggable/tag.rb +1 -1
- data/lib/make_taggable/version.rb +1 -1
- data/lib/tasks/setup_test_db.rake +5 -3
- data/make_taggable.gemspec +28 -16
- metadata +87 -248
- data/.github/workflows/mysql_tests.yml +0 -56
- data/.github/workflows/pg_tests.yml +0 -56
- data/.github/workflows/sqlite_tests.yml +0 -47
- data/.github/workflows/standardrb-check.yml +0 -37
- data/.standard.yml +0 -18
- data/.standard_todo.yml +0 -5
- data/LICENSE.txt +0 -21
- data/spec/dummy/README.md +0 -0
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -2
- data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
- data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
- data/spec/dummy/app/controllers/application_controller.rb +0 -2
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/jobs/application_job.rb +0 -7
- data/spec/dummy/app/mailers/application_mailer.rb +0 -4
- data/spec/dummy/app/models/altered_inheriting_taggable_model.rb +0 -5
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/models/cached_model.rb +0 -3
- data/spec/dummy/app/models/cached_model_with_array.rb +0 -5
- data/spec/dummy/app/models/columns_override_model.rb +0 -5
- data/spec/dummy/app/models/company.rb +0 -15
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/inheriting_taggable_model.rb +0 -4
- data/spec/dummy/app/models/market.rb +0 -2
- data/spec/dummy/app/models/non_standard_id_taggable_model.rb +0 -8
- data/spec/dummy/app/models/ordered_taggable_model.rb +0 -4
- data/spec/dummy/app/models/other_cached_model.rb +0 -3
- data/spec/dummy/app/models/other_taggable_model.rb +0 -4
- data/spec/dummy/app/models/student.rb +0 -4
- data/spec/dummy/app/models/taggable_model.rb +0 -14
- data/spec/dummy/app/models/taggable_model_with_json.rb +0 -6
- data/spec/dummy/app/models/untaggable_model.rb +0 -3
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -33
- data/spec/dummy/config.ru +0 -5
- data/spec/dummy/config/application.rb +0 -13
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/credentials.yml.enc +0 -1
- data/spec/dummy/config/database.yml +0 -7
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -52
- data/spec/dummy/config/environments/production.rb +0 -105
- data/spec/dummy/config/environments/test.rb +0 -49
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/cors.rb +0 -16
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -33
- data/spec/dummy/config/master.key +0 -1
- data/spec/dummy/config/mysql_database.yml.ci +0 -8
- data/spec/dummy/config/pg_database.yml.ci +0 -8
- data/spec/dummy/config/puma.rb +0 -38
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/spring.rb +0 -6
- data/spec/dummy/config/storage.yml +0 -34
- data/spec/dummy/db/migrate/020201119220853_create_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/020201119221037_create_columns_override_models.rb +0 -9
- data/spec/dummy/db/migrate/020201119221121_create_non_standard_id_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/020201119221228_create_untaggable_models.rb +0 -8
- data/spec/dummy/db/migrate/020201119221247_create_cached_models.rb +0 -9
- data/spec/dummy/db/migrate/020201119221314_create_other_cached_models.rb +0 -11
- data/spec/dummy/db/migrate/020201119221343_create_companies.rb +0 -7
- data/spec/dummy/db/migrate/020201119221416_create_users.rb +0 -7
- data/spec/dummy/db/migrate/020201119221434_create_other_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/020201119221507_create_ordered_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/020201119221530_create_cache_methods_injected_models.rb +0 -7
- data/spec/dummy/db/migrate/020201119221629_create_other_cached_with_array_models.rb +0 -11
- data/spec/dummy/db/migrate/020201119221746_create_taggable_model_with_jsons.rb +0 -9
- data/spec/dummy/lib/tasks/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/robots.txt +0 -1
- data/spec/dummy/storage/.keep +0 -0
- data/spec/dummy/test/channels/application_cable/connection_test.rb +0 -11
- data/spec/dummy/test/controllers/.keep +0 -0
- data/spec/dummy/test/fixtures/.keep +0 -0
- data/spec/dummy/test/fixtures/files/.keep +0 -0
- data/spec/dummy/test/integration/.keep +0 -0
- data/spec/dummy/test/mailers/.keep +0 -0
- data/spec/dummy/test/models/.keep +0 -0
- data/spec/dummy/test/test_helper.rb +0 -13
- data/spec/dummy/vendor/.keep +0 -0
- data/spec/make_taggable/acts_as_tagger_spec.rb +0 -112
- data/spec/make_taggable/caching_spec.rb +0 -123
- data/spec/make_taggable/default_parser_spec.rb +0 -45
- data/spec/make_taggable/dirty_spec.rb +0 -140
- data/spec/make_taggable/generic_parser_spec.rb +0 -13
- data/spec/make_taggable/make_taggable_spec.rb +0 -260
- data/spec/make_taggable/related_spec.rb +0 -93
- data/spec/make_taggable/single_table_inheritance_spec.rb +0 -220
- data/spec/make_taggable/tag_list_spec.rb +0 -169
- data/spec/make_taggable/tag_spec.rb +0 -135
- data/spec/make_taggable/taggable_spec.rb +0 -804
- data/spec/make_taggable/tagger_spec.rb +0 -149
- data/spec/make_taggable/tagging_spec.rb +0 -115
- data/spec/make_taggable/tags_helper_spec.rb +0 -43
- data/spec/make_taggable/utils_spec.rb +0 -22
- data/spec/make_taggable_spec.rb +0 -5
- data/spec/spec_helper.rb +0 -16
- data/spec/support/array.rb +0 -9
- data/spec/support/helpers.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 418910d2f9e9a651f3101d4e9d1688d970e1fa5aa4bd4036ba7bcf8e0efff02b
|
4
|
+
data.tar.gz: 6aeadae682477523982efee1f9a4903613c5a23e3512580d32f7c8e319516a16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e63d4adb3aff65c339dc11359b908b93afd8f3cf142862b27868238af14f7e885a0b9076ca7ac4915090caa4dad591b7ad809d9177c1d4433a2b9f35d526808c
|
7
|
+
data.tar.gz: '097d51f1401b7112455748cdd3be4e6024c87f6ffef95005c74dc384d67726b0451de624053e8d7d4e19dfe03b59c7387df4ab16e24643fe63ab0b91e4f0487c'
|
data/.dummyrc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
--skip-bootsnap
|
2
|
+
--skip-webpack
|
3
|
+
--skip-action-cable
|
4
|
+
--skip-spring
|
5
|
+
--skip-coffee
|
6
|
+
--skip-turbolinks
|
7
|
+
--skip-listen
|
8
|
+
--skip-action-text
|
9
|
+
--skip-active-storage
|
10
|
+
--skip-action-cable
|
11
|
+
--skip-action-mailer
|
12
|
+
--skip-action-mailbox
|
13
|
+
--skip-active-job
|
14
|
+
--skip-javascript
|
15
|
+
--skip-test
|
16
|
+
|
17
|
+
--template=spec/template/test_app_template.rb
|
@@ -0,0 +1,140 @@
|
|
1
|
+
---
|
2
|
+
name: CI
|
3
|
+
|
4
|
+
on:
|
5
|
+
pull_request:
|
6
|
+
branches:
|
7
|
+
- '*'
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
jobs:
|
12
|
+
# SQLITE
|
13
|
+
sqlite:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
ruby: ['2.6', '2.7', '3.0']
|
18
|
+
gemfile:
|
19
|
+
- rails_5
|
20
|
+
- rails_6
|
21
|
+
- rails_6_1
|
22
|
+
- rails_master
|
23
|
+
exclude:
|
24
|
+
- ruby: '3.0'
|
25
|
+
gemfile: rails_5
|
26
|
+
# Rails 7 requires Ruby 2.7 or higher
|
27
|
+
- ruby: '2.6'
|
28
|
+
gemfile: rails_master
|
29
|
+
env:
|
30
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
31
|
+
BUNDLE_PATH_RELATIVE_TO_CWD: true
|
32
|
+
|
33
|
+
steps:
|
34
|
+
- uses: actions/checkout@v2
|
35
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
36
|
+
uses: ruby/setup-ruby@v1
|
37
|
+
with:
|
38
|
+
ruby-version: ${{ matrix.ruby }}
|
39
|
+
bundler-cache: true
|
40
|
+
|
41
|
+
- name: Run tests
|
42
|
+
env:
|
43
|
+
RAILS_ENV: test
|
44
|
+
run: |
|
45
|
+
bundle exec rake create_test_app
|
46
|
+
bundle exec rake
|
47
|
+
|
48
|
+
|
49
|
+
# MYSQL
|
50
|
+
mysql:
|
51
|
+
runs-on: ubuntu-latest
|
52
|
+
strategy:
|
53
|
+
matrix:
|
54
|
+
ruby: ['2.6', '2.7', '3.0']
|
55
|
+
gemfile:
|
56
|
+
- rails_5
|
57
|
+
- rails_6
|
58
|
+
- rails_6_1
|
59
|
+
- rails_master
|
60
|
+
exclude:
|
61
|
+
- ruby: '3.0'
|
62
|
+
gemfile: rails_5
|
63
|
+
# Rails 7 requires Ruby 2.7 or higher
|
64
|
+
- ruby: '2.6'
|
65
|
+
gemfile: rails_master
|
66
|
+
env:
|
67
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
68
|
+
BUNDLE_PATH_RELATIVE_TO_CWD: true
|
69
|
+
|
70
|
+
services:
|
71
|
+
mysql:
|
72
|
+
image: mysql:8
|
73
|
+
env:
|
74
|
+
MYSQL_ROOT_PASSWORD: password
|
75
|
+
MSQL_DATABASE: test
|
76
|
+
ports: ['3306:3306']
|
77
|
+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
78
|
+
|
79
|
+
steps:
|
80
|
+
- uses: actions/checkout@v2
|
81
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
82
|
+
uses: ruby/setup-ruby@v1
|
83
|
+
with:
|
84
|
+
ruby-version: ${{ matrix.ruby }}
|
85
|
+
bundler-cache: true
|
86
|
+
|
87
|
+
- name: Run tests
|
88
|
+
env:
|
89
|
+
DATABASE_URL: mysql2://root:password@127.0.0.1:3306/test
|
90
|
+
RAILS_ENV: test
|
91
|
+
run: |
|
92
|
+
bundle exec rake create_test_app
|
93
|
+
bundle exec rake
|
94
|
+
|
95
|
+
|
96
|
+
# POSTGRES
|
97
|
+
postgres:
|
98
|
+
runs-on: ubuntu-latest
|
99
|
+
strategy:
|
100
|
+
matrix:
|
101
|
+
ruby: ['2.6', '2.7', '3.0']
|
102
|
+
gemfile:
|
103
|
+
- rails_5
|
104
|
+
- rails_6
|
105
|
+
- rails_6_1
|
106
|
+
- rails_master
|
107
|
+
exclude:
|
108
|
+
- ruby: '3.0'
|
109
|
+
gemfile: rails_5
|
110
|
+
# Rails 7 requires Ruby 2.7 or higher
|
111
|
+
- ruby: '2.6'
|
112
|
+
gemfile: rails_master
|
113
|
+
env:
|
114
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
115
|
+
BUNDLE_PATH_RELATIVE_TO_CWD: true
|
116
|
+
|
117
|
+
services:
|
118
|
+
postgres:
|
119
|
+
image: postgres:12
|
120
|
+
env:
|
121
|
+
POSTGRES_USER: postgres
|
122
|
+
POSTGRES_PASSWORD: password
|
123
|
+
POSTGRES_DB: test
|
124
|
+
ports: ['5432:5432']
|
125
|
+
|
126
|
+
steps:
|
127
|
+
- uses: actions/checkout@v2
|
128
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
129
|
+
uses: ruby/setup-ruby@v1
|
130
|
+
with:
|
131
|
+
ruby-version: ${{ matrix.ruby }}
|
132
|
+
bundler-cache: true
|
133
|
+
|
134
|
+
- name: Run tests
|
135
|
+
env:
|
136
|
+
DATABASE_URL: postgres://postgres:password@localhost:5432/test
|
137
|
+
RAILS_ENV: test
|
138
|
+
run: |
|
139
|
+
bundle exec rake create_test_app
|
140
|
+
bundle exec rake
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
name: Standard Rb
|
3
|
+
|
4
|
+
on:
|
5
|
+
pull_request:
|
6
|
+
branches:
|
7
|
+
- '*'
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
jobs:
|
12
|
+
# STANDARD RB
|
13
|
+
standard:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
ruby: ['3.0']
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
bundler-cache: true
|
25
|
+
|
26
|
+
- name: Run Standard Rb
|
27
|
+
run: bundle exec standardrb --format progress
|
data/.gitignore
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -1,21 +1,8 @@
|
|
1
|
-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
2
|
-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
3
|
-
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
4
|
-
|
5
|
-
- [How to contribute:](#how-to-contribute)
|
6
|
-
- [Bug reports / Issues](#bug-reports--issues)
|
7
|
-
- [Code](#code)
|
8
|
-
- [Commit Messages](#commit-messages)
|
9
|
-
- [About Pull Requests (PR's)](#about-pull-requests-prs)
|
10
|
-
- [Documentation](#documentation)
|
11
|
-
|
12
|
-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
13
|
-
|
14
1
|
# How to contribute:
|
15
2
|
|
16
3
|
## Bug reports / Issues
|
17
4
|
|
18
|
-
* Is something broken or not working as expected? Check for an existing issue or [create a new one](https://github.com/
|
5
|
+
* Is something broken or not working as expected? Check for an existing issue or [create a new one](https://github.com/MatthewKennedy/make_taggable/issues/new)
|
19
6
|
* IMPORTANT: Include the version of the gem, if you've install from git, what Ruby and Rails you are running, etc.
|
20
7
|
|
21
8
|
## Code
|
@@ -23,15 +10,14 @@
|
|
23
10
|
1. [Fork and clone the repo](https://help.github.com/articles/fork-a-repo)
|
24
11
|
2. Install the gem dependencies: `bundle install`
|
25
12
|
3. Make the changes you want and back them up with tests.
|
26
|
-
|
27
|
-
|
28
|
-
|
13
|
+
4. Run the tests](https://github.com/MatthewKennedy/make_taggable#testing)
|
14
|
+
5. Update the CHANGELOG.md file with your changes and give yourself credit
|
15
|
+
6. Commit and create a pull request with details as to what has been changed and why
|
29
16
|
* Use well-described, small (atomic) commits.
|
30
17
|
* Include links to any relevant github issues.
|
31
18
|
* *Don't* change the VERSION file.
|
32
|
-
6. Extra Credit: [Confirm it runs and tests pass on the rubies specified in the travis config](.travis.yml). I will otherwise confirm it runs on these.
|
33
19
|
|
34
|
-
How I handle pull requests:
|
20
|
+
## How I handle pull requests:
|
35
21
|
|
36
22
|
* If the tests pass and the pull request looks good, I will merge it.
|
37
23
|
* If the pull request needs to be changed,
|
@@ -40,18 +26,6 @@ How I handle pull requests:
|
|
40
26
|
* by force pushing to it
|
41
27
|
* I can make any changes myself and manually merge the code in.
|
42
28
|
|
43
|
-
### Commit Messages
|
44
|
-
|
45
|
-
* [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
|
46
|
-
* [http://stopwritingramblingcommitmessages.com/](http://stopwritingramblingcommitmessages.com/)
|
47
|
-
* [ThoughtBot style guide](https://github.com/thoughtbot/guides/tree/master/style#git)
|
48
|
-
|
49
|
-
### About Pull Requests (PR's)
|
50
|
-
|
51
|
-
* [All Your Open Source Code Are Belong To Us](http://www.benjaminfleischer.com/2013/07/30/all-your-open-source-code-are-belong-to-us/)
|
52
|
-
* [Using Pull Requests](https://help.github.com/articles/using-pull-requests)
|
53
|
-
* [Github pull requests made easy](http://www.element84.com/github-pull-requests-made-easy.html)
|
54
|
-
|
55
29
|
## Documentation
|
56
30
|
|
57
31
|
* Update the wiki
|
data/README.md
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
# MakeTaggable
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/make_taggable.svg)](https://badge.fury.io/rb/make_taggable)
|
3
|
-
![
|
4
|
-
![
|
5
|
-
![SQLite Tests](https://github.com/MatthewKennedy/make_taggable/workflows/SQLite%20Tests/badge.svg)
|
6
|
-
![Standard Rb](https://github.com/MatthewKennedy/make_taggable/workflows/Standard%20Rb/badge.svg)
|
3
|
+
![CI](https://github.com/MatthewKennedy/make_taggable/workflows/CI/badge.svg)
|
4
|
+
[![Standard Rb](https://github.com/MatthewKennedy/make_taggable/actions/workflows/standard-ci.yml/badge.svg)](https://github.com/MatthewKennedy/make_taggable/actions/workflows/standard-ci.yml)
|
7
5
|
|
8
|
-
MakeTaggable is a
|
9
|
-
|
10
|
-
All credit goes to those who contributed to Acts-As-Taggable-On: Michael Bleigh & Joost Baaij.
|
6
|
+
MakeTaggable is a tagging gem for Rails applications that allows custom tagging along dynamic contexts.
|
11
7
|
|
12
8
|
## Installation
|
13
9
|
|
@@ -497,11 +493,26 @@ bundle exec appraisal install
|
|
497
493
|
bundle exec appraisal rake
|
498
494
|
```
|
499
495
|
|
496
|
+
## Contributing
|
497
|
+
|
498
|
+
Please use the following Standard Rb commands to format your code before creating a pull request:
|
499
|
+
|
500
|
+
Check for code errors:
|
500
501
|
|
501
|
-
|
502
|
+
```shell
|
503
|
+
bundle exec standardrb
|
504
|
+
```
|
505
|
+
|
506
|
+
Fix code errors:
|
507
|
+
|
508
|
+
```shell
|
509
|
+
bundle exec standardrb --fix
|
510
|
+
```
|
511
|
+
For more information please review the [Contributing](https://github.com/MatthewKennedy/make_taggable/blob/master/CONTRIBUTING.md) section.
|
502
512
|
|
513
|
+
#### Contributors
|
503
514
|
List of valued contributors From Acts-As-Taggable-On: [Check them all](https://github.com/mbleigh/acts-as-taggable-on/contributors)
|
504
515
|
|
505
516
|
|
506
517
|
## License
|
507
|
-
This gem is available as open source under the terms of the [MIT License](https://github.com/MatthewKennedy/make_taggable/blob/master/LICENSE.
|
518
|
+
This gem is available as open source under the terms of the [MIT License](https://github.com/MatthewKennedy/make_taggable/blob/master/LICENSE.md).
|
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require "rails/dummy/tasks"
|
2
3
|
|
3
4
|
import "./lib/tasks/tags_collate_utf8.rake"
|
4
5
|
|
@@ -6,6 +7,7 @@ APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
|
6
7
|
|
7
8
|
require "rspec/core/rake_task"
|
8
9
|
RSpec::Core::RakeTask.new(:spec)
|
10
|
+
|
9
11
|
task default: :spec
|
10
12
|
|
11
13
|
load "lib/tasks/setup_test_db.rake"
|
data/lib/make_taggable.rb
CHANGED
@@ -60,7 +60,7 @@ module MakeTaggable
|
|
60
60
|
def self.glue
|
61
61
|
setting = @configuration.delimiter
|
62
62
|
delimiter = setting.is_a?(Array) ? setting[0] : setting
|
63
|
-
delimiter.
|
63
|
+
delimiter.end_with?(" ") ? delimiter : "#{delimiter} "
|
64
64
|
end
|
65
65
|
|
66
66
|
class Configuration
|
data/lib/make_taggable/tag.rb
CHANGED
@@ -7,7 +7,7 @@ module MakeTaggable
|
|
7
7
|
|
8
8
|
### VALIDATIONS:
|
9
9
|
validates_presence_of :name
|
10
|
-
validates_uniqueness_of :name, if: :validates_name_uniqueness
|
10
|
+
validates_uniqueness_of :name, if: :validates_name_uniqueness?, case_sensitive: true
|
11
11
|
validates_length_of :name, maximum: 255
|
12
12
|
|
13
13
|
# Monkey patch this method if don't need name uniqueness validation
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require "fileutils"
|
2
2
|
|
3
|
-
desc "
|
4
|
-
task :
|
5
|
-
|
3
|
+
desc "Create a test app"
|
4
|
+
task :create_test_app do
|
5
|
+
ENV["RAILS_ENV"] = "test"
|
6
|
+
ENV["ENGINE"] = "make_taggable_engine"
|
7
|
+
Rake::Task["dummy:app"].invoke
|
6
8
|
end
|
data/make_taggable.gemspec
CHANGED
@@ -1,32 +1,44 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require "make_taggable/version"
|
1
|
+
require_relative "lib/make_taggable/version"
|
4
2
|
|
5
3
|
Gem::Specification.new do |spec|
|
6
4
|
spec.name = "make_taggable"
|
7
5
|
spec.version = MakeTaggable::VERSION
|
8
6
|
spec.authors = ["Matthew Kennedy", "Michael Bleigh", "Joost Baaij"]
|
9
7
|
spec.email = %w[m.kennedy@me.com]
|
10
|
-
|
8
|
+
|
9
|
+
spec.required_ruby_version = ">= 2.5"
|
10
|
+
|
11
11
|
spec.summary = "Advanced Tagging For Rails"
|
12
|
+
spec.description = "MakeTaggable is a fork of Acts-As-Taggable-On with code updates & fresh migrations"
|
13
|
+
|
12
14
|
spec.homepage = "https://github.com/MatthewKennedy/make_taggable"
|
13
15
|
spec.license = "MIT"
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/MatthewKennedy/make_taggable/blob/master/CHANGELOG.md"
|
20
|
+
|
21
|
+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
17
23
|
end
|
18
24
|
|
19
|
-
spec.
|
20
|
-
spec.
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
27
|
spec.require_paths = ["lib"]
|
22
28
|
|
23
|
-
spec.add_dependency "
|
29
|
+
spec.add_dependency "activerecord", ">= 5.2.0", "<= 7.5.0"
|
30
|
+
|
31
|
+
spec.add_development_dependency "rails", ">= 5.2.0", "<= 7.5.0"
|
32
|
+
spec.add_development_dependency "appraisal", "~> 2.3.0"
|
33
|
+
spec.add_development_dependency "mysql2", "~> 0.5.0"
|
34
|
+
spec.add_development_dependency "pg", "~> 1.2.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.10.0"
|
36
|
+
spec.add_development_dependency "rspec-rails", "~> 4.0.0"
|
37
|
+
spec.add_development_dependency "standard", "~> 0.10.0"
|
38
|
+
spec.add_development_dependency "sqlite3", "~> 1.4.0"
|
39
|
+
spec.add_development_dependency "rails-dummy", "~> 0.1.0"
|
24
40
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
spec.add_development_dependency "rspec"
|
29
|
-
spec.add_development_dependency "rspec-rails"
|
30
|
-
spec.add_development_dependency "standard"
|
31
|
-
spec.add_development_dependency "sqlite3"
|
41
|
+
if File.exist?("UPGRADING.md")
|
42
|
+
spec.post_install_message = File.read("UPGRADING.md")
|
43
|
+
end
|
32
44
|
end
|