modsvaskr 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- module Modsvaskr
2
-
3
- VERSION = '0.1.11'
4
-
5
- end
1
+ module Modsvaskr
2
+
3
+ VERSION = '0.1.12'
4
+
5
+ end
@@ -1,65 +1,65 @@
1
- require 'csv'
2
- require 'modsvaskr/encoding'
3
- require 'modsvaskr/run_cmd'
4
-
5
- module Modsvaskr
6
-
7
- # Helper to use an instance of xEdit
8
- class Xedit
9
-
10
- include RunCmd
11
-
12
- # String: Installation path
13
- attr_reader :install_path
14
-
15
- # Constructor
16
- #
17
- # Parameters::
18
- # * *install_path* (String): Installation path of xEdit
19
- # * *game_path* (String): Installation path of the game to use xEdit on
20
- def initialize(install_path, game_path)
21
- @install_path = install_path
22
- @game_path = game_path
23
- # Set of scripts that have been run
24
- @runs = {}
25
- end
26
-
27
- # Run an xEdit script
28
- #
29
- # Parameters::
30
- # * *script* (String): Script name, as defined in xedit_scripts (without the Modsvaskr_ prefix and .pas suffix)
31
- # * *only_once* (Boolean): If true, then make sure this script is run only once by instance [default: false]
32
- def run_script(script, only_once: false)
33
- if !only_once || !@runs.key?(script)
34
- FileUtils.cp "#{__dir__}/../../xedit_scripts/Modsvaskr_#{script}.pas", "#{@install_path}/Edit Scripts/Modsvaskr_#{script}.pas"
35
- run_cmd(
36
- {
37
- dir: @install_path,
38
- exe: 'SSEEdit.exe'
39
- },
40
- args: %W[
41
- -IKnowWhatImDoing
42
- -AllowMasterFilesEdit
43
- -SSE
44
- -autoload
45
- -script:"Modsvaskr_#{script}.pas"
46
- ]
47
- )
48
- @runs[script] = nil
49
- end
50
- end
51
-
52
- # Parse a CSV that has been dumped by a previous run of xEdit
53
- #
54
- # Parameters::
55
- # * *csv* (String): Name of the CSV file (from Edit Scripts), without .csv
56
- # * *row_block* (Proc): Code called for each CSV row
57
- # Parameters::
58
- # * *row* (Array<String>): CSV row
59
- def parse_csv(csv, &row_block)
60
- CSV.parse(Encoding.to_utf8(File.read("#{install_path}/Edit Scripts/#{csv}.csv", mode: 'rb'))).each(&row_block)
61
- end
62
-
63
- end
64
-
65
- end
1
+ require 'csv'
2
+ require 'modsvaskr/encoding'
3
+ require 'modsvaskr/run_cmd'
4
+
5
+ module Modsvaskr
6
+
7
+ # Helper to use an instance of xEdit
8
+ class Xedit
9
+
10
+ include RunCmd
11
+
12
+ # String: Installation path
13
+ attr_reader :install_path
14
+
15
+ # Constructor
16
+ #
17
+ # Parameters::
18
+ # * *install_path* (String): Installation path of xEdit
19
+ # * *game_path* (String): Installation path of the game to use xEdit on
20
+ def initialize(install_path, game_path)
21
+ @install_path = install_path
22
+ @game_path = game_path
23
+ # Set of scripts that have been run
24
+ @runs = {}
25
+ end
26
+
27
+ # Run an xEdit script
28
+ #
29
+ # Parameters::
30
+ # * *script* (String): Script name, as defined in xedit_scripts (without the Modsvaskr_ prefix and .pas suffix)
31
+ # * *only_once* (Boolean): If true, then make sure this script is run only once by instance [default: false]
32
+ def run_script(script, only_once: false)
33
+ return if only_once && @runs.key?(script)
34
+
35
+ FileUtils.cp "#{__dir__}/../../xedit_scripts/Modsvaskr_#{script}.pas", "#{@install_path}/Edit Scripts/Modsvaskr_#{script}.pas"
36
+ run_cmd(
37
+ {
38
+ dir: @install_path,
39
+ exe: 'SSEEdit.exe'
40
+ },
41
+ args: %W[
42
+ -IKnowWhatImDoing
43
+ -AllowMasterFilesEdit
44
+ -SSE
45
+ -autoload
46
+ -script:"Modsvaskr_#{script}.pas"
47
+ ]
48
+ )
49
+ @runs[script] = nil
50
+ end
51
+
52
+ # Parse a CSV that has been dumped by a previous run of xEdit
53
+ #
54
+ # Parameters::
55
+ # * *csv* (String): Name of the CSV file (from Edit Scripts), without .csv
56
+ # * *row_block* (Proc): Code called for each CSV row
57
+ # Parameters::
58
+ # * *row* (Array<String>): CSV row
59
+ def parse_csv(csv, &row_block)
60
+ CSV.parse(Encoding.to_utf_8(File.read("#{install_path}/Edit Scripts/#{csv}.csv", mode: 'rb'))).each(&row_block)
61
+ end
62
+
63
+ end
64
+
65
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modsvaskr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-25 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses_menu
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.10'
47
+ version: '1.12'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.10'
54
+ version: '1.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,56 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.11'
75
+ version: '3.14'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.11'
82
+ version: '3.14'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sem_ver_components
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.0'
89
+ version: '0.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.0'
96
+ version: '0.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.19'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.19'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '2.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '2.4'
97
125
  description: Command-line UI handling a full Mods' ecosystem for Bethesda's games.
98
126
  email:
99
127
  - muriel@x-aeon.com
@@ -133,14 +161,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
161
  requirements:
134
162
  - - ">="
135
163
  - !ruby/object:Gem::Version
136
- version: '0'
164
+ version: '2.6'
137
165
  required_rubygems_version: !ruby/object:Gem::Requirement
138
166
  requirements:
139
167
  - - ">="
140
168
  - !ruby/object:Gem::Version
141
169
  version: '0'
142
170
  requirements: []
143
- rubygems_version: 3.0.3
171
+ rubygems_version: 3.0.3.1
144
172
  signing_key:
145
173
  specification_version: 4
146
174
  summary: 'Stronghold for mods acting like companions: The Modsvaskr'