forest_liana 2.0.1 → 2.0.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: 71d2df55d54f86d4dc437fe7728932ce6b96ff0f
4
- data.tar.gz: b57ec2af007ec0f4685d16c13b768a4280289a68
3
+ metadata.gz: 454283c8971492a55f01569974efa146b9b8adc2
4
+ data.tar.gz: 972f439e41f2f6278e6c31dee4754a31c7bc734f
5
5
  SHA512:
6
- metadata.gz: 244c825c39d423ced6a59a473e12485c57247fb6e9a71f89e9ad4a354f3362abad73f4e6f12dbd751e953ac4d2a1dec2280f8b483e22afc41b99fcfe4daf6db4
7
- data.tar.gz: 51bfcbbe0eb3760321a4b55173741dcf496924d8a9a8ab806d632a1025a8d82ebb558f5040069d4770709bba4c0bb54b3d9cbb9335c0128ac6f00bc9a99a9978
6
+ metadata.gz: 3e5f995173c4f58f4f37593eee943c619b674c845551bb5972d43445ada79814dfb7d625e1eaa0a5fb6ee000b8ce99e195b17b607e76ce4e2f26e2f33d5e1914
7
+ data.tar.gz: 4756a39195e5055dd5a55b26d61d577d106586c7c27e2805408cfaf6b43bc585749d3d4f11933623df516b12304745b6114b353cc601c48e71c2583afc7c4520
@@ -13,9 +13,7 @@ module ForestLiana
13
13
 
14
14
  # NOTICE: Create the serializer in the UserSpace to avoid conflicts with
15
15
  # serializer created from integrations, actions, segments, etc.
16
- unless ForestLiana::UserSpace.const_defined?(serializer_name)
17
- ForestLiana::UserSpace.const_set(serializer_name, serializer)
18
- end
16
+ ForestLiana::UserSpace.const_set(serializer_name, serializer)
19
17
  end
20
18
 
21
19
  def self.get_serializer_name(active_record_class)
@@ -27,8 +27,7 @@ module ForestLiana
27
27
  def controller_for(active_record_class)
28
28
  controller = Class.new(ResourcesController) { }
29
29
 
30
- ForestLiana::ControllerFactory.define_controller(active_record_class,
31
- controller)
30
+ ForestLiana::ControllerFactory.define_controller(active_record_class, controller)
32
31
  controller
33
32
  end
34
33
  end
@@ -79,11 +79,11 @@ module ForestLiana
79
79
  # Monkey patch the find_serializer_class_name method to specify the
80
80
  # good serializer to use.
81
81
  ::JSONAPI::Serializer.class_eval do
82
- def self.find_serializer_class_name(obj, options)
83
- if obj.respond_to?(:jsonapi_serializer_class_name)
84
- obj.jsonapi_serializer_class_name.to_s
82
+ def self.find_serializer_class_name(record, options)
83
+ if record.respond_to?(:jsonapi_serializer_class_name)
84
+ record.jsonapi_serializer_class_name.to_s
85
85
  else
86
- ForestLiana::SerializerFactory.get_serializer_name(obj.class)
86
+ ForestLiana::SerializerFactory.get_serializer_name(record.class)
87
87
  end
88
88
  end
89
89
  end
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails