vault_coh 6.0.0 → 6.0.1

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: 82ae68759203e352288395c3a0f4bda330ae0d7980fa89d2bd3ba19cbf716eb4
4
+ data.tar.gz: 89a5360499f6a6c2ab99ad11cc01a00793c6bfcb11862f45e2a68a6272f97ced
5
5
  SHA512:
6
- metadata.gz: 033d7db015b8ff4cfc49c93b71d47d625790766844c2b3693faf17dcf1ece45bde53772622f9a4e223845166327cdbbc87891cdfd79ff6b9b6eba5a5962e9da6
7
- data.tar.gz: 5c61de1481d40eaf667a9b70cc67ab1e93fe50a7b8f6853e79e58aacda8d48a21d4daa1540de150899d4fd359b1805eabc6273882f8fdefeae1cc00b68ca2d07
6
+ metadata.gz: 4029518b8dd474f22e8dd95bfd40bb7f89680922ca8c4e784d04536fea79ab9b3cb7ca4a3209852ae792e676d21dce2cdf06ea973b27a3c71b5b0e718e6400a1
7
+ data.tar.gz: 27c73513cf4264ff967f4708403b6793ba27b5635ef0fefbbe6396ddae0deca52999fd78a8a207b80cc4953274e112de8f9b5b2494c712848a759fe224d637d6
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.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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.0.1)
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.0.1).
28
28
 
29
29
  ## Contributing
30
30
 
@@ -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,86 @@ 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
73
  Command::SelectBattlegroup(data) => {
66
74
  let hash: RHash = serde_magnus::serialize(data).unwrap();
67
- hash.aset("type", RString::new("SelectBattlegroup"))
68
- .unwrap();
69
- hash.aset("action_type", RString::new("PCMD_InstantUpgrade"))
75
+ hash.aset(Symbol::new("type"), RString::new("SelectBattlegroup"))
70
76
  .unwrap();
77
+ hash.aset(
78
+ Symbol::new("action_type"),
79
+ RString::new("PCMD_InstantUpgrade"),
80
+ )
81
+ .unwrap();
71
82
  hash.as_value()
72
83
  }
73
84
  Command::SelectBattlegroupAbility(data) => {
74
85
  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();
86
+ hash.aset(
87
+ Symbol::new("type"),
88
+ RString::new("SelectBattlegroupAbility"),
89
+ )
90
+ .unwrap();
91
+ hash.aset(
92
+ Symbol::new("action_type"),
93
+ RString::new("PCMD_TentativeUpgrade"),
94
+ )
95
+ .unwrap();
79
96
  hash.as_value()
80
97
  }
81
98
  Command::Unknown(data) => {
82
99
  let hash: RHash = serde_magnus::serialize(data).unwrap();
83
- hash.aset("type", RString::new("Unknown")).unwrap();
100
+ hash.aset(Symbol::new("type"), RString::new("Unknown"))
101
+ .unwrap();
84
102
  hash.as_value()
85
103
  }
86
104
  Command::UseAbility(data) => {
87
105
  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"))
106
+ hash.aset(Symbol::new("type"), RString::new("UseAbility"))
107
+ .unwrap();
108
+ hash.aset(Symbol::new("action_type"), RString::new("CMD_Ability"))
90
109
  .unwrap();
91
110
  hash.as_value()
92
111
  }
93
112
  Command::UseBattlegroupAbility(data) => {
94
113
  let hash: RHash = serde_magnus::serialize(data).unwrap();
95
- hash.aset("type", RString::new("UseBattlegroupAbility"))
114
+ hash.aset(Symbol::new("type"), RString::new("UseBattlegroupAbility"))
96
115
  .unwrap();
97
- hash.aset("action_type", RString::new("PCMD_Ability"))
116
+ hash.aset(Symbol::new("action_type"), RString::new("PCMD_Ability"))
98
117
  .unwrap();
99
118
  hash.as_value()
100
119
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VaultCoh
4
- VERSION = '6.0.0'
4
+ VERSION = '6.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryantaylor