pinkman 1.4.3 → 1.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
  SHA256:
3
- metadata.gz: 291782b4b04a02a359d5cecaccf2c67b3c4d2c3f2b269e6bb607d949e6ecd180
4
- data.tar.gz: 58a64ecaf2dab1df27e8d1d3d07563efcec47cd7e318fc38b2b9c52302cdecc4
3
+ metadata.gz: cdbcf82be04a4c52b12aa2617e76bfd3283dbac27d249439da178d895884e111
4
+ data.tar.gz: 0c30dfe1bf24107cd193a2f1fd03642e8408260ac7234e8746535d8a16e91145
5
5
  SHA512:
6
- metadata.gz: 609f4254349dbcc6b21a164d7cfd4c998d92daa64df054ea20318f977feaa759bb0a128627c1f2eb6070a7dea2d4eb837e5d6a368ec43135185e2e416203a3ee
7
- data.tar.gz: 3715ca1976c898dc5bd8151dc954ab9bb453ff99e224fd7b158ebdbad99ebda66238a3251b8f58145a29ec9e5af88192be2c953e1067b669fbb2878cfa6bd3c6
6
+ metadata.gz: 73346a8d0d1be3a24d9d371ea204aee7032de3dee7fd10affd86ac111779fcc93d68c0a11ba45bb7c91d3e5733b197f16a42a3d178aa6a6ff9b03434a3ba2bc0
7
+ data.tar.gz: 7f07ce461d183d9d118fc9123eb0638d63480a6cc9a91e7faf818274d7bf992a3bdc47fddc4727522b5ce3c4608a522434a85632e805ce0b02b26a3313c47ee6
@@ -16,7 +16,7 @@ module Pinkman
16
16
  self
17
17
  end
18
18
 
19
- self.root = false
19
+ # self.root = false
20
20
  def self.table_name
21
21
  model.table_name
22
22
  end
@@ -109,15 +109,19 @@ module Pinkman
109
109
  def attributes *args
110
110
  hash = super(*args)
111
111
  if scope
112
- pinkmanscope = self.class.scope(scope)
113
- include_all = pinkmanscope.read.include?(:all)
114
- model = self.class.model
115
- model.column_names.each {|attribute| hash[attribute] = object.send(attribute) } if include_all && model && model.methods.include?(:column_names)
116
- pinkmanscope.read.each {|attribute| hash[attribute] = send(attribute) if self.methods.include?(attribute)}
117
- pinkmanscope.read.each {|attribute| hash[attribute] ||= object.send(attribute) if object.methods.include?(attribute)}
118
- pinkmanscope.read_ghost.each {|attribute| begin hash[attribute] ||= object.send(attribute) rescue nil end }
119
- hash[:destroyed] = true if object.destroyed?
120
- hash[:errors] = self.class.format_errors(errors) if errors.present? and errors.any?
112
+ begin
113
+ pinkmanscope = self.class.scope(scope)
114
+ include_all = pinkmanscope.read.include?(:all)
115
+ model = self.class.model
116
+ model.column_names.each {|attribute| hash[attribute] = object.send(attribute) } if include_all && model && model.methods.include?(:column_names)
117
+ pinkmanscope.read.each {|attribute| hash[attribute] = send(attribute) if self.methods.include?(attribute)}
118
+ pinkmanscope.read.each {|attribute| hash[attribute] ||= object.send(attribute) if object.methods.include?(attribute)}
119
+ pinkmanscope.read_ghost.each {|attribute| begin hash[attribute] ||= object.send(attribute) rescue nil end }
120
+ hash[:destroyed] = true if object.destroyed?
121
+ hash[:errors] = self.class.format_errors(errors) if errors.present? and errors.any?
122
+ rescue
123
+ nil
124
+ end
121
125
  hash
122
126
  end
123
127
  end
@@ -1,3 +1,3 @@
1
1
  module Pinkman
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
  end
@@ -43,6 +43,6 @@ Gem::Specification.new do |spec|
43
43
  spec.add_dependency 'rails'
44
44
  spec.add_dependency 'activerecord'
45
45
  spec.add_dependency 'jquery-rails'
46
- spec.add_dependency 'active_model_serializers', '~> 0.9.0'
46
+ spec.add_dependency 'active_model_serializers', '~> 0.10.0'
47
47
 
48
48
  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: 1.4.3
4
+ version: 1.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: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2019-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.9.0
173
+ version: 0.10.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.9.0
180
+ version: 0.10.0
181
181
  description: 'Pinkman: a new way to orchestrate javascript in Rails.'
182
182
  email:
183
183
  - agilso.b@gmail.com