ns_connector 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.9.2"
4
3
  - "1.9.3"
5
4
  - "2.0.0"
6
5
  # - jruby-19mode TODO these are probably broken. Look over threading code.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
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
- sublists = Hash[@sublist_store.map {|sublist_id, objects|
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 => sublists,
142
+ :sublists => sublist_data,
143
143
  )
144
144
 
145
145
  # If we got this far, we're probably in NetSuite
@@ -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.15
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: 828425202057504674
235
+ hash: 380619574366234658
236
236
  required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  none: false
238
238
  requirements: