Skip to content

Commit 717a92f

Browse files
authored
Merge pull request #26 from THE-POWERNEWS/develop
fix: MastodonツールのRAILS_ENV受け渡し修正
2 parents d56d56d + 8b468a0 commit 717a92f

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GIT
22
remote: https://github.com/pooza/ginseng-core.git
3-
revision: 007cc8ecceb2c7a7b4348f13264abe7ac6ab59cb
3+
revision: 80891c47bdca2915b44b1aeb5546189fa1e5bdef
44
specs:
5-
ginseng-core (1.15.12)
5+
ginseng-core (1.15.13)
66
activesupport (>= 7.0.7.1)
77
addressable (>= 2.8.0)
88
cgi (>= 0.4.2)

app/lib/writers_base/tool/mastodon_follow_tool.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ def description
1919
private
2020

2121
def tootctl_command(args)
22-
command = CommandLine.new(
23-
['sudo', '-u', mastodon_user, 'bundle', 'exec', 'bin/tootctl', *args],
24-
)
22+
command = CommandLine.new(['bundle', 'exec', 'bin/tootctl', *args])
23+
command.user = mastodon_user
2524
command.env = {'RAILS_ENV' => mastodon_rails_env}
2625
command.dir = mastodon_dir
2726
unless test?

app/lib/writers_base/tool/mastodon_maintenance_tool.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ def description
2121
private
2222

2323
def tootctl_command(args)
24-
command = CommandLine.new(
25-
['sudo', '-u', mastodon_user, 'bundle', 'exec', 'bin/tootctl', *args],
26-
)
24+
command = CommandLine.new(['bundle', 'exec', 'bin/tootctl', *args])
25+
command.user = mastodon_user
2726
command.env = {'RAILS_ENV' => mastodon_rails_env}
2827
command.dir = mastodon_dir
2928
unless test?

app/lib/writers_base/tool/mastodon_media_cleanup_tool.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ def description
2121
private
2222

2323
def tootctl_command(args)
24-
command = CommandLine.new(
25-
['sudo', '-u', mastodon_user, 'bundle', 'exec', 'bin/tootctl', *args],
26-
)
24+
command = CommandLine.new(['bundle', 'exec', 'bin/tootctl', *args])
25+
command.user = mastodon_user
2726
command.env = {'RAILS_ENV' => mastodon_rails_env}
2827
command.dir = mastodon_dir
2928
unless test?

config/application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package:
1919
- tkoishi@b-shock.co.jp
2020
license: MIT
2121
url: https://github.com/THE-POWERNEWS/writersbase-tools
22-
version: 1.4.7
22+
version: 1.4.8
2323
ruby:
2424
bin: /usr/bin/ruby3.3
2525
hourly: []

0 commit comments

Comments
 (0)