mailboxer 0.12.1 → 0.12.2
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/README.md +12 -5
- data/app/models/mailboxer/notification.rb +1 -1
- data/db/migrate/20131206080417_add_missing_indices.rb +19 -0
- data/lib/generators/mailboxer/install_generator.rb +5 -1
- data/lib/generators/mailboxer/views_generator.rb +2 -2
- data/lib/mailboxer/version.rb +1 -1
- metadata +4 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2e228d66124ff2fbaa9e6b99cb1c992ca48e3ff3
         | 
| 4 | 
            +
              data.tar.gz: 904407cb4bd33fa41ec899b007a5e7d8166dd789
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 150e6c115a595b511406090090b7a1198e17ac44c025a19adbb2e6c6f6825cc8c7965a3d6f0139699b1c5fa412e486ec9e8b2f51ed4bf69de729b5150412b63d
         | 
| 7 | 
            +
              data.tar.gz: b86151ee9608dd753e0f60931b19a8fef82b71a9e8c64a59951d3d4ba10644d4b65dc34185d32781a06eda19b0916caba7ea64df5e26eb5590843a36b43ef81f
         | 
    
        data/README.md
    CHANGED
    
    | @@ -11,7 +11,7 @@ a powerful and flexible message system. It supports the use of | |
| 11 11 | 
             
            conversations with two or more participants, sending notifications to
         | 
| 12 12 | 
             
            recipients (intended to be used as system notifications “Your picture has
         | 
| 13 13 | 
             
            new comments”, “John Doe has updated his document”, etc.), and emailing the
         | 
| 14 | 
            -
            messageable model (if configured to do so). It has a complete implementation | 
| 14 | 
            +
            messageable model (if configured to do so). It has a complete implementation
         | 
| 15 15 | 
             
            of a `Mailbox` object for each messageable with `inbox`, `sentbox` and
         | 
| 16 16 | 
             
            `trash`.
         | 
| 17 17 |  | 
| @@ -56,6 +56,12 @@ And don't forget to migrate your database: | |
| 56 56 | 
             
            $ rake db:migrate
         | 
| 57 57 | 
             
            ```
         | 
| 58 58 |  | 
| 59 | 
            +
            You can also generate email views:
         | 
| 60 | 
            +
             | 
| 61 | 
            +
            ```sh
         | 
| 62 | 
            +
            $ rails g mailboxer:views
         | 
| 63 | 
            +
            ```
         | 
| 64 | 
            +
             | 
| 59 65 | 
             
            Upgrading
         | 
| 60 66 | 
             
            ---------
         | 
| 61 67 |  | 
| @@ -63,7 +69,7 @@ If upgrading from 0.11.0 to 0.12.0, run the following generators: | |
| 63 69 |  | 
| 64 70 | 
             
            ```sh
         | 
| 65 71 | 
             
            $ rails generate mailboxer:namespacing_compatibility
         | 
| 66 | 
            -
            $ rails generate  | 
| 72 | 
            +
            $ rails generate mailboxer:install -s
         | 
| 67 73 | 
             
            ```
         | 
| 68 74 |  | 
| 69 75 | 
             
            Then, migrate your database:
         | 
| @@ -81,7 +87,7 @@ We are now adding support for sending emails when a Notification or a Message is | |
| 81 87 | 
             
            ```ruby
         | 
| 82 88 | 
             
            Mailboxer.setup do |config|
         | 
| 83 89 | 
             
              #Enables or disables email sending for Notifications and Messages
         | 
| 84 | 
            -
              config.uses_emails = true | 
| 90 | 
            +
              config.uses_emails = true
         | 
| 85 91 | 
             
              #Configures the default `from` address for the email sent for Messages and Notifications of Mailboxer
         | 
| 86 92 | 
             
              config.default_from = "no-reply@dit.upm.es"
         | 
| 87 93 | 
             
              ...
         | 
| @@ -244,12 +250,12 @@ conversations = alfa.mailbox.conversations.page(params[:page]).per(9) | |
| 244 250 |  | 
| 245 251 | 
             
            #Paginating received conversations using :page parameter and 9 per page
         | 
| 246 252 | 
             
            conversations = alfa.mailbox.inbox.page(params[:page]).per(9)
         | 
| 247 | 
            -
             | 
| 253 | 
            +
             | 
| 248 254 | 
             
            #Paginating sent conversations using :page parameter and 9 per page
         | 
| 249 255 | 
             
            conversations = alfa.mailbox.sentbox.page(params[:page]).per(9)
         | 
| 250 256 |  | 
| 251 257 | 
             
            #Paginating trashed conversations using :page parameter and 9 per page
         | 
| 252 | 
            -
            conversations = alfa.mailbox.trash.page(params[:page]).per(9) | 
| 258 | 
            +
            conversations = alfa.mailbox.trash.page(params[:page]).per(9)
         | 
| 253 259 | 
             
            ```
         | 
| 254 260 |  | 
| 255 261 | 
             
            ### How can I read the messages of a conversation?
         | 
| @@ -306,3 +312,4 @@ If you need a GUI you should take a look a these links: | |
| 306 312 | 
             
            * [bennick](https://github.com/ging/mailboxer/commits/master?author=bennick) (Ryan Bennick)
         | 
| 307 313 | 
             
            * [rjst](https://github.com/ging/mailboxer/commits/master?author=rjst) (Ricardo Trindade)
         | 
| 308 314 | 
             
            * [fabianoalmeida](https://github.com/ging/mailboxer/commits/master?author=fabianoalmeida) (Fabiano Almeida)
         | 
| 315 | 
            +
            * [supremebeing7](https://github.com/ging/mailboxer/commits/master?author=supremebeing7) (Mark J. Lehman)
         | 
| @@ -168,7 +168,7 @@ class Mailboxer::Notification < ActiveRecord::Base | |
| 168 168 |  | 
| 169 169 | 
             
              #Returns notified_object. DEPRECATED
         | 
| 170 170 | 
             
              def object
         | 
| 171 | 
            -
                warn "DEPRECATION WARNING: use ' | 
| 171 | 
            +
                warn "DEPRECATION WARNING: use 'notified_object' instead of 'object' to get the object associated with the Notification"
         | 
| 172 172 | 
             
                notified_object
         | 
| 173 173 | 
             
              end
         | 
| 174 174 |  | 
| @@ -0,0 +1,19 @@ | |
| 1 | 
            +
            class AddMissingIndices < ActiveRecord::Migration
         | 
| 2 | 
            +
              def change
         | 
| 3 | 
            +
                # We'll explicitly specify its name, as the auto-generated name is too long and exceeds 63
         | 
| 4 | 
            +
                # characters limitation.
         | 
| 5 | 
            +
                add_index :mailboxer_conversation_opt_outs, [:unsubscriber_id, :unsubscriber_type],
         | 
| 6 | 
            +
                  name: 'index_mailboxer_conversation_opt_outs_on_unsubscriber_id_type'
         | 
| 7 | 
            +
                add_index :mailboxer_conversation_opt_outs, :conversation_id
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                add_index :mailboxer_notifications, :type
         | 
| 10 | 
            +
                add_index :mailboxer_notifications, [:sender_id, :sender_type]
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                # We'll explicitly specify its name, as the auto-generated name is too long and exceeds 63
         | 
| 13 | 
            +
                # characters limitation.
         | 
| 14 | 
            +
                add_index :mailboxer_notifications, [:notified_object_id, :notified_object_type],
         | 
| 15 | 
            +
                  name: 'index_mailboxer_notifications_on_notified_object_id_and_type'
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                add_index :mailboxer_receipts, [:receiver_id, :receiver_type]
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
            end
         | 
| @@ -18,7 +18,11 @@ class Mailboxer::InstallGenerator < Rails::Generators::Base #:nodoc: | |
| 18 18 |  | 
| 19 19 | 
             
              def copy_migrations
         | 
| 20 20 | 
             
                if Rails.version < "3.1"
         | 
| 21 | 
            -
                  migrations = [ | 
| 21 | 
            +
                  migrations = [
         | 
| 22 | 
            +
                    %w[20110511145103_create_mailboxer.rb create_mailboxer.rb],
         | 
| 23 | 
            +
                    %w[20131206080416_add_conversation_optout.rb add_conversation_optout.rb],
         | 
| 24 | 
            +
                    %w[20131206080417_add_missing_indices.rb add_missing_indices.rb]
         | 
| 25 | 
            +
                  ],
         | 
| 22 26 | 
             
                  migrations.each do |migration|
         | 
| 23 27 | 
             
                    migration_template "../../../../db/migrate/" + migration[0], "db/migrate/" + migration[1]
         | 
| 24 28 | 
             
                  end
         | 
| @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            class Mailboxer::ViewsGenerator < Rails::Generators::Base
         | 
| 2 | 
            -
              source_root File.expand_path("../../../../app/views", __FILE__)
         | 
| 2 | 
            +
              source_root File.expand_path("../../../../app/views/mailboxer", __FILE__)
         | 
| 3 3 |  | 
| 4 4 | 
             
              desc "Copy Mailboxer views into your app"
         | 
| 5 5 | 
             
              def copy_views
         | 
| 6 6 | 
             
                directory('message_mailer', 'app/views/message_mailer')
         | 
| 7 7 | 
             
                directory('notification_mailer', 'app/views/notification_mailer')
         | 
| 8 8 | 
             
              end
         | 
| 9 | 
            -
            end
         | 
| 9 | 
            +
            end
         | 
    
        data/lib/mailboxer/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mailboxer
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.12. | 
| 4 | 
            +
              version: 0.12.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Eduardo Casanova Cuesta
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014- | 
| 11 | 
            +
            date: 2014-08-16 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: foreigner
         | 
| @@ -194,6 +194,7 @@ files: | |
| 194 194 | 
             
            - config/locales/en.yml
         | 
| 195 195 | 
             
            - db/migrate/20110511145103_create_mailboxer.rb
         | 
| 196 196 | 
             
            - db/migrate/20131206080416_add_conversation_optout.rb
         | 
| 197 | 
            +
            - db/migrate/20131206080417_add_missing_indices.rb
         | 
| 197 198 | 
             
            - gemfiles/rails3.2.gemfile
         | 
| 198 199 | 
             
            - gemfiles/rails4.0.gemfile
         | 
| 199 200 | 
             
            - gemfiles/rails4.1.gemfile
         | 
| @@ -290,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 290 291 | 
             
                  version: '0'
         | 
| 291 292 | 
             
            requirements: []
         | 
| 292 293 | 
             
            rubyforge_project: 
         | 
| 293 | 
            -
            rubygems_version: 2. | 
| 294 | 
            +
            rubygems_version: 2.4.1
         | 
| 294 295 | 
             
            signing_key: 
         | 
| 295 296 | 
             
            specification_version: 4
         | 
| 296 297 | 
             
            summary: Messaging system for rails apps.
         |