pinkman 0.9.4.3 → 0.9.4.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: 797683a4eb67f989dca3c3bdd663b73086ce4156
4
- data.tar.gz: 14d63f14dba4c44b97b6abfe364bf74ff99d36d4
3
+ metadata.gz: ac62f2ddbf04a2e2849c16d8ce1107896df4a643
4
+ data.tar.gz: 8391b1e3635bb16994dac4b8cd988c6075d845e7
5
5
  SHA512:
6
- metadata.gz: 4debf7d79ee461a2a1725f19c9e3714a5491dc60f2aba3edb84be0cca74819e0ad687fbc2660989434cc5d6a4cbe4db28bf468125b80e8ad0f59d4c6669c2fcf
7
- data.tar.gz: 71564174d48c0146311fa4a34ee6e13582c2577abfc2f9af50bc8807e8dc6f2913637e4ec66ee717c03edd53be4bb3a38f2e1e040bbd6005072554bdbce0600d
6
+ metadata.gz: ec0c2dcdba1f09be5442eccbc06b7035f1031647cac8dc29f201885a4da61f81ff86d14e40889fe906c118766eb36408209c7664de8e05402883886fe6d7e403
7
+ data.tar.gz: 1945ea0a4e65d82909670ea334da3b30d436e8bba254d5c785ecc4b4a86bae9669e6b93011c804383f5b54c891d3d3d3044de9066374e10cf1a016a9ccfd0247
@@ -80,8 +80,8 @@ module Pinkman
80
80
  include_all = pinkmanscope.read.include?(:all)
81
81
  model = self.class.model
82
82
  model.column_names.each {|attribute| hash[attribute] = object.send(attribute) } if include_all && model && model.methods.include?(:column_names)
83
- pinkmanscope.read.each {|attribute| hash[attribute] = object.send(attribute) if object.methods.include?(attribute)}
84
83
  pinkmanscope.read.each {|attribute| hash[attribute] = send(attribute) if self.methods.include?(attribute)}
84
+ pinkmanscope.read.each {|attribute| hash[attribute] ||= object.send(attribute) if object.methods.include?(attribute)}
85
85
  hash[:errors] = self.class.format_errors(errors) if errors.present? and errors.any?
86
86
  hash
87
87
  end
@@ -1,3 +1,3 @@
1
1
  module Pinkman
2
- VERSION = "0.9.4.3"
2
+ VERSION = "0.9.4.4"
3
3
  end
data/lib/pinkman.rb CHANGED
@@ -70,7 +70,8 @@ module Pinkman
70
70
  end
71
71
 
72
72
  def json_for scope_name, params_hash={}
73
- serialize_for(scope_name,params_hash).to_json
73
+ eval "@_json_for_#{scope_name.to_s} = serialize_for(scope_name,params_hash).to_json if not @_json_for_#{scope_name.to_s} or changed?"
74
+ eval "@_json_for_#{scope_name.to_s}"
74
75
  end
75
76
 
76
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinkman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4.3
4
+ version: 0.9.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agilso Oliveira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-12 00:00:00.000000000 Z
11
+ date: 2017-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler