jera_push 1.1.7 → 1.2.1

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
- SHA1:
3
- metadata.gz: d539b0d3a701cb6bc82345b71d8f2d1061a13099
4
- data.tar.gz: fc9b3f630b3909638259058e563464480e3dda2c
2
+ SHA256:
3
+ metadata.gz: efee65617eb9d612ce38593a5c623d57b336e56ae1017a27d4ced3e8680c862b
4
+ data.tar.gz: '00954314ef516fbb4c7711ddcb85dd0ee4063332006ef63d8f8c5500e55e135f'
5
5
  SHA512:
6
- metadata.gz: c80dbdfb23738dbb604602083217ce06c84ec43d55972eb0704384bc496c45880d596cd012ac049a96b711e621117919930b8d72d163a8d5debcc3e8acdfdb94
7
- data.tar.gz: d317fed3aac61950458ec54487540983024846aa34da9963ee9e4f98d7b333556745eeabc4b8825320412f7e3dc6622a2d1812cb8bb93be1846cf46ad23e298e
6
+ metadata.gz: 1371cda26262aefcbb61bf47897a537c6af623eaf703481f10e1770357165b9b23f07eaf5ed38baebb7dc53447663869c6e27f0f086ddb93d4badcf8361ccc39
7
+ data.tar.gz: b40dd9d3a328961467dd0d373436a31833165ad3e34e043099451745109002eac483037078bdc80920503dde8d1fa670d776aaaac835ed46d279bf9ff960c77f
@@ -1,4 +1,4 @@
1
- ![Jera Logo](http://jera.com.br/images/logo-jera-header.png)
1
+ ![Jera Logo](https://raw.github.com/jera/jera-push/master/update-compatibility-rails/logo_jera.png)
2
2
 
3
3
  JeraPush is a easy tool to work with push messages and firebase API.
4
4
 
@@ -50,6 +50,11 @@ nav {
50
50
  font-size: $navbar-brand-font-size;
51
51
  padding: 0;
52
52
  white-space: nowrap;
53
+
54
+ img {
55
+ width: 100px;
56
+ height: auto;
57
+ }
53
58
 
54
59
  &.center {
55
60
  left: 50%;
@@ -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(:pushable, :device).where('message_id = :id and device_id in (:device_ids)', id: params[:id], device_ids: @devices.pluck(:id))
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,4 @@
1
1
  module JeraPush
2
2
  class V1::VersionController < JeraPush::JeraPushController
3
-
4
-
5
-
6
3
  end
7
4
  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="http://jera.com.br/images/logo-jera-header.png" alt="Jera Software Logo">
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 CreateJeraPushDevices < ActiveRecord::Migration[5.2]
1
+ class CreateJeraPushDevices < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :jera_push_devices do |t|
4
4
  t.string :token, index: true
@@ -1,4 +1,4 @@
1
- class CreateJeraPushMessages < ActiveRecord::Migration[5.2]
1
+ class CreateJeraPushMessages < ActiveRecord::Migration<%= migration_version %>
2
2
  def change
3
3
  create_table :jera_push_messages do |t|
4
4
  t.text :content
@@ -1,4 +1,4 @@
1
- class CreateJeraPushMessagesDevices < ActiveRecord::Migration[5.2]
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
@@ -7,6 +7,4 @@ class JeraPush::MessageDevice < ActiveRecord::Base
7
7
  belongs_to :message
8
8
 
9
9
  enumerize :status, in: [:error, :success], predicate: true
10
-
11
- has_one :pushable, through: :device
12
10
  end
@@ -3,7 +3,7 @@ module JeraPush
3
3
  class SendMessage
4
4
 
5
5
  def initialize(*args)
6
- args[0].to_unsafe_hash.map { |attr_name, value| instance_variable_set("@#{attr_name}", value) }
6
+ args[0].map { |attr_name, value| instance_variable_set("@#{attr_name}", value) }
7
7
  end
8
8
 
9
9
  def call
@@ -1,3 +1,3 @@
1
1
  module JeraPush
2
- VERSION = "1.1.7"
3
- end
2
+ VERSION = "1.2.1"
3
+ end
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.7
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: 2018-09-24 00:00:00.000000000 Z
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: '5.0'
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: '5.0'
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: enumerize
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,26 +50,26 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '0.14'
53
+ version: '0.16'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '0.14'
60
+ version: '0.16'
55
61
  - !ruby/object:Gem::Dependency
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.3.7
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
- rubyforge_project:
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/app/models/user.rb
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/helpers/application_helper.rb
339
- - test/dummy/test/models/user_test.rb
340
- - test/dummy/test/fixtures/users.yml
341
- - test/dummy/bin/rake
342
- - test/dummy/bin/setup
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/wrap_parameters.rb
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.ru
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/public/favicon.ico
367
- - test/dummy/public/422.html
368
- - test/dummy/public/500.html
369
- - test/dummy/public/404.html
370
- - test/dummy/db/schema.rb
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