jera_push 1.1.3 → 1.2.1
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 +5 -5
- data/README.rdoc +1 -1
- data/app/assets/styles/jera_push/materialize/components/_navbar.scss +5 -0
- data/app/controllers/jera_push/admin/messages_controller.rb +1 -2
- data/app/controllers/jera_push/v1/version_controller.rb +0 -3
- data/app/views/layouts/jera_push/_navbar.html.erb +1 -1
- data/config/locale/jera_push.pt-BR.yml +7 -0
- data/lib/generators/active_record/jera_push_generator.rb +16 -3
- data/lib/generators/active_record/templates/create_jera_push_devices.rb +1 -1
- data/lib/generators/active_record/templates/create_jera_push_messages.rb +1 -1
- data/lib/generators/active_record/templates/create_jera_push_messages_devices.rb +1 -1
- data/lib/jera_push/models/message_device.rb +0 -2
- data/lib/jera_push/version.rb +1 -1
- metadata +48 -43
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: efee65617eb9d612ce38593a5c623d57b336e56ae1017a27d4ced3e8680c862b
         | 
| 4 | 
            +
              data.tar.gz: '00954314ef516fbb4c7711ddcb85dd0ee4063332006ef63d8f8c5500e55e135f'
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1371cda26262aefcbb61bf47897a537c6af623eaf703481f10e1770357165b9b23f07eaf5ed38baebb7dc53447663869c6e27f0f086ddb93d4badcf8361ccc39
         | 
| 7 | 
            +
              data.tar.gz: b40dd9d3a328961467dd0d373436a31833165ad3e34e043099451745109002eac483037078bdc80920503dde8d1fa670d776aaaac835ed46d279bf9ff960c77f
         | 
    
        data/README.rdoc
    CHANGED
    
    
| @@ -45,12 +45,11 @@ module JeraPush | |
| 45 45 | 
             
                  def apply_filter
         | 
| 46 46 | 
             
                    @filter = JeraPush::DeviceFilter.new device_filter_params
         | 
| 47 47 | 
             
                    @devices = @filter.search.limit(params[:limit]).order(created_at: :desc)
         | 
| 48 | 
            -
                    @message_devices = JeraPush::MessageDevice.includes(: | 
| 48 | 
            +
                    @message_devices = JeraPush::MessageDevice.includes(:device).where('message_id = :id and device_id in (:device_ids)', id: params[:id], device_ids: @devices.pluck(:id))
         | 
| 49 49 | 
             
                  end
         | 
| 50 50 |  | 
| 51 51 | 
             
                  def device_filter_params
         | 
| 52 52 | 
             
                    params.permit(:value, :field, :resource_name, platform: []).merge({ message_id: params[:id] })
         | 
| 53 53 | 
             
                  end
         | 
| 54 | 
            -
             | 
| 55 54 | 
             
              end
         | 
| 56 55 | 
             
            end
         | 
| @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            <nav>
         | 
| 2 2 | 
             
              <div class="nav-wrapper">
         | 
| 3 3 | 
             
                <a href="<%= jera_push_admin_path %>" class="brand-logo">
         | 
| 4 | 
            -
                  <img src=" | 
| 4 | 
            +
                  <img src="https://jera.com.br/images/logo-facebook.png" alt="Jera Software Logo">
         | 
| 5 5 | 
             
                </a>
         | 
| 6 6 | 
             
                <ul id="nav-mobile" class="right hide-on-med-and-down">
         | 
| 7 7 | 
             
                  <li class="<%= 'active' if current_page?(jera_push_admin_devices_path) %>">
         | 
| @@ -39,6 +39,12 @@ pt-BR: | |
| 39 39 | 
             
                    send: Enviar
         | 
| 40 40 | 
             
                    send_all: Todos
         | 
| 41 41 | 
             
                    remove_all: Nenhum
         | 
| 42 | 
            +
                  devices: 
         | 
| 43 | 
            +
                    attributes:
         | 
| 44 | 
            +
                      id: Identificador
         | 
| 45 | 
            +
                      token: Token
         | 
| 46 | 
            +
                      platform: Plataforma
         | 
| 47 | 
            +
                      resource: Recurso 
         | 
| 42 48 | 
             
                  message_devices:
         | 
| 43 49 | 
             
                    attributes:
         | 
| 44 50 | 
             
                      device: Aparelho
         | 
| @@ -66,3 +72,4 @@ pt-BR: | |
| 66 72 | 
             
                      new_attribute: Novo Atributo
         | 
| 67 73 | 
             
                      specific: Específico
         | 
| 68 74 | 
             
                      broadcast: Broadcast
         | 
| 75 | 
            +
                    
         | 
| @@ -6,13 +6,26 @@ module ActiveRecord | |
| 6 6 | 
             
                  source_root File.expand_path("../templates", __FILE__)
         | 
| 7 7 |  | 
| 8 8 | 
             
                  def create_devices_table
         | 
| 9 | 
            -
                    migration_template "create_jera_push_devices.rb", "db/migrate/create_jera_push_devices.rb"
         | 
| 9 | 
            +
                    migration_template "create_jera_push_devices.rb", "db/migrate/create_jera_push_devices.rb", migration_version: migration_version
         | 
| 10 10 | 
             
                  end
         | 
| 11 11 |  | 
| 12 12 | 
             
                  def create_messages_table
         | 
| 13 | 
            -
                    migration_template "create_jera_push_messages.rb", "db/migrate/create_jera_push_messages.rb"
         | 
| 14 | 
            -
                    migration_template "create_jera_push_messages_devices.rb", "db/migrate/create_jera_push_messages_devices.rb"
         | 
| 13 | 
            +
                    migration_template "create_jera_push_messages.rb", "db/migrate/create_jera_push_messages.rb", migration_version: migration_version
         | 
| 14 | 
            +
                    migration_template "create_jera_push_messages_devices.rb", "db/migrate/create_jera_push_messages_devices.rb", migration_version: migration_version
         | 
| 15 15 | 
             
                  end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  private
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  def rails5_and_up?
         | 
| 20 | 
            +
                    Rails::VERSION::MAJOR >= 5
         | 
| 21 | 
            +
                  end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                  def migration_version
         | 
| 24 | 
            +
                    if rails5_and_up?
         | 
| 25 | 
            +
                      "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
         | 
| 26 | 
            +
                    end
         | 
| 27 | 
            +
                  end
         | 
| 28 | 
            +
             | 
| 16 29 | 
             
                end
         | 
| 17 30 | 
             
              end
         | 
| 18 31 | 
             
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            class CreateJeraPushMessagesDevices < ActiveRecord::Migration | 
| 1 | 
            +
            class CreateJeraPushMessagesDevices < ActiveRecord::Migration<%= migration_version %>
         | 
| 2 2 | 
             
              def change
         | 
| 3 3 | 
             
                create_table :jera_push_messages_devices do |t|
         | 
| 4 4 | 
             
                  t.integer :device_id, index: true, foreign_key: true
         | 
    
        data/lib/jera_push/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,29 +1,35 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: jera_push
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.1 | 
| 4 | 
            +
              version: 1.2.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Jera
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-10-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| 15 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 | 
            +
                - - ">="
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '5.2'
         | 
| 17 20 | 
             
                - - "~>"
         | 
| 18 21 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 22 | 
            +
                    version: '6'
         | 
| 20 23 | 
             
              type: :runtime
         | 
| 21 24 | 
             
              prerelease: false
         | 
| 22 25 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 26 | 
             
                requirements:
         | 
| 27 | 
            +
                - - ">="
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            +
                    version: '5.2'
         | 
| 24 30 | 
             
                - - "~>"
         | 
| 25 31 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version:  | 
| 32 | 
            +
                    version: '6'
         | 
| 27 33 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 34 | 
             
              name: enumerize
         | 
| 29 35 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -56,14 +62,14 @@ dependencies: | |
| 56 62 | 
             
              name: sass-rails
         | 
| 57 63 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 64 | 
             
                requirements:
         | 
| 59 | 
            -
                - - " | 
| 65 | 
            +
                - - ">="
         | 
| 60 66 | 
             
                  - !ruby/object:Gem::Version
         | 
| 61 67 | 
             
                    version: '5.0'
         | 
| 62 68 | 
             
              type: :runtime
         | 
| 63 69 | 
             
              prerelease: false
         | 
| 64 70 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 71 | 
             
                requirements:
         | 
| 66 | 
            -
                - - " | 
| 72 | 
            +
                - - ">="
         | 
| 67 73 | 
             
                  - !ruby/object:Gem::Version
         | 
| 68 74 | 
             
                    version: '5.0'
         | 
| 69 75 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -84,14 +90,14 @@ dependencies: | |
| 84 90 | 
             
              name: responders
         | 
| 85 91 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 86 92 | 
             
                requirements:
         | 
| 87 | 
            -
                - - " | 
| 93 | 
            +
                - - ">="
         | 
| 88 94 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 95 | 
             
                    version: '2.4'
         | 
| 90 96 | 
             
              type: :runtime
         | 
| 91 97 | 
             
              prerelease: false
         | 
| 92 98 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 99 | 
             
                requirements:
         | 
| 94 | 
            -
                - - " | 
| 100 | 
            +
                - - ">="
         | 
| 95 101 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 102 | 
             
                    version: '2.4'
         | 
| 97 103 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -317,59 +323,58 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 317 323 | 
             
              requirements:
         | 
| 318 324 | 
             
              - - ">="
         | 
| 319 325 | 
             
                - !ruby/object:Gem::Version
         | 
| 320 | 
            -
                  version: 2. | 
| 326 | 
            +
                  version: 2.5.0
         | 
| 321 327 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 322 328 | 
             
              requirements:
         | 
| 323 329 | 
             
              - - ">="
         | 
| 324 330 | 
             
                - !ruby/object:Gem::Version
         | 
| 325 331 | 
             
                  version: '0'
         | 
| 326 332 | 
             
            requirements: []
         | 
| 327 | 
            -
             | 
| 328 | 
            -
            rubygems_version: 2.6.14
         | 
| 333 | 
            +
            rubygems_version: 3.1.2
         | 
| 329 334 | 
             
            signing_key: 
         | 
| 330 335 | 
             
            specification_version: 4
         | 
| 331 336 | 
             
            summary: Gem to use firebase push messages.
         | 
| 332 337 | 
             
            test_files:
         | 
| 333 | 
            -
            - test/dummy/ | 
| 338 | 
            +
            - test/dummy/db/migrate/20161005121035_create_users.rb
         | 
| 339 | 
            +
            - test/dummy/db/schema.rb
         | 
| 340 | 
            +
            - test/dummy/db/seeds.rb
         | 
| 341 | 
            +
            - test/dummy/README.rdoc
         | 
| 342 | 
            +
            - test/dummy/app/helpers/application_helper.rb
         | 
| 334 343 | 
             
            - test/dummy/app/controllers/application_controller.rb
         | 
| 335 344 | 
             
            - test/dummy/app/views/layouts/application.html.erb
         | 
| 336 345 | 
             
            - test/dummy/app/assets/javascripts/application.js
         | 
| 337 346 | 
             
            - test/dummy/app/assets/stylesheets/application.css
         | 
| 338 | 
            -
            - test/dummy/app/ | 
| 339 | 
            -
            - test/dummy/ | 
| 340 | 
            -
            - test/dummy/ | 
| 341 | 
            -
            - test/dummy/ | 
| 342 | 
            -
            - test/dummy/ | 
| 343 | 
            -
            - test/dummy/bin/bundle
         | 
| 344 | 
            -
            - test/dummy/bin/rails
         | 
| 345 | 
            -
            - test/dummy/config/secrets.yml
         | 
| 346 | 
            -
            - test/dummy/config/routes.rb
         | 
| 347 | 
            -
            - test/dummy/config/locales/pt-BR.yml
         | 
| 348 | 
            -
            - test/dummy/config/locales/en.yml
         | 
| 349 | 
            -
            - test/dummy/config/environments/production.rb
         | 
| 350 | 
            -
            - test/dummy/config/environments/development.rb
         | 
| 351 | 
            -
            - test/dummy/config/environments/test.rb
         | 
| 352 | 
            -
            - test/dummy/config/environment.rb
         | 
| 353 | 
            -
            - test/dummy/config/application.rb
         | 
| 354 | 
            -
            - test/dummy/config/database.yml
         | 
| 347 | 
            +
            - test/dummy/app/models/user.rb
         | 
| 348 | 
            +
            - test/dummy/public/500.html
         | 
| 349 | 
            +
            - test/dummy/public/422.html
         | 
| 350 | 
            +
            - test/dummy/public/favicon.ico
         | 
| 351 | 
            +
            - test/dummy/public/404.html
         | 
| 355 352 | 
             
            - test/dummy/config/boot.rb
         | 
| 353 | 
            +
            - test/dummy/config/routes.rb
         | 
| 354 | 
            +
            - test/dummy/config/initializers/wrap_parameters.rb
         | 
| 356 355 | 
             
            - test/dummy/config/initializers/backtrace_silencers.rb
         | 
| 356 | 
            +
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 357 | 
            +
            - test/dummy/config/initializers/assets.rb
         | 
| 357 358 | 
             
            - test/dummy/config/initializers/mime_types.rb
         | 
| 358 | 
            -
            - test/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 359 359 | 
             
            - test/dummy/config/initializers/session_store.rb
         | 
| 360 | 
            -
            - test/dummy/config/initializers/ | 
| 361 | 
            -
            - test/dummy/config/initializers/assets.rb
         | 
| 362 | 
            -
            - test/dummy/config/initializers/cookies_serializer.rb
         | 
| 360 | 
            +
            - test/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 363 361 | 
             
            - test/dummy/config/initializers/inflections.rb
         | 
| 364 | 
            -
            - test/dummy/config. | 
| 362 | 
            +
            - test/dummy/config/application.rb
         | 
| 363 | 
            +
            - test/dummy/config/locales/pt-BR.yml
         | 
| 364 | 
            +
            - test/dummy/config/locales/en.yml
         | 
| 365 | 
            +
            - test/dummy/config/environment.rb
         | 
| 366 | 
            +
            - test/dummy/config/environments/test.rb
         | 
| 367 | 
            +
            - test/dummy/config/environments/development.rb
         | 
| 368 | 
            +
            - test/dummy/config/environments/production.rb
         | 
| 369 | 
            +
            - test/dummy/config/database.yml
         | 
| 370 | 
            +
            - test/dummy/config/secrets.yml
         | 
| 371 | 
            +
            - test/dummy/test/models/user_test.rb
         | 
| 372 | 
            +
            - test/dummy/test/fixtures/users.yml
         | 
| 365 373 | 
             
            - test/dummy/Rakefile
         | 
| 366 | 
            -
            - test/dummy/ | 
| 367 | 
            -
            - test/dummy/ | 
| 368 | 
            -
            - test/dummy/ | 
| 369 | 
            -
            - test/dummy/ | 
| 370 | 
            -
            - test/dummy/ | 
| 371 | 
            -
            - test/dummy/db/seeds.rb
         | 
| 372 | 
            -
            - test/dummy/db/migrate/20161005121035_create_users.rb
         | 
| 373 | 
            -
            - test/dummy/README.rdoc
         | 
| 374 | 
            -
            - test/jera_push_test.rb
         | 
| 374 | 
            +
            - test/dummy/config.ru
         | 
| 375 | 
            +
            - test/dummy/bin/rails
         | 
| 376 | 
            +
            - test/dummy/bin/rake
         | 
| 377 | 
            +
            - test/dummy/bin/bundle
         | 
| 378 | 
            +
            - test/dummy/bin/setup
         | 
| 375 379 | 
             
            - test/test_helper.rb
         | 
| 380 | 
            +
            - test/jera_push_test.rb
         |