easy_tags 0.2.6 → 0.2.8

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
  SHA256:
3
- metadata.gz: 28e114c5f8de3ceaf5728fecfe910c88464e1eb0067732a7b24bb9c7c5935c89
4
- data.tar.gz: 064c888f328cfa05f9e3de0c6d0b0b8c90957134ef02ed97ce17140760f5de13
3
+ metadata.gz: d60ff0a998d517c1815441df2175ece954e6bcb7d97eec9f74f01600240819dc
4
+ data.tar.gz: 3e47056d08fb9452810f53d8203391710111c21ea178252473c902d04851028c
5
5
  SHA512:
6
- metadata.gz: 9b5e9917f9f0e40c441ec4ded539fd6f4179d9dd835d508c28f1ad137c7b968a382013d9a0169f9c6b0abcdbd2f868c000d7e80e61b0176d6dea691092d06aaa
7
- data.tar.gz: 3265ee7814dea6f750594558e99fe8ab58c5577c61358851e77e6e2c5e480774e4cf9125b2f59ec9d9fb54b26beab0b32af99f8eee800154ae388391408a9018
6
+ metadata.gz: 2375cb83e42449be314a41ca339480456f4ea6645e7fb28a0eacb919525f9d9c8eb3f74580638911dd14ad8eceb03253659d5f19cb5abb054e1e72afeefae067
7
+ data.tar.gz: 87333f2d3512cf46d03437b04d1a77fa0a4f33b6b83245a9ae0da612ba8e9ca3da75a0ec12131f463db5bd70ce0d14468bccd99c80ec1c3c56544872ef06bbd0
@@ -0,0 +1,81 @@
1
+ # .github/workflows/ci.yml
2
+ name: CI
3
+
4
+ on: [push, pull_request]
5
+
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ env:
10
+ NOKOGIRI_USE_SYSTEM_LIBRARIES: true
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ include:
15
+ - gemfile: activerecord_6.0
16
+ ruby: 2.6
17
+
18
+ - gemfile: activerecord_6.0
19
+ ruby: 2.7
20
+
21
+ - gemfile: activerecord_6.0
22
+ ruby: 3.0
23
+
24
+ - gemfile: activerecord_6.1
25
+ ruby: 2.6
26
+
27
+ - gemfile: activerecord_6.1
28
+ ruby: 2.7
29
+
30
+ - gemfile: activerecord_6.1
31
+ ruby: 3.0
32
+
33
+ - gemfile: activerecord_7.0
34
+ ruby: 3.1
35
+
36
+ - gemfile: activerecord_7.0
37
+ ruby: 3.2
38
+
39
+ - gemfile: activerecord_7.0
40
+ ruby: 3.1
41
+
42
+ - gemfile: activerecord_7.0
43
+ ruby: 3.2
44
+
45
+ name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}
46
+
47
+ steps:
48
+ - uses: actions/checkout@v2
49
+
50
+ - name: Set up Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: ${{ matrix.ruby }}
54
+ bundler-cache: true
55
+
56
+ - name: Bundle install
57
+ run: |
58
+ bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile"
59
+ bundle install --jobs 4 --retry 3
60
+
61
+ - name: Run tests
62
+ run: bundle exec rspec
63
+
64
+ - name: Report to Code Climate
65
+ uses: paambaati/codeclimate-action@v3.0.0
66
+ env:
67
+ CC_TEST_REPORTER_ID: c7f705db7f3e2658ca529a196cd65b724f6b674a7ed6ac2e01928135babdac35
68
+ with:
69
+ coverageCommand: bundle exec rspec # TODO: this should not be needed, but can't make it work
70
+
71
+ rubocop_check:
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - uses: actions/checkout@v2
75
+ - name: Set up Ruby
76
+ uses: ruby/setup-ruby@v1
77
+ with:
78
+ ruby-version: '3.2'
79
+ bundler-cache: true
80
+ - name: Rubocop
81
+ run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,15 +1,39 @@
1
- Metrics/LineLength:
2
- Max: 120
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ NewCops: enable
5
+ Exclude:
6
+ - gemfiles/**/*
7
+ - vendor/bundle/**/*
8
+ TargetRubyVersion: 2.5
9
+
10
+ Layout/IndentationConsistency:
11
+ EnforcedStyle: indented_internal_methods
3
12
 
4
13
  Style/StringLiterals:
14
+ Enabled: true
5
15
  EnforcedStyle: single_quotes
6
16
 
7
- Style/SymbolArray:
17
+ Style/StringLiteralsInInterpolation:
8
18
  Enabled: true
19
+ EnforcedStyle: double_quotes
9
20
 
10
- Layout/IndentationConsistency:
11
- EnforcedStyle: rails
21
+ Layout/LineLength:
22
+ Max: 120
12
23
 
13
- AllCops:
24
+ RSpec/ExpectInHook:
25
+ Enabled: false
26
+
27
+ RSpec/NestedGroups:
28
+ Enabled: false
29
+
30
+ RSpec/MessageSpies:
31
+ Enabled: false
32
+
33
+ Metrics/MethodLength:
34
+ Max: 10
35
+
36
+ Metrics/BlockLength:
14
37
  Exclude:
15
- - 'spec/**/*'
38
+ - Rakefile
39
+ - spec/**/*.rb
data/Appraisals CHANGED
@@ -1,14 +1,21 @@
1
- appraise 'activerecord-5.1' do
2
- gem 'activerecord', '~> 5.1.0'
3
- gem 'activesupport', '~> 5.1.0'
4
- end
5
-
6
- appraise 'activerecord-5.2' do
7
- gem 'activerecord', '~> 5.2.0'
8
- gem 'activesupport', '~> 5.2.0'
9
- end
1
+ # frozen_string_literal: true
10
2
 
11
3
  appraise 'activerecord-6.0' do
12
4
  gem 'activerecord', '~> 6.0.0'
13
5
  gem 'activesupport', '~> 6.0.0'
14
6
  end
7
+
8
+ appraise 'activerecord-6.1' do
9
+ gem 'activerecord', '~> 6.1.0'
10
+ gem 'activesupport', '~> 6.1.0'
11
+ end
12
+
13
+ appraise 'activerecord-7.0' do
14
+ gem 'activerecord', '~> 7.0.0'
15
+ gem 'activesupport', '~> 7.0.0'
16
+ end
17
+
18
+ appraise 'activerecord-7.1' do
19
+ gem 'activerecord', '~> 7.1.0'
20
+ gem 'activesupport', '~> 7.1.0'
21
+ end
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.8] - 2023-12-12
10
+ ### Added
11
+ - Rails 7.0 and 7.1 support (@jwilsjustin)
12
+
13
+ ## [0.2.7] - 2022-03-28
14
+ ### Added
15
+ - Rails 6.1 support
16
+
9
17
  ## [0.2.6] - 2022-01-21
10
18
  ### Fixed
11
19
  - Fixed bug with reload method arguments forwarding. [Issue #36](https://github.com/iiwo/easy_tags/issues/36)
@@ -38,7 +46,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
38
46
  ## [0.1.0] - 2019-07-15
39
47
  Initial release
40
48
 
41
- [Unreleased]: https://github.com/iiwo/easy_tagscompare/v0.2.6...HEAD
49
+ [Unreleased]: https://github.com/iiwo/easy_tags/compare/v0.2.8...HEAD
50
+ [0.2.8]: https://github.com/iiwo/easy_tags/compare/v0.2.7...v0.2.8
51
+ [0.2.7]: https://github.com/iiwo/easy_tags/compare/v0.2.6...v0.2.7
42
52
  [0.2.6]: https://github.com/iiwo/easy_tags/compare/v0.2.5...v0.2.6
43
53
  [0.2.5]: https://github.com/iiwo/easy_tags/compare/v0.2.4...v0.2.5
44
54
  [0.2.4]: https://github.com/iiwo/easy_tags/compare/v0.2.3...v0.2.4
data/Gemfile CHANGED
@@ -1,6 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
7
+ gem 'appraisal'
8
+ gem 'database_cleaner'
9
+ gem 'db-query-matchers'
10
+ gem 'rspec'
11
+ gem 'rspec-rails'
12
+ gem 'rubocop', require: false
13
+ gem 'rubocop-rspec', require: false
14
+ gem 'simplecov'
15
+ gem 'simplecov-console'
16
+ gem 'sqlite3'
17
+
5
18
  # Specify your gem's dependencies in easy_tags.gemspec
6
19
  gemspec
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Maintainability](https://api.codeclimate.com/v1/badges/5c35fe854f8cbd3f1209/maintainability)](https://codeclimate.com/github/iiwo/easy_tags/maintainability)
2
- [![Build Status](https://travis-ci.org/iiwo/easy_tags.svg?branch=master)](https://travis-ci.org/iiwo/easy_tags)
2
+ [![CI Status](https://github.com/iiwo/easy_tags/workflows/CI/badge.svg?branch=master)](https://github.com/iiwo/easy_tags/actions?query=workflow%3ACI+branch%3Amaster)
3
3
  [![Test Coverage](https://api.codeclimate.com/v1/badges/5c35fe854f8cbd3f1209/test_coverage)](https://codeclimate.com/github/iiwo/easy_tags/test_coverage)
4
4
 
5
5
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'easy_tags'
data/easy_tags.gemspec CHANGED
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'easy_tags/version'
4
6
 
5
- # rubocop:disable Metrics/BlockLength
6
7
  Gem::Specification.new do |spec|
7
8
  spec.name = 'easy_tags'
8
9
  spec.version = EasyTags::VERSION
@@ -17,7 +18,8 @@ Gem::Specification.new do |spec|
17
18
  'homepage_uri' => 'https://github.com/iiwo/easy_tags',
18
19
  'changelog_uri' => 'https://github.com/iiwo/easy_tags/blob/master/CHANGELOG.md',
19
20
  'source_code_uri' => 'https://github.com/iiwo/easy_tags',
20
- 'bug_tracker_uri' => 'https://github.com/iiwo/easy_tags/issues'
21
+ 'bug_tracker_uri' => 'https://github.com/iiwo/easy_tags/issues',
22
+ 'rubygems_mfa_required' => 'true'
21
23
  }
22
24
 
23
25
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -27,16 +29,8 @@ Gem::Specification.new do |spec|
27
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
30
  spec.require_paths = ['lib']
29
31
 
30
- spec.add_runtime_dependency 'activerecord', '>= 5.0', '< 6.1'
31
- spec.add_runtime_dependency 'activesupport', '>= 5.0', '< 6.1'
32
+ spec.required_ruby_version = ['>= 2.5.0', '<= 4.0.0']
32
33
 
33
- spec.add_development_dependency 'appraisal'
34
- spec.add_development_dependency 'database_cleaner'
35
- spec.add_development_dependency 'db-query-matchers'
36
- spec.add_development_dependency 'rspec'
37
- spec.add_development_dependency 'rspec-rails'
38
- spec.add_development_dependency 'simplecov'
39
- spec.add_development_dependency 'simplecov-console'
40
- spec.add_development_dependency 'sqlite3'
34
+ spec.add_runtime_dependency 'activerecord', '>= 5.0', '< 8'
35
+ spec.add_runtime_dependency 'activesupport', '>= 5.0', '< 8'
41
36
  end
42
- # rubocop:enable Metrics/BlockLength
@@ -2,6 +2,16 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "appraisal"
6
+ gem "database_cleaner"
7
+ gem "db-query-matchers"
8
+ gem "rspec"
9
+ gem "rspec-rails"
10
+ gem "rubocop", require: false
11
+ gem "rubocop-rspec", require: false
12
+ gem "simplecov"
13
+ gem "simplecov-console"
14
+ gem "sqlite3"
5
15
  gem "activerecord", "~> 6.0.0"
6
16
  gem "activesupport", "~> 6.0.0"
7
17
 
@@ -0,0 +1,18 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner"
7
+ gem "db-query-matchers"
8
+ gem "rspec"
9
+ gem "rspec-rails"
10
+ gem "rubocop", require: false
11
+ gem "rubocop-rspec", require: false
12
+ gem "simplecov"
13
+ gem "simplecov-console"
14
+ gem "sqlite3"
15
+ gem "activerecord", "~> 6.1.0"
16
+ gem "activesupport", "~> 6.1.0"
17
+
18
+ gemspec path: "../"
@@ -0,0 +1,18 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner"
7
+ gem "db-query-matchers"
8
+ gem "rspec"
9
+ gem "rspec-rails"
10
+ gem "rubocop", require: false
11
+ gem "rubocop-rspec", require: false
12
+ gem "simplecov"
13
+ gem "simplecov-console"
14
+ gem "sqlite3"
15
+ gem "activerecord", "~> 7.0.0"
16
+ gem "activesupport", "~> 7.0.0"
17
+
18
+ gemspec path: "../"
@@ -0,0 +1,18 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner"
7
+ gem "db-query-matchers"
8
+ gem "rspec"
9
+ gem "rspec-rails"
10
+ gem "rubocop", require: false
11
+ gem "rubocop-rspec", require: false
12
+ gem "simplecov"
13
+ gem "simplecov-console"
14
+ gem "sqlite3"
15
+ gem "activerecord", "~> 7.1.0"
16
+ gem "activesupport", "~> 7.1.0"
17
+
18
+ gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Handles dirty behaviour
3
5
  module DirtyMethods
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  module Generators
3
5
  # Default generator for [Array] -> [String] conversion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  module Options
3
5
  # Represents a single callback item
@@ -23,9 +25,10 @@ module EasyTags
23
25
  # @param [Object] taggable
24
26
  # @param [Object] tagging
25
27
  def run(taggable:, tagging:)
26
- if @callback.is_a?(Symbol)
28
+ case @callback
29
+ when Symbol
27
30
  taggable.send(@callback, tagging)
28
- elsif @callback.is_a?(Proc)
31
+ when Proc
29
32
  taggable.instance_exec tagging, &@callback
30
33
  end
31
34
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  module Options
3
5
  # Represents collection of options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  module Options
3
5
  # Represents a single option item
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  module Parsers
3
5
  # Default parser for [String] -> [Array] conversion
@@ -14,7 +16,7 @@ module EasyTags
14
16
  def parse(tag_list_string)
15
17
  return [] if tag_list_string.to_s.empty?
16
18
 
17
- tag_list_string.to_s.split(/,/).map(&:strip)
19
+ tag_list_string.to_s.split(',').map(&:strip)
18
20
  end
19
21
  end
20
22
  end
data/lib/easy_tags/tag.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Tag model
3
5
  class Tag < ::ActiveRecord::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Represents a tag list
3
5
  class TagList < SimpleDelegator
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # rubocop:disable Style/Documentation
2
4
  module EasyTags
3
5
  module Taggable
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Handles tag context manipulation
3
5
  class TaggableContext
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Handles injecting of the dynamic context related methods
3
5
  # Example:
@@ -14,8 +16,9 @@ module EasyTags
14
16
  # def bees_list=
15
17
  class TaggableContextMethods
16
18
  class << self
19
+ # rubocop:disable Metrics/MethodLength
17
20
  def inject(class_instance:, context:)
18
- class_instance.class_eval <<-RUBY, __FILE__, __LINE__ + 1
21
+ class_instance.class_eval <<-RUBY, __FILE__, __LINE__ + 1 # rubocop:disable Style/DocumentDynamicEvalDefinition
19
22
  has_many(
20
23
  :#{context}_taggings, -> { includes(:tag).where(context: :#{context}) },
21
24
  as: :taggable,
@@ -55,6 +58,7 @@ module EasyTags
55
58
  end
56
59
  RUBY
57
60
  end
61
+ # rubocop:enable Metrics/MethodLength
58
62
  end
59
63
  end
60
64
  end
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Taggable instance methods
3
5
  module TaggableMethods
4
6
  class << self
5
- # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
7
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
6
8
  def inject(class_instance:)
7
9
  # rubocop:disable Metrics/BlockLength
8
10
  class_instance.class_eval do
@@ -26,70 +28,70 @@ module EasyTags
26
28
 
27
29
  private
28
30
 
29
- attr_accessor :_taggable_contexts
30
-
31
- def _taggable_contexts
32
- @_taggable_contexts ||= {}
33
- end
31
+ attr_accessor :_taggable_contexts
34
32
 
35
- def _update_taggings
36
- tagging_contexts.each do |context|
37
- context_tags = _taggable_context(context)
33
+ def _taggable_contexts
34
+ @_taggable_contexts ||= {}
35
+ end
38
36
 
39
- next unless context_tags.changed?
37
+ def _update_taggings
38
+ tagging_contexts.each do |context|
39
+ context_tags = _taggable_context(context)
40
40
 
41
- context_tags.new_tags.each do |tag_name|
42
- tag = Tag.find_or_create_by!(name: tag_name)
43
- taggings.create!(context: context, tag: tag)
44
- end
41
+ next unless context_tags.changed?
45
42
 
46
- taggings
47
- .joins(:tag)
48
- .where(context: context)
49
- .where(Tag.table_name => { name: context_tags.removed_tags })
50
- .destroy_all
43
+ context_tags.new_tags.each do |tag_name|
44
+ tag = Tag.find_or_create_by!(name: tag_name)
45
+ taggings.create!(context: context, tag: tag)
51
46
  end
52
- end
53
47
 
54
- def _refresh_tagging
55
- tagging_contexts.each do |context|
56
- _taggable_context(context).refresh
57
- end
48
+ taggings
49
+ .joins(:tag)
50
+ .where(context: context)
51
+ .where(Tag.table_name => { name: context_tags.removed_tags })
52
+ .destroy_all
58
53
  end
54
+ end
59
55
 
60
- include DirtyMethods
61
-
62
- def _taggable_context(context)
63
- _taggable_contexts[context] ||= TaggableContext.new(
64
- context: context,
65
- tags_association: public_send("#{context}_tags"),
66
- on_change: lambda { |tag_context|
67
- _mark_dirty(context: context, taggable_context: tag_context)
68
- }
69
- )
56
+ def _refresh_tagging
57
+ tagging_contexts.each do |context|
58
+ _taggable_context(context).refresh
70
59
  end
60
+ end
71
61
 
72
- def _notify_tag_change(type:, tagging:)
73
- callbacks_for_type = tagging_callbacks[tagging.context.to_sym].select do |callback|
74
- callback.type == type
75
- end
62
+ include DirtyMethods
76
63
 
77
- callbacks_for_type.each do |callback|
78
- callback.run(taggable: self, tagging: tagging)
79
- end
80
- end
64
+ def _taggable_context(context)
65
+ _taggable_contexts[context] ||= TaggableContext.new(
66
+ context: context,
67
+ tags_association: public_send("#{context}_tags"),
68
+ on_change: lambda { |tag_context|
69
+ _mark_dirty(context: context, taggable_context: tag_context)
70
+ }
71
+ )
72
+ end
81
73
 
82
- def _notify_tag_add(tagging)
83
- _notify_tag_change(type: :after_add, tagging: tagging)
74
+ def _notify_tag_change(type:, tagging:)
75
+ callbacks_for_type = tagging_callbacks[tagging.context.to_sym].select do |callback|
76
+ callback.type == type
84
77
  end
85
78
 
86
- def _notify_tag_remove(tagging)
87
- _notify_tag_change(type: :after_remove, tagging: tagging)
79
+ callbacks_for_type.each do |callback|
80
+ callback.run(taggable: self, tagging: tagging)
88
81
  end
82
+ end
83
+
84
+ def _notify_tag_add(tagging)
85
+ _notify_tag_change(type: :after_add, tagging: tagging)
86
+ end
87
+
88
+ def _notify_tag_remove(tagging)
89
+ _notify_tag_change(type: :after_remove, tagging: tagging)
90
+ end
89
91
  end
90
92
  # rubocop:enable Metrics/BlockLength
91
93
  end
92
- # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
94
+ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
93
95
  end
94
96
  end
95
97
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
4
  # Tagging model
3
5
  class Tagging < ::ActiveRecord::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module EasyTags
2
- VERSION = '0.2.6'.freeze
4
+ VERSION = '0.2.8'
3
5
  end
data/lib/easy_tags.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/dependencies/autoload'
2
4
  require 'active_record'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rails/generators/active_record'
2
4
 
3
5
  module EasyTags
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iwo Dziechciarow
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-21 00:00:00.000000000 Z
11
+ date: 2023-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '5.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '6.1'
42
+ version: '8'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,119 +49,7 @@ dependencies:
49
49
  version: '5.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '6.1'
53
- - !ruby/object:Gem::Dependency
54
- name: appraisal
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: '0'
60
- type: :development
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
- - !ruby/object:Gem::Dependency
68
- name: database_cleaner
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: '0'
74
- type: :development
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: '0'
81
- - !ruby/object:Gem::Dependency
82
- name: db-query-matchers
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
96
- name: rspec
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '0'
109
- - !ruby/object:Gem::Dependency
110
- name: rspec-rails
111
- requirement: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: '0'
116
- type: :development
117
- prerelease: false
118
- version_requirements: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: '0'
123
- - !ruby/object:Gem::Dependency
124
- name: simplecov
125
- requirement: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '0'
130
- type: :development
131
- prerelease: false
132
- version_requirements: !ruby/object:Gem::Requirement
133
- requirements:
134
- - - ">="
135
- - !ruby/object:Gem::Version
136
- version: '0'
137
- - !ruby/object:Gem::Dependency
138
- name: simplecov-console
139
- requirement: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- version: '0'
144
- type: :development
145
- prerelease: false
146
- version_requirements: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: '0'
151
- - !ruby/object:Gem::Dependency
152
- name: sqlite3
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - ">="
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- type: :development
159
- prerelease: false
160
- version_requirements: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- version: '0'
52
+ version: '8'
165
53
  description: Easy tagging for Rails
166
54
  email:
167
55
  - iiwo@o2.pl
@@ -170,10 +58,10 @@ extensions: []
170
58
  extra_rdoc_files: []
171
59
  files:
172
60
  - ".codeclimate.yml"
61
+ - ".github/workflows/ci.yml"
173
62
  - ".gitignore"
174
63
  - ".rspec"
175
64
  - ".rubocop.yml"
176
- - ".travis.yml"
177
65
  - ".yardopts"
178
66
  - Appraisals
179
67
  - CHANGELOG.md
@@ -185,9 +73,10 @@ files:
185
73
  - bin/console
186
74
  - bin/setup
187
75
  - easy_tags.gemspec
188
- - gemfiles/activerecord_5.1.gemfile
189
- - gemfiles/activerecord_5.2.gemfile
190
76
  - gemfiles/activerecord_6.0.gemfile
77
+ - gemfiles/activerecord_6.1.gemfile
78
+ - gemfiles/activerecord_7.0.gemfile
79
+ - gemfiles/activerecord_7.1.gemfile
191
80
  - lib/easy_tags.rb
192
81
  - lib/easy_tags/dirty_methods.rb
193
82
  - lib/easy_tags/generators/default.rb
@@ -213,6 +102,7 @@ metadata:
213
102
  changelog_uri: https://github.com/iiwo/easy_tags/blob/master/CHANGELOG.md
214
103
  source_code_uri: https://github.com/iiwo/easy_tags
215
104
  bug_tracker_uri: https://github.com/iiwo/easy_tags/issues
105
+ rubygems_mfa_required: 'true'
216
106
  post_install_message:
217
107
  rdoc_options: []
218
108
  require_paths:
@@ -221,14 +111,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
111
  requirements:
222
112
  - - ">="
223
113
  - !ruby/object:Gem::Version
224
- version: '0'
114
+ version: 2.5.0
115
+ - - "<="
116
+ - !ruby/object:Gem::Version
117
+ version: 4.0.0
225
118
  required_rubygems_version: !ruby/object:Gem::Requirement
226
119
  requirements:
227
120
  - - ">="
228
121
  - !ruby/object:Gem::Version
229
122
  version: '0'
230
123
  requirements: []
231
- rubygems_version: 3.2.9
124
+ rubygems_version: 3.2.33
232
125
  signing_key:
233
126
  specification_version: 4
234
127
  summary: EasyTags allows you to tag a single model on several contexts
data/.travis.yml DELETED
@@ -1,31 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- before_script: bundle update
5
- before_install:
6
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
7
- - gem install bundler -v '< 2'
8
- before_script:
9
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10
- - chmod +x ./cc-test-reporter
11
- - ./cc-test-reporter before-build
12
- script:
13
- - bundle exec rspec
14
- after_script:
15
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
16
- rvm:
17
- - 2.5.3
18
- - 2.6.0
19
- - ruby-head
20
- gemfile:
21
- - Gemfile
22
- - gemfiles/activerecord_5.1.gemfile
23
- - gemfiles/activerecord_5.2.gemfile
24
- - gemfiles/activerecord_6.0.gemfile
25
- matrix:
26
- allow_failures:
27
- - rvm: ruby-head
28
- fast_finish: true
29
- env:
30
- global:
31
- - CC_TEST_REPORTER_ID=c7f705db7f3e2658ca529a196cd65b724f6b674a7ed6ac2e01928135babdac35
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.1.0"
6
- gem "activesupport", "~> 5.1.0"
7
-
8
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.2.0"
6
- gem "activesupport", "~> 5.2.0"
7
-
8
- gemspec path: "../"