rhino_project_notifications 0.20.0.alpha.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8890761593b0c2cec32dfd63d88ddc5f84209ad2a64195adb3aad573f2e3d820
4
+ data.tar.gz: 23e3a5d7ae8abcc0e09de25bb3ab30ba859c6519e8e9d4e9c1d3fcd9cd9172c9
5
+ SHA512:
6
+ metadata.gz: b007f09989571df5552d0bb23b29809b64abd9105091bbd063cac36c284711c00fb3a0df0aec290ceb634796dee47b7ae1e08188dd2bccf34df99c20fd160d86
7
+ data.tar.gz: 302d9cc23d5c82b7a4a0ecdf778a92fe27e4c203af3839231a8467c46580975eb6f80f702e9c429b012c8d3dc4ffbe8045943c93dd06f946b4ea22d5bda59132
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020-present Codalio Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # RhinoNotifications
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'rhino_notifications'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install rhino_notifications
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,35 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ task :package
10
+
11
+ RDoc::Task.new(:rdoc) do |rdoc|
12
+ rdoc.rdoc_dir = 'rdoc'
13
+ rdoc.title = 'RhinoNotifications'
14
+ rdoc.options << '--line-numbers'
15
+ rdoc.rdoc_files.include('README.md')
16
+ rdoc.rdoc_files.include('lib/**/*.rb')
17
+ end
18
+
19
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
20
+ load 'rails/tasks/engine.rake'
21
+
22
+ load 'rails/tasks/statistics.rake'
23
+
24
+ require 'bundler/gem_tasks'
25
+
26
+ require 'rake/testtask'
27
+
28
+ Rake::TestTask.new(:test) do |t|
29
+ t.libs << 'test'
30
+ t.pattern = 'test/**/*_test.rb'
31
+ t.verbose = true
32
+ t.warning = false
33
+ end
34
+
35
+ task default: :test
File without changes
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ scope Rhino.namespace do
3
+ notify_to :users, api_mode: true, with_devise: :users
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RhinoNotifications
4
+ module Generators
5
+ class InstallGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path('templates', __dir__)
7
+
8
+ def install
9
+ generate 'activity_notification:install'
10
+ generate 'activity_notification:migration'
11
+ end
12
+
13
+ def user_as_target
14
+ inject_into_file "app/models/user.rb", "#{optimize_indentation('acts_as_target email: :email', 2)}\n", after: "class User < Rhino::User\n"
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rhino/engine"
4
+ require "rhino_notifications/version"
5
+
6
+ # https://guides.rubyonrails.org/engines.html#other-gem-dependencies
7
+ require "activity_notification"
8
+
9
+ module RhinoNotifications
10
+ class Engine < ::Rails::Engine
11
+ config.autoload_paths << File.expand_path("../../lib", __dir__)
12
+
13
+ initializer "rhino_notifications.register_module" do
14
+ config.after_initialize do
15
+ if File.exist?(Rails.root.join("config/initializers/activity_notification.rb"))
16
+ Rhino.registered_modules[:rhino_notifications] = {
17
+ version: RhinoNotifications::VERSION::STRING
18
+ }
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RhinoNotifications
4
+ # Returns the currently loaded version of Rhino core as a +Gem::Version+.
5
+ def self.gem_version
6
+ Gem::Version.new VERSION::STRING
7
+ end
8
+
9
+ module VERSION
10
+ MAJOR = 0
11
+ MINOR = 20
12
+ TINY = 0
13
+ PRE = "alpha.0"
14
+
15
+ STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
+ end
17
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rhino_notifications/engine"
4
+
5
+ module RhinoNotifications
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :rhino_notifications do
4
+ # Prevent migration installation task from showing up twice.
5
+ if Rake::Task.task_defined?('rhino_notifications_engine:install:migrations')
6
+ Rake::Task['rhino_notifications_engine:install:migrations'].clear_comments
7
+ end
8
+
9
+ desc 'Install rhino_notifications'
10
+ task install: :environment do
11
+ Rake::Task['rhino_notifications_engine:install:migrations'].invoke if Rake::Task.task_defined?('rhino_notifications_engine:install:migrations')
12
+
13
+ Rails::Command.invoke :generate, ['rhino_notifications:install']
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rhino_project_notifications
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.20.0.alpha.0
5
+ platform: ruby
6
+ authors:
7
+ - JP Rosevear
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 7.1.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 7.1.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 7.1.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 7.1.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: rhino_project_core
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '='
38
+ - !ruby/object:Gem::Version
39
+ version: 0.20.0.alpha.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '='
45
+ - !ruby/object:Gem::Version
46
+ version: 0.20.0.alpha.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: rhino_project_jobs
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.20.0.alpha.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 0.20.0.alpha.0
61
+ - !ruby/object:Gem::Dependency
62
+ name: activity_notification
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 2.3.1
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '='
73
+ - !ruby/object:Gem::Version
74
+ version: 2.3.1
75
+ description: ''
76
+ email:
77
+ - jp@codalio.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - LICENSE
83
+ - README.md
84
+ - Rakefile
85
+ - app/assets/config/rhino_notifications_manifest.js
86
+ - config/routes.rb
87
+ - lib/generators/rhino_notifications/install/install_generator.rb
88
+ - lib/rhino_notifications/engine.rb
89
+ - lib/rhino_notifications/version.rb
90
+ - lib/rhino_project_notifications.rb
91
+ - lib/tasks/rhino_notifications.rake
92
+ homepage: ''
93
+ licenses:
94
+ - MIT
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubygems_version: 3.5.11
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: ''
115
+ test_files: []