husky 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a40002f43145e23cfb43616e29a9862e167c1b20
4
- data.tar.gz: a272385bcaf0d1b59d2a094813629e5f8c065595
3
+ metadata.gz: aca4c22701d93fa574ddc7f27bbb28782e574b11
4
+ data.tar.gz: f72fa23a1fb8ffbf2ad8c7df902d5fa67b019a5f
5
5
  SHA512:
6
- metadata.gz: b8d326458a2e7e5bff59ec45e83b419ff3382b348df2e23e2ab9a5ab43c9b16da0c7ef5dff402073f7ead0b865c19d429f2edc57bb2fa57cacd7ae839d847eec
7
- data.tar.gz: f26607b08d019a4bda10417a4d4fce8a101b0e4816aad05c5942f4f1f1ad25b0570d147ee291e66a62598b60a2ad9c50b88b623756cd3143aa198f761652e241
6
+ metadata.gz: b92f873fa0a8a15f4c7999f011f06c45e7c4fa8ede668f172f862e55be997f5de89536113d8ebbceab03c50124e15d68b97a28e97082fbc19a4df67e9a0fbf97
7
+ data.tar.gz: 4cd82d9e95ebe6162ca76d554815aa154b29dcc5a50ed4634bce557c31bc9a4077db46690da2f6751170ef5d517726d576a3152c1dffc1ff37f7a32a1b76ddde
data/lib/husky/repo.rb CHANGED
@@ -65,11 +65,16 @@ module Husky
65
65
  end
66
66
 
67
67
  def find(id)
68
- entity.build(@records[id.to_i])
68
+ entity.build(get_record(id))
69
+ end
70
+
71
+ def get_record(id)
72
+ @records[id.to_i]
69
73
  end
70
74
 
71
75
  def save(object)
72
76
  object.id = @id
77
+ object.update_attributes({ id: @id })
73
78
  @records[@id] = object
74
79
  @id += 1
75
80
  entity.build(object)
data/lib/husky/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Husky
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: husky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Fiser