discard 1.2.1 → 1.3.0
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/.github/dependabot.yml +6 -0
- data/.github/workflows/test.yml +23 -16
- data/CHANGELOG.md +6 -0
- data/README.md +3 -1
- data/discard.gemspec +1 -1
- data/lib/discard/model.rb +1 -1
- data/lib/discard/version.rb +1 -1
- metadata +6 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 98ef1bd12f3edc82e8e50b429d39989473cf7b917225ce25068a60e09ef7bb06
         | 
| 4 | 
            +
              data.tar.gz: 7762b63af8cd7aeeb848f9778242a02a02be7069586943542916ea3ac12e6d51
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a43ba463a29c4cd1e1b8c3a79a37b8d140925ef9fe2ee1d23b1aa347c86e746faa390a3a11c60818cf327fb81c0cacd8561a9005a3ddeb9ced016b64258c32ce
         | 
| 7 | 
            +
              data.tar.gz: 1a3516836d8a2f21ef1e0385d6b126bec5f5ca380071f473a80ac8d8bd5dc9cd275954fff9052b9964f5d0763cbbd0b2ba4e8da9317e042dbbdd5cb42836cf56
         | 
    
        data/.github/workflows/test.yml
    CHANGED
    
    | @@ -11,22 +11,29 @@ on: | |
| 11 11 | 
             
            jobs:
         | 
| 12 12 | 
             
              build:
         | 
| 13 13 | 
             
                runs-on: ubuntu-latest
         | 
| 14 | 
            -
                name: Test on Rails ${{ matrix.rails_version }}
         | 
| 14 | 
            +
                name: Test on Rails ${{ matrix.rails_version }} and Ruby ${{ matrix.ruby_version }}
         | 
| 15 15 | 
             
                strategy:
         | 
| 16 16 | 
             
                  matrix:
         | 
| 17 | 
            -
                     | 
| 18 | 
            -
                      - ~>  | 
| 19 | 
            -
             | 
| 20 | 
            -
                      - ~>  | 
| 21 | 
            -
             | 
| 22 | 
            -
                      - ~>  | 
| 23 | 
            -
             | 
| 17 | 
            +
                    include:
         | 
| 18 | 
            +
                      - rails_version: ~> 7.0.0
         | 
| 19 | 
            +
                        ruby_version: 3.2
         | 
| 20 | 
            +
                      - rails_version: ~> 7.0.0
         | 
| 21 | 
            +
                        ruby_version: 3.1
         | 
| 22 | 
            +
                      - rails_version: ~> 6.1.0
         | 
| 23 | 
            +
                        ruby_version: '3.0'
         | 
| 24 | 
            +
                      - rails_version: ~> 6.0.0
         | 
| 25 | 
            +
                        ruby_version: 2.7
         | 
| 26 | 
            +
                      - rails_version: ~> 5.2.0
         | 
| 27 | 
            +
                        ruby_version: 2.6
         | 
| 28 | 
            +
                      - rails_version: ~> 5.1.0
         | 
| 29 | 
            +
                        ruby_version: 2.5
         | 
| 30 | 
            +
                env:
         | 
| 31 | 
            +
                  RAILS_VERSION: ${{ matrix.rails_version }}
         | 
| 24 32 | 
             
                steps:
         | 
| 25 | 
            -
                - uses: actions/checkout@ | 
| 26 | 
            -
                -  | 
| 27 | 
            -
                   | 
| 28 | 
            -
                     | 
| 29 | 
            -
                     | 
| 30 | 
            -
             | 
| 31 | 
            -
                   | 
| 32 | 
            -
                    RAILS_VERSION:  ${{ matrix.rails_version }}
         | 
| 33 | 
            +
                - uses: actions/checkout@v3
         | 
| 34 | 
            +
                - uses: ruby/setup-ruby@v1
         | 
| 35 | 
            +
                  with:
         | 
| 36 | 
            +
                    ruby-version: ${{ matrix.ruby_version }}
         | 
| 37 | 
            +
                    bundler-cache: true
         | 
| 38 | 
            +
                - name: Test
         | 
| 39 | 
            +
                  run: bundle exec rake 
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            # Discard [](https://github.com/jhawthorn/discard/actions/workflows/test.yml)
         | 
| 2 2 |  | 
| 3 3 | 
             
            Soft deletes for ActiveRecord done right.
         | 
| 4 4 |  | 
| @@ -265,6 +265,8 @@ Discard takes a different approach. It doesn't override any ActiveRecord | |
| 265 265 | 
             
            methods and instead simply provides convenience methods and scopes for
         | 
| 266 266 | 
             
            discarding (hiding), restoring, and querying records.
         | 
| 267 267 |  | 
| 268 | 
            +
            You can find more information about the history and purpose of Discard in [this blog post](https://supergood.software/introduction-to-discard/).
         | 
| 269 | 
            +
             | 
| 268 270 | 
             
            ## Development
         | 
| 269 271 |  | 
| 270 272 | 
             
            After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         | 
    
        data/discard.gemspec
    CHANGED
    
    | @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| | |
| 24 24 |  | 
| 25 25 | 
             
              spec.add_dependency "activerecord", ">= 4.2", "< 8"
         | 
| 26 26 | 
             
              spec.add_development_dependency "bundler"
         | 
| 27 | 
            -
              spec.add_development_dependency "rake", " | 
| 27 | 
            +
              spec.add_development_dependency "rake", ">= 10.0"
         | 
| 28 28 | 
             
              spec.add_development_dependency "rspec", "~> 3.5.0"
         | 
| 29 29 | 
             
              spec.add_development_dependency "database_cleaner", "~> 1.5"
         | 
| 30 30 | 
             
              spec.add_development_dependency "with_model", "~> 2.0"
         | 
    
        data/lib/discard/model.rb
    CHANGED
    
    | @@ -138,7 +138,7 @@ module Discard | |
| 138 138 | 
             
                #
         | 
| 139 139 | 
             
                # @return [Boolean] true if successful, otherwise false
         | 
| 140 140 | 
             
                def undiscard
         | 
| 141 | 
            -
                  return unless discarded?
         | 
| 141 | 
            +
                  return false unless discarded?
         | 
| 142 142 | 
             
                  run_callbacks(:undiscard) do
         | 
| 143 143 | 
             
                    update_attribute(self.class.discard_column, nil)
         | 
| 144 144 | 
             
                  end
         | 
    
        data/lib/discard/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: discard
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.3.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - John Hawthorn
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-08-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: activerecord
         | 
| @@ -48,14 +48,14 @@ dependencies: | |
| 48 48 | 
             
              name: rake
         | 
| 49 49 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 50 50 | 
             
                requirements:
         | 
| 51 | 
            -
                - - " | 
| 51 | 
            +
                - - ">="
         | 
| 52 52 | 
             
                  - !ruby/object:Gem::Version
         | 
| 53 53 | 
             
                    version: '10.0'
         | 
| 54 54 | 
             
              type: :development
         | 
| 55 55 | 
             
              prerelease: false
         | 
| 56 56 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 57 57 | 
             
                requirements:
         | 
| 58 | 
            -
                - - " | 
| 58 | 
            +
                - - ">="
         | 
| 59 59 | 
             
                  - !ruby/object:Gem::Version
         | 
| 60 60 | 
             
                    version: '10.0'
         | 
| 61 61 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -124,6 +124,7 @@ extra_rdoc_files: [] | |
| 124 124 | 
             
            files:
         | 
| 125 125 | 
             
            - ".github/ISSUE_TEMPLATE/bug-report.md"
         | 
| 126 126 | 
             
            - ".github/ISSUE_TEMPLATE/feature-proposal.md"
         | 
| 127 | 
            +
            - ".github/dependabot.yml"
         | 
| 127 128 | 
             
            - ".github/workflows/test.yml"
         | 
| 128 129 | 
             
            - ".gitignore"
         | 
| 129 130 | 
             
            - ".rspec"
         | 
| @@ -161,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 161 162 | 
             
                - !ruby/object:Gem::Version
         | 
| 162 163 | 
             
                  version: '0'
         | 
| 163 164 | 
             
            requirements: []
         | 
| 164 | 
            -
            rubygems_version: 3. | 
| 165 | 
            +
            rubygems_version: 3.4.10
         | 
| 165 166 | 
             
            signing_key:
         | 
| 166 167 | 
             
            specification_version: 4
         | 
| 167 168 | 
             
            summary: ActiveRecord soft-deletes done right
         |