gsd-cli 0.1.22 → 0.1.23

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cli.rb +4 -3
  3. data/lib/game_template.rb +3 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 005f98855ef33026c63163f36fcb2527a16fe79a7205de920ff40e9b30aadf42
4
- data.tar.gz: d03b9453a0977d78af887b53a9ccb06f73e8928fbf228c92393046445df2ec93
3
+ metadata.gz: 3539c2a24ee00886e425b1e5dc9ec8288c5dce1adf70e6e30509414967eee283
4
+ data.tar.gz: eee2fee24e056db6e9a3b4de0ad7cab03ce68c2b4e7fa6ec30a71c0341c4751b
5
5
  SHA512:
6
- metadata.gz: 616e300b482bd4d9fb03c028a95ef88fc9e34a63cb73d7fda513738c7d5c89e330d6a94f5bf30dc589a5873f4ff1f37c748b26ac01c428d3c05d1d0f31c38b99
7
- data.tar.gz: 6812612714ee6619dd81e0cf24774ad6f8517676902e71ee68488ffd240b4bf3a426f967a0de8d0361b602a99e967bc99c94f7e1e6108c9f3623ff468ea1ba2c
6
+ metadata.gz: c6978dbb7ffe7f259ac3cd67c335bb7158ce53a047d12cb465cb977869279d1f9c238bb91a77dcc6dbde1b0796a4aa6da31a2647abc4128222a70a1de7ea7b34
7
+ data.tar.gz: ae75faf71e0e19a87e74e1e43c5535cf2fa47b85470a2e4167ad53a714931ca39cb2297b8d00e4c58444936d2a105dfb97fd183b3f92cae7960670c180dc1afc
data/lib/cli.rb CHANGED
@@ -31,7 +31,7 @@ end
31
31
  @games = userdata
32
32
 
33
33
  program :name, "gsd-cli"
34
- program :version, "0.1.22"
34
+ program :version, "0.1.23"
35
35
  program :description, "A cli tool to deploy & manage dedicated game servers on Linux"
36
36
 
37
37
  command :install do |c|
@@ -43,11 +43,12 @@ command :install do |c|
43
43
  c.option "--steamuser OPTIONAL", String, "Steam user account required to install certain games."
44
44
  c.option "--steampassword OPTIONAL", String, "Steam account password for installing certain games."
45
45
  c.action do |args, options|
46
+ abort("Install what? Provide a game name argument!") if (args.first().nil?)
46
47
  puts "Beginning installation process. This may take a while..."
47
48
  GameTemplate.new(@games[args.first()])
48
49
  .install(options.path, options.steamuser, options.steampassword, options.devmode)
49
- end
50
- puts "Server installation & deployment complete!".green
50
+ end
51
+ puts "Server installation & deployment complete!".green
51
52
  end
52
53
 
53
54
  command :run do |c|
data/lib/game_template.rb CHANGED
@@ -46,7 +46,7 @@ class GameTemplate
46
46
  end
47
47
 
48
48
  def install(install_path, steamuser, steampassword, dev_mode)
49
- ensure_delete_unit_file(install_path) if install_path.nil? == false
49
+ # ensure_delete_unit_file(install_path) if install_path.nil? == false
50
50
  if @game.app_id.nil?
51
51
  @game.install_server(get_install_path(install_path))
52
52
  else
@@ -72,7 +72,7 @@ class GameTemplate
72
72
  private
73
73
 
74
74
  # Installs or Updates a dedicated game server via Steamcmd
75
- def install_steam_server(install_path = "/tmp/#{@game.name}", steamuser = nil, steampassword = nil)
75
+ def install_steam_server(install_path = "/opt/#{@game.name}", steamuser = nil, steampassword = nil)
76
76
  login = if steamuser.nil?
77
77
  "+login anonymous"
78
78
  else
@@ -87,7 +87,7 @@ class GameTemplate
87
87
  def get_install_path(path)
88
88
  install_path = if path.nil?
89
89
  # puts "Install path not defined: installing to /tmp/#{@game.name}".yellow
90
- "/tmp/#{@game.name}"
90
+ "/opt/#{@game.name}"
91
91
  else
92
92
  path
93
93
  end
@@ -113,9 +113,7 @@ class GameTemplate
113
113
  [Install]
114
114
  WantedBy=default.target
115
115
  [Service]
116
- LimitNPROC=infinity
117
116
  Type=simple
118
- User=#{`whoami`}
119
117
  ExecStart=#{cli_path} run #{@game.name} --path #{install_path}"
120
118
  end
121
119
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gsd-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Egee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-03 00:00:00.000000000 Z
11
+ date: 2019-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize