hsss 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +5 -5
  2. data/exe/hsss +1 -0
  3. data/lib/hsss.rb +8 -0
  4. data/lib/hsss/version.rb +1 -1
  5. metadata +6 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b4cfbeb48000c60ccc92946c71bbefe9732e44c8
4
- data.tar.gz: 7dbb7590b50b940a18a3d01c74d401db53879c52
2
+ SHA256:
3
+ metadata.gz: 96bbfca29172fb609c9de7699b81e89c02e0b7539e63a5632f963e2202940031
4
+ data.tar.gz: 210afcafd9fd2829ae7cc1865150acd329a175d9b9afc1506dd81d3bd10c9778
5
5
  SHA512:
6
- metadata.gz: 4a1d6e92e2b97508cb32879d0be317c011e5343e702a7680cb725b911cf6cb4f96feda30d4a531aa22eac272a7ff77b90dce66ce24f667e67d18f8267bacd1db
7
- data.tar.gz: d4424e547089c26757f55337e494ef90e244b2a72f33f1043a2c6defd2e4a4dbeb41a5b9b9cff74dc644b1f0d9b95d8e323daf657b452d28d42f0018de778dcf
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
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module Hsss
2
- VERSION = "0.1.18"
2
+ VERSION = "0.1.19"
3
3
  end
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.18
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: 2017-05-28 00:00:00.000000000 Z
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
- rubyforge_project:
97
- rubygems_version: 2.6.11
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: []