procon_bypass_man 0.1.15 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -0
- data/.github/workflows/release.yml +2 -2
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +29 -7
- data/README.md +32 -4
- data/Steepfile +31 -17
- data/docs/setting/left-analogstick-cap.md +60 -0
- data/docs/setting/splatoon2_macro_sokuwari_bubble.md +52 -0
- data/docs/setup_raspi.md +2 -0
- data/docs/setup_raspi.mitamae.rb +7 -8
- data/docs/setup_raspi_by_mitamae.md +37 -1
- data/docs/upgrade_pbm.md +32 -0
- data/lib/ext/em_pure_ruby.rb +25 -0
- data/lib/ext/module.rb +16 -0
- data/lib/procon_bypass_man/background.rb +0 -1
- data/lib/procon_bypass_man/buttons_setting_configuration/layer.rb +35 -13
- data/lib/procon_bypass_man/buttons_setting_configuration/loader.rb +4 -1
- data/lib/procon_bypass_man/buttons_setting_configuration/validator.rb +36 -0
- data/lib/procon_bypass_man/buttons_setting_configuration.rb +28 -13
- data/lib/procon_bypass_man/bypass/usb_hid_logger.rb +6 -4
- data/lib/procon_bypass_man/bypass.rb +13 -6
- data/lib/procon_bypass_man/commands/bypass_command.rb +2 -2
- data/lib/procon_bypass_man/commands/print_boot_message_command.rb +50 -1
- data/lib/procon_bypass_man/commands/print_message_command.rb +8 -0
- data/lib/procon_bypass_man/commands/run_remote_pbm_action_dispatch_command.rb +1 -1
- data/lib/procon_bypass_man/commands/send_reload_config_event_command.rb +1 -2
- data/lib/procon_bypass_man/commands.rb +1 -0
- data/lib/procon_bypass_man/configuration.rb +32 -1
- data/lib/procon_bypass_man/domains/binary/base.rb +25 -0
- data/lib/procon_bypass_man/domains/binary/has_immutable_binary.rb +5 -0
- data/lib/procon_bypass_man/domains/binary/has_mutable_binary.rb +5 -0
- data/lib/procon_bypass_man/domains/binary/inbound_procon_binary.rb +9 -0
- data/lib/procon_bypass_man/domains/binary/processing_procon_binary.rb +66 -0
- data/lib/procon_bypass_man/domains.rb +11 -0
- data/lib/procon_bypass_man/plugin/splatoon2/macro/fast_return.rb +1 -1
- data/lib/procon_bypass_man/plugin/splatoon2/macro/jump_to_left_key.rb +1 -1
- data/lib/procon_bypass_man/plugin/splatoon2/macro/jump_to_right_key.rb +1 -1
- data/lib/procon_bypass_man/plugin/splatoon2/macro/jump_to_up_key.rb +1 -1
- data/lib/procon_bypass_man/plugin/splatoon2/macro/sokuwari_for_splash_bomb.rb +22 -0
- data/lib/procon_bypass_man/plugin/splatoon2/version.rb +1 -1
- data/lib/procon_bypass_man/{plugin.rb → plugins.rb} +1 -0
- data/lib/procon_bypass_man/processor.rb +4 -5
- data/lib/procon_bypass_man/procon/button.rb +11 -0
- data/lib/procon_bypass_man/procon/button_collection.rb +9 -11
- data/lib/procon_bypass_man/procon/layer_changer.rb +3 -2
- data/lib/procon_bypass_man/procon/macro.rb +89 -0
- data/lib/procon_bypass_man/procon/macro_builder.rb +123 -0
- data/lib/procon_bypass_man/procon/macro_registry.rb +9 -27
- data/lib/procon_bypass_man/procon/mode_registry.rb +4 -4
- data/lib/procon_bypass_man/procon/press_button_aware.rb +9 -7
- data/lib/procon_bypass_man/procon/user_operation.rb +58 -61
- data/lib/procon_bypass_man/procon/{analog_stick.rb → value_objects/analog_stick.rb} +3 -4
- data/lib/procon_bypass_man/procon/value_objects/procon_reader.rb +34 -0
- data/lib/procon_bypass_man/procon.rb +20 -16
- data/lib/procon_bypass_man/remote_pbm_action/{lib → commands}/update_remote_pbm_action_status_command.rb +0 -0
- data/lib/procon_bypass_man/remote_pbm_action/restore_pbm_setting.rb +1 -1
- data/lib/procon_bypass_man/{value_objects → remote_pbm_action/value_objects}/remote_pbm_action_object.rb +0 -0
- data/lib/procon_bypass_man/remote_pbm_action.rb +1 -1
- data/lib/procon_bypass_man/runner.rb +3 -3
- data/lib/procon_bypass_man/scheduler.rb +0 -7
- data/lib/procon_bypass_man/support/compress_array.rb +5 -0
- data/lib/procon_bypass_man/support/http_client.rb +4 -0
- data/lib/procon_bypass_man/support/on_memory_cache.rb +3 -1
- data/lib/procon_bypass_man/support/server_pool.rb +4 -0
- data/lib/procon_bypass_man/version.rb +1 -1
- data/lib/procon_bypass_man/websocket/pbm_job_client.rb +90 -0
- data/lib/procon_bypass_man.rb +13 -6
- data/procon_bypass_man.gemspec +3 -1
- data/project_template/README.md +10 -5
- data/project_template/app.rb +3 -2
- data/sig/main.rbs +226 -41
- data/sig/on_memory_cache.rbs +16 -0
- metadata +56 -13
- data/lib/procon_bypass_man/background/jobs/fetch_and_run_remote_pbm_action_job.rb +0 -29
- data/lib/procon_bypass_man/boot_message.rb +0 -48
- data/lib/procon_bypass_man/commands/run_local_shell_command.rb +0 -6
- data/lib/procon_bypass_man/procon_reader.rb +0 -31
@@ -1,7 +1,9 @@
|
|
1
1
|
class ProconBypassMan::Procon
|
2
2
|
require "procon_bypass_man/procon/consts"
|
3
3
|
require "procon_bypass_man/procon/mode_registry"
|
4
|
+
require "procon_bypass_man/procon/macro"
|
4
5
|
require "procon_bypass_man/procon/macro_registry"
|
6
|
+
require "procon_bypass_man/procon/macro_builder"
|
5
7
|
require "procon_bypass_man/procon/layer_changer"
|
6
8
|
require "procon_bypass_man/procon/button_collection"
|
7
9
|
require "procon_bypass_man/procon/user_operation"
|
@@ -20,8 +22,11 @@ class ProconBypassMan::Procon
|
|
20
22
|
end
|
21
23
|
reset!
|
22
24
|
|
25
|
+
# @param [string] binary
|
23
26
|
def initialize(binary)
|
24
|
-
self.user_operation = ProconBypassMan::Procon::UserOperation.new(
|
27
|
+
self.user_operation = ProconBypassMan::Procon::UserOperation.new(
|
28
|
+
binary.dup
|
29
|
+
)
|
25
30
|
end
|
26
31
|
|
27
32
|
def status; @@status[:buttons]; end
|
@@ -43,7 +48,7 @@ class ProconBypassMan::Procon
|
|
43
48
|
|
44
49
|
if ongoing_macro.finished?
|
45
50
|
current_layer.macros.each do |macro_name, options|
|
46
|
-
if options[:if_pressed]
|
51
|
+
if user_operation.pressing_all_buttons?(options[:if_pressed])
|
47
52
|
@@status[:ongoing_macro] = MacroRegistry.load(macro_name)
|
48
53
|
end
|
49
54
|
end
|
@@ -60,7 +65,7 @@ class ProconBypassMan::Procon
|
|
60
65
|
next
|
61
66
|
end
|
62
67
|
|
63
|
-
if options[:if_pressed] && options[:if_pressed]
|
68
|
+
if options[:if_pressed] && user_operation.pressing_all_buttons?(options[:if_pressed])
|
64
69
|
FlipCache.fetch(key: button, expires_in: options[:flip_interval]) do
|
65
70
|
status[button] = !status[button]
|
66
71
|
end
|
@@ -75,7 +80,7 @@ class ProconBypassMan::Procon
|
|
75
80
|
@@status[:ongoing_mode] = ProconBypassMan::Procon::ModeRegistry.load(current_layer.mode)
|
76
81
|
end
|
77
82
|
if(binary = ongoing_mode.next_binary)
|
78
|
-
self.user_operation.merge(
|
83
|
+
self.user_operation.merge([binary].pack("H*"))
|
79
84
|
end
|
80
85
|
return
|
81
86
|
end
|
@@ -83,28 +88,28 @@ class ProconBypassMan::Procon
|
|
83
88
|
status
|
84
89
|
end
|
85
90
|
|
86
|
-
# @return [
|
91
|
+
# @return [ProconBypassMan::Domains::ProcessingProconBinary]
|
87
92
|
def to_binary
|
88
93
|
if ongoing_mode.name != :manual
|
89
|
-
return user_operation.binary
|
94
|
+
return user_operation.binary.raw
|
90
95
|
end
|
91
96
|
|
92
97
|
if ongoing_macro.ongoing?
|
93
|
-
step = ongoing_macro.next_step or return(user_operation.binary)
|
98
|
+
step = ongoing_macro.next_step or return(user_operation.binary.raw)
|
94
99
|
user_operation.press_button_only(step)
|
95
|
-
return user_operation.binary
|
100
|
+
return user_operation.binary.raw
|
96
101
|
end
|
97
102
|
|
98
103
|
current_layer.disables.each do |button|
|
99
104
|
user_operation.unpress_button(button)
|
100
105
|
end
|
101
106
|
|
102
|
-
current_layer.left_analog_stick_caps.each do |
|
103
|
-
if
|
104
|
-
|
107
|
+
current_layer.left_analog_stick_caps.each do |config|
|
108
|
+
if config[:if_pressed].nil? || user_operation.pressing_all_buttons?(config[:if_pressed])
|
109
|
+
config[:force_neutral]&.each do |force_neutral_button|
|
105
110
|
user_operation.unpress_button(force_neutral_button)
|
106
111
|
end
|
107
|
-
user_operation.apply_left_analog_stick_cap(cap:
|
112
|
+
user_operation.apply_left_analog_stick_cap(cap: config[:cap])
|
108
113
|
end
|
109
114
|
end
|
110
115
|
|
@@ -116,7 +121,7 @@ class ProconBypassMan::Procon
|
|
116
121
|
end
|
117
122
|
|
118
123
|
# 押している時だけ連打
|
119
|
-
if options[:if_pressed] && options[:if_pressed]
|
124
|
+
if options[:if_pressed] && user_operation.pressing_all_buttons?(options[:if_pressed])
|
120
125
|
if !status[button]
|
121
126
|
user_operation.unpress_button(button)
|
122
127
|
end
|
@@ -128,16 +133,15 @@ class ProconBypassMan::Procon
|
|
128
133
|
end
|
129
134
|
|
130
135
|
current_layer.remaps.each do |from_button, to_buttons|
|
131
|
-
if user_operation.
|
136
|
+
if user_operation.pressing_button?(from_button)
|
132
137
|
user_operation.unpress_button(from_button)
|
133
|
-
# TODO 2重でpressしないようにしたい
|
134
138
|
to_buttons[:to].each do |to_button|
|
135
139
|
user_operation.press_button(to_button)
|
136
140
|
end
|
137
141
|
end
|
138
142
|
end
|
139
143
|
|
140
|
-
user_operation.binary
|
144
|
+
user_operation.binary.raw
|
141
145
|
end
|
142
146
|
|
143
147
|
private
|
File without changes
|
@@ -5,7 +5,7 @@ module ProconBypassMan
|
|
5
5
|
def action_content(args: )
|
6
6
|
require "pbmenv"
|
7
7
|
ProconBypassMan.logger.info "execute RestorePbmSettingAction!"
|
8
|
-
setting = args
|
8
|
+
setting = args.dig("setting") or raise(ProconBypassMan::RemotePbmAction::NeedPbmVersionError, "settingが必要です, #{args.inspect}")
|
9
9
|
File.write(
|
10
10
|
ProconBypassMan::ButtonsSettingConfiguration.instance.setting_path,
|
11
11
|
setting.to_yaml,
|
File without changes
|
@@ -5,7 +5,7 @@ module ProconBypassMan
|
|
5
5
|
require "procon_bypass_man/remote_pbm_action/reboot_os_action"
|
6
6
|
require "procon_bypass_man/remote_pbm_action/stop_pbm_action"
|
7
7
|
require "procon_bypass_man/remote_pbm_action/restore_pbm_setting.rb"
|
8
|
-
require "procon_bypass_man/remote_pbm_action/
|
8
|
+
require "procon_bypass_man/remote_pbm_action/commands/update_remote_pbm_action_status_command"
|
9
9
|
|
10
10
|
ACTION_CHANGE_PBM_VERSION = "change_pbm_version"
|
11
11
|
ACTION_REBOOT_OS = "reboot_os"
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require_relative "io_monitor"
|
2
|
-
require_relative "boot_message"
|
3
2
|
|
4
3
|
class ProconBypassMan::Runner
|
5
4
|
class InterruptForRestart < StandardError; end
|
@@ -31,6 +30,7 @@ class ProconBypassMan::Runner
|
|
31
30
|
main_loop_pid = Kernel.fork { ProconBypassMan::BypassCommand.new(gadget: @gadget, procon: @procon).execute }
|
32
31
|
|
33
32
|
begin
|
33
|
+
# TODO 小プロセスが消滅した時に、メインプロセスは生き続けてしまい、何もできなくなる問題がある
|
34
34
|
while(readable_io = IO.select([self_read]))
|
35
35
|
signal = readable_io.first[0].gets.strip
|
36
36
|
handle_signal(signal)
|
@@ -39,14 +39,14 @@ class ProconBypassMan::Runner
|
|
39
39
|
$will_terminate_token = true
|
40
40
|
Process.kill("TERM", main_loop_pid)
|
41
41
|
Process.wait
|
42
|
-
ProconBypassMan.
|
42
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "Reloading config file")
|
43
43
|
begin
|
44
44
|
ProconBypassMan::ButtonsSettingConfiguration::Loader.reload_setting
|
45
45
|
ProconBypassMan::SendReloadConfigEventCommand.execute
|
46
46
|
rescue ProconBypassMan::CouldNotLoadConfigError
|
47
47
|
ProconBypassMan::SendErrorCommand.execute(error: "設定ファイルが不正です。再読み込みができませんでした")
|
48
48
|
end
|
49
|
-
ProconBypassMan.
|
49
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "バイパス処理を再開します")
|
50
50
|
rescue Interrupt
|
51
51
|
$will_terminate_token = true
|
52
52
|
Process.kill("TERM", main_loop_pid)
|
@@ -68,13 +68,6 @@ module ProconBypassMan
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.register_schedules
|
71
|
-
register(
|
72
|
-
schedule: Schedule.new(
|
73
|
-
klass: ProconBypassMan::FetchAndRunRemotePbmActionJob,
|
74
|
-
args: [],
|
75
|
-
interval: 3,
|
76
|
-
)
|
77
|
-
)
|
78
71
|
register(
|
79
72
|
schedule: Schedule.new(
|
80
73
|
klass: ProconBypassMan::SyncDeviceStatsJob,
|
@@ -0,0 +1,90 @@
|
|
1
|
+
module ProconBypassMan
|
2
|
+
module Websocket
|
3
|
+
module PbmJobClient
|
4
|
+
CHANNEL = 'PbmJobChannel'
|
5
|
+
|
6
|
+
def self.start!
|
7
|
+
return unless ProconBypassMan.config.enable_ws?
|
8
|
+
|
9
|
+
Thread.start do
|
10
|
+
loop do
|
11
|
+
run
|
12
|
+
rescue
|
13
|
+
retry
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.run
|
19
|
+
EventMachine.run do
|
20
|
+
client = ActionCableClient.new(
|
21
|
+
ProconBypassMan.config.current_ws_server_url, {
|
22
|
+
channel: CHANNEL, device_id: ProconBypassMan.device_id,
|
23
|
+
}
|
24
|
+
)
|
25
|
+
|
26
|
+
client.connected {
|
27
|
+
ProconBypassMan.logger.info('successfully connected in ProconBypassMan::Websocket::PbmJobClient')
|
28
|
+
}
|
29
|
+
client.subscribed { |msg|
|
30
|
+
puts({ event: :subscribed, msg: msg })
|
31
|
+
ProconBypassMan::SyncDeviceStatsJob.perform(ProconBypassMan::DeviceStatus.current)
|
32
|
+
}
|
33
|
+
|
34
|
+
client.received do |data|
|
35
|
+
ProconBypassMan.logger.info(data)
|
36
|
+
|
37
|
+
dispatch(data: data, client: client)
|
38
|
+
rescue => e
|
39
|
+
ProconBypassMan::SendErrorCommand.execute(error: e)
|
40
|
+
end
|
41
|
+
|
42
|
+
client.disconnected {
|
43
|
+
puts :disconnected
|
44
|
+
client.reconnect!
|
45
|
+
sleep 2
|
46
|
+
}
|
47
|
+
client.errored { |msg| puts :errored; puts msg }
|
48
|
+
client.pinged { |msg|
|
49
|
+
ProconBypassMan.cache.fetch key: 'ws_pinged', expires_in: 10 do
|
50
|
+
ProconBypassMan.logger.info(msg)
|
51
|
+
end
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# @param [Hash] data
|
57
|
+
def self.dispatch(data: , client: )
|
58
|
+
pbm_job_hash = data.dig("message")
|
59
|
+
if pbm_job_hash['action'] == "ping"
|
60
|
+
client.perform('pong', { device_id: ProconBypassMan.device_id, message: 'hello from pbm' })
|
61
|
+
else
|
62
|
+
validate_and_run(data: data)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# @raise [ProconBypassMan::RemotePbmActionObject::ValidationError]
|
67
|
+
# @param [Hash] data
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_and_run(data: )
|
70
|
+
pbm_job_hash = data.dig("message")
|
71
|
+
begin
|
72
|
+
pbm_job_object = ProconBypassMan::RemotePbmActionObject.new(action: pbm_job_hash["action"],
|
73
|
+
status: pbm_job_hash["status"],
|
74
|
+
uuid: pbm_job_hash["uuid"],
|
75
|
+
created_at: pbm_job_hash["created_at"],
|
76
|
+
job_args: pbm_job_hash["args"])
|
77
|
+
pbm_job_object.validate!
|
78
|
+
rescue ProconBypassMan::RemotePbmActionObject::ValidationError => e
|
79
|
+
raise
|
80
|
+
end
|
81
|
+
|
82
|
+
ProconBypassMan::RunRemotePbmActionDispatchCommand.execute(
|
83
|
+
action: pbm_job_object.action,
|
84
|
+
uuid: pbm_job_object.uuid,
|
85
|
+
job_args: pbm_job_object.job_args
|
86
|
+
)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
data/lib/procon_bypass_man.rb
CHANGED
@@ -4,6 +4,10 @@ require "json"
|
|
4
4
|
require "net/http"
|
5
5
|
require "fileutils"
|
6
6
|
require "securerandom"
|
7
|
+
require 'em/pure_ruby'
|
8
|
+
require "action_cable_client"
|
9
|
+
require "ext/em_pure_ruby"
|
10
|
+
require "ext/module"
|
7
11
|
|
8
12
|
require_relative "procon_bypass_man/version"
|
9
13
|
require_relative "procon_bypass_man/remote_pbm_action"
|
@@ -21,6 +25,7 @@ require_relative "procon_bypass_man/support/server_pool"
|
|
21
25
|
require_relative "procon_bypass_man/background"
|
22
26
|
require_relative "procon_bypass_man/commands"
|
23
27
|
require_relative "procon_bypass_man/bypass"
|
28
|
+
require_relative "procon_bypass_man/domains"
|
24
29
|
require_relative "procon_bypass_man/device_connector"
|
25
30
|
require_relative "procon_bypass_man/device_status"
|
26
31
|
require_relative "procon_bypass_man/runner"
|
@@ -28,12 +33,14 @@ require_relative "procon_bypass_man/processor"
|
|
28
33
|
require_relative "procon_bypass_man/configuration"
|
29
34
|
require_relative "procon_bypass_man/buttons_setting_configuration"
|
30
35
|
require_relative "procon_bypass_man/procon"
|
31
|
-
require_relative "procon_bypass_man/
|
32
|
-
require_relative "procon_bypass_man/procon/analog_stick"
|
36
|
+
require_relative "procon_bypass_man/procon/button"
|
37
|
+
require_relative "procon_bypass_man/procon/value_objects/analog_stick"
|
38
|
+
require_relative "procon_bypass_man/procon/value_objects/procon_reader"
|
33
39
|
require_relative "procon_bypass_man/procon/analog_stick_cap"
|
34
|
-
require_relative "procon_bypass_man/value_objects/remote_pbm_action_object"
|
40
|
+
require_relative "procon_bypass_man/remote_pbm_action/value_objects/remote_pbm_action_object"
|
35
41
|
require_relative "procon_bypass_man/scheduler"
|
36
|
-
require_relative "procon_bypass_man/
|
42
|
+
require_relative "procon_bypass_man/plugins"
|
43
|
+
require_relative "procon_bypass_man/websocket/pbm_job_client"
|
37
44
|
|
38
45
|
STDOUT.sync = true
|
39
46
|
Thread.abort_on_exception = true
|
@@ -51,9 +58,9 @@ module ProconBypassMan
|
|
51
58
|
def self.run(setting_path: nil)
|
52
59
|
ProconBypassMan::Scheduler.start!
|
53
60
|
ProconBypassMan::Background::JobRunner.start!
|
61
|
+
ProconBypassMan::Websocket::PbmJobClient.start!
|
54
62
|
|
55
|
-
ProconBypassMan.
|
56
|
-
puts "PBMを起動しています"
|
63
|
+
ProconBypassMan::PrintMessageCommand.execute(text: "PBMを起動しています")
|
57
64
|
ProconBypassMan::ButtonsSettingConfiguration::Loader.load(setting_path: setting_path)
|
58
65
|
initialize_pbm
|
59
66
|
gadget, procon = ProconBypassMan::ConnectDeviceCommand.execute!
|
data/procon_bypass_man.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["jiikko"]
|
9
9
|
spec.email = ["n905i.1214@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "
|
11
|
+
spec.summary = "A programmable converter for Nintendo Switch Pro Controller"
|
12
12
|
spec.description = spec.summary
|
13
13
|
spec.homepage = "https://github.com/splaplapla/procon_bypass_man"
|
14
14
|
spec.license = "MIT"
|
@@ -29,6 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
# Uncomment to register a new dependency of your gem
|
31
31
|
spec.add_dependency "pbmenv"
|
32
|
+
spec.add_dependency "action_cable_client"
|
33
|
+
spec.add_dependency "sorted_set"
|
32
34
|
|
33
35
|
# For more information and examples about making a new gem, checkout our
|
34
36
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/project_template/README.md
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
# Project Template
|
2
|
-
これらは https://github.com/splaplapla/pbmenv がinstallするときに配備するファイルです
|
2
|
+
* これらは https://github.com/splaplapla/pbmenv がinstallするときに配備するファイルです
|
3
|
+
* pbm_webはオプショナルです
|
3
4
|
|
4
5
|
## systemdを使ってサービスに登録する方法
|
5
|
-
|
6
|
-
|
7
|
-
*
|
8
|
-
* sudo systemctl
|
6
|
+
systemctl enableした後は、次回のOS起動時にserviceも自動起動します
|
7
|
+
|
8
|
+
* pbm
|
9
|
+
* sudo systemctl link /usr/share/pbm/current/systemd_units/pbm.service
|
10
|
+
* sudo systemctl enable pbm.service
|
11
|
+
* pbm_web
|
12
|
+
* sudo systemctl link /usr/share/pbm/current/systemd_units/pbm_web.service
|
13
|
+
* sudo systemctl enable pbm_web.service
|
9
14
|
|
10
15
|
## systemdを使ってサービスから解除する方法
|
11
16
|
* sudo systemctl disable pbm.service
|
data/project_template/app.rb
CHANGED
@@ -5,14 +5,15 @@ require 'bundler/inline'
|
|
5
5
|
gemfile do
|
6
6
|
source 'https://rubygems.org'
|
7
7
|
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
8
|
-
gem 'procon_bypass_man', '0.1.
|
8
|
+
gem 'procon_bypass_man', '0.1.18'
|
9
9
|
end
|
10
10
|
|
11
11
|
ProconBypassMan.configure do |config|
|
12
12
|
config.root = File.expand_path(__dir__)
|
13
13
|
config.logger = Logger.new("#{ProconBypassMan.root}/app.log", 5, 1024 * 1024 * 10)
|
14
14
|
config.logger.level = :debug
|
15
|
-
#
|
15
|
+
# webからProconBypassManを操作できるwebサービス
|
16
|
+
# config.api_servers = ['https://pbm-cloud.herokuapp.com']
|
16
17
|
config.enable_critical_error_logging = true
|
17
18
|
end
|
18
19
|
|