my_lyn_plugin 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4583e86dc8557543c9662571663b3778b0dc1ab8d198a622f9df298cc24ddc4a
4
+ data.tar.gz: 9076bddfd0fe5aad0e0345fd7e8cefa917f545d9c8df768d6d4a60bf69a9ce6b
5
+ SHA512:
6
+ metadata.gz: f4f6b9a302aa1fffe7387f5770984ea7026acbd210e052dd1db438ea3254a25a3c569234bc25561dc9876a54f32d71933e66108d82c0dd789d9753513974bccc
7
+ data.tar.gz: 9ac52a2b617242dd5fb2f5f13b5048f1dd802a3494bc660d2cabb23843437b12d5efa29b65ab96ab42babdffedc7c1d2d79738603e1c26abc56496f17248ccdd
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # MyPlugin
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 "my_plugin"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install my_plugin
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,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module MyPlugin
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,27 @@
1
+ module MyPlugin
2
+ class PostsController < ApplicationController
3
+ def index
4
+ @posts = Post.all
5
+ end
6
+ def show
7
+ @post = Post.find(params[:id])
8
+ end
9
+ def new
10
+ @post = Post.new
11
+ end
12
+ def create
13
+ @post = Post.new(post_params)
14
+ if @post.save
15
+ redirect_to @post
16
+ else
17
+ render :new, status: :unprocessable_entity
18
+ end
19
+ end
20
+
21
+
22
+ private
23
+ def post_params
24
+ params.require(:post).permit(:title, :content)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,4 @@
1
+ module MyPlugin
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MyPlugin
2
+ module PostsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module MyPlugin
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module MyPlugin
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: "from@example.com"
4
+ layout "mailer"
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module MyPlugin
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module MyPlugin
2
+ class Post < ApplicationRecord
3
+ end
4
+ end
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>My plugin</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= yield :head %>
9
+
10
+ <%= stylesheet_link_tag "my_plugin/application", media: "all" %>
11
+ </head>
12
+ <body>
13
+
14
+ <%= yield %>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1 @@
1
+ <h2>Posts-index page</h2>
@@ -0,0 +1 @@
1
+ <h2>Posts-New file</h2>
@@ -0,0 +1 @@
1
+ <h2>Posts-Show file</h2>
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ MyPlugin::Engine.routes.draw do
2
+ resources :posts
3
+ end
@@ -0,0 +1,10 @@
1
+ class CreateMyPluginPosts < ActiveRecord::Migration[8.0]
2
+ def change
3
+ create_table :my_plugin_posts do |t|
4
+ t.string :title
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ module MyPlugin
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace MyPlugin
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module MyPlugin
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,6 @@
1
+ require "my_plugin/version"
2
+ require "my_plugin/engine"
3
+
4
+ module MyPlugin
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :my_plugin do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my_lyn_plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Lynelle0503
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-12-19 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: 8.0.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 8.0.1
27
+ description: I think this is optional
28
+ email:
29
+ - 37027090+Lynelle0503@users.noreply.github.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - README.md
35
+ - Rakefile
36
+ - app/assets/stylesheets/my_plugin/application.css
37
+ - app/controllers/my_plugin/application_controller.rb
38
+ - app/controllers/my_plugin/posts_controller.rb
39
+ - app/helpers/my_plugin/application_helper.rb
40
+ - app/helpers/my_plugin/posts_helper.rb
41
+ - app/jobs/my_plugin/application_job.rb
42
+ - app/mailers/my_plugin/application_mailer.rb
43
+ - app/models/my_plugin/application_record.rb
44
+ - app/models/my_plugin/post.rb
45
+ - app/views/layouts/my_plugin/application.html.erb
46
+ - app/views/my_plugin/posts/index.html.erb
47
+ - app/views/my_plugin/posts/new.html.erb
48
+ - app/views/my_plugin/posts/show.html.erb
49
+ - config/routes.rb
50
+ - db/migrate/20241219053725_create_my_plugin_posts.rb
51
+ - lib/my_lyn_plugin.rb
52
+ - lib/my_lyn_plugin/engine.rb
53
+ - lib/my_lyn_plugin/version.rb
54
+ - lib/tasks/my_lyn_plugin_tasks.rake
55
+ homepage: https://guides.rubyonrails.org/
56
+ licenses: []
57
+ metadata:
58
+ allowed_push_host: https://rubygems.org
59
+ homepage_uri: https://guides.rubyonrails.org/
60
+ source_code_uri: https://guides.rubyonrails.org/
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.5.23
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: first try at plugin
80
+ test_files: []