activity_notification 2.1.3 → 2.1.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/CHANGELOG.md +13 -1
- data/Gemfile +0 -2
- data/activity_notification.gemspec +1 -1
- data/docs/Functions.md +2 -2
- data/docs/Setup.md +176 -63
- data/gemfiles/Gemfile.rails-5.0 +1 -0
- data/gemfiles/Gemfile.rails-5.1 +1 -0
- data/gemfiles/Gemfile.rails-5.2 +1 -0
- data/gemfiles/Gemfile.rails-6.0 +0 -2
- data/lib/activity_notification/apis/notification_api.rb +7 -0
- data/lib/activity_notification/common.rb +4 -1
- data/lib/activity_notification/models/concerns/notifiable.rb +10 -10
- data/lib/activity_notification/models/concerns/swagger/notification_schema.rb +34 -34
- data/lib/activity_notification/models/concerns/swagger/subscription_schema.rb +17 -17
- data/lib/activity_notification/optional_targets/action_cable_api_channel.rb +1 -1
- data/lib/activity_notification/optional_targets/action_cable_channel.rb +1 -1
- data/lib/activity_notification/orm/dynamoid.rb +10 -3
- data/lib/activity_notification/orm/dynamoid/notification.rb +48 -13
- data/lib/activity_notification/orm/dynamoid/subscription.rb +1 -1
- data/lib/activity_notification/orm/mongoid.rb +10 -3
- data/lib/activity_notification/orm/mongoid/notification.rb +4 -4
- data/lib/activity_notification/roles/acts_as_notifiable.rb +2 -1
- data/lib/activity_notification/version.rb +1 -1
- data/spec/concerns/models/notifiable_spec.rb +35 -35
- data/spec/config_spec.rb +26 -15
- data/spec/rails_app/app/controllers/users_controller.rb +5 -0
- data/spec/rails_app/app/javascript/App.vue +8 -72
- data/spec/rails_app/app/javascript/components/DeviseTokenAuth.vue +3 -4
- data/spec/rails_app/app/javascript/components/Top.vue +2 -3
- data/spec/rails_app/app/javascript/packs/spa.js +6 -3
- data/spec/rails_app/app/javascript/router/index.js +73 -0
- data/spec/rails_app/app/javascript/store/{auth.js → index.js} +0 -0
- data/spec/rails_app/app/models/dummy/dummy_group.rb +8 -0
- data/spec/rails_app/app/models/dummy/dummy_notifiable_target.rb +8 -0
- data/spec/rails_app/app/models/user.rb +2 -1
- data/spec/rails_app/config/application.rb +4 -1
- data/spec/rails_app/config/dynamoid.rb +11 -3
- data/spec/rails_app/config/environments/production.rb +3 -0
- data/spec/rails_app/config/initializers/activity_notification.rb +3 -3
- data/spec/rails_app/config/routes.rb +5 -1
- data/spec/rails_app/db/seeds.rb +9 -2
- data/spec/roles/acts_as_notifiable_spec.rb +5 -5
- metadata +6 -10
| @@ -54,7 +54,7 @@ describe ActivityNotification::ActsAsNotifiable do | |
| 54 54 |  | 
| 55 55 | 
             
                    context "true as :tracked" do
         | 
| 56 56 | 
             
                      before do
         | 
| 57 | 
            -
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: true
         | 
| 57 | 
            +
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: true, notifiable_path: -> { "dummy_path" }
         | 
| 58 58 | 
             
                        @created_notifiable = dummy_notifiable_class.create
         | 
| 59 59 | 
             
                      end
         | 
| 60 60 |  | 
| @@ -103,7 +103,7 @@ describe ActivityNotification::ActsAsNotifiable do | |
| 103 103 |  | 
| 104 104 | 
             
                    context "with :only option (creation only)" do
         | 
| 105 105 | 
             
                      before do
         | 
| 106 | 
            -
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { only: [:create] }
         | 
| 106 | 
            +
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { only: [:create] }, notifiable_path: -> { "dummy_path" }
         | 
| 107 107 | 
             
                        @created_notifiable = dummy_notifiable_class.create
         | 
| 108 108 | 
             
                      end
         | 
| 109 109 |  | 
| @@ -133,7 +133,7 @@ describe ActivityNotification::ActsAsNotifiable do | |
| 133 133 |  | 
| 134 134 | 
             
                    context "with :except option (except update)" do
         | 
| 135 135 | 
             
                      before do
         | 
| 136 | 
            -
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { except: [:update] }
         | 
| 136 | 
            +
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { except: [:update] }, notifiable_path: -> { "dummy_path" }
         | 
| 137 137 | 
             
                        @created_notifiable = dummy_notifiable_class.create
         | 
| 138 138 | 
             
                      end
         | 
| 139 139 |  | 
| @@ -163,7 +163,7 @@ describe ActivityNotification::ActsAsNotifiable do | |
| 163 163 |  | 
| 164 164 | 
             
                    context "with :key option" do
         | 
| 165 165 | 
             
                      before do
         | 
| 166 | 
            -
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { key: "test.key" }
         | 
| 166 | 
            +
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { key: "test.key" }, notifiable_path: -> { "dummy_path" }
         | 
| 167 167 | 
             
                        @created_notifiable = dummy_notifiable_class.create
         | 
| 168 168 | 
             
                      end
         | 
| 169 169 |  | 
| @@ -199,7 +199,7 @@ describe ActivityNotification::ActsAsNotifiable do | |
| 199 199 | 
             
                    context "with :notify_later option" do
         | 
| 200 200 | 
             
                      before do
         | 
| 201 201 | 
             
                        ActiveJob::Base.queue_adapter = :test
         | 
| 202 | 
            -
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { notify_later: true }
         | 
| 202 | 
            +
                        dummy_notifiable_class.acts_as_notifiable :users, targets: [user_target], tracked: { notify_later: true }, notifiable_path: -> { "dummy_path" }
         | 
| 203 203 | 
             
                        @created_notifiable = dummy_notifiable_class.create
         | 
| 204 204 | 
             
                      end
         | 
| 205 205 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: activity_notification
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.1. | 
| 4 | 
            +
              version: 2.1.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Shota Yamazaki
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-11-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: railties
         | 
| @@ -163,9 +163,6 @@ dependencies: | |
| 163 163 | 
             
                - - ">="
         | 
| 164 164 | 
             
                  - !ruby/object:Gem::Version
         | 
| 165 165 | 
             
                    version: 3.8.0
         | 
| 166 | 
            -
                - - "<"
         | 
| 167 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 168 | 
            -
                    version: 4.0.0
         | 
| 169 166 | 
             
              type: :development
         | 
| 170 167 | 
             
              prerelease: false
         | 
| 171 168 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -173,9 +170,6 @@ dependencies: | |
| 173 170 | 
             
                - - ">="
         | 
| 174 171 | 
             
                  - !ruby/object:Gem::Version
         | 
| 175 172 | 
             
                    version: 3.8.0
         | 
| 176 | 
            -
                - - "<"
         | 
| 177 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 178 | 
            -
                    version: 4.0.0
         | 
| 179 173 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 180 174 | 
             
              name: factory_bot_rails
         | 
| 181 175 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -576,7 +570,8 @@ files: | |
| 576 570 | 
             
            - spec/rails_app/app/javascript/config/test.js
         | 
| 577 571 | 
             
            - spec/rails_app/app/javascript/packs/application.js
         | 
| 578 572 | 
             
            - spec/rails_app/app/javascript/packs/spa.js
         | 
| 579 | 
            -
            - spec/rails_app/app/javascript/ | 
| 573 | 
            +
            - spec/rails_app/app/javascript/router/index.js
         | 
| 574 | 
            +
            - spec/rails_app/app/javascript/store/index.js
         | 
| 580 575 | 
             
            - spec/rails_app/app/mailers/.keep
         | 
| 581 576 | 
             
            - spec/rails_app/app/mailers/custom_notification_mailer.rb
         | 
| 582 577 | 
             
            - spec/rails_app/app/models/admin.rb
         | 
| @@ -795,7 +790,8 @@ test_files: | |
| 795 790 | 
             
            - spec/rails_app/app/javascript/config/test.js
         | 
| 796 791 | 
             
            - spec/rails_app/app/javascript/packs/application.js
         | 
| 797 792 | 
             
            - spec/rails_app/app/javascript/packs/spa.js
         | 
| 798 | 
            -
            - spec/rails_app/app/javascript/ | 
| 793 | 
            +
            - spec/rails_app/app/javascript/router/index.js
         | 
| 794 | 
            +
            - spec/rails_app/app/javascript/store/index.js
         | 
| 799 795 | 
             
            - spec/rails_app/app/mailers/.keep
         | 
| 800 796 | 
             
            - spec/rails_app/app/mailers/custom_notification_mailer.rb
         | 
| 801 797 | 
             
            - spec/rails_app/app/models/admin.rb
         |