active_tools 0.0.33 → 0.0.34

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: 1a295e3333bd10a1c4924db044d118da719ca97b
4
- data.tar.gz: 62b7f49f7eb44381e8215c1bbff70f4e3ef4f00f
3
+ metadata.gz: 61ac99dabcb4e537d397d077f57a9f1e90303e5d
4
+ data.tar.gz: 08399e6f9aae134f98347560bf4c1ff9c13719e2
5
5
  SHA512:
6
- metadata.gz: 0c17bfb164557e05af1e5ef23ad6703b69fbfbab845c4ad9edb5af45451c8236f45366933128c61c58f92aa05daa6761c7531c89359c81bf0d7c1c53b69c383e
7
- data.tar.gz: 6d574507f65788a25aac219dd58c003b11034442e38d6b84db9c8ba6503e1abed730339d758f0671905d869adbe930fcd2b481cebfaeee036fc38cb859abe298
6
+ metadata.gz: 7002e7e85eaa2705db0dbb74f161bbf84111cf40fa755e33b7e439e3500caa2ce6656c2884d280800746a106e326df205d681760a27dd96335f897f6b8a443e1
7
+ data.tar.gz: f81067f711edc309b958bd0e08df0e0fa623762cdcc0b416e4c5af61e6249bb2d2213d357fa1b1557f6107e3a7128af8c01e55faf582dab1e634c269e12dec8a
@@ -10,6 +10,7 @@ module ActiveTools
10
10
  object_name = args.first
11
11
  passed_attr_map = options.delete(:attributes)||{}
12
12
  prefix = options.delete(:prefix)
13
+ fit = options.delete(:fit)||false
13
14
  attr_map_name = :"_valid_with_#{object_name}"
14
15
  unless respond_to?(attr_map_name)
15
16
  class_attribute attr_map_name
@@ -20,7 +21,7 @@ module ActiveTools
20
21
 
21
22
  validate(*[options]) do
22
23
  if object = send(object_name)
23
- if options[:fit] == true
24
+ if fit
24
25
  object.instance_variable_set(:@errors, ActiveTools::ActiveModel::ValidWith::FakeErrors.new(object))
25
26
  end
26
27
  if !object.valid?
@@ -1,3 +1,3 @@
1
1
  module ActiveTools
2
- VERSION = "0.0.33"
2
+ VERSION = "0.0.34"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valery Kvon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-28 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project: active_tools
128
- rubygems_version: 2.4.6
128
+ rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: ActionDispatch, ActionController, ActiveModel, ActiveRecord, ActiveSupport,