boomi-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/boomi-ruby.gemspec +69 -0
- data/lib/boomi/boomi.rb +6 -2
- metadata +17 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/boomi-ruby.gemspec
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "boomi-ruby"
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Charles Cooke"]
|
12
|
+
s.date = "2013-06-25"
|
13
|
+
s.description = "Supports the Boomi REST Webservice"
|
14
|
+
s.email = "charles@coupa.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.rdoc",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"boomi-ruby.gemspec",
|
28
|
+
"lib/boomi-ruby.rb",
|
29
|
+
"lib/boomi/boomi.rb",
|
30
|
+
"test/helper.rb",
|
31
|
+
"test/test_boomi-ruby.rb"
|
32
|
+
]
|
33
|
+
s.homepage = "http://github.com/coupacooke/boomi-ruby"
|
34
|
+
s.licenses = ["MIT"]
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
s.rubygems_version = "1.8.11"
|
37
|
+
s.summary = "Ruby gem for Boomi webservices"
|
38
|
+
|
39
|
+
if s.respond_to? :specification_version then
|
40
|
+
s.specification_version = 3
|
41
|
+
|
42
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
43
|
+
s.add_runtime_dependency(%q<rest-client>, ["~> 1.6.0"])
|
44
|
+
s.add_runtime_dependency(%q<xml-simple>, ["~> 1.0.0"])
|
45
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
46
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
47
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
49
|
+
s.add_development_dependency(%q<rcov>, ["= 0.9.11"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<rest-client>, ["~> 1.6.0"])
|
52
|
+
s.add_dependency(%q<xml-simple>, ["~> 1.0.0"])
|
53
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
55
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
56
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
57
|
+
s.add_dependency(%q<rcov>, ["= 0.9.11"])
|
58
|
+
end
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<rest-client>, ["~> 1.6.0"])
|
61
|
+
s.add_dependency(%q<xml-simple>, ["~> 1.0.0"])
|
62
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
63
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
64
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
65
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
66
|
+
s.add_dependency(%q<rcov>, ["= 0.9.11"])
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
data/lib/boomi/boomi.rb
CHANGED
@@ -72,7 +72,7 @@ EOS
|
|
72
72
|
operator ||= 'EQUALS'
|
73
73
|
|
74
74
|
"<nestedExpression operator='#{operator}' property='#{field}' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='SimpleExpression'>
|
75
|
-
<argument>#{value.is_a?(Time) ? value
|
75
|
+
<argument>#{value.is_a?(Time) ? boomi_time(value) : value}</argument>
|
76
76
|
</nestedExpression>"
|
77
77
|
end.join('\n')
|
78
78
|
}
|
@@ -82,6 +82,10 @@ EOS
|
|
82
82
|
EXPR
|
83
83
|
end
|
84
84
|
|
85
|
+
def boomi_time(t)
|
86
|
+
t.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
|
87
|
+
end
|
88
|
+
|
85
89
|
def get(url)
|
86
90
|
contents = @resource[url].get
|
87
91
|
parsed = parse(contents)
|
@@ -116,7 +120,7 @@ EXPR
|
|
116
120
|
end
|
117
121
|
|
118
122
|
def parse(content)
|
119
|
-
return if content.
|
123
|
+
return if content.empty?
|
120
124
|
XmlSimple.xml_in(content)
|
121
125
|
end
|
122
126
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boomi-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-06-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
16
|
-
requirement: &
|
16
|
+
requirement: &76188340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.6.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *76188340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: xml-simple
|
27
|
-
requirement: &
|
27
|
+
requirement: &76187800 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *76187800
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: shoulda
|
38
|
-
requirement: &
|
38
|
+
requirement: &76186160 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *76186160
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rdoc
|
49
|
-
requirement: &
|
49
|
+
requirement: &76202420 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.12'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *76202420
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &76200150 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *76200150
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: jeweler
|
71
|
-
requirement: &
|
71
|
+
requirement: &76198470 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.8.4
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *76198470
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: rcov
|
82
|
-
requirement: &
|
82
|
+
requirement: &76196320 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - =
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 0.9.11
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *76196320
|
91
91
|
description: Supports the Boomi REST Webservice
|
92
92
|
email: charles@coupa.com
|
93
93
|
executables: []
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- README.rdoc
|
104
104
|
- Rakefile
|
105
105
|
- VERSION
|
106
|
+
- boomi-ruby.gemspec
|
106
107
|
- lib/boomi-ruby.rb
|
107
108
|
- lib/boomi/boomi.rb
|
108
109
|
- test/helper.rb
|
@@ -122,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
123
|
version: '0'
|
123
124
|
segments:
|
124
125
|
- 0
|
125
|
-
hash:
|
126
|
+
hash: -262214157
|
126
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
128
|
none: false
|
128
129
|
requirements:
|