simple_ams 0.1.3 → 0.1.4

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: 7466c8f4a93d634a5694e11369c829b5cd125e2f
4
- data.tar.gz: 40ca860c3304907242ed9b357b1d0f2663faf977
3
+ metadata.gz: 187d317a579cf83a439386c26889aa8d83d8b4fd
4
+ data.tar.gz: 3b9c96d21261064d84b17469e6c641d6ffdd6de9
5
5
  SHA512:
6
- metadata.gz: 2ec2ba04017b4db14d5178dcc6f9ac11b1a50035a5971bd8a8b6b3c1dd1aebdae307d953078a7fd498fb32f2f689f5658adc5ce909ed41bc7c60519be9762efc
7
- data.tar.gz: ddd1b7ebfc152dd071a19f5cb23f1ce154aee16c33536d8cb4ad997376a855743d208eceef23b18d5ce6a64d79d53e9a03f6e2d1e1bc53f62c3499aeea951796
6
+ metadata.gz: 256cddefd11ab9bddfca80542ab66df3273c6b769e3e1214c1bd8c7de08bf57b75c3bdc8ced67423b1904d64c3f5355dccbec1733a693585e2ac27c99b84d467
7
+ data.tar.gz: 0bb37d2b577647e1dc2b83bc9fe24b370204f8a7cd58a30078e2c13d951f985d1233559d56bd34c0b2f4dfc954c3324684255d79dc74eab16ce88a275785f2ac
data/README.md CHANGED
@@ -59,7 +59,7 @@ class UserSerializer
59
59
  link :root, '/api/v1/', rel: :user
60
60
  #link values can be dynamic as well through lambdas
61
61
  #lambdas take arguments the object to be serialized and the instantiated serializer
62
- link :posts, ->(obj, s) { "/api/v1/users/#{obj.id}/posts/" }, rel: :user
62
+ link :posts, ->(obj, s) { s.api_v1_user_followers_path(user_id: obj.id) }, rel: :user
63
63
  #if you also need dynamic options, you can return an array from the lambda
64
64
  link :followers, ->(obj, s) { ["/api/v1/users/#{obj.id}/followers/", rel: obj.type] }
65
65
 
@@ -122,9 +122,9 @@ class SimpleAMS::Document
122
122
  allowed_options: serializer_for(resource).options
123
123
  })
124
124
  else
125
- resource_options.with_resource(resource)
126
- end
127
- =begin
125
+ # resource_options.with_resource(resource)
126
+ # end
127
+ # we need to optimize that using tracked properties
128
128
  SimpleAMS::Options.new(resource, {
129
129
  injected_options: resource_options.injected_options.merge({
130
130
  serializer: serializer_for(resource)
@@ -132,7 +132,6 @@ class SimpleAMS::Document
132
132
  allowed_options: serializer_for(resource).options
133
133
  })
134
134
  end
135
- =end
136
135
  end
137
136
 
138
137
  def serializer_for(resource)
@@ -1,3 +1,3 @@
1
1
  module SimpleAMS
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_ams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filippos Vasilakis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler