vault_coh 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b761236eb71771fd8c489d2867ae4ec1b77361e0834ae8636ea86e492994ea1c
4
- data.tar.gz: b600e4662c61af2a3ccbe1104de63ad506909de5daaff9d0171ecbe397862ce2
3
+ metadata.gz: e6d08a9b4c0f1c856decec2b338a3a0c9005a9506d409d0c9d0a17b1212cc765
4
+ data.tar.gz: b689b813dff0074520ad2a8b993b01374c369e0e07aed4ba3373d64631a962b1
5
5
  SHA512:
6
- metadata.gz: 033d7db015b8ff4cfc49c93b71d47d625790766844c2b3693faf17dcf1ece45bde53772622f9a4e223845166327cdbbc87891cdfd79ff6b9b6eba5a5962e9da6
7
- data.tar.gz: 5c61de1481d40eaf667a9b70cc67ab1e93fe50a7b8f6853e79e58aacda8d48a21d4daa1540de150899d4fd359b1805eabc6273882f8fdefeae1cc00b68ca2d07
6
+ metadata.gz: 6de6915d99020add56d5e1212af98bf060a06a22f26e919bae1d43024466f31e745fc4953c34d18044f31abaa8e393353d51a5786d6572d2d2af01504855ad6e
7
+ data.tar.gz: ed0bda5b6c5f1298db6c49bd5b7903294ef7598c4fb6968ddbac0c9df8936815a974037c766815899082f160547868ba870087a250c6982b236c454b7e1a20b4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.3.4
data/Cargo.lock CHANGED
@@ -13,16 +13,16 @@ dependencies = [
13
13
 
14
14
  [[package]]
15
15
  name = "bindgen"
16
- version = "0.66.1"
16
+ version = "0.69.4"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
18
+ checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
19
19
  dependencies = [
20
20
  "bitflags",
21
21
  "cexpr",
22
22
  "clang-sys",
23
+ "itertools",
23
24
  "lazy_static",
24
25
  "lazycell",
25
- "peeking_take_while",
26
26
  "proc-macro2",
27
27
  "quote",
28
28
  "regex",
@@ -75,12 +75,27 @@ dependencies = [
75
75
  "libloading",
76
76
  ]
77
77
 
78
+ [[package]]
79
+ name = "either"
80
+ version = "1.13.0"
81
+ source = "registry+https://github.com/rust-lang/crates.io-index"
82
+ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
83
+
78
84
  [[package]]
79
85
  name = "glob"
80
86
  version = "0.3.1"
81
87
  source = "registry+https://github.com/rust-lang/crates.io-index"
82
88
  checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
83
89
 
90
+ [[package]]
91
+ name = "itertools"
92
+ version = "0.12.1"
93
+ source = "registry+https://github.com/rust-lang/crates.io-index"
94
+ checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
95
+ dependencies = [
96
+ "either",
97
+ ]
98
+
84
99
  [[package]]
85
100
  name = "lazy_static"
86
101
  version = "1.4.0"
@@ -111,9 +126,9 @@ dependencies = [
111
126
 
112
127
  [[package]]
113
128
  name = "magnus"
114
- version = "0.6.2"
129
+ version = "0.7.1"
115
130
  source = "registry+https://github.com/rust-lang/crates.io-index"
116
- checksum = "4778544796676e8428e9c622460ebf284bea52d8b10db3aeb449d8b5e61b3a13"
131
+ checksum = "3d87ae53030f3a22e83879e666cb94e58a7bdf31706878a0ba48752994146dab"
117
132
  dependencies = [
118
133
  "magnus-macros",
119
134
  "rb-sys",
@@ -186,12 +201,6 @@ dependencies = [
186
201
  "nom",
187
202
  ]
188
203
 
189
- [[package]]
190
- name = "peeking_take_while"
191
- version = "0.1.2"
192
- source = "registry+https://github.com/rust-lang/crates.io-index"
193
- checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
194
-
195
204
  [[package]]
196
205
  name = "proc-macro2"
197
206
  version = "1.0.69"
@@ -212,18 +221,18 @@ dependencies = [
212
221
 
213
222
  [[package]]
214
223
  name = "rb-sys"
215
- version = "0.9.81"
224
+ version = "0.9.101"
216
225
  source = "registry+https://github.com/rust-lang/crates.io-index"
217
- checksum = "a57240b308b155b09dce81e32829966a99f52d1088b45957e4283e526c5317a1"
226
+ checksum = "1ba2704ccfa7875c91792c57a9aa7c3caac524d3036c122e36eeddad6f6e7c6f"
218
227
  dependencies = [
219
228
  "rb-sys-build",
220
229
  ]
221
230
 
222
231
  [[package]]
223
232
  name = "rb-sys-build"
224
- version = "0.9.81"
233
+ version = "0.9.101"
225
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
226
- checksum = "f24ce877a4c5d07f06f6aa6fec3ac95e4b357b9f73b0f5445d8cbb7266d410e8"
235
+ checksum = "c73585ec80c217b7a81257ca9bb89b191b5e452ec4b9106dc4c2e4e96a822242"
227
236
  dependencies = [
228
237
  "bindgen",
229
238
  "lazy_static",
@@ -303,13 +312,10 @@ dependencies = [
303
312
 
304
313
  [[package]]
305
314
  name = "serde_magnus"
306
- version = "0.8.0"
307
- source = "registry+https://github.com/rust-lang/crates.io-index"
308
- checksum = "4a9a56602c902d792aac8f369117c4490616b6772aaa85fad88cc8cc35edd192"
315
+ version = "0.8.1"
316
+ source = "git+https://github.com/ryantaylor/serde-magnus.git?branch=update-magnus#cb4ee4e76ec08f21a58651d70c28aab265870599"
309
317
  dependencies = [
310
318
  "magnus",
311
- "rb-sys",
312
- "rb-sys-build",
313
319
  "serde",
314
320
  "tap",
315
321
  ]
@@ -371,9 +377,9 @@ dependencies = [
371
377
 
372
378
  [[package]]
373
379
  name = "vault"
374
- version = "9.0.0"
380
+ version = "10.0.0"
375
381
  source = "registry+https://github.com/rust-lang/crates.io-index"
376
- checksum = "771f7db565a750b784bea91fc8cf5190fca40a1f77c791e05d5a5e4168bfff59"
382
+ checksum = "1fb1df47725f2569f794e8998c080cc4cbb803059050dbe464c25c815e704eb1"
377
383
  dependencies = [
378
384
  "byteorder",
379
385
  "magnus",
data/Gemfile CHANGED
@@ -12,4 +12,4 @@ gem 'rb_sys'
12
12
 
13
13
  gem 'rspec', '~> 3.13'
14
14
 
15
- gem 'rubocop', '~> 1.64'
15
+ gem 'rubocop', '~> 1.65'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault_coh (6.0.0)
4
+ vault_coh (6.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -10,44 +10,44 @@ GEM
10
10
  diff-lcs (1.5.1)
11
11
  json (2.7.2)
12
12
  language_server-protocol (3.17.0.3)
13
- parallel (1.24.0)
14
- parser (3.3.2.0)
13
+ parallel (1.26.2)
14
+ parser (3.3.4.2)
15
15
  ast (~> 2.4.1)
16
16
  racc
17
- racc (1.8.0)
17
+ racc (1.8.1)
18
18
  rainbow (3.1.1)
19
19
  rake (13.2.1)
20
20
  rake-compiler (1.2.7)
21
21
  rake
22
- rb_sys (0.9.97)
22
+ rb_sys (0.9.100)
23
23
  regexp_parser (2.9.2)
24
- rexml (3.2.8)
25
- strscan (>= 3.0.9)
24
+ rexml (3.3.5)
25
+ strscan
26
26
  rspec (3.13.0)
27
27
  rspec-core (~> 3.13.0)
28
28
  rspec-expectations (~> 3.13.0)
29
29
  rspec-mocks (~> 3.13.0)
30
30
  rspec-core (3.13.0)
31
31
  rspec-support (~> 3.13.0)
32
- rspec-expectations (3.13.0)
32
+ rspec-expectations (3.13.1)
33
33
  diff-lcs (>= 1.2.0, < 2.0)
34
34
  rspec-support (~> 3.13.0)
35
35
  rspec-mocks (3.13.1)
36
36
  diff-lcs (>= 1.2.0, < 2.0)
37
37
  rspec-support (~> 3.13.0)
38
38
  rspec-support (3.13.1)
39
- rubocop (1.64.1)
39
+ rubocop (1.65.1)
40
40
  json (~> 2.3)
41
41
  language_server-protocol (>= 3.17.0)
42
42
  parallel (~> 1.10)
43
43
  parser (>= 3.3.0.2)
44
44
  rainbow (>= 2.2.2, < 4.0)
45
- regexp_parser (>= 1.8, < 3.0)
45
+ regexp_parser (>= 2.4, < 3.0)
46
46
  rexml (>= 3.2.5, < 4.0)
47
47
  rubocop-ast (>= 1.31.1, < 2.0)
48
48
  ruby-progressbar (~> 1.7)
49
49
  unicode-display_width (>= 2.4.0, < 3.0)
50
- rubocop-ast (1.31.3)
50
+ rubocop-ast (1.32.0)
51
51
  parser (>= 3.3.1.0)
52
52
  ruby-progressbar (1.13.0)
53
53
  strscan (3.1.0)
@@ -55,6 +55,7 @@ GEM
55
55
 
56
56
  PLATFORMS
57
57
  arm64-darwin-21
58
+ arm64-darwin-23
58
59
  x86_64-linux
59
60
 
60
61
  DEPENDENCIES
@@ -62,8 +63,8 @@ DEPENDENCIES
62
63
  rake-compiler
63
64
  rb_sys
64
65
  rspec (~> 3.13)
65
- rubocop (~> 1.64)
66
+ rubocop (~> 1.65)
66
67
  vault_coh!
67
68
 
68
69
  BUNDLED WITH
69
- 2.4.7
70
+ 2.5.17
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vault
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/vault_coh.svg)](https://badge.fury.io/rb/vault_coh) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://rubydoc.info/github/ryantaylor/vault-rb/v6.0.0)
3
+ [![Gem Version](https://badge.fury.io/rb/vault_coh.svg)](https://badge.fury.io/rb/vault_coh) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://rubydoc.info/github/ryantaylor/vault-rb/v6.1.0)
4
4
 
5
5
  A native Ruby client wrapper for the [vault](https://github.com/ryantaylor/vault) Company of Heroes replay parser, integrated via a Rust native extension.
6
6
 
@@ -24,7 +24,7 @@ bytes = File.read('/path/to/replay.rec').unpack('C*')
24
24
  replay = VaultCoh::Replay.from_bytes(bytes)
25
25
  puts replay.version
26
26
  ```
27
- All information available from parsing can be found in the [documentation](https://rubydoc.info/github/ryantaylor/vault-rb/v6.0.0).
27
+ All information available from parsing can be found in the [documentation](https://rubydoc.info/github/ryantaylor/vault-rb/v6.1.0).
28
28
 
29
29
  ## Contributing
30
30
 
@@ -10,6 +10,6 @@ publish = false
10
10
  crate-type = ["cdylib"]
11
11
 
12
12
  [dependencies]
13
- magnus = { version = "0.6" }
14
- serde_magnus = { version = "0.8" }
15
- vault = { version = "9", features = ["magnus", "serde"] }
13
+ magnus = { version = "0.7" }
14
+ serde_magnus = { git = "https://github.com/ryantaylor/serde-magnus.git", branch = "update-magnus" }
15
+ vault = { version = "10", features = ["magnus", "serde"] }
@@ -1,4 +1,4 @@
1
- use magnus::{value::ReprValue, RHash, RString, Value};
1
+ use magnus::{value::ReprValue, RHash, RString, Symbol, Value};
2
2
  use vault::{Command, Map, Message, Player, Replay};
3
3
 
4
4
  pub trait HashExt {
@@ -34,67 +34,97 @@ impl HashExt for Command {
34
34
  match self {
35
35
  Command::BuildGlobalUpgrade(data) => {
36
36
  let hash: RHash = serde_magnus::serialize(data).unwrap();
37
- hash.aset("type", RString::new("BuildGlobalUpgrade"))
37
+ hash.aset(Symbol::new("type"), RString::new("BuildGlobalUpgrade"))
38
38
  .unwrap();
39
- hash.aset("action_type", RString::new("CMD_Upgrade"))
39
+ hash.aset(Symbol::new("action_type"), RString::new("CMD_Upgrade"))
40
40
  .unwrap();
41
41
  hash.as_value()
42
42
  }
43
43
  Command::BuildSquad(data) => {
44
44
  let hash: RHash = serde_magnus::serialize(data).unwrap();
45
- hash.aset("type", RString::new("BuildSquad")).unwrap();
46
- hash.aset("action_type", RString::new("CMD_BuildSquad"))
45
+ hash.aset(Symbol::new("type"), RString::new("BuildSquad"))
46
+ .unwrap();
47
+ hash.aset(Symbol::new("action_type"), RString::new("CMD_BuildSquad"))
47
48
  .unwrap();
48
49
  hash.as_value()
49
50
  }
50
51
  Command::CancelConstruction(data) => {
51
52
  let hash: RHash = serde_magnus::serialize(data).unwrap();
52
- hash.aset("type", RString::new("CancelConstruction"))
53
- .unwrap();
54
- hash.aset("action_type", RString::new("CMD_CancelConstruction"))
53
+ hash.aset(Symbol::new("type"), RString::new("CancelConstruction"))
55
54
  .unwrap();
55
+ hash.aset(
56
+ Symbol::new("action_type"),
57
+ RString::new("CMD_CancelConstruction"),
58
+ )
59
+ .unwrap();
56
60
  hash.as_value()
57
61
  }
58
62
  Command::CancelProduction(data) => {
59
63
  let hash: RHash = serde_magnus::serialize(data).unwrap();
60
- hash.aset("type", RString::new("CancelProduction")).unwrap();
61
- hash.aset("action_type", RString::new("CMD_CancelProduction"))
64
+ hash.aset(Symbol::new("type"), RString::new("CancelProduction"))
62
65
  .unwrap();
66
+ hash.aset(
67
+ Symbol::new("action_type"),
68
+ RString::new("CMD_CancelProduction"),
69
+ )
70
+ .unwrap();
63
71
  hash.as_value()
64
72
  }
65
- Command::SelectBattlegroup(data) => {
73
+ Command::ConstructEntity(data) => {
66
74
  let hash: RHash = serde_magnus::serialize(data).unwrap();
67
- hash.aset("type", RString::new("SelectBattlegroup"))
75
+ hash.aset(Symbol::new("type"), RString::new("ConstructEntity"))
68
76
  .unwrap();
69
- hash.aset("action_type", RString::new("PCMD_InstantUpgrade"))
77
+ hash.aset(
78
+ Symbol::new("action_type"),
79
+ RString::new("PCMD_PlaceAndConstructEntities"),
80
+ )
81
+ .unwrap();
82
+ hash.as_value()
83
+ }
84
+ Command::SelectBattlegroup(data) => {
85
+ let hash: RHash = serde_magnus::serialize(data).unwrap();
86
+ hash.aset(Symbol::new("type"), RString::new("SelectBattlegroup"))
70
87
  .unwrap();
88
+ hash.aset(
89
+ Symbol::new("action_type"),
90
+ RString::new("PCMD_InstantUpgrade"),
91
+ )
92
+ .unwrap();
71
93
  hash.as_value()
72
94
  }
73
95
  Command::SelectBattlegroupAbility(data) => {
74
96
  let hash: RHash = serde_magnus::serialize(data).unwrap();
75
- hash.aset("type", RString::new("SelectBattlegroupAbility"))
76
- .unwrap();
77
- hash.aset("action_type", RString::new("PCMD_TentativeUpgrade"))
78
- .unwrap();
97
+ hash.aset(
98
+ Symbol::new("type"),
99
+ RString::new("SelectBattlegroupAbility"),
100
+ )
101
+ .unwrap();
102
+ hash.aset(
103
+ Symbol::new("action_type"),
104
+ RString::new("PCMD_TentativeUpgrade"),
105
+ )
106
+ .unwrap();
79
107
  hash.as_value()
80
108
  }
81
109
  Command::Unknown(data) => {
82
110
  let hash: RHash = serde_magnus::serialize(data).unwrap();
83
- hash.aset("type", RString::new("Unknown")).unwrap();
111
+ hash.aset(Symbol::new("type"), RString::new("Unknown"))
112
+ .unwrap();
84
113
  hash.as_value()
85
114
  }
86
115
  Command::UseAbility(data) => {
87
116
  let hash: RHash = serde_magnus::serialize(data).unwrap();
88
- hash.aset("type", RString::new("UseAbility")).unwrap();
89
- hash.aset("action_type", RString::new("CMD_Ability"))
117
+ hash.aset(Symbol::new("type"), RString::new("UseAbility"))
118
+ .unwrap();
119
+ hash.aset(Symbol::new("action_type"), RString::new("CMD_Ability"))
90
120
  .unwrap();
91
121
  hash.as_value()
92
122
  }
93
123
  Command::UseBattlegroupAbility(data) => {
94
124
  let hash: RHash = serde_magnus::serialize(data).unwrap();
95
- hash.aset("type", RString::new("UseBattlegroupAbility"))
125
+ hash.aset(Symbol::new("type"), RString::new("UseBattlegroupAbility"))
96
126
  .unwrap();
97
- hash.aset("action_type", RString::new("PCMD_Ability"))
127
+ hash.aset(Symbol::new("action_type"), RString::new("PCMD_Ability"))
98
128
  .unwrap();
99
129
  hash.as_value()
100
130
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VaultCoh
4
- VERSION = '6.0.0'
4
+ VERSION = '6.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vault_coh
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryantaylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-03 00:00:00.000000000 Z
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Company of Heroes replay parsing in Ruby using the vault parsing library
14
14
  via a Rust native extension.