wmls 0.1.15 → 0.1.16
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 +7 -0
- data/README +1 -0
- data/lib/wmls.rb +9 -11
- metadata +27 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ec984b25a48c4bb95a44242f79fa494370493175
|
4
|
+
data.tar.gz: 5e1e75fa07b6090591a63fecb9d967fad7bb4c57
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8ffd0024f831f84b77d3fbfb681550b2e13703e7d9e5ddaca79b156db8fb30a4d683df5728843f9d374e805e654b0b168bcc63723dc799876c7591a9bf3164d5
|
7
|
+
data.tar.gz: 814f754637acc7df9480a92bcd34233a28a3242c3ac8dd280303413d22b95f5e29e20453336a56aa632653c1c719f331c115847b87cdddddecfb5aada531bbee
|
data/README
CHANGED
@@ -24,6 +24,7 @@ wmls -q query_v1311/get_all_wells.xml -r https://witsml.wellstorm.com/witsml/ser
|
|
24
24
|
|
25
25
|
I've included a bunch of sample query templates originally created by Gary Masters of Energistics.
|
26
26
|
|
27
|
+
wmls files: Copyright 2012 Welstorm Development
|
27
28
|
License: Apache 2.0
|
28
29
|
|
29
30
|
History:
|
data/lib/wmls.rb
CHANGED
@@ -18,7 +18,7 @@ require 'net/http'
|
|
18
18
|
require 'net/https'
|
19
19
|
require 'uri'
|
20
20
|
require 'stringio'
|
21
|
-
require '
|
21
|
+
require 'nokogiri'
|
22
22
|
|
23
23
|
# A WITSML client library.
|
24
24
|
#
|
@@ -149,29 +149,27 @@ END
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def pretty_xml(xml_data)
|
152
|
-
|
153
|
-
doc
|
154
|
-
doc.write(s, 2)
|
155
|
-
return s
|
152
|
+
doc = Nokogiri::XML(xml_data)
|
153
|
+
return doc.to_xml
|
156
154
|
end
|
157
155
|
|
158
156
|
# parse the xml and return the singular of the root element name.
|
159
157
|
def extract_type(xml_data)
|
160
|
-
doc =
|
158
|
+
doc = Nokogiri::XML(xml_data)
|
161
159
|
plural = doc.root.name
|
162
160
|
return plural[0..plural.length-2]
|
163
161
|
end
|
164
162
|
|
165
163
|
#extract the witsml response: status_code and xml_out
|
166
164
|
def extract_response(xml_data)
|
167
|
-
doc =
|
165
|
+
doc = Nokogiri::XML(xml_data)
|
168
166
|
r = 0
|
169
167
|
x = ''
|
170
168
|
s = ''
|
171
|
-
doc.
|
172
|
-
doc.
|
173
|
-
doc.
|
174
|
-
doc.
|
169
|
+
doc.xpath('//Result').each() { |elt| r = elt.text }
|
170
|
+
doc.xpath('//XMLout').each() { |elt| x = pretty_xml(elt.text) }
|
171
|
+
doc.xpath('//CapabilitiesOut').each() { |elt| x = pretty_xml(elt.text) }
|
172
|
+
doc.xpath('//SuppMsgOut').each() { |elt| s = elt.text }
|
175
173
|
return [r.to_i,s,x];
|
176
174
|
end
|
177
175
|
|
metadata
CHANGED
@@ -1,51 +1,64 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wmls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.16
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Hugh Winkler
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
11
|
+
date: 2015-07-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
14
27
|
description: Wmls calls GetCap, GetFromStore, AddToStore, UpdateInStore, or DeleteFromStore
|
15
28
|
on a WITSML server.
|
16
|
-
email:
|
29
|
+
email: hwinkler@drillinginfo.com
|
17
30
|
executables:
|
18
31
|
- wmls
|
19
32
|
extensions: []
|
20
33
|
extra_rdoc_files: []
|
21
34
|
files:
|
22
|
-
- README
|
23
35
|
- LICENSE
|
24
|
-
-
|
36
|
+
- README
|
25
37
|
- bin/wmls
|
38
|
+
- lib/wmls.rb
|
26
39
|
homepage: https://github.com/wellstorm/wmls/
|
27
|
-
licenses:
|
40
|
+
licenses:
|
41
|
+
- Apache-2.0
|
42
|
+
metadata: {}
|
28
43
|
post_install_message:
|
29
44
|
rdoc_options: []
|
30
45
|
require_paths:
|
31
46
|
- lib
|
32
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
48
|
requirements:
|
35
|
-
- -
|
49
|
+
- - ">="
|
36
50
|
- !ruby/object:Gem::Version
|
37
51
|
version: '0'
|
38
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
53
|
requirements:
|
41
|
-
- -
|
54
|
+
- - ">="
|
42
55
|
- !ruby/object:Gem::Version
|
43
56
|
version: '0'
|
44
57
|
requirements: []
|
45
58
|
rubyforge_project:
|
46
|
-
rubygems_version:
|
59
|
+
rubygems_version: 2.4.5
|
47
60
|
signing_key:
|
48
|
-
specification_version:
|
61
|
+
specification_version: 4
|
49
62
|
summary: Calls GetCap, GetFromStore, AddToStore, UpdateInStore, or DeleteFromStore
|
50
63
|
on a WITSML server.
|
51
64
|
test_files: []
|