ginjo-rfm 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTliMjcxMTMwOTViNmIyY2JlZTY4NTNiZGU2MjU2ZmFjMjhlOTYxMA==
4
+ NDkwZmQwZTdjNWVjZmQwYTc3NGZjYjFlMTI3OTAzMWRiMzBhYzZlOQ==
5
5
  data.tar.gz: !binary |-
6
- YjA0MGJhNDhiZjZiZjM2NmQzNTBmYzI3MTE4ZGM3NGZjNmVkYjIwYw==
6
+ YjMyYTRmNWFjYWUzN2ZlNmJmN2E5MWE3MDFhM2E1ZmRlMGFlNWUyZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGQ1N2U4ZDAyNGYxOGEyZDU2ZGVmMWRjMGM1N2NkMzU0MWYxYmYxNThhNGVh
10
- ZGI1YTc2MjJjZWNkZWFlNDRlNGY4MjU5OTliNzU4YzEyMTNmZTg4MWZmMzNi
11
- ODIwNGY4YmZhYzRlOGRlZjI3NDgwZTdkOTE2ODlkOTExOTI1MTQ=
9
+ NGFhODQ1Mjk0M2YzY2ZhNjhmYTY4NWRiNzZlYTlhZjU1YTE2MjE2NmFiZTIz
10
+ NGVmYTA5YzEyMmYzNDg2NWQ5YTY0Yjk3ZGI5ZDI5ODBhMmI0ZWIzYmVlY2Vi
11
+ OGVlZDE4ODk1ZDU2NDQ3YzZkNmU4NmM1OGQyNWEwNWI4MWM4ZjI=
12
12
  data.tar.gz: !binary |-
13
- MmEzZWU4ZWJmMTFiYTBiMGQxNDE1NTkxNjUxNzNjOGE5MTQ0ZTNiNDY1YTli
14
- OGM5M2U4Y2M0MDc4NTM5YTdjZTQzNmM4YmY1YTkzODE2YmVhMzRlYzYwOGVk
15
- M2EwNWYzMWEzNmQ3ZGU0MmE4ZDg1NWQyN2Q1OTMzMjcyYWI1YzI=
13
+ ODhiMjg0Njk1Y2UzMzk2NWY3MDRiMTA5Yzc5MmZmNzkzODQ4ZTIyYzA2YTI4
14
+ ZGY0MGE4NGNkNjFlMTQ3MzZmZTQyY2YyYjNjNDc3N2I3YjQwYTBjOWRhYmVl
15
+ NGU0YWMwMjgyNzQxNjNmYzJmODM0Y2Y1NDQ5MGEwMTYwYWU2YTA=
data/lib/rfm/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.0.1
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+ # Database names from fmpxmlresult #
3
+ #
4
+ # <?xml version="1.0" encoding="UTF-8" standalone="no"?>
5
+ # <!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "/fmi/xml/FMPXMLRESULT.dtd">
6
+ # <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
7
+ # <ERRORCODE>0</ERRORCODE>
8
+ # <PRODUCT BUILD="03/02/2011" NAME="FileMaker Web Publishing Engine" VERSION="11.0.3.302"/>
9
+ # <DATABASE DATEFORMAT="" LAYOUT="" NAME="DBNAMES" RECORDS="3" TIMEFORMAT=""/>
10
+ # <METADATA>
11
+ # <FIELD EMPTYOK="NO" MAXREPEAT="1" NAME="DATABASE_NAME" TYPE="TEXT"/>
12
+ # </METADATA>
13
+ # <RESULTSET FOUND="3">
14
+ # <ROW MODID="0" RECORDID="0">
15
+ # <COL>
16
+ # <DATA>SDS</DATA>
17
+ # </COL>
18
+ # </ROW>
19
+ # <ROW MODID="0" RECORDID="0">
20
+ # <COL>
21
+ # <DATA>SevenDev</DATA>
22
+ # </COL>
23
+ # </ROW>
24
+ # <ROW MODID="0" RECORDID="0">
25
+ # <COL>
26
+ # <DATA>SevenGables</DATA>
27
+ # </COL>
28
+ # </ROW>
29
+ # </RESULTSET>
30
+ # </FMPXMLRESULT>
31
+ #
32
+ # The top level represents the initial object, a basic hash in this case.
33
+ ---
34
+ attach_elements: none
35
+ attach_attributes: none
36
+ elements:
37
+ - name: data
38
+ compact: true
39
+ attach: hash
40
+ attach_attributes: hash
41
+ delimiter: text
42
+
@@ -0,0 +1,173 @@
1
+ #!/usr/bin/env ruby
2
+ # YAML structure defining a SAX parsing scheme for fmpxmllayout xml.
3
+ # The initial object of this parse should be a new instance of Rfm::Layout.
4
+ ---
5
+ attach_elements: _meta
6
+ attach_attributes: _meta
7
+ elements:
8
+ - name: doctype
9
+ attach: none
10
+ attributes:
11
+ - name: value
12
+ as_name: doctype
13
+ - name: fmpxmllayout
14
+ attach: none
15
+ - name: errorcode
16
+ attach: none
17
+ # TODO: Build check_for_errors method in Layout class.
18
+ #before_close: 'check_for_errors'
19
+ attributes:
20
+ - name: text
21
+ as_name: error
22
+ - name: product
23
+ as_name: product
24
+ - name: layout
25
+ attach: none
26
+ attributes:
27
+ - name: database
28
+ as_name: database
29
+ - name: NAME
30
+ as_name: name
31
+ - name: field
32
+ handler: [object.meta, handle_new_field_control, _attributes]
33
+ attach_attributes: private
34
+ elements:
35
+ - name: style
36
+ handler: [object, handle_style_element, _attributes]
37
+ # attach: none
38
+ # attributes:
39
+ # - name: valuelist
40
+ # as_name: value_list_name
41
+ - name: valuelists
42
+ attach: none
43
+ - name: valuelist
44
+ class: Array
45
+ as_name: value_lists
46
+ delimiter: name
47
+ elements:
48
+ - name: value
49
+ class: Rfm::Metadata::ValueListItem
50
+ before_close: replace(@value.to_s)
51
+ attach_attributes: private
52
+ attributes:
53
+ - name: display
54
+ as_name: display
55
+ - name: text
56
+ as_name: value
57
+
58
+
59
+ # Works - doesn't use Handler method.
60
+ # ---
61
+ # attach_elements: _meta
62
+ # attach_attributes: _meta
63
+ # elements:
64
+ # - name: doctype
65
+ # attach: none
66
+ # attributes:
67
+ # - name: value
68
+ # as_name: doctype
69
+ # - name: FMPXMLLAYOUT
70
+ # attach: none
71
+ # - name: ERRORCODE
72
+ # attach: none
73
+ # # TODO: Build check_for_errors method in Layout class.
74
+ # #before_close: 'check_for_errors'
75
+ # attributes:
76
+ # - name: text
77
+ # as_name: error
78
+ # - name: PRODUCT
79
+ # as_name: product
80
+ # - name: LAYOUT
81
+ # attach: none
82
+ # attributes:
83
+ # - name: DATABASE
84
+ # as_name: database
85
+ # - name: NAME
86
+ # as_name: name
87
+ # - name: FIELD
88
+ # class: Rfm::Metadata::FieldControl
89
+ # as_name: field_controls
90
+ # delimiter: name
91
+ # attach_attributes: private
92
+ # attributes:
93
+ # - name: NAME
94
+ # as_name: name
95
+ # elements:
96
+ # - name: STYLE
97
+ # attach: none
98
+ # # Add logic for 3rd level of prefs, so FieldControl pref captures this attach_attributes instead having to explicitly define here.
99
+ # attach_attributes: private
100
+ # attributes:
101
+ # - name: TYPE
102
+ # as_name: type
103
+ # - name: VALUELIST
104
+ # as_name: valuelist
105
+ # - name: VALUELISTS
106
+ # attach: none
107
+ # - name: VALUELIST
108
+ # # TODO: Disabling this breaks the delimiter.
109
+ # #attach: shared
110
+ # class: Array
111
+ # as_name: value_lists
112
+ # delimiter: NAME
113
+ # elements:
114
+ # - name: VALUE
115
+ # class: Rfm::Metadata::ValueListItem
116
+ # before_close: replace(@value.to_s)
117
+ # attach_attributes: private
118
+ # attributes:
119
+ # - name: DISPLAY
120
+ # as_name: display
121
+ # - name: text
122
+ # as_name: value
123
+
124
+
125
+
126
+ # Works !!!
127
+ # ---
128
+ # elements:
129
+ # - name: FMPXMLLAYOUT
130
+ # attach: none
131
+ # attach_attributes: shared
132
+ # - name: ERRORCODE
133
+ # as_name: error
134
+ # attach: shared
135
+ # compact: true
136
+ # - name: PRODUCT
137
+ # attach: none
138
+ # attach_attributes: shared
139
+ # - name: LAYOUT
140
+ # attach: none
141
+ # attach_attributes: shared
142
+ # - name: FIELD
143
+ # class: Rfm::Metadata::FieldControl
144
+ # as_name: field_controls
145
+ # delineate_with_hash: name
146
+ # attributes:
147
+ # - name: NAME
148
+ # as_name: name
149
+ # elements:
150
+ # - name: STYLE
151
+ # attach: none
152
+ # attributes:
153
+ # - name: TYPE
154
+ # as_name: type
155
+ # - name: VALUELIST
156
+ # as_name: valuelist
157
+ # - name: VALUELISTS
158
+ # attach: none
159
+ # - name: VALUELIST
160
+ # class: Array
161
+ # as_name: value_lists
162
+ # delineate_with_hash: NAME
163
+ # elements:
164
+ # - name: VALUE
165
+ # # This turns the potential hash into a string
166
+ # class: String
167
+ # # Then we place the main attribute into the string's data.
168
+ # before_close: replace text
169
+ # attributes:
170
+ # - name: DISPLAY
171
+ # as_name: display
172
+
173
+
@@ -0,0 +1,79 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <fmresultset-xml>
3
+ <attach-elements>individual</attach-elements>
4
+ <elements >
5
+ <element>
6
+ <name>fmresultset</name>
7
+ <class>Rfm::FmResultset</class>
8
+ <ignore >
9
+ <ignore>self</ignore>
10
+ </ignore>
11
+ </element>
12
+ <element>
13
+ <name>datasource</name>
14
+ <class>Rfm::Datasource</class>
15
+ </element>
16
+ <element>
17
+ <name>metadata</name>
18
+ <class>Rfm::Meta</class>
19
+ <elements >
20
+ <element>
21
+ <name>field_definition</name>
22
+ <as-name>field_meta</as-name>
23
+ <attach>hash</attach>
24
+ </element>
25
+ <element>
26
+ <name>portal_definition</name>
27
+ <as-name>portal_meta</as-name>
28
+ <attach>hash</attach>
29
+ </element>
30
+ </elements>
31
+ </element>
32
+ <element>
33
+ <name>resultset</name>
34
+ <attach-attributes>individual</attach-attributes>
35
+ <ignore >
36
+ <ignore>self</ignore>
37
+ </ignore>
38
+ </element>
39
+ <element>
40
+ <name>record</name>
41
+ <class>Rfm::Record</class>
42
+ <attach-attributes>individual</attach-attributes>
43
+ <attach>hash</attach>
44
+ <elements >
45
+ <element>
46
+ <name>field</name>
47
+ <class>Rfm::Metadata::Field</class>
48
+ <attach-attributes>individual</attach-attributes>
49
+ <compact>true</compact>
50
+ <attach>none</attach>
51
+ <before-close>build_record_data</before-close>
52
+ </element>
53
+ <element>
54
+ <name>relatedset</name>
55
+ <class>Rfm::RelatedSet</class>
56
+ <attach>individual</attach>
57
+ <as-name>portals</as-name>
58
+ <delineate-with-hash>table</delineate-with-hash>
59
+ <elements >
60
+ <element>
61
+ <name>record</name>
62
+ <class>Rfm::Record</class>
63
+ <attach-attributes>individual</attach-attributes>
64
+ <elements >
65
+ <element>
66
+ <name>field</name>
67
+ <compact>true</compact>
68
+ <class>Rfm::Metadata::Field</class>
69
+ <attach>none</attach>
70
+ <before-close>build_record_data</before-close>
71
+ </element>
72
+ </elements>
73
+ </element>
74
+ </elements>
75
+ </element>
76
+ </elements>
77
+ </element>
78
+ </elements>
79
+ </fmresultset-xml>
@@ -0,0 +1,160 @@
1
+ #!/usr/bin/env ruby
2
+ # YAML structure defining a SAX parsing scheme for fmresultset xml.
3
+ # The initial object of this parse should be a new instance of Rfm::Resultset.
4
+ ---
5
+ attach_elements: _meta
6
+ attach_attributes: _meta
7
+ create_accessors: all
8
+ elements:
9
+ - name: doctype
10
+ attach: none
11
+ attributes:
12
+ - name: value
13
+ as_name: doctype
14
+ - name: fmresultset
15
+ attach: none
16
+ - name: product
17
+ - name: error
18
+ attach: none
19
+ before_close: 'check_for_errors'
20
+ attributes:
21
+ - name: code
22
+ as_name: error
23
+ - name: datasource
24
+ attach: none
25
+ attributes:
26
+ - name: total_count
27
+ accessor: none
28
+ before_close: :end_datasource_element_callback
29
+ - name: metadata
30
+ attach: none
31
+ - name: field_definition
32
+ handler: [object.meta, handle_new_field, _attributes]
33
+ before_close: :main_callback
34
+ - name: relatedset_definition
35
+ delimiter: table
36
+ as_name: portal_meta
37
+ attach_attributes: private
38
+ elements:
39
+ - name: field_definition
40
+ class: Rfm::Metadata::Field
41
+ attach: cursor
42
+ delimiter: name
43
+ as_name: field_meta
44
+ attach_attributes: private
45
+ before_close: :portal_callback
46
+ - name: resultset
47
+ attach: none
48
+ attributes:
49
+ - name: count
50
+ accessor: none
51
+ - name: fetch_size
52
+ accessor: none
53
+ - name: record
54
+ handler: [object, handle_new_record, _attributes]
55
+ before_close: '@loaded=true'
56
+ elements:
57
+ - name: field
58
+ class: Rfm::Metadata::Datum
59
+ compact: true
60
+ attach: cursor
61
+ before_close: :handler_callback
62
+ - name: relatedset
63
+ class: Array
64
+ as_name: portals
65
+ attach: private
66
+ attach_attributes: private
67
+ create_accessors: all
68
+ delimiter: table
69
+ elements:
70
+ - name: record
71
+ class: Rfm::Record
72
+ attach_attributes: private
73
+ before_close: '@loaded=true'
74
+ elements:
75
+ - name: field
76
+ compact: true
77
+ class: Rfm::Metadata::Datum
78
+ attach: cursor
79
+ before_close: :portal_callback
80
+
81
+
82
+
83
+ # Works - doesn't use Handler methods.
84
+ # ---
85
+ # attach_elements: _meta
86
+ # attach_attributes: _meta
87
+ # create_accessors: all
88
+ # elements:
89
+ # - name: doctype
90
+ # attach: none
91
+ # attributes:
92
+ # - name: value
93
+ # as_name: doctype
94
+ # - name: fmresultset
95
+ # attach: none
96
+ # - name: product
97
+ # - name: error
98
+ # attach: none
99
+ # before_close: 'check_for_errors'
100
+ # attributes:
101
+ # - name: code
102
+ # as_name: error
103
+ # - name: datasource
104
+ # attach: none
105
+ # before_close: :end_datasource_element_callback
106
+ # - name: metadata
107
+ # attach: none
108
+ # - name: field_definition
109
+ # class: Rfm::Metadata::Field
110
+ # attach: cursor
111
+ # delimiter: name
112
+ # as_name: field_meta
113
+ # attach_attributes: private
114
+ # before_close: :main_callback
115
+ # - name: relatedset_definition
116
+ # delimiter: table
117
+ # as_name: portal_meta
118
+ # attach_attributes: private
119
+ # elements:
120
+ # - name: field_definition
121
+ # class: Rfm::Metadata::Field
122
+ # attach: cursor
123
+ # delimiter: name
124
+ # as_name: field_meta
125
+ # attach_attributes: private
126
+ # before_close: :portal_callback
127
+ # - name: resultset
128
+ # attach: none
129
+ # - name: record
130
+ # class: Rfm::Record
131
+ # initialize: [new, object]
132
+ # attach: array
133
+ # attach_attributes: private
134
+ # before_close: '@loaded=true'
135
+ # elements:
136
+ # - name: field
137
+ # class: Rfm::Metadata::Datum
138
+ # compact: true
139
+ # attach: cursor
140
+ # before_close: :main_callback
141
+ # - name: relatedset
142
+ # class: Array
143
+ # as_name: portals
144
+ # attach: private
145
+ # attach_attributes: private
146
+ # create_accessors: all
147
+ # delimiter: table
148
+ # elements:
149
+ # - name: record
150
+ # class: Rfm::Record
151
+ # # Should this be enabled?
152
+ # #initialize: [new, object]
153
+ # attach_attributes: private
154
+ # before_close: '@loaded=true'
155
+ # elements:
156
+ # - name: field
157
+ # compact: true
158
+ # class: Rfm::Metadata::Datum
159
+ # attach: cursor
160
+ # before_close: :portal_callback
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ginjo-rfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Coffey
@@ -192,6 +192,10 @@ files:
192
192
  - lib/rfm/utilities/connection.rb
193
193
  - lib/rfm/utilities/core_ext.rb
194
194
  - lib/rfm/utilities/factory.rb
195
+ - lib/rfm/utilities/sax/fmpxml_minimal.yml
196
+ - lib/rfm/utilities/sax/fmpxmllayout.yml
197
+ - lib/rfm/utilities/sax/fmresultset.xml
198
+ - lib/rfm/utilities/sax/fmresultset.yml
195
199
  - lib/rfm/utilities/sax_parser.rb
196
200
  - lib/rfm/version.rb
197
201
  homepage: https://rubygems.org/gems/ginjo-rfm