rails_notice 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -4
  3. data/app/assets/javascripts/controllers/{rails_notice_admin → notice/admin}/notification_settings/index.js +0 -0
  4. data/app/assets/javascripts/controllers/{rails_notice_admin → notice/admin}/notifications/index.js +0 -0
  5. data/app/assets/javascripts/controllers/{rails_notice_admin → notice/admin}/notify_settings/edit.js +0 -0
  6. data/app/assets/javascripts/controllers/{rails_notice_admin → notice/admin}/notify_settings/index.js +0 -0
  7. data/app/assets/javascripts/controllers/{rails_notice_admin → notice/admin}/notify_settings/new.js +0 -0
  8. data/app/controllers/{rails_notice_admin → notice/admin}/base_controller.rb +1 -1
  9. data/app/controllers/{rails_notice_admin → notice/admin}/notification_settings_controller.rb +6 -2
  10. data/app/controllers/{rails_notice_admin → notice/admin}/notifications_controller.rb +6 -2
  11. data/app/controllers/notice/my/base_controller.rb +5 -0
  12. data/app/controllers/{rails_notice_my → notice/my}/notification_settings_controller.rb +10 -3
  13. data/app/controllers/{rails_notice_my → notice/my}/notifications_controller.rb +1 -1
  14. data/app/controllers/{receivers_controller.rb → notice/receivers_controller.rb} +0 -0
  15. data/app/models/concerns/the_notifiable.rb +0 -1
  16. data/app/views/{rails_notice_admin → notice/admin}/base/_nav.html.erb +0 -0
  17. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/_form.html.erb +0 -0
  18. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/_search_form.html.erb +0 -0
  19. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/edit.html.erb +0 -0
  20. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/index.html.erb +0 -0
  21. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/new.html.erb +0 -0
  22. data/app/views/{rails_notice_admin → notice/admin}/notification_settings/show.html.erb +0 -0
  23. data/app/views/{rails_notice_admin → notice/admin}/notifications/_form.html.erb +0 -0
  24. data/app/views/{rails_notice_admin → notice/admin}/notifications/_menu.html.erb +0 -0
  25. data/app/views/{rails_notice_admin → notice/admin}/notifications/_search_form.html.erb +0 -0
  26. data/app/views/{rails_notice_admin → notice/admin}/notifications/edit.html.erb +0 -0
  27. data/app/views/{rails_notice_admin → notice/admin}/notifications/index.html.erb +0 -0
  28. data/app/views/{rails_notice_admin → notice/admin}/notifications/new.html.erb +0 -0
  29. data/app/views/{rails_notice_my → notice/my}/base/_nav_my.html.erb +0 -0
  30. data/app/views/{rails_notice_my → notice/my}/notification_settings/_form.html.erb +0 -0
  31. data/app/views/{rails_notice_my → notice/my}/notification_settings/show.html.erb +0 -0
  32. data/app/views/{rails_notice_my → notice/my}/notifications/_navbar.html.erb +0 -0
  33. data/app/views/{rails_notice_my → notice/my}/notifications/_notifications.html.erb +0 -0
  34. data/app/views/{rails_notice_my → notice/my}/notifications/edit.html.erb +0 -0
  35. data/app/views/{rails_notice_my → notice/my}/notifications/index.html.erb +0 -0
  36. data/app/views/{rails_notice_my → notice/my}/notifications/index.js.erb +0 -0
  37. data/app/views/{rails_notice_my → notice/my}/notifications/new.html.erb +0 -0
  38. data/app/views/{rails_notice_my → notice/my}/notifications/read.js.erb +0 -0
  39. data/app/views/{rails_notice_my → notice/my}/notifications/read_all.js.erb +0 -0
  40. data/app/views/{rails_notice_my → notice/my}/notifications/show.html.erb +0 -0
  41. data/config/routes.rb +2 -2
  42. data/lib/rails_notice/config.rb +3 -3
  43. data/lib/rails_notice/version.rb +1 -1
  44. metadata +51 -45
  45. data/app/controllers/rails_notice_my/base_controller.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bda6c602631a3fdf5cc0d896aaf790cc4d0bd4c7f2627987c99f460b26b6388
4
- data.tar.gz: 92447234ba79cbf5581b25f9110764cfef53bfd5aacf62e88821156529470f7d
3
+ metadata.gz: e940b006c25d0c6000da574a9916df65f1712e5185c71970996785f27f7d1aeb
4
+ data.tar.gz: 23fbefcc329063b11716ba2ee1f4d2f9f22dcf71e1f431f5720840d387dcd00d
5
5
  SHA512:
6
- metadata.gz: 37f15f271d3b715706407377594febace0896215de9853d9627cb2555a70cd478fe93fa297f309686265490f9bb87c019356853a2e1cb1c6ec1b67c39701607e
7
- data.tar.gz: 8f83cdaef9b46c7d0e254ec962c07a2e6a9171a5016017806e465f393207f145740e85197f7acd9198a91ac61d448c3ee112271372351ad20f50a1e74bc31ed7
6
+ metadata.gz: fd8c9801ef12fa0042875c039f37ddfe859a832609bafecc9d956182c704854f1e5d8af56d77724ac6b6861bd9b6282de502b075b3f2fb2b5874029d66036075
7
+ data.tar.gz: fd70007b996988aa6bb1d25e19c9e761e3174298b8de2fc4bdc4d82e031e740eec77d39e697f26636a233f8b66c533bd30ac1dfa0a1f4c45956bbc019926d6f3
data/README.md CHANGED
@@ -69,8 +69,5 @@ Or install it yourself as:
69
69
  $ gem install rails_notice
70
70
  ```
71
71
 
72
- ## Contributing
73
- Contribution directions go here.
74
-
75
72
  ## License
76
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
73
+ The gem is available as open source under the terms of the [LGPL License](https://opensource.org/licenses/LGPL-3.0).
@@ -1,4 +1,4 @@
1
- class RailsNoticeAdmin::BaseController < RailsNotice.config.admin_class.constantize
1
+ class Notice::Admin::BaseController < RailsNotice.config.admin_class.constantize
2
2
  #skip_before_action :verify_authenticity_token#, if: -> { request.content_type == 'application/json' }
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- class RailsNoticeAdmin::NotificationSettingsController < RailsNoticeAdmin::BaseController
1
+ class Notice::Admin::NotificationSettingsController < Notice::Admin::BaseController
2
2
  before_action :set_notification_setting, only: [:show, :edit, :update, :destroy]
3
3
 
4
4
  def index
@@ -49,7 +49,11 @@ class RailsNoticeAdmin::NotificationSettingsController < RailsNoticeAdmin::BaseC
49
49
  end
50
50
 
51
51
  def notification_setting_params
52
- params.fetch(:notification_setting, {}).permit(:showtime, :accept_email, notifiable_types: [])
52
+ params.fetch(:notification_setting, {}).permit(
53
+ :showtime,
54
+ :accept_email,
55
+ notifiable_types: []
56
+ )
53
57
  end
54
58
 
55
59
  end
@@ -1,4 +1,4 @@
1
- class RailsNoticeAdmin::NotificationsController < RailsNoticeAdmin::BaseController
1
+ class Notice::Admin::NotificationsController < Notice::Admin::BaseController
2
2
  before_action :set_receiver, only: [:index, :new, :create]
3
3
  before_action :set_notification, only: [:show, :push, :email, :edit, :update, :destroy]
4
4
 
@@ -65,7 +65,11 @@ class RailsNoticeAdmin::NotificationsController < RailsNoticeAdmin::BaseControll
65
65
  end
66
66
 
67
67
  def notification_params
68
- params[:notification].permit(:title, :body, :link)
68
+ params[:notification].permit(
69
+ :title,
70
+ :body,
71
+ :link
72
+ )
69
73
  end
70
74
 
71
75
  end
@@ -0,0 +1,5 @@
1
+ class Notice::My::BaseController < RailsNotice.config.my_class.constantize
2
+
3
+
4
+
5
+ end
@@ -1,5 +1,9 @@
1
- class RailsNoticeMy::NotificationSettingsController < RailsNoticeMy::BaseController
2
- before_action :set_notification_setting, only: [:show, :edit, :update]
1
+ class Notice::My::NotificationSettingsController < Notice::My::BaseController
2
+ before_action :set_notification_setting, only: [
3
+ :show,
4
+ :edit,
5
+ :update
6
+ ]
3
7
 
4
8
  def show
5
9
  end
@@ -22,7 +26,10 @@ class RailsNoticeMy::NotificationSettingsController < RailsNoticeMy::BaseControl
22
26
  end
23
27
 
24
28
  def notification_setting_params
25
- params.fetch(:notification_setting, {}).permit(:showtime, :accept_email)
29
+ params.fetch(:notification_setting, {}).permit(
30
+ :showtime,
31
+ :accept_email
32
+ )
26
33
  end
27
34
 
28
35
  end
@@ -1,4 +1,4 @@
1
- class RailsNoticeMy::NotificationsController < RailsNoticeMy::BaseController
1
+ class Notice::My::NotificationsController < Notice::My::BaseController
2
2
  before_action :set_notification, only: [:show, :url, :read, :edit, :update, :destroy]
3
3
  before_action :set_receiver, only: [:index, :read_all]
4
4
  protect_from_forgery except: :read
@@ -3,7 +3,6 @@ module TheNotifiable
3
3
 
4
4
  included do
5
5
  class_attribute :notifies, default: {}
6
-
7
6
  delegate :url_helpers, to: 'Rails.application.routes'
8
7
 
9
8
  has_many :notifications, as: 'notifiable', dependent: :delete_all
@@ -1,6 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- scope :admin, as: 'admin', module: 'rails_notice_admin' do
3
+ scope :admin, module: 'notice/admin', as: 'admin' do
4
4
  resources :notifications do
5
5
  patch :push, on: :member
6
6
  patch :email, on: :member
@@ -11,7 +11,7 @@ Rails.application.routes.draw do
11
11
  resources :notification_settings
12
12
  end
13
13
 
14
- scope module: 'rails_notice_my' do
14
+ scope module: 'notice/my' do
15
15
  resources :notifications do
16
16
  get :url, on: :member
17
17
  get :read, on: :member
@@ -4,10 +4,10 @@ module RailsNotice
4
4
  include ActiveSupport::Configurable
5
5
 
6
6
  configure do |config|
7
- config.admin_class = 'Admin::BaseController'
8
- config.my_class = 'My::BaseController'
7
+ config.admin_class = 'AdminController'
8
+ config.my_class = 'MyController'
9
9
  config.default_notifiable_types = []
10
10
  config.default_send_email = true
11
11
  end
12
12
 
13
- end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsNotice
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_notice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - qinmingyuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-10-10 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
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '5.0'
20
+ - - "<="
21
+ - !ruby/object:Gem::Version
22
+ version: '6.0'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '5.0'
30
+ - - "<="
25
31
  - !ruby/object:Gem::Version
26
- version: '5.2'
32
+ version: '6.0'
27
33
  description: Description of RailsNotice.
28
34
  email:
29
35
  - mingyuan0715@foxmail.com
@@ -35,12 +41,12 @@ files:
35
41
  - README.md
36
42
  - Rakefile
37
43
  - app/assets/config/rails_notice_manifest.js
44
+ - app/assets/javascripts/controllers/notice/admin/notification_settings/index.js
45
+ - app/assets/javascripts/controllers/notice/admin/notifications/index.js
46
+ - app/assets/javascripts/controllers/notice/admin/notify_settings/edit.js
47
+ - app/assets/javascripts/controllers/notice/admin/notify_settings/index.js
48
+ - app/assets/javascripts/controllers/notice/admin/notify_settings/new.js
38
49
  - app/assets/javascripts/controllers/notifications/index.js
39
- - app/assets/javascripts/controllers/rails_notice_admin/notification_settings/index.js
40
- - app/assets/javascripts/controllers/rails_notice_admin/notifications/index.js
41
- - app/assets/javascripts/controllers/rails_notice_admin/notify_settings/edit.js
42
- - app/assets/javascripts/controllers/rails_notice_admin/notify_settings/index.js
43
- - app/assets/javascripts/controllers/rails_notice_admin/notify_settings/new.js
44
50
  - app/assets/javascripts/rails_notice/cable.js
45
51
  - app/assets/javascripts/rails_notice/channels/notices.js
46
52
  - app/assets/javascripts/rails_notice/messenger-theme-future.js
@@ -51,13 +57,13 @@ files:
51
57
  - app/channels/notices_channel.rb
52
58
  - app/channels/rails_notice_connection.rb
53
59
  - app/controllers/concerns/rails_notice_controller.rb
54
- - app/controllers/rails_notice_admin/base_controller.rb
55
- - app/controllers/rails_notice_admin/notification_settings_controller.rb
56
- - app/controllers/rails_notice_admin/notifications_controller.rb
57
- - app/controllers/rails_notice_my/base_controller.rb
58
- - app/controllers/rails_notice_my/notification_settings_controller.rb
59
- - app/controllers/rails_notice_my/notifications_controller.rb
60
- - app/controllers/receivers_controller.rb
60
+ - app/controllers/notice/admin/base_controller.rb
61
+ - app/controllers/notice/admin/notification_settings_controller.rb
62
+ - app/controllers/notice/admin/notifications_controller.rb
63
+ - app/controllers/notice/my/base_controller.rb
64
+ - app/controllers/notice/my/notification_settings_controller.rb
65
+ - app/controllers/notice/my/notifications_controller.rb
66
+ - app/controllers/notice/receivers_controller.rb
61
67
  - app/jobs/notification_job.rb
62
68
  - app/mailers/rails_notice_mailer.rb
63
69
  - app/models/annunciation.rb
@@ -67,33 +73,33 @@ files:
67
73
  - app/models/concerns/the_receivable.rb
68
74
  - app/models/notification.rb
69
75
  - app/models/notification_setting.rb
76
+ - app/views/notice/admin/base/_nav.html.erb
77
+ - app/views/notice/admin/notification_settings/_form.html.erb
78
+ - app/views/notice/admin/notification_settings/_search_form.html.erb
79
+ - app/views/notice/admin/notification_settings/edit.html.erb
80
+ - app/views/notice/admin/notification_settings/index.html.erb
81
+ - app/views/notice/admin/notification_settings/new.html.erb
82
+ - app/views/notice/admin/notification_settings/show.html.erb
83
+ - app/views/notice/admin/notifications/_form.html.erb
84
+ - app/views/notice/admin/notifications/_menu.html.erb
85
+ - app/views/notice/admin/notifications/_search_form.html.erb
86
+ - app/views/notice/admin/notifications/edit.html.erb
87
+ - app/views/notice/admin/notifications/index.html.erb
88
+ - app/views/notice/admin/notifications/new.html.erb
89
+ - app/views/notice/my/base/_nav_my.html.erb
90
+ - app/views/notice/my/notification_settings/_form.html.erb
91
+ - app/views/notice/my/notification_settings/show.html.erb
92
+ - app/views/notice/my/notifications/_navbar.html.erb
93
+ - app/views/notice/my/notifications/_notifications.html.erb
94
+ - app/views/notice/my/notifications/edit.html.erb
95
+ - app/views/notice/my/notifications/index.html.erb
96
+ - app/views/notice/my/notifications/index.js.erb
97
+ - app/views/notice/my/notifications/new.html.erb
98
+ - app/views/notice/my/notifications/read.js.erb
99
+ - app/views/notice/my/notifications/read_all.js.erb
100
+ - app/views/notice/my/notifications/show.html.erb
70
101
  - app/views/rails_notice/_link.html.erb
71
- - app/views/rails_notice_admin/base/_nav.html.erb
72
- - app/views/rails_notice_admin/notification_settings/_form.html.erb
73
- - app/views/rails_notice_admin/notification_settings/_search_form.html.erb
74
- - app/views/rails_notice_admin/notification_settings/edit.html.erb
75
- - app/views/rails_notice_admin/notification_settings/index.html.erb
76
- - app/views/rails_notice_admin/notification_settings/new.html.erb
77
- - app/views/rails_notice_admin/notification_settings/show.html.erb
78
- - app/views/rails_notice_admin/notifications/_form.html.erb
79
- - app/views/rails_notice_admin/notifications/_menu.html.erb
80
- - app/views/rails_notice_admin/notifications/_search_form.html.erb
81
- - app/views/rails_notice_admin/notifications/edit.html.erb
82
- - app/views/rails_notice_admin/notifications/index.html.erb
83
- - app/views/rails_notice_admin/notifications/new.html.erb
84
102
  - app/views/rails_notice_mailer/notify.html.erb
85
- - app/views/rails_notice_my/base/_nav_my.html.erb
86
- - app/views/rails_notice_my/notification_settings/_form.html.erb
87
- - app/views/rails_notice_my/notification_settings/show.html.erb
88
- - app/views/rails_notice_my/notifications/_navbar.html.erb
89
- - app/views/rails_notice_my/notifications/_notifications.html.erb
90
- - app/views/rails_notice_my/notifications/edit.html.erb
91
- - app/views/rails_notice_my/notifications/index.html.erb
92
- - app/views/rails_notice_my/notifications/index.js.erb
93
- - app/views/rails_notice_my/notifications/new.html.erb
94
- - app/views/rails_notice_my/notifications/read.js.erb
95
- - app/views/rails_notice_my/notifications/read_all.js.erb
96
- - app/views/rails_notice_my/notifications/show.html.erb
97
103
  - config/locales/en.yml
98
104
  - config/locales/zh.yml
99
105
  - config/routes.rb
@@ -125,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
131
  version: '0'
126
132
  requirements: []
127
133
  rubyforge_project:
128
- rubygems_version: 2.7.7
134
+ rubygems_version: 2.7.6
129
135
  signing_key:
130
136
  specification_version: 4
131
- summary: Summary of RailsNotice.
137
+ summary: Notification Center for Rails Application
132
138
  test_files: []
@@ -1,5 +0,0 @@
1
- class RailsNoticeMy::BaseController < RailsNotice.config.my_class.constantize
2
-
3
-
4
-
5
- end