fanforce-validations 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTc1NzViYTE3Y2Y1ZGExYzEzM2M5ZWNmNmVmZjY1YWRiMjNkOTViNw==
4
+ ZjA1NmNjZmQ3OGEzMzZhMTYwMjgwYTdiYThkZDY5NDFlNmI0NGE0Yg==
5
5
  data.tar.gz: !binary |-
6
- YjRiNGUyMDU3YjczNmIxZDc4MGNhNGFhNzBlMzNiODdkNDQ0NDZmOQ==
6
+ YzUwMmVkNDU5YTVkOGQyN2FkM2ZlNWUxYzIxMzRhM2M1NmU3MzllOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTdjZDU1OTIyYjU2YWZlOWI2Y2I0MDdiZmJkODUyZDc1MDA0OTBjYjUyZGE3
10
- NzFiYmQxMTkxZWFjM2M3MjBhOGY2OWVhYjQ2NzFiYWQ1ZGY0YjhmZmExOTJh
11
- MjIzYmJmMDE0NDFkY2M2ZGQ3ZDQ5ZTAwMDk4NmE2MTgxNzgyZGQ=
9
+ YjA3ZDAyZmVlNjgwNjRhMmE4MzBiMTE2Mzk3MWI4ZGM3ODhkMjMyZTFkM2Rk
10
+ ZmY5YmJiMzM3YzE1NWEwYjNmODcyMDE5NzhhNGExZjc1NTMxOTJmYTg5MjJh
11
+ OTlkN2UyMmE3ZDQ0YWE3YWI4MjMwMDdmODE3ZGRjNjZkYjdiMWE=
12
12
  data.tar.gz: !binary |-
13
- YzIwMDk2OWYzYjMxYzdkZjgwMTJlMDFmZGY5OTFiNGEzZmU1ODFiYWUzNWI1
14
- OTYxN2Q4ZWJmMTMzMzUyN2RmNzZjMjk5ZDUzMDBlNDJkOTM4M2IyM2QzZWMy
15
- ZTYxYjllMjc5N2U3ODQ4MzY2OGQ0YzhkYmRlZDdlMWIwOWUxMWE=
13
+ MmUwYjc0ODFhZGNlMjAyM2MxNWM2ZTVkYWFkMmYxZTdjMjc1ZmJkNjkzZTFj
14
+ YmIxNjBlYzExYjVkNDU2OTllMWY2ZTRkOWNiMTI5YWIyZWIyNTQzYmQwNjNk
15
+ MzY5MDIyOGI1NjRmZTA2MWZmNzE2YWVlNzE2MjUzNDQ1MzZiOTk=
@@ -72,21 +72,6 @@ module Fanforce::Validations
72
72
  raise_validation_errors(opts, errors, Fanforce::Error::RequestFailed)
73
73
  end
74
74
 
75
- def validates_format_of_external_id(*args)
76
- _external_id = args.first
77
- opts = extract_options!(args).merge(:field => :_external_id)
78
- params = extract_validation_params(opts)
79
-
80
- if _external_id.to_s.include?('/')
81
- opts[:message] = '_external_id contains one or more forward slashes (/), which is not allowed'
82
- else
83
- return true
84
- end
85
-
86
- errors = [format_validation_error(opts, :_external_id, :invalid_data)]
87
- raise_validation_errors(opts, errors, Fanforce::Error::RequestFailed)
88
- end
89
-
90
75
  def format_validation_error(opts, fields, default_error_code=nil)
91
76
  error = {
92
77
  resource: is_present?(opts[:resource]) ? opts[:resource] : (self.class==Class ? self.name.demodulize.tableize.singularize : self.class.name.demodulize.tableize.singularize),
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module Validations
3
- VERSION = '0.4.2'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark