beyond_the_api 0.0.2 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +11 -0
- data/config.reek +13 -17
- data/lib/beyond_the_api.rb +1 -0
- data/lib/beyond_the_api/base.rb +9 -0
- data/lib/beyond_the_api/index_render_helpers.rb +1 -1
- data/lib/beyond_the_api/render_helpers.rb +1 -0
- data/lib/beyond_the_api/show_render_helpers.rb +1 -0
- data/lib/beyond_the_api/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 923e632d6a7bda509e55b4495898a49ccfe4e00f
|
4
|
+
data.tar.gz: f6f11947c64646eac64ab5baf11260f34a006cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01207481508bf4353a2d9b835a962565de30123fa3fc1271b2f5d4f7df6246d73cd260f847a6d9fa4be04fc038b95ba363ac55ee40073cd5c24561fa8e7fd3d
|
7
|
+
data.tar.gz: a98856bc9f7f6fd0dbfab5e977795386d71624a447692bcdea0053cbf8663ad7c57310f49c9fa19d45ca6be35787951e2fc9f3a97722fb14dfba5a33981c69d1
|
data/changelog.md
ADDED
data/config.reek
CHANGED
@@ -8,29 +8,25 @@ UnusedPrivateMethod:
|
|
8
8
|
NilCheck:
|
9
9
|
enabled: false
|
10
10
|
|
11
|
-
"
|
12
|
-
TooManyStatements:
|
13
|
-
max_statements: 10
|
14
|
-
NestedIterators:
|
15
|
-
max_allowed_nesting: 2
|
16
|
-
UnusedPrivateMethod:
|
17
|
-
enabled: false
|
18
|
-
UncommunicativeModuleName:
|
19
|
-
enabled: false
|
20
|
-
InstanceVariableAssumption:
|
21
|
-
enabled: false
|
22
|
-
ManualDispatch:
|
23
|
-
enabled: false
|
24
|
-
"app/helpers":
|
11
|
+
"lib/beyond_the_api":
|
25
12
|
UtilityFunction:
|
26
13
|
enabled: false
|
27
14
|
FeatureEnvy:
|
28
15
|
enabled: false
|
29
16
|
ManualDispatch:
|
30
17
|
enabled: false
|
31
|
-
|
32
|
-
|
33
|
-
|
18
|
+
TooManyStatements:
|
19
|
+
max_statements: 10
|
20
|
+
NestedIterators:
|
21
|
+
max_allowed_nesting: 2
|
22
|
+
UnusedPrivateMethod:
|
23
|
+
enabled: false
|
24
|
+
UncommunicativeModuleName:
|
25
|
+
enabled: false
|
26
|
+
InstanceVariableAssumption:
|
27
|
+
enabled: false
|
28
|
+
ManualDispatch:
|
29
|
+
enabled: false
|
34
30
|
"app/serializer":
|
35
31
|
RepeatedConditional:
|
36
32
|
enabled: false
|
data/lib/beyond_the_api.rb
CHANGED
@@ -20,7 +20,7 @@ module BeyondTheApi
|
|
20
20
|
params_to_render = { json: @list, meta: @meta, current_user: current_user }
|
21
21
|
serializer = options[:serializer]
|
22
22
|
params_to_render[:each_serializer] = serializer if serializer
|
23
|
-
params_to_render
|
23
|
+
add_fields_and_include_to_render_options(params_to_render)
|
24
24
|
end
|
25
25
|
|
26
26
|
def render_json_list_enum(list, name, options = {})
|
@@ -3,6 +3,7 @@ module BeyondTheApi
|
|
3
3
|
def render_json_serializer(object, options = {})
|
4
4
|
render_params = { json: object, current_user: current_user, meta: @meta,
|
5
5
|
status: (options[:status] || :ok) }
|
6
|
+
add_fields_and_include_to_render_options(render_params)
|
6
7
|
|
7
8
|
render render_params.merge(render_json_serializer_aditional_params(options))
|
8
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_the_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Weckl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -113,8 +113,10 @@ files:
|
|
113
113
|
- LICENSE.txt
|
114
114
|
- README.md
|
115
115
|
- beyond_the_api.gemspec
|
116
|
+
- changelog.md
|
116
117
|
- config.reek
|
117
118
|
- lib/beyond_the_api.rb
|
119
|
+
- lib/beyond_the_api/base.rb
|
118
120
|
- lib/beyond_the_api/index_render_helpers.rb
|
119
121
|
- lib/beyond_the_api/render_helpers.rb
|
120
122
|
- lib/beyond_the_api/show_render_helpers.rb
|