omf_oml 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/omf_oml/schema.rb +7 -4
- data/lib/omf_oml/version.rb +1 -1
- metadata +2 -2
data/lib/omf_oml/schema.rb
CHANGED
@@ -207,7 +207,7 @@ module OMF::OML
|
|
207
207
|
schema_description.each_with_index do |cdesc, i|
|
208
208
|
insert_column_at(i, cdesc)
|
209
209
|
end
|
210
|
-
debug "
|
210
|
+
debug "xschema: '#{describe.inspect}'"
|
211
211
|
|
212
212
|
end
|
213
213
|
|
@@ -219,20 +219,23 @@ module OMF::OML
|
|
219
219
|
end
|
220
220
|
if col.kind_of? Array
|
221
221
|
# should be [name, type]
|
222
|
+
# Make sure that any leading spaces are being removed on name
|
223
|
+
col[0] = col[0].to_s.strip.to_sym
|
222
224
|
if col.length == 1
|
223
|
-
col = {:name => col[0]
|
225
|
+
col = {:name => col[0],
|
224
226
|
:type => :string,
|
225
227
|
:title => col[0].to_s.split('_').collect {|s| s.capitalize}.join(' ')}
|
226
228
|
elsif col.length == 2
|
227
|
-
col = {:name => col[0]
|
229
|
+
col = {:name => col[0],
|
228
230
|
:type => col[1].to_sym,
|
229
231
|
:title => col[0].to_s.split('_').collect {|s| s.capitalize}.join(' ')}
|
230
232
|
elsif col.length == 3
|
231
|
-
col = {:name => col[0]
|
233
|
+
col = {:name => col[0], :type => col[1].to_sym, :title => col[2]}
|
232
234
|
else
|
233
235
|
throw "Simple column schema should consist of [name, type, title] array, but found '#{col.inspect}'"
|
234
236
|
end
|
235
237
|
elsif col.kind_of? Hash
|
238
|
+
col[:name] = col[:name].to_s.strip.to_sym
|
236
239
|
# ensure there is a :title property
|
237
240
|
unless col[:title]
|
238
241
|
col[:title] = col[:name].to_s.split('_').collect {|s| s.capitalize}.join(' ')
|
data/lib/omf_oml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_oml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omf_base
|