make_taggable 0.6.6 → 0.7.4
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 +4 -4
- data/.dummyrc +17 -0
- data/.github/workflows/ci.yml +115 -22
- data/.github/workflows/standard-ci.yml +27 -0
- data/.gitignore +4 -0
- data/Appraisals +4 -0
- data/CONTRIBUTING.md +5 -31
- data/README.md +59 -28
- data/Rakefile +3 -0
- data/gemfiles/rails_6_1.gemfile +9 -0
- data/lib/make_taggable.rb +4 -4
- data/lib/make_taggable/tag.rb +1 -1
- data/lib/make_taggable/version.rb +1 -2
- data/lib/tasks/setup_test_db.rake +8 -0
- data/make_taggable.gemspec +29 -15
- metadata +109 -252
- data/.standard.yml +0 -18
- data/.standard_todo.yml +0 -5
- data/.travis.yml +0 -36
- data/LICENSE.txt +0 -21
- data/spec/dummy/README.md +0 -24
- 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 -11
- 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/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 -19
- 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 -25
- 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/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/20201119220853_create_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/20201119221037_create_columns_override_models.rb +0 -9
- data/spec/dummy/db/migrate/20201119221121_create_non_standard_id_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/20201119221228_create_untaggable_models.rb +0 -8
- data/spec/dummy/db/migrate/20201119221247_create_cached_models.rb +0 -9
- data/spec/dummy/db/migrate/20201119221314_create_other_cached_models.rb +0 -11
- data/spec/dummy/db/migrate/20201119221343_create_companies.rb +0 -7
- data/spec/dummy/db/migrate/20201119221416_create_users.rb +0 -7
- data/spec/dummy/db/migrate/20201119221434_create_other_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/20201119221507_create_ordered_taggable_models.rb +0 -8
- data/spec/dummy/db/migrate/20201119221530_create_cache_methods_injected_models.rb +0 -7
- data/spec/dummy/db/migrate/20201119221629_create_other_cached_with_array_models.rb +0 -11
- data/spec/dummy/db/migrate/20201119221746_create_taggable_model_with_jsons.rb +0 -9
- data/spec/dummy/db/migrate/20201121222007_create_make_taggable_tags.make_taggable_engine.rb +0 -11
- data/spec/dummy/db/migrate/20201121222008_create_make_taggable_taggings.make_taggable_engine.rb +0 -13
- data/spec/dummy/db/migrate/20201121222009_change_tag_name_collation_mysql.make_taggable_engine.rb +0 -8
- data/spec/dummy/db/migrate/20201121222010_add_index_to_tags.make_taggable_engine.rb +0 -6
- data/spec/dummy/db/migrate/20201121222011_add_index_to_taggings.make_taggable_engine.rb +0 -13
- data/spec/dummy/db/schema.rb +0 -117
- data/spec/dummy/db/seeds.rb +0 -7
- 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 -297
- 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 -18
- 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: c3f8ba23e2c0ef116d6ecf1a84bc4005f844e273043fdc6851fd81d2cdcc4c12
|
|
4
|
+
data.tar.gz: 264f1cfb9480eb07793175f4793c3d868b5e51ca30ab6d04adf014aeeadf9a35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43307738e342679e858293c5801d1bf21bafee7363ac9620de63800590903c448a3aea03a1a3ab3d258b2482f42a12bb5f4baad1065f2648a569b86b0c966eac
|
|
7
|
+
data.tar.gz: e6e2a45780ebdac2539107fe5ff87709975666f6d436cff09129d90c04d444e93ae72a56beef2f7b99af55385969c84cb33b56f0e2ef4593bacc2fd859969258
|
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
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: CI
|
|
2
3
|
|
|
3
4
|
on:
|
|
4
5
|
pull_request:
|
|
@@ -8,40 +9,132 @@ on:
|
|
|
8
9
|
branches:
|
|
9
10
|
- master
|
|
10
11
|
jobs:
|
|
11
|
-
|
|
12
|
+
# SQLITE
|
|
13
|
+
sqlite:
|
|
12
14
|
runs-on: ubuntu-latest
|
|
13
15
|
strategy:
|
|
14
16
|
matrix:
|
|
15
|
-
ruby: [
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
18
32
|
|
|
19
|
-
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v2
|
|
35
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
20
36
|
uses: ruby/setup-ruby@v1
|
|
21
37
|
with:
|
|
22
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
|
+
|
|
23
48
|
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
26
83
|
with:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
32
91
|
run: |
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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']
|
|
39
125
|
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
42
133
|
|
|
43
134
|
- name: Run tests
|
|
44
135
|
env:
|
|
136
|
+
DATABASE_URL: postgres://postgres:password@localhost:5432/test
|
|
45
137
|
RAILS_ENV: test
|
|
46
138
|
run: |
|
|
47
|
-
bundle exec
|
|
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/Appraisals
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
|
[](https://badge.fury.io/rb/make_taggable)
|
|
3
|
-
|
|
4
|
-
[
|
|
4
|
+
[](https://github.com/MatthewKennedy/make_taggable/actions/workflows/standard-ci.yml)
|
|
5
5
|
|
|
6
|
-
MakeTaggable is a
|
|
7
|
-
|
|
8
|
-
Why fork acts-as-taggable-on? Act As Taggable On appears stuck with a set of legacy migrations from rails pre [4.2] that added and removed indexes so much that the migrations do not run on a fresh install using MySQL.
|
|
9
|
-
|
|
10
|
-
For the PostgreSQL users, this is not an issue, but if you have an app or gem that used acts-as-taggable-on, you can no longer test against MySQL, so it seems a fresh start would be useful to clear out any legacy issues and move forward.
|
|
6
|
+
MakeTaggable is a tagging gem for Rails applications that allows custom tagging along dynamic contexts.
|
|
11
7
|
|
|
12
8
|
## Installation
|
|
13
9
|
|
|
@@ -22,23 +18,22 @@ bundle add make_taggable
|
|
|
22
18
|
Install migrations
|
|
23
19
|
|
|
24
20
|
```shell
|
|
25
|
-
# For the latest versions :
|
|
26
21
|
rails make_taggable_engine:install:migrations
|
|
27
22
|
```
|
|
28
23
|
|
|
29
|
-
Review the generated migrations then migrate
|
|
24
|
+
Review the generated migrations then migrate:
|
|
30
25
|
```shell
|
|
31
26
|
rails db:migrate
|
|
32
27
|
```
|
|
33
28
|
|
|
34
29
|
#### For MySql users
|
|
35
|
-
|
|
30
|
+
To make MySQL play nice with spÉcial characters you can setting the following line in an initializer file:
|
|
36
31
|
|
|
37
32
|
```ruby
|
|
38
33
|
MakeTaggable.force_binary_collation = true
|
|
39
34
|
```
|
|
40
35
|
|
|
41
|
-
Or by
|
|
36
|
+
Or by run this rake task:
|
|
42
37
|
|
|
43
38
|
```shell
|
|
44
39
|
rails make_taggable_engine:tag_names:collate_bin
|
|
@@ -46,6 +41,7 @@ rails make_taggable_engine:tag_names:collate_bin
|
|
|
46
41
|
|
|
47
42
|
See the Configuration section for more details.
|
|
48
43
|
|
|
44
|
+
|
|
49
45
|
## Usage
|
|
50
46
|
|
|
51
47
|
Setup
|
|
@@ -176,7 +172,7 @@ MakeTaggable::Tag.least_used(10)
|
|
|
176
172
|
|
|
177
173
|
### Finding Tagged Objects
|
|
178
174
|
|
|
179
|
-
|
|
175
|
+
MakeTaggable uses scopes to create an association for tags.
|
|
180
176
|
This way you can mix and match to filter down your results.
|
|
181
177
|
|
|
182
178
|
```ruby
|
|
@@ -405,6 +401,7 @@ CSS:
|
|
|
405
401
|
.css4 { font-size: 1.6em; }
|
|
406
402
|
```
|
|
407
403
|
|
|
404
|
+
|
|
408
405
|
## Configuration
|
|
409
406
|
|
|
410
407
|
If you would like to remove unused tag objects after removing taggings, add:
|
|
@@ -453,35 +450,69 @@ MakeTaggable.delimiter = ','
|
|
|
453
450
|
*NOTE 1: SQLite by default can't upcase or downcase multibyte characters, resulting in unwanted behavior. Load the SQLite ICU extension for proper handle of such characters. [See docs](http://www.sqlite.org/src/artifact?ci=trunk&filename=ext/icu/README.txt)*
|
|
454
451
|
|
|
455
452
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
see [UPGRADING](UPGRADING.md)
|
|
453
|
+
## Upgrading
|
|
459
454
|
|
|
460
|
-
|
|
455
|
+
Install new migrations by running:
|
|
461
456
|
|
|
462
|
-
|
|
457
|
+
```shell
|
|
458
|
+
rails make_taggable_engine:install:migrations
|
|
459
|
+
```
|
|
463
460
|
|
|
464
461
|
## Compatibility
|
|
465
462
|
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
Version 0.7.x is compatible with Ruby 2.5 > and Rails 5.2 >
|
|
468
464
|
|
|
469
|
-
## TODO
|
|
470
|
-
- Review migrations indexes they seem excessive looking at the schema.
|
|
471
|
-
- See if the newer version of ActiveRecord or arel can be used instead of the MySQL workarounds.
|
|
472
465
|
|
|
473
466
|
## Testing
|
|
474
467
|
|
|
475
|
-
|
|
476
|
-
|
|
468
|
+
MakeTaggable uses RSpec for its test coverage. Inside the gem directory, you can run the specs by following the steps below:
|
|
469
|
+
|
|
470
|
+
Install the rquired gems:
|
|
471
|
+
|
|
472
|
+
```shell
|
|
473
|
+
bundle install
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Setup the dummy test app:
|
|
477
|
+
|
|
478
|
+
```shell
|
|
479
|
+
bundle exec rake test_app
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Run the spec tests against SQLite use the followiong command.
|
|
483
|
+
|
|
484
|
+
```shell
|
|
485
|
+
bundle exec rake
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
You can also run all the tests across all the Rails versions by running:
|
|
489
|
+
|
|
490
|
+
```shell
|
|
491
|
+
bundle exec appraisal install
|
|
492
|
+
|
|
493
|
+
bundle exec appraisal rake
|
|
494
|
+
```
|
|
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:
|
|
501
|
+
|
|
502
|
+
```shell
|
|
503
|
+
bundle exec standardrb
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
Fix code errors:
|
|
477
507
|
|
|
478
508
|
```shell
|
|
479
|
-
bundle
|
|
480
|
-
rake spec
|
|
509
|
+
bundle exec standardrb --fix
|
|
481
510
|
```
|
|
511
|
+
For more information please review the [Contributing](https://github.com/MatthewKennedy/make_taggable/blob/master/CONTRIBUTING.md) section.
|
|
482
512
|
|
|
483
|
-
|
|
513
|
+
#### Contributors
|
|
514
|
+
List of valued contributors From Acts-As-Taggable-On: [Check them all](https://github.com/mbleigh/acts-as-taggable-on/contributors)
|
|
484
515
|
|
|
485
516
|
|
|
486
517
|
## License
|
|
487
|
-
MIT
|
|
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).
|