lardawge-rfm 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2007 Geoff Coffey
3
+ Copyright (c) 2007 Six Fried Rice, LLC and Mufaddal Khumr
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.rdoc CHANGED
@@ -8,6 +8,8 @@ Other lead contributors:
8
8
  - Atsushi Matsuo was an early Rfm tester, and provided outstanding feedback, critical code fixes, and a lot of web exposure.
9
9
  - Jesse Antunes helped ensure that Rfm is stable and functional.
10
10
 
11
+ Rdoc location: http://rdoc.info/projects/lardawge/rfm
12
+
11
13
  == Installation
12
14
 
13
15
  Run the following if you haven't already:
@@ -25,6 +27,7 @@ Once the gem is installed, you can use rfm in your ruby scripts by requiring it:
25
27
 
26
28
  == Connecting
27
29
 
30
+ IMPORTANT:SSL and Certificate verification are on by default. Please see Server#new in rdocs for explanation and setup.
28
31
  You connect with the Rfm::Server object. This little buddy will be your window into FileMaker data.
29
32
 
30
33
  require 'rfm/rfm'
@@ -32,7 +35,8 @@ You connect with the Rfm::Server object. This little buddy will be your window i
32
35
  my_server = Rfm::Server.new(
33
36
  :host => 'myservername',
34
37
  :username => 'user',
35
- :password => 'pw'
38
+ :password => 'pw',
39
+ :ssl => false
36
40
  )
37
41
 
38
42
  if your web publishing engine runs on a port other than 80, you can provide the port number as well:
@@ -41,7 +45,8 @@ if your web publishing engine runs on a port other than 80, you can provide the
41
45
  :host => 'myservername',
42
46
  :username => 'user',
43
47
  :password => 'pw',
44
- :port => 8080
48
+ :port => 8080,
49
+ :ssl => false
45
50
  )
46
51
 
47
52
  == Databases and Layouts
@@ -242,4 +247,4 @@ These options will change in the future. They're only there now as a quick-easy
242
247
 
243
248
  == Copyright
244
249
 
245
- Copyright (c) 2007 Geoff Coffey. See LICENSE for details.
250
+ Copyright (c) 2007 Six Fried Rice, LLC and Mufaddal Khumr. See LICENSE for details.
data/lib/rfm_command.rb CHANGED
@@ -53,7 +53,7 @@ module Rfm
53
53
  # In addition to the +db+ attribute, Server has a few other useful attributes:
54
54
  #
55
55
  # * *host_name* is the host name this server points to
56
- # * *post* is the port number this server communicates on
56
+ # * *port* is the port number this server communicates on
57
57
  # * *state* is a hash of all server options used to initialize this server
58
58
 
59
59
  class Server
@@ -63,7 +63,7 @@ module Rfm
63
63
  #
64
64
  # Example to turn off SSL:
65
65
  #
66
- # response = myServer.do_action(
66
+ # response = myServer.do_action(
67
67
  # :host => 'localhost',
68
68
  # :account_name => 'sample',
69
69
  # :password => '12345',
@@ -72,7 +72,7 @@ module Rfm
72
72
  #
73
73
  # Example using SSL without *root_cert*:
74
74
  #
75
- # response = myServer.do_action(
75
+ # response = myServer.do_action(
76
76
  # :host => 'localhost',
77
77
  # :account_name => 'sample',
78
78
  # :password => '12345',
@@ -81,7 +81,7 @@ module Rfm
81
81
  #
82
82
  # Example using SSL with *root_cert* at file root:
83
83
  #
84
- # response = myServer.do_action(
84
+ # response = myServer.do_action(
85
85
  # :host => 'localhost',
86
86
  # :account_name => 'sample',
87
87
  # :password => '12345',
@@ -90,7 +90,7 @@ module Rfm
90
90
  #
91
91
  # Example using SSL with *root_cert* specifying *root_cert_path*:
92
92
  #
93
- # response = myServer.do_action(
93
+ # response = myServer.do_action(
94
94
  # :host => 'localhost',
95
95
  # :account_name => 'sample',
96
96
  # :password => '12345',
@@ -108,19 +108,6 @@ module Rfm
108
108
  #
109
109
  # * *port* the port number the WPE is listening no (defaults to 80 unless *ssl* +true+ which sets it to 443)
110
110
  #
111
- # * *ssl* +false+ if you want to turn SSL (HTTPS) off when connecting to connect to FileMaker (default is +true+)
112
- #
113
- # If you have SSL on and want
114
- # * *root_cert* +false+ if you do not want to verify your SSL session (default is +true+).
115
- # You will want to turn this off if you are using a self signed certificate and do not have a certificate authority cert file.
116
- # If you choose this option you will need to provide a cert *root_cert_name* and *root_cert_path* (if not in root directory).
117
- #
118
- # * *root_cert_name* name of pem file for certificate verification (Root cert from certificate authority who issued certificate.
119
- # If self signed certificate do not use this option!!). You can download the entire bundle of CA Root Certificates
120
- # from http://curl.haxx.se/ca/cacert.pem. Place the pem file in config directory.
121
- #
122
- # * *root_cert_path* path to cert file. (defaults to '/' if no path given)
123
- #
124
111
  # * *account_name* the default account name to log in to databases with (you can also supply a
125
112
  # account name on a per-database basis if necessary)
126
113
  #
@@ -140,6 +127,22 @@ module Rfm
140
127
  # * *raise_on_401* although RFM raises error when FileMaker returns error responses, it typically
141
128
  # ignores FileMaker's 401 error (no records found) and returns an empty record set instead; if you
142
129
  # prefer a raised error when a find produces no errors, set this option to +true+
130
+ #
131
+ #SSL Options:
132
+ #
133
+ # * *ssl* +false+ if you want to turn SSL (HTTPS) off when connecting to connect to FileMaker (default is +true+)
134
+ #
135
+ # If you are using SSL on and want to verify the certificate use the following options:
136
+ #
137
+ # * *root_cert* +false+ if you do not want to verify your SSL session (default is +true+).
138
+ # You will want to turn this off if you are using a self signed certificate and do not have a certificate authority cert file.
139
+ # If you choose this option you will need to provide a cert *root_cert_name* and *root_cert_path* (if not in root directory).
140
+ #
141
+ # * *root_cert_name* name of pem file for certificate verification (Root cert from certificate authority who issued certificate.
142
+ # If self signed certificate do not use this option!!). You can download the entire bundle of CA Root Certificates
143
+ # from http://curl.haxx.se/ca/cacert.pem. Place the pem file in config directory.
144
+ #
145
+ # * *root_cert_path* path to cert file. (defaults to '/' if no path given)
143
146
 
144
147
  def initialize(options)
145
148
  @state = {
data/lib/rfm_result.rb CHANGED
@@ -227,8 +227,8 @@ module Rfm::Result
227
227
  # Initializes a Record object. You really really never need to do this yourself. Instead, get your records
228
228
  # from a ResultSet object.
229
229
  def initialize(row_element, resultset, fields, layout, portal=nil)
230
- @record_id = row_element.attributes['record-id']
231
- @mod_id = row_element.attributes['mod-id']
230
+ @record_id = row_element['record-id']
231
+ @mod_id = row_element['mod-id']
232
232
  @mods = {}
233
233
  @resultset = resultset
234
234
  @layout = layout
@@ -236,7 +236,7 @@ module Rfm::Result
236
236
  @loaded = false
237
237
 
238
238
  row_element.search('field').each do |field|
239
- field_name = field.attributes['name']
239
+ field_name = field['name']
240
240
  field_name.sub!(Regexp.new(portal + '::'), '') if portal
241
241
  datum = []
242
242
  field.search('data').each do |x|
@@ -253,7 +253,7 @@ module Rfm::Result
253
253
 
254
254
  @portals = Rfm::Util::CaseInsensitiveHash.new
255
255
  row_element.search('relatedset').each do |relatedset|
256
- table = relatedset.attributes['table']
256
+ table = relatedset['table']
257
257
  records = []
258
258
  relatedset.search('record').each do |record|
259
259
  records << Record.new(record, @resultset, @resultset.portals[table], @layout, table)
@@ -395,11 +395,11 @@ module Rfm::Result
395
395
  # ResultSet::fields
396
396
  def initialize(result_set, field)
397
397
  @result_set = result_set
398
- @name = field.attributes['name']
399
- @result = field.attributes['result']
400
- @type = field.attributes['type']
401
- @max_repeats = field.attributes['max-repeats']
402
- @global = field.attributes['global']
398
+ @name = field['name']
399
+ @result = field['result']
400
+ @type = field['type']
401
+ @max_repeats = field['max-repeats']
402
+ @global = field['global']
403
403
 
404
404
  @loaded = false
405
405
  end
@@ -428,6 +428,8 @@ module Rfm::Result
428
428
  return DateTime.strptime(value, @result_set.timestamp_format)
429
429
  when "container"
430
430
  return URI.parse("#{@result_set.server.scheme}://#{@result_set.server.host_name}:#{@result_set.server.port}#{value}")
431
+ else
432
+ return nil
431
433
  end
432
434
  end
433
435
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lardawge-rfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Coffey
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-05-29 00:00:00 -07:00
15
+ date: 2009-08-11 00:00:00 -07:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -45,9 +45,12 @@ files:
45
45
  - README.rdoc
46
46
  has_rdoc: false
47
47
  homepage: http://sixfriedrice.com/wp/products/rfm/
48
+ licenses:
48
49
  post_install_message:
49
50
  rdoc_options:
50
- - --charset=UTF-8
51
+ - --line-numbers
52
+ - --main
53
+ - README.rdoc
51
54
  require_paths:
52
55
  - lib
53
56
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -65,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
68
  requirements: []
66
69
 
67
70
  rubyforge_project:
68
- rubygems_version: 1.2.0
71
+ rubygems_version: 1.3.5
69
72
  signing_key:
70
73
  specification_version: 3
71
74
  summary: FileMaker to Ruby adapter