hsss 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/exe/hsss +1 -0
- data/lib/hsss.rb +8 -0
- data/lib/hsss/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96bbfca29172fb609c9de7699b81e89c02e0b7539e63a5632f963e2202940031
|
4
|
+
data.tar.gz: 210afcafd9fd2829ae7cc1865150acd329a175d9b9afc1506dd81d3bd10c9778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bcda4beaed9ffdd7f9d2e254da451dade55bed7861e6691029d987e0df6e4d469e74091649dbdb3aab77dfb05885c965f03131d7e26174148ecb03ef23aeaf9
|
7
|
+
data.tar.gz: 2530fcf8cfcf4b7a5bff064097f16da2de02fc0db0ea32ba7c7270424b3adfa42854c7d4e561acd137aa79ef4fa0961e702cc67b71f51dc857891ff52758ee78
|
data/exe/hsss
CHANGED
@@ -19,6 +19,7 @@ arg=OptionParser.new do |opts|
|
|
19
19
|
opts.on("--no-parse", "Skip using luac to check script syntax"){opt[:no_luac]=true}
|
20
20
|
opts.on("--no-static", "Don't make variables static (file-scoped)"){opt[:no_static]=true}
|
21
21
|
opts.on("--header-only", "just the header"){opt[:header_only]=true}
|
22
|
+
opts.on("--header-guard", "header guard string"){|v|opt[:header_guard]=v}
|
22
23
|
opts.on("--data-only", "just the data"){opt[:data_only]=true}
|
23
24
|
opts.on("--prefix [#{Hsss::DEFAULT_PREFIX}]", "Prefix default names with this"){|v| opt[:prefix]=v}
|
24
25
|
end
|
data/lib/hsss.rb
CHANGED
@@ -44,6 +44,7 @@ module Hsss
|
|
44
44
|
@data_only = opt[:data_only]
|
45
45
|
@include_count = !opt[:skip_count]
|
46
46
|
@include_iter_macro = !opt[:skip_each]
|
47
|
+
@header_guard = opt[:header_guard]
|
47
48
|
@include_hash = !!hashes_struct
|
48
49
|
|
49
50
|
(Array === files ? files : [ files ]).each do |f|
|
@@ -227,10 +228,17 @@ module Hsss
|
|
227
228
|
scripties = nil
|
228
229
|
end
|
229
230
|
if @header_only
|
231
|
+
if @header_guard
|
232
|
+
out << "#ifndef #{@header_guard}\n"
|
233
|
+
out << "#define #{@header_guard}\n"
|
234
|
+
end
|
230
235
|
out << sprintf(@headf, @struct.join("\n"))
|
231
236
|
out << "#{@static}#{struct_name} #{scripts_struct};\n"
|
232
237
|
out << "const int #{@count_name};\n" if @include_count
|
233
238
|
out << iter_macro
|
239
|
+
if @header_guard
|
240
|
+
out << "#endif //#{@header_guard}\n"
|
241
|
+
end
|
234
242
|
elsif @data_only
|
235
243
|
out << "#{@static}#{struct_name} #{scripts_struct} = {\n"
|
236
244
|
out << "#{scrapts.join(",\n\n")}\n"
|
data/lib/hsss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hsss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leo P.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,7 +78,7 @@ licenses:
|
|
78
78
|
- MIT
|
79
79
|
metadata:
|
80
80
|
allowed_push_host: https://rubygems.org
|
81
|
-
post_install_message:
|
81
|
+
post_install_message:
|
82
82
|
rdoc_options: []
|
83
83
|
require_paths:
|
84
84
|
- lib
|
@@ -93,9 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
|
97
|
-
|
98
|
-
signing_key:
|
96
|
+
rubygems_version: 3.1.3
|
97
|
+
signing_key:
|
99
98
|
specification_version: 4
|
100
99
|
summary: Hash-Safe Script Splinterer
|
101
100
|
test_files: []
|