vault_coh 2.2.0 → 3.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d592cf204ea2ac142d3a8a3451fc5c6f2af2b2b1667c63182c31a968104b80ff
4
- data.tar.gz: 3b3d78276b036144d13321007080a4c4b207549c3181728d0c71d36d13128182
3
+ metadata.gz: 763f4d0ebdbd58cd93d40ea506dc1f3d5ec176b152639127fa63dce0f144b50b
4
+ data.tar.gz: 58a846515ed9a32da75e3bc0c7f29c1585207ed1635d11dffe1c16a0af6c5bf7
5
5
  SHA512:
6
- metadata.gz: 5e652ab1d2dd9df9cfab540012512a9d099955498d1d69951c222e15e4717676db8a5c3d47c74163b543de277d61091dd531ad792fa1cfb6de730357476fea63
7
- data.tar.gz: 606019499e3af6298b8ff1b07004740f0dff1a2339601f61ab1b3c74debca39d67e5bc91e2837e87b5bab6f38c013d834e4e4a2611265481981ecf949babc4fb
6
+ metadata.gz: 905aa7c2464b935e14fd7196af6012c1afefb52adad173602e7b0b77ccb43f0e62fe964509d99e743e924649909dd4f8b744ad179b32eecf3d407e976ea5f02c
7
+ data.tar.gz: ca9bae0ee2fb8c2e16b01e09c2edf0a0aa444b6c536f9cb5bf3b0499c35d64ecec8938509aed78af95795ab4d4d71442c0fdc8b971547fdb623cc3f7f3d270c5
data/Cargo.lock CHANGED
@@ -362,9 +362,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
362
362
 
363
363
  [[package]]
364
364
  name = "vault"
365
- version = "5.1.1"
365
+ version = "6.0.0"
366
366
  source = "registry+https://github.com/rust-lang/crates.io-index"
367
- checksum = "6254a954458cb9965b33572de19287e36c6b32c7803d1bec0f2889d8eb9d3e3c"
367
+ checksum = "56d2f7e8331af1c81e0e894ae95960807789cfe849dcc95e828382f9f41b2959"
368
368
  dependencies = [
369
369
  "byteorder",
370
370
  "magnus",
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault_coh (2.2.0)
4
+ vault_coh (3.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,12 +14,12 @@ GEM
14
14
  parser (3.2.2.4)
15
15
  ast (~> 2.4.1)
16
16
  racc
17
- racc (1.7.2)
17
+ racc (1.7.3)
18
18
  rainbow (3.1.1)
19
19
  rake (13.1.0)
20
20
  rake-compiler (1.2.5)
21
21
  rake
22
- rb_sys (0.9.82)
22
+ rb_sys (0.9.83)
23
23
  regexp_parser (2.8.2)
24
24
  rexml (3.2.6)
25
25
  rspec (3.12.0)
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/v2.2.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/v3.0.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/v2.2.0).
27
+ All information available from parsing can be found in the [documentation](https://rubydoc.info/github/ryantaylor/vault-rb/v3.0.0).
28
28
 
29
29
  ## Contributing
30
30
 
@@ -12,4 +12,4 @@ crate-type = ["cdylib"]
12
12
  [dependencies]
13
13
  magnus = { version = "0.6" }
14
14
  serde_magnus = { version = "0.8" }
15
- vault = { version = "5", features = ["magnus", "serde"] }
15
+ vault = { version = "6", features = ["magnus", "serde"] }
@@ -1,6 +1,7 @@
1
1
  use magnus::Value;
2
2
  use vault::commands::{
3
- BuildSquad, SelectBattlegroup, SelectBattlegroupAbility, Unknown, UseBattlegroupAbility,
3
+ BuildGlobalUpgrade, BuildSquad, SelectBattlegroup, SelectBattlegroupAbility, Unknown,
4
+ UseBattlegroupAbility,
4
5
  };
5
6
  use vault::{Command, Map, Message, Player, Replay};
6
7
 
@@ -38,6 +39,12 @@ impl HashExt for Command {
38
39
  }
39
40
  }
40
41
 
42
+ impl HashExt for BuildGlobalUpgrade {
43
+ fn to_h(&self) -> Value {
44
+ serde_magnus::serialize(self).unwrap()
45
+ }
46
+ }
47
+
41
48
  impl HashExt for BuildSquad {
42
49
  fn to_h(&self) -> Value {
43
50
  serde_magnus::serialize(self).unwrap()
@@ -3,7 +3,8 @@ mod hash;
3
3
  use crate::hash::HashExt;
4
4
  use magnus::{class, define_module, exception, function, method, prelude::*, Error};
5
5
  use vault::commands::{
6
- BuildSquad, SelectBattlegroup, SelectBattlegroupAbility, Unknown, UseBattlegroupAbility,
6
+ BuildGlobalUpgrade, BuildSquad, SelectBattlegroup, SelectBattlegroupAbility, Unknown,
7
+ UseBattlegroupAbility,
7
8
  };
8
9
  use vault::{Command, Faction, Map, Message, Player, Replay, Team};
9
10
 
@@ -71,6 +72,17 @@ fn init() -> Result<(), Error> {
71
72
 
72
73
  let commands_module = module.define_module("Commands")?;
73
74
 
75
+ let build_global_upgrade_command =
76
+ commands_module.define_class("BuildGlobalUpgradeCommand", command)?;
77
+ build_global_upgrade_command
78
+ .define_method("value", method!(Command::extract_build_global_upgrade, 0))?;
79
+
80
+ let build_global_upgrade =
81
+ commands_module.define_class("BuildGlobalUpgrade", class::object())?;
82
+ build_global_upgrade.define_method("tick", method!(BuildGlobalUpgrade::tick, 0))?;
83
+ build_global_upgrade.define_method("pbgid", method!(BuildGlobalUpgrade::pbgid, 0))?;
84
+ build_global_upgrade.define_method("to_h", method!(BuildGlobalUpgrade::to_h, 0))?;
85
+
74
86
  let build_squad_command = commands_module.define_class("BuildSquadCommand", command)?;
75
87
  build_squad_command.define_method("value", method!(Command::extract_build_squad, 0))?;
76
88
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VaultCoh
4
- VERSION = '2.2.0'
4
+ VERSION = '3.0.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: 2.2.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryantaylor
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-06 00:00:00.000000000 Z
11
+ date: 2023-11-23 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.