webring-rails 1.6.0 → 1.7.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 +4 -4
- data/README.md +2 -0
- data/app/controllers/webring/members_controller.rb +1 -1
- data/app/controllers/webring/navigation_controller.rb +2 -0
- data/app/controllers/webring/widget_controller.rb +7 -8
- data/app/models/concerns/webring/membership_request_actions.rb +1 -0
- data/lib/generators/webring/member/templates/migration.rb +2 -1
- data/lib/generators/webring/navigation_controller/templates/navigation_controller.rb +2 -0
- data/lib/webring/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a5b42e96746928c014435c11237eace0ad0219f0dda1ef94c682d4659ff821
|
4
|
+
data.tar.gz: 5cae67399d29d43add826956e4f061bf646364c25bfa02c94ea2c4b82ac74d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a83df3a9470ec0612cdf66b649fb500e3167a191b709455792fa98c88b68711233f906263dc6e345cd86d042219b79b90a24cd4be96a061887d0f2a8d210a2e2
|
7
|
+
data.tar.gz: 563281f534ced604e59d885771c9ca828a42c416b23b6aa4809ff1bdba1b3a40a7bb329808a7bbe707834923785b078ce85696922581ac9ec6aed42fd83aac6c
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
# Webring for Rails
|
4
4
|
|
5
|
+
[](https://badge.fury.io/rb/webring-rails)
|
6
|
+
|
5
7
|
[Webring for Rails (webring-rails)](https://github.com/cybergizer-hq/webring-rails) is a flexible engine for creating and managing a webring system in your Ruby on Rails application. A webring is a collection of websites linked together in a circular structure, allowing visitors to navigate from one site to another.
|
6
8
|
|
7
9
|
## Features
|
@@ -3,7 +3,6 @@ module Webring
|
|
3
3
|
# Disable CSRF protection for widget.js as it needs to be loaded from other domains
|
4
4
|
skip_forgery_protection
|
5
5
|
|
6
|
-
# Set CORS headers for the widget
|
7
6
|
before_action :set_cors_headers
|
8
7
|
|
9
8
|
# Serve the webring navigation widget JavaScript
|
@@ -28,13 +27,6 @@ module Webring
|
|
28
27
|
|
29
28
|
private
|
30
29
|
|
31
|
-
def set_cors_headers
|
32
|
-
response.headers['Access-Control-Allow-Origin'] = '*'
|
33
|
-
response.headers['Access-Control-Allow-Methods'] = 'GET, OPTIONS'
|
34
|
-
response.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept'
|
35
|
-
response.headers['Access-Control-Max-Age'] = '86400'
|
36
|
-
end
|
37
|
-
|
38
30
|
# This function is used to generate the logo SVG function for the compiled widget.js file to overcome args names compression issue
|
39
31
|
def logo_svg_function
|
40
32
|
<<~JS
|
@@ -57,5 +49,12 @@ module Webring
|
|
57
49
|
widgetTitle: { default: 'Webring', enforced: false }
|
58
50
|
}
|
59
51
|
end
|
52
|
+
|
53
|
+
def set_cors_headers
|
54
|
+
response.headers['Access-Control-Allow-Origin'] = '*'
|
55
|
+
response.headers['Access-Control-Allow-Methods'] = 'GET, OPTIONS'
|
56
|
+
response.headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept'
|
57
|
+
response.headers['Access-Control-Max-Age'] = '86400'
|
58
|
+
end
|
60
59
|
end
|
61
60
|
end
|
@@ -4,7 +4,8 @@ class CreateWebringMembers < ActiveRecord::Migration<%= "[#{Rails::VERSION::MAJO
|
|
4
4
|
t.string :uid, null: false, limit: 32
|
5
5
|
t.string :name, null: false
|
6
6
|
t.string :url, null: false
|
7
|
-
t.
|
7
|
+
t.string :owner_email
|
8
|
+
t.text :description
|
8
9
|
t.integer :status, null: false, default: 0
|
9
10
|
|
10
11
|
t.index :uid, unique: true
|
data/lib/webring/version.rb
CHANGED