ns_connector 0.0.15 → 0.0.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.
- data/.travis.yml +0 -1
- data/VERSION +1 -1
- data/lib/ns_connector/resource.rb +2 -2
- data/spec/resource_spec.rb +5 -4
- metadata +2 -2
data/.travis.yml
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.16
|
@@ -128,7 +128,7 @@ class NSConnector::Resource
|
|
128
128
|
# Returns:: true
|
129
129
|
def save!
|
130
130
|
# Convert all of our sublist objects to hashes
|
131
|
-
|
131
|
+
sublist_data = Hash[@sublist_store.map {|sublist_id, objects|
|
132
132
|
[sublist_id, objects.map {|object|
|
133
133
|
object.to_hash
|
134
134
|
}]
|
@@ -139,7 +139,7 @@ class NSConnector::Resource
|
|
139
139
|
:type_id => type_id,
|
140
140
|
:fields => fields,
|
141
141
|
:data => @store,
|
142
|
-
:sublists =>
|
142
|
+
:sublists => sublist_data,
|
143
143
|
)
|
144
144
|
|
145
145
|
# If we got this far, we're probably in NetSuite
|
data/spec/resource_spec.rb
CHANGED
@@ -91,10 +91,6 @@ describe PseudoResource do
|
|
91
91
|
@p.notes << note_item1
|
92
92
|
@p.notes << note_item2
|
93
93
|
|
94
|
-
# Replace them, backways to test.
|
95
|
-
SubList.should_receive(:save!).
|
96
|
-
and_return([note_item2, note_item1])
|
97
|
-
|
98
94
|
Restlet.should_receive(:execute!).
|
99
95
|
with({
|
100
96
|
:action => 'create',
|
@@ -111,6 +107,11 @@ describe PseudoResource do
|
|
111
107
|
once.
|
112
108
|
and_return(ns_reply)
|
113
109
|
|
110
|
+
# Replace them, backways to test.
|
111
|
+
SubList.should_receive(:save!).
|
112
|
+
with([note_item1, note_item2], @p, :notes, [:line]).
|
113
|
+
and_return([note_item2, note_item1])
|
114
|
+
|
114
115
|
expect(@p.save!).to eql(true)
|
115
116
|
|
116
117
|
expect(@p.firstname).to eql('Name')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ns_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -232,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
232
|
version: '0'
|
233
233
|
segments:
|
234
234
|
- 0
|
235
|
-
hash:
|
235
|
+
hash: 380619574366234658
|
236
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
237
|
none: false
|
238
238
|
requirements:
|