active_remote 1.5.6 → 1.5.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10241ee6e9259fc216b773c0f1ec69ef84cde67b
4
- data.tar.gz: 382fab2d6de193a861048b2a92c4b5043af7e932
3
+ metadata.gz: bc68466da59e6a382402baff2a19f03cd2db4c2b
4
+ data.tar.gz: f0964eebcca0b98d70d26c81b5cad9f782d6f1fe
5
5
  SHA512:
6
- metadata.gz: 01ef2c0851f1aa1c85929da5c52d69ef30f9b759bada2cac178346e3f220acecc8f3fb0f7d0d761cb52ffe37c6a87a3c96bb0043d6e27a83d06653e696a0138a
7
- data.tar.gz: ff1086e1da57f95b78d59d612db5983d73d0fc109e70494def2da62254b8c1aef71d524d6bb434a8d42a399ba5555465a97267ebc1ffa71fda967d51e9451298
6
+ metadata.gz: e8a23f3c600658c81f94fef43217fa9369b574a0b42a166e410c92d83425dceab6c7cbe93ed9592be7cffd73c1e720fb416aa5e75caef09958b0a76f11713f4b
7
+ data.tar.gz: 7065b8f5b80f9d74d3cd6a9bc3158f18a00f3115133bfe6a326fde502982cb93e55f331d10a7ce6fb37abdfb66a56657c061ecd3867027bdce9b578f40edc29f
@@ -125,7 +125,9 @@ module ActiveRemote
125
125
  #
126
126
  def reload
127
127
  _active_remote_search(:guid => self.guid)
128
- assign_attributes(last_response.to_hash)
128
+
129
+ fresh_object = self.class.new(last_response.to_hash)
130
+ @attributes.update(fresh_object.instance_variable_get('@attributes'))
129
131
  end
130
132
  end
131
133
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRemote
2
- VERSION = "1.5.6"
2
+ VERSION = "1.5.7"
3
3
  end
@@ -76,7 +76,7 @@ describe ActiveRemote::Search do
76
76
 
77
77
  describe "#reload" do
78
78
  let(:args) { { :guid => 'foo' } }
79
- let(:attributes) { HashWithIndifferentAccess.new }
79
+ let(:attributes) { HashWithIndifferentAccess.new(:guid => 'foo', :name => 'bar') }
80
80
 
81
81
  subject { Tag.new(args) }
82
82
 
@@ -91,8 +91,8 @@ describe ActiveRemote::Search do
91
91
  end
92
92
 
93
93
  it "assigns new attributes" do
94
- subject.should_receive(:assign_attributes).with(attributes)
95
94
  subject.reload
95
+ subject.attributes.should eq attributes
96
96
  end
97
97
  end
98
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-14 00:00:00.000000000 Z
11
+ date: 2013-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr