-
Notifications
You must be signed in to change notification settings - Fork 1
Bump up to Rails 7.2 #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: for-taruntarun
Are you sure you want to change the base?
Bump up to Rails 7.2 #604
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,5 @@ DB_USER=postgres | |
| DB_PASS=postgres | ||
| DB_NAME=pub-relay | ||
|
|
||
| DOMAIN=example.com | ||
| DOMAIN=www.example.com | ||
| HTTPS=true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,5 +7,5 @@ DB_USER=postgres | |
| DB_PASS=postgres | ||
| DB_NAME=pub-relay | ||
|
|
||
| DOMAIN=example.com | ||
| DOMAIN=www.example.com | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,14 +10,14 @@ def show | |
| links: [{ | ||
| rel: 'self', | ||
| type: 'application/activity+json', | ||
| href: actor_url, | ||
| href: "https://#{ENV['DOMAIN']}/actor", | ||
| }], | ||
| }) | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def acct | ||
| 'acct:relay@' + Rails.application.default_url_options[:host] | ||
| "acct:relay@#{ENV["DOMAIN"]}" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同じく環境変数を使うように変更しています |
||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ def perform(url, body) | |
| private | ||
|
|
||
| def actor_url | ||
| PubRelay::Application.routes.url_helpers.actor_url | ||
| "https://#{ENV['DOMAIN']}/actor" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらも同じく |
||
| end | ||
|
|
||
| def http_client | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,14 +62,14 @@ def subscribe! | |
|
|
||
| accept_activity = Oj.dump({ | ||
| '@context': %w(https://www.w3.org/ns/activitystreams https://w3id.org/security/v1), | ||
| id: URI.join(Rails.application.routes.url_helpers.root_url, "/actor#accepts/follows/#{domain}"), | ||
| id: "https://#{ENV["DOMAIN"]}/actor#accepts/follows/#{domain}", | ||
| type: 'Accept', | ||
| actor: URI.join(Rails.application.routes.url_helpers.root_url, "/actor"), | ||
| actor: "https://#{ENV["DOMAIN"]}/actor", | ||
| object: { | ||
| id: @json['id'], | ||
| type: "Follow", | ||
| actor: @actor['id'], | ||
| object: URI.join(Rails.application.routes.url_helpers.root_url, "/actor") | ||
| object: "https://#{ENV["DOMAIN"]}/actor" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらも同じく環境変数を使うように変更しています |
||
| }, | ||
| }) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,4 @@ | ||
| #!/usr/bin/env ruby | ||
| begin | ||
| load File.expand_path('../spring', __FILE__) | ||
| rescue LoadError => e | ||
| raise unless e.message.include?('spring') | ||
| end | ||
| APP_PATH = File.expand_path('../config/application', __dir__) | ||
| require_relative '../config/boot' | ||
| require 'rails/commands' | ||
| APP_PATH = File.expand_path("../config/application", __dir__) | ||
| require_relative "../config/boot" | ||
| require "rails/commands" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,4 @@ | ||
| #!/usr/bin/env ruby | ||
| begin | ||
| load File.expand_path('../spring', __FILE__) | ||
| rescue LoadError => e | ||
| raise unless e.message.include?('spring') | ||
| end | ||
| require_relative '../config/boot' | ||
| require 'rake' | ||
| require_relative "../config/boot" | ||
| require "rake" | ||
| Rake.application.run |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #!/usr/bin/env ruby | ||
| require_relative '../config/boot' | ||
| require_relative '../config/environment' | ||
| require_relative '../lib/cli' | ||
| PubRelay::CLI.start(ARGV) | ||
| require_relative '../lib/pub_relay/cli' | ||
| PubRelay::Cli.start(ARGV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_url_optionsの挙動が変更されており、そのまま扱うのは難しいと判断して環境変数を使うように変更しています。