sqm2json 0.0.1 → 0.0.2
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/README.md +16 -6
- data/lib/sqm2json/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d777ca4a5b2618203709bcf6ed9fc20b55881516
|
|
4
|
+
data.tar.gz: f8721a692c66988fcfdae9a030aa2d599f0769a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92c843eb04b36af684abf23429004249059f859097801a76eb65b38e803aa44cebdedc2b45c5151296410efadef8c6ced443e7944f83cb84aed89899af078f42
|
|
7
|
+
data.tar.gz: 528b3a57c6a8d58920c392778d3bce7e11de7e37f6ffe5343b1c646e52e41080346b42158fbed637cd3f6ae1c8a513c53d0dfbbe3bce335742188c034a1907ab
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Sqm2Json
|
|
1
|
+
# Sqm2Json [](https://badge.fury.io/rb/sqm2json)
|
|
2
2
|
|
|
3
3
|
This gem can convert SQM mission files from Arma3 to JSON documents. And vice versa. Missions content can be either parsed easily, and generated from standard JSON representation.
|
|
4
4
|
|
|
@@ -20,17 +20,27 @@ Or install it yourself as:
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
This library embeds a
|
|
23
|
+
This library embeds a module called **Sqm2Json** and its submodule **Sqm2Json::Reverse** ; include or extends them, then you can play with main methods:
|
|
24
24
|
|
|
25
|
+
```ruby
|
|
26
|
+
require 'sqm2json'
|
|
25
27
|
|
|
28
|
+
class MyClass
|
|
29
|
+
include Sqm2Json,Sqm2Json::Reverse
|
|
30
|
+
end
|
|
26
31
|
|
|
32
|
+
mission_as_json = MyClass.new.to_json(File.read('sqm_mission_file_path'))
|
|
33
|
+
mission_as_sqm = MyClass.new.to_sqm(mission_as_json)
|
|
34
|
+
```
|
|
27
35
|
|
|
28
|
-
## Development
|
|
29
36
|
|
|
30
|
-
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.
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
## Development
|
|
39
|
+
After checking out the repo, you can run `bundle install` to install the dependencies. Then, you can run `bundle exec rake spec` to execute the tests and run `bundle exec rake yard` to build the documentation.
|
|
40
|
+
You can also run `bundle exec irb` for an interactive prompt that will allow you to experiment.
|
|
41
|
+
|
|
42
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `lib/sqm2json/version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
33
43
|
|
|
34
44
|
## Contributing
|
|
35
45
|
|
|
36
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/arma3. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/arma3. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
data/lib/sqm2json/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sqm2json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas FLINOIS
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|