grape-client 0.3.1 → 0.3.2

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: f778c9c9490d2a4ca55036ac634f6d2c756224f5
4
- data.tar.gz: 374ef037944a5e988a6479b297d2eb02f249b225
3
+ metadata.gz: 4ceaceb46fa4a688ef855c6fb4f93edbdce4eb91
4
+ data.tar.gz: fd74c6a7c64947991f1c18c9f008300af3cd74bf
5
5
  SHA512:
6
- metadata.gz: 53b9f9bbd6d40bb80db727c4a004705f9f485dda500a86850d18ec6789a86c4fdb0604d31451e7c350cb584c381a491d088fcc39294f5a33154cc6ba1644231a
7
- data.tar.gz: 4cf5927a28c13e720098fb23bf7d5537c3710d607d8c8cb8f274334a9a8a54b3cf281a508eb2204a7d3b57d1014ac0ed08c9abb2c7693e8df57e78744c1f88de
6
+ metadata.gz: d2af71e884d0235bcf3ca41c22147b1e13445ce843ec1bb37280709918a83956c3446ab8bd826c71f1fd85deb352fd4fca18187d41f78e1a6e621f79095622bd
7
+ data.tar.gz: f36fcae56089adfe5402349dc60a3a4e5f20f574ed7fc625421d9ef0161c3a3e6b6621184e1fc034cb8d506320d202d9f30013f4a5a92706de0bd17e75806e21
@@ -9,14 +9,16 @@ module GrapeClient
9
9
  include BelongsTo
10
10
  include HasMany
11
11
 
12
- mattr_accessor :attributes
13
- mattr_accessor :site, :user, :password, :prefix
14
-
15
- self.attributes = []
16
- self.site = GrapeClient.configuration.site
17
- self.user = GrapeClient.configuration.user
18
- self.password = GrapeClient.configuration.password
19
- self.prefix = GrapeClient.configuration.prefix
12
+ attr_accessor :attributes
13
+ attr_accessor :site, :user, :password, :prefix
14
+
15
+ def inherited(child)
16
+ child.attributes = attributes.try(:dup) || []
17
+ child.site = GrapeClient.configuration.site
18
+ child.user = GrapeClient.configuration.user
19
+ child.password = GrapeClient.configuration.password
20
+ child.prefix = GrapeClient.configuration.prefix
21
+ end
20
22
 
21
23
  def attr_accessor(*names)
22
24
  names.each do |name|
@@ -1,3 +1,3 @@
1
1
  module GrapeClient
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silchenko