dsp_blueprint_parser 0.1.0 → 0.1.1
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 +4 -4
- data/.gitignore +12 -11
- data/.rspec +3 -3
- data/CHANGELOG.md +5 -5
- data/Gemfile.lock +1 -1
- data/LICENSE.txt +21 -21
- data/README.md +6 -1
- data/bin/setup +8 -8
- data/lib/dsp_blueprint_parser/parser.rb +8 -2
- data/lib/dsp_blueprint_parser/version.rb +1 -1
- metadata +1 -6
- data/.idea/.gitignore +0 -8
- data/.idea/dsp_blueprint_parser.iml +0 -77
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/vcs.xml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e1f313346ba7c2ec3370570a6db46c75c15d4483d1df0760d65c1bec29c478b
|
4
|
+
data.tar.gz: ce8c9216312ee174256d5d11d46c897a9767d65b0d458c8aa18fd99ffe1a853d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a1873d1e5fc1dea052681b2b95969502d797b986efc612855d4e0cd2b0414a1bd3480ef10d7513ea6616a97c31a2ff237a1942c05847c935c1b9beee4dcd17
|
7
|
+
data.tar.gz: 2a60d12b85c731d86e9b4891f2e08423d65297ee531c472523790c6586616ce6a57941945fb6fa34c189f3f4540ff3731f260cabbb98e78d82c341cce86c69e2
|
data/.gitignore
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
/.
|
2
|
-
/.
|
3
|
-
|
4
|
-
/
|
5
|
-
/
|
6
|
-
/
|
7
|
-
/
|
8
|
-
/
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
/.idea/
|
2
|
+
/.bundle/
|
3
|
+
/.yardoc
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
|
11
|
+
# rspec failure tracking
|
12
|
+
.rspec_status
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
## [Unreleased]
|
2
|
-
|
3
|
-
## [0.1.0] - 2021-07-31
|
4
|
-
|
5
|
-
- Initial release
|
1
|
+
## [Unreleased]
|
2
|
+
|
3
|
+
## [0.1.0] - 2021-07-31
|
4
|
+
|
5
|
+
- Initial release
|
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2021 Lucas Falk
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Lucas Falk
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
Small Ruby gem to handle parsing of Dyson Sphere Program's blueprint data.
|
4
4
|
|
5
|
+
Currently the gem does not support validating the MD5 hash of the blueprint. It appears as if the DSP devs wrote their own MD5 algorithm which would need it's own Ruby port.
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
@@ -23,9 +25,12 @@ Or install it yourself as:
|
|
23
25
|
Module `DspBlueprintParser` has a single static method `parse` which takes the DSP blueprint string to be parsed.
|
24
26
|
|
25
27
|
```ruby
|
26
|
-
DspBlueprintParser
|
28
|
+
DspBlueprintParser.parse(str_blueprint)
|
27
29
|
```
|
28
30
|
|
31
|
+
This method returns a [BlueprintData](https://github.com/LRFalk01/DSP-Blueprint-Parser/blob/master/lib/dsp_blueprint_parser/blueprint_data.rb) object which includes the various metadata of the blueprint.
|
32
|
+
Part of the `BlueprintData` object are properties for [areas](https://github.com/LRFalk01/DSP-Blueprint-Parser/blob/master/lib/dsp_blueprint_parser/area.rb) and [buildings](https://github.com/LRFalk01/DSP-Blueprint-Parser/blob/master/lib/dsp_blueprint_parser/building.rb) which are what one would mostly be interested in further evaluating.
|
33
|
+
|
29
34
|
## Development
|
30
35
|
|
31
36
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/bin/setup
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
set -vx
|
5
|
-
|
6
|
-
bundle install
|
7
|
-
|
8
|
-
# Do any other automated setup that you need to do here
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
bundle install
|
7
|
+
|
8
|
+
# Do any other automated setup that you need to do here
|
@@ -123,8 +123,14 @@ module DspBlueprintParser
|
|
123
123
|
|
124
124
|
blueprint.time = ticks_to_epoch(header_segments[8].to_i)
|
125
125
|
blueprint.game_version = header_segments[9]
|
126
|
-
|
127
|
-
|
126
|
+
|
127
|
+
if header_segments[10]
|
128
|
+
blueprint.short_description = CGI.unescape(header_segments[10])
|
129
|
+
end
|
130
|
+
|
131
|
+
if header_segments[11]
|
132
|
+
blueprint.description = CGI.unescape(header_segments[11])
|
133
|
+
end
|
128
134
|
|
129
135
|
blueprint.version = reader.read_i32
|
130
136
|
blueprint.cursor_offset_x = reader.read_i32
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsp_blueprint_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Falk
|
@@ -18,11 +18,6 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
|
-
- ".idea/.gitignore"
|
22
|
-
- ".idea/dsp_blueprint_parser.iml"
|
23
|
-
- ".idea/misc.xml"
|
24
|
-
- ".idea/modules.xml"
|
25
|
-
- ".idea/vcs.xml"
|
26
21
|
- ".rspec"
|
27
22
|
- ".rubocop.yml"
|
28
23
|
- CHANGELOG.md
|
data/.idea/.gitignore
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="ModuleRunConfigurationManager">
|
4
|
-
<shared />
|
5
|
-
</component>
|
6
|
-
<component name="NewModuleRootManager">
|
7
|
-
<content url="file://$MODULE_DIR$">
|
8
|
-
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
-
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
-
</content>
|
12
|
-
<orderEntry type="inheritedJdk" />
|
13
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, ruby-3.0.2-p107) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.22, ruby-3.0.2-p107) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, ruby-3.0.2-p107) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.4.4, ruby-3.0.2-p107) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, ruby-3.0.2-p107) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.20.1, ruby-3.0.2-p107) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="parser (v3.0.2.0, ruby-3.0.2-p107) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="pry (v0.14.1, ruby-3.0.2-p107) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, ruby-3.0.2-p107) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, ruby-3.0.2-p107) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rbs (v1.0.4, ruby-3.0.2-p107) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.1.1, ruby-3.0.2-p107) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, ruby-3.0.2-p107) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.10.0, ruby-3.0.2-p107) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.10.1, ruby-3.0.2-p107) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.10.1, ruby-3.0.2-p107) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-its (v1.3.0, ruby-3.0.2-p107) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.10.2, ruby-3.0.2-p107) [gem]" level="application" />
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.10.2, ruby-3.0.2-p107) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.18.4, ruby-3.0.2-p107) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.8.0, ruby-3.0.2-p107) [gem]" level="application" />
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, ruby-3.0.2-p107) [gem]" level="application" />
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.0.0, ruby-3.0.2-p107) [gem]" level="application" />
|
37
|
-
</component>
|
38
|
-
<component name="RakeTasksCache">
|
39
|
-
<option name="myRootTask">
|
40
|
-
<RakeTaskImpl id="rake">
|
41
|
-
<subtasks>
|
42
|
-
<RakeTaskImpl description="Build dsp_blueprint_parser-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
|
43
|
-
<RakeTaskImpl id="build">
|
44
|
-
<subtasks>
|
45
|
-
<RakeTaskImpl description="Generate SHA512 checksum if dsp_blueprint_parser-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
|
46
|
-
</subtasks>
|
47
|
-
</RakeTaskImpl>
|
48
|
-
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
49
|
-
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
50
|
-
<RakeTaskImpl description="Build and install dsp_blueprint_parser-0.1.0.gem into system gems" fullCommand="install" id="install" />
|
51
|
-
<RakeTaskImpl id="install">
|
52
|
-
<subtasks>
|
53
|
-
<RakeTaskImpl description="Build and install dsp_blueprint_parser-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
|
54
|
-
</subtasks>
|
55
|
-
</RakeTaskImpl>
|
56
|
-
<RakeTaskImpl description="Create tag v0.1.0 and build and push dsp_blueprint_parser-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
|
57
|
-
<RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
|
58
|
-
<RakeTaskImpl id="rubocop">
|
59
|
-
<subtasks>
|
60
|
-
<RakeTaskImpl description="Auto-correct RuboCop offenses" fullCommand="rubocop:auto_correct" id="auto_correct" />
|
61
|
-
</subtasks>
|
62
|
-
</RakeTaskImpl>
|
63
|
-
<RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
|
64
|
-
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
65
|
-
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
66
|
-
<RakeTaskImpl id="release">
|
67
|
-
<subtasks>
|
68
|
-
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
69
|
-
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
70
|
-
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
71
|
-
</subtasks>
|
72
|
-
</RakeTaskImpl>
|
73
|
-
</subtasks>
|
74
|
-
</RakeTaskImpl>
|
75
|
-
</option>
|
76
|
-
</component>
|
77
|
-
</module>
|
data/.idea/misc.xml
DELETED
data/.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/dsp_blueprint_parser.iml" filepath="$PROJECT_DIR$/.idea/dsp_blueprint_parser.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|