ncs_mdes 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
+
0.3.1
|
2
|
+
=====
|
3
|
+
|
4
|
+
- Correct pattern compilation. XML Schema patterns implicitly must
|
5
|
+
match the entire value, so it's necessary to surround the value with
|
6
|
+
`^` and `$` when converting to a ruby regular expression.
|
7
|
+
|
1
8
|
0.3.0
|
2
9
|
=====
|
3
10
|
|
4
11
|
- Add foreign key / table reference support, including explicit
|
5
|
-
mappings for all ambiguous or unguessable FKs.
|
12
|
+
mappings for all ambiguous or unguessable FKs (#1).
|
6
13
|
- Add Specification#[] for quicker access to a particular table or
|
7
14
|
tables.
|
8
15
|
|
@@ -64,7 +64,7 @@ module NcsNavigator::Mdes
|
|
64
64
|
p = elt['value']
|
65
65
|
vt.pattern =
|
66
66
|
begin
|
67
|
-
Regexp.new(p)
|
67
|
+
Regexp.new("^#{p}$")
|
68
68
|
rescue RegexpError
|
69
69
|
log.warn("Uncompilable pattern #{p.inspect} in simpleType#{(' ' + vt.name.inspect) if vt.name} on line #{elt.line}")
|
70
70
|
nil
|
@@ -67,7 +67,7 @@ module NcsNavigator::Mdes
|
|
67
67
|
describe '#pattern' do
|
68
68
|
it 'is compiled to a regexp if present' do
|
69
69
|
vtype_from_string('<xs:pattern value="([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])?"/>').
|
70
|
-
pattern.should ==
|
70
|
+
pattern.should == /^([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])?$/
|
71
71
|
end
|
72
72
|
|
73
73
|
describe 'when malformed' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ncs_mdes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rhett Sutphin
|
@@ -15,11 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-27 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
name: nokogiri
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
23
25
|
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
@@ -29,12 +31,12 @@ dependencies:
|
|
29
31
|
- 1
|
30
32
|
- 4
|
31
33
|
version: "1.4"
|
32
|
-
requirement: *id001
|
33
34
|
type: :runtime
|
34
|
-
|
35
|
-
prerelease: false
|
35
|
+
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
37
|
+
name: rspec
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
40
|
none: false
|
39
41
|
requirements:
|
40
42
|
- - ~>
|
@@ -44,12 +46,12 @@ dependencies:
|
|
44
46
|
- 2
|
45
47
|
- 6
|
46
48
|
version: "2.6"
|
47
|
-
requirement: *id002
|
48
49
|
type: :development
|
49
|
-
|
50
|
-
prerelease: false
|
50
|
+
version_requirements: *id002
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
|
-
|
52
|
+
name: rake
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
55
|
none: false
|
54
56
|
requirements:
|
55
57
|
- - ~>
|
@@ -60,12 +62,12 @@ dependencies:
|
|
60
62
|
- 9
|
61
63
|
- 2
|
62
64
|
version: 0.9.2
|
63
|
-
requirement: *id003
|
64
65
|
type: :development
|
65
|
-
|
66
|
-
prerelease: false
|
66
|
+
version_requirements: *id003
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
|
68
|
+
name: yard
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
71
|
none: false
|
70
72
|
requirements:
|
71
73
|
- - ~>
|
@@ -76,10 +78,8 @@ dependencies:
|
|
76
78
|
- 7
|
77
79
|
- 2
|
78
80
|
version: 0.7.2
|
79
|
-
requirement: *id004
|
80
81
|
type: :development
|
81
|
-
|
82
|
-
prerelease: false
|
82
|
+
version_requirements: *id004
|
83
83
|
description: |
|
84
84
|
|
85
85
|
Provides a consistent ruby interface to the project metainformation in the
|