ginjo-rfm 3.0.7 → 3.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG.md +11 -0
- data/README.md +14 -8
- data/lib/rfm/VERSION +1 -1
- data/lib/rfm/layout.rb +1 -2
- data/lib/rfm/utilities/config.rb +4 -2
- data/lib/rfm/utilities/connection.rb +8 -1
- metadata +32 -32
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NDZkOTg4ODU2OGExYTc1M2QwMDA1ZjQxZjhmZDg4ZTgyNzgwMjJhOQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3a124ce5cf138e1c46547069cc547a46f4692827
|
4
|
+
data.tar.gz: 597d7eaa2f436d8d224340f2d3bdb4a090b8113f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OGRiYTU0MmRhNDQzZjA5ZTU0ZjA5ODM3ZjA5MzM5YmRmNGQwZTBkYTVjMDc4
|
11
|
-
MmQyYmFjNGRmYTlhZGM1YzFhYmRiOWRkODM4ZWUxNTZlNDdkY2I=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YWJmM2RiNDZjMjhjZmM5ODRjYTc1YWE2MDg4MTY4MzNkZWFkMDkxZTIyMTk0
|
14
|
-
ZDI0MzEzZDAxMDM1NDY0YmY5YjZlOTk3NGNlY2FiNWM0ZWIwZjFjODEyNmNi
|
15
|
-
ZjJmODc4NDU0YzEzYjFiZWUyYzcyMjVjMTRlYzY3M2UxZDYyYjg=
|
6
|
+
metadata.gz: 00974925e3e0434eb7056421575f35d4bf2e567e79eb6c9a8b4d88d42d39cba3ed77514d0aaa592e148aaf541c1abdbbffbe381ab4805ab64f510c9b6371b5aa
|
7
|
+
data.tar.gz: 3c9fe4a727cae3c8d24fa4ccef9244ec9edb82522bb7a227c3b95c8ddbdd5654102ed197b0bf8b7cc077c729ef308810d0ff36270ab0dc1f3b1c71844faadc09
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Ginjo-Rfm 3.0.8
|
4
|
+
|
5
|
+
* Implemented proxy option for database connections thru a proxy server.
|
6
|
+
|
7
|
+
config :proxy=>['my.proxy.com', 8888]
|
8
|
+
|
9
|
+
* Implemented erb parsing of config.yml
|
10
|
+
|
11
|
+
* Disabled ```:grammar => :auto``` option. The current xml parser cannot yet use the FMPXMLRESULT grammar for general queries.
|
12
|
+
|
13
|
+
|
3
14
|
## Ginjo-Rfm 3.0.7
|
4
15
|
|
5
16
|
* Changed record creation so that generic records created from non-modelized layouts will be instances of Rfm::Record, instead of instances of a transient model class based on the layout. Transient model classes will foul up serialization and any number of other things. Records created from a user-defined model class will continue to be instances of the model class.
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
Rfm is a Ruby-Filemaker adapter, a Ruby Gem that provides an interface between Filemaker Server and Ruby. Query your Filemaker database, browse result records as persistent objects, and create/update/delete records with a syntax similar to ActiveRecord. Ginjo-rfm picks up from the lardawge-rfm gem and continues to refine code and fix bugs. Version 3 removes the dependency on ActiveSupport and is now a completely independent Gem, able to run most of its core features without requiring any other supporting Gems. ActiveModel features can be activated by adding activemodel to your Gemfile (or requiring activemodel manually).
|
21
21
|
|
22
|
-
Ginjo-rfm version 3 has been tested successfully on Ruby 1.8.7
|
22
|
+
Ginjo-rfm version 3 has been tested successfully on Ruby 1.8.7 thru 2.1.3.
|
23
23
|
|
24
24
|
|
25
25
|
## Documentation & Links
|
@@ -205,6 +205,7 @@ See `Rfm::Config::CONFIG_KEYS` for a list of currently allowed configuration opt
|
|
205
205
|
:root_cert_path => '/'
|
206
206
|
:account_name => ''
|
207
207
|
:password => ''
|
208
|
+
:proxy => false # Pass an array of Net::HTTP::Proxy options (p_addr, p_port = nil, p_user = nil, p_pass = nil).
|
208
209
|
:log_actions => false
|
209
210
|
:log_responses => false
|
210
211
|
:log_parser => false
|
@@ -212,13 +213,18 @@ See `Rfm::Config::CONFIG_KEYS` for a list of currently allowed configuration opt
|
|
212
213
|
:raise_on_401 => false
|
213
214
|
:timeout => 60
|
214
215
|
|
215
|
-
:use #
|
216
|
-
:layout #
|
217
|
-
:parent => 'Rfm::Config' #
|
218
|
-
:file_name => 'rfm.yml #
|
219
|
-
:file_path => ['', 'config/'] #
|
220
|
-
:parser # Prefferred XML parser
|
221
|
-
|
216
|
+
:use # Use configuration subgroups, or filter configuration subgoups.
|
217
|
+
:layout # Specify the name of the layout to use.
|
218
|
+
:parent => 'Rfm::Config' # The parent configuration object of the current configuration object, as string.
|
219
|
+
:file_name => 'rfm.yml # Name of configuration file to load yaml from.
|
220
|
+
:file_path => ['', 'config/'] # Array of additional file paths to look for configuration file.
|
221
|
+
:parser # Prefferred XML parser. Can be :libxml, :nokogiri, :ox, :rexml.
|
222
|
+
# You must also require the parsing gem or specify it in your gemfile,
|
223
|
+
# if not using the built-in Ruby XML parser REXML.
|
224
|
+
# You only need to use this option if you have multiple
|
225
|
+
# parsing gems loaded and want to use a specfic one.
|
226
|
+
# Otherwise, Rfm will use the best parser it can find amongst your currently loaded parsing gems.
|
227
|
+
:ignore_bad_data => nil # Instruct Rfm to ignore data mismatch errors when loading a resultset.
|
222
228
|
|
223
229
|
|
224
230
|
### Using Models
|
data/lib/rfm/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.8
|
data/lib/rfm/layout.rb
CHANGED
@@ -289,8 +289,7 @@ module Rfm
|
|
289
289
|
end
|
290
290
|
|
291
291
|
def get_records(action, extra_params = {}, options = {})
|
292
|
-
# TODO:
|
293
|
-
# models/sublayouts/layout/server (Is this done now?).
|
292
|
+
# TODO: See auto-grammar bypbass in connection.rb.
|
294
293
|
grammar_option = state(options)[:grammar]
|
295
294
|
options.merge!(:grammar=>grammar_option) if grammar_option
|
296
295
|
template = options.delete :template
|
data/lib/rfm/utilities/config.rb
CHANGED
@@ -7,6 +7,7 @@ module Rfm
|
|
7
7
|
#
|
8
8
|
module Config
|
9
9
|
require 'yaml'
|
10
|
+
require 'erb'
|
10
11
|
|
11
12
|
CONFIG_KEYS = %w(
|
12
13
|
file_name
|
@@ -14,6 +15,7 @@ module Rfm
|
|
14
15
|
parser
|
15
16
|
host
|
16
17
|
port
|
18
|
+
proxy
|
17
19
|
account_name
|
18
20
|
password
|
19
21
|
database
|
@@ -123,9 +125,9 @@ module Rfm
|
|
123
125
|
def get_config_file
|
124
126
|
@@config_file_data ||= (
|
125
127
|
config_file_name = @config[:file_name] || (RFM_CONFIG[:file_name] rescue nil) || 'rfm.yml'
|
126
|
-
config_file_paths = [''] | [(@config[:file_path] || (RFM_CONFIG[:file_path] rescue nil) || %w( config/ ))].flatten
|
128
|
+
config_file_paths = [''] | [(@config[:file_path] || (RFM_CONFIG[:file_path] rescue nil) || %w( config/ ./ ))].flatten
|
127
129
|
config_file_paths.collect do |path|
|
128
|
-
(YAML.
|
130
|
+
(YAML.load(ERB.new(File.read(File.join(path, config_file_name))).result) rescue {})
|
129
131
|
end.inject({}){|h,a| h.merge(a)}
|
130
132
|
) || {}
|
131
133
|
end
|
@@ -32,6 +32,7 @@ module Rfm
|
|
32
32
|
@defaults = {
|
33
33
|
:host => 'localhost',
|
34
34
|
#:port => 80,
|
35
|
+
:proxy=>false, # array of (p_addr, p_port = nil, p_user = nil, p_pass = nil)
|
35
36
|
:ssl => true,
|
36
37
|
:root_cert => true,
|
37
38
|
:root_cert_name => '',
|
@@ -68,6 +69,8 @@ module Rfm
|
|
68
69
|
def select_grammar(post, options={})
|
69
70
|
grammar = state(options)[:grammar] || 'fmresultset'
|
70
71
|
if grammar.to_s.downcase == 'auto'
|
72
|
+
# TODO: Build grammar parser in new sax engine templates to handle FMPXMLRESULT.
|
73
|
+
return "fmresultset"
|
71
74
|
post.keys.find(){|k| %w(-find -findall -dbnames -layoutnames -scriptnames).include? k.to_s} ? "FMPXMLRESULT" : "fmresultset"
|
72
75
|
else
|
73
76
|
grammar
|
@@ -99,7 +102,11 @@ module Rfm
|
|
99
102
|
request.basic_auth(account_name, password)
|
100
103
|
request.set_form_data(post_data)
|
101
104
|
|
102
|
-
|
105
|
+
if state[:proxy]
|
106
|
+
connection = Net::HTTP::Proxy(*state[:proxy]).new(host_name, port)
|
107
|
+
else
|
108
|
+
connection = Net::HTTP.new(host_name, port)
|
109
|
+
end
|
103
110
|
#ADDED LONG TIMEOUT TIMOTHY TING 05/12/2011
|
104
111
|
connection.open_timeout = connection.read_timeout = state[:timeout]
|
105
112
|
if state[:ssl]
|
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.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoff Coffey
|
@@ -12,174 +12,174 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activemodel
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '0'
|
24
24
|
type: :development
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '0'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rake
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '0'
|
38
38
|
type: :development
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '0'
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: rdoc
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- -
|
49
|
+
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0'
|
52
52
|
type: :development
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rspec
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
|
-
- - ~>
|
63
|
+
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '2'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- - ~>
|
70
|
+
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '2'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: minitest
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: diff-lcs
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: yard
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: redcarpet
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- -
|
126
|
+
- - ">="
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: ruby-prof
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- -
|
133
|
+
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
type: :development
|
137
137
|
prerelease: false
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- -
|
140
|
+
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: libxml-ruby
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- -
|
147
|
+
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- -
|
154
|
+
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: nokogiri
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
type: :development
|
165
165
|
prerelease: false
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- -
|
168
|
+
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: ox
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- -
|
175
|
+
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- -
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: '0'
|
185
185
|
description: Rfm lets your Ruby scripts and Rails applications talk directly to your
|
@@ -194,7 +194,7 @@ extra_rdoc_files:
|
|
194
194
|
- CHANGELOG.md
|
195
195
|
- lib/rfm/VERSION
|
196
196
|
files:
|
197
|
-
- .yardopts
|
197
|
+
- ".yardopts"
|
198
198
|
- CHANGELOG.md
|
199
199
|
- LICENSE
|
200
200
|
- README.md
|
@@ -231,24 +231,24 @@ licenses: []
|
|
231
231
|
metadata: {}
|
232
232
|
post_install_message:
|
233
233
|
rdoc_options:
|
234
|
-
- --line-numbers
|
235
|
-
- --main
|
234
|
+
- "--line-numbers"
|
235
|
+
- "--main"
|
236
236
|
- README.md
|
237
237
|
require_paths:
|
238
238
|
- lib
|
239
239
|
required_ruby_version: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- -
|
241
|
+
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- -
|
246
|
+
- - ">"
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: 1.3.1
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project:
|
251
|
-
rubygems_version: 2.
|
251
|
+
rubygems_version: 2.4.5
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Ruby to Filemaker adapter
|