blufin-lib 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scan/scanner_js.rb +9 -6
- data/lib/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: 6277cc9d0ce36387db4539da117d9545cea679d4
|
4
|
+
data.tar.gz: fff64f90538da43d91d9a589fc1b7776285725d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f9d10c168f9739768878858a8f9474d0d6a7b9ad3c6979b0bea66cfdfdd337b8beb6575a1ad78615aed4a750765555ba9e1d0d58153fe6e6d3b30b9b952e54
|
7
|
+
data.tar.gz: 91aec2f1270fee3f8a0a1517cf073b5ca84c3b096bce01ee4bdb050ac7aad434df573225d8df9a30dc009c79a2e0e98dd93af8ea254c0f580aee9278ee207215
|
data/lib/scan/scanner_js.rb
CHANGED
@@ -109,7 +109,7 @@ module Blufin
|
|
109
109
|
ls = line.gsub(/^\s*\*+\s*@param\s+/, '').split(' ')
|
110
110
|
type = extract_type(ls[0])
|
111
111
|
param_name = ls[1]
|
112
|
-
param_name
|
112
|
+
param_name = param_name.strip.gsub(/^\[/, '').gsub(/]$/, '')
|
113
113
|
hyphen = ls[2]
|
114
114
|
description = ls.drop(3).join(' ')
|
115
115
|
raise RuntimeError, "Duplicate parameter: #{param_name}" if @docs[:params].is_a?(Hash) && @docs[:params].has_key?(param_name)
|
@@ -148,7 +148,7 @@ module Blufin
|
|
148
148
|
raise RuntimeError, "Expected exactly one equal (=) sign, got: #{ps.length - 1}" unless ps.length == 2
|
149
149
|
param_extracted = ps[0].strip
|
150
150
|
raise RuntimeError, "Duplicate parameter: #{param_extracted}" if @params.has_key?(param_extracted)
|
151
|
-
@params[param_extracted] = {
|
151
|
+
@params[param_extracted] = {:default => ps[1].strip}
|
152
152
|
elsif param =~ /\w+/
|
153
153
|
raise RuntimeError, "Duplicate parameter: #{param}" if @params.has_key?(param)
|
154
154
|
@params[param] = {}
|
@@ -156,7 +156,7 @@ module Blufin
|
|
156
156
|
raise RuntimeError, "Unrecognized parameter: #{param}"
|
157
157
|
end
|
158
158
|
end
|
159
|
-
@docs = {
|
159
|
+
@docs = {:params => {}} unless @docs.is_a?(Hash)
|
160
160
|
@docs[:params] = {} unless @docs[:params].is_a?(Hash)
|
161
161
|
@data[@file_short][:methods][method_name] = {
|
162
162
|
:line => @line,
|
@@ -173,9 +173,12 @@ module Blufin
|
|
173
173
|
def self.extract_type(string, allow_void = false)
|
174
174
|
types = DATA_TYPES
|
175
175
|
types << 'void' if allow_void
|
176
|
-
type
|
177
|
-
|
178
|
-
|
176
|
+
type = string.gsub(/^\{/, '').gsub(/\}$/, '')
|
177
|
+
types_compare = type =~ /\|/ ? type.split('|') : [type]
|
178
|
+
types_compare.each do |type_inner|
|
179
|
+
raise RuntimeError, "Unrecognized data type: #{type_inner}" unless types.include?(type_inner.downcase)
|
180
|
+
raise RuntimeError, "Data types must be lowercase, found: #{type_inner}" if type_inner.downcase != 'array' && type_inner != type_inner.downcase
|
181
|
+
end
|
179
182
|
type
|
180
183
|
end
|
181
184
|
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
BLUFIN_LIB_VERSION = '2.2.
|
1
|
+
BLUFIN_LIB_VERSION = '2.2.2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blufin-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert Rannetsperger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|