informant-common 1.1.1 → 1.2.0

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
  SHA256:
3
- metadata.gz: a03bd29f29b6aed0fd1972aae2a1d613d1831b43329c2055af0dc1f11484ad66
4
- data.tar.gz: 425d55d6002d53e4cf6c32e0aafa6d414b55ff7dc25b90b07bb8c9253a8f3c08
3
+ metadata.gz: ed34407cec544b01391b2ac8902ed3a2667ee575976388dc3a2a97afcb0264d3
4
+ data.tar.gz: 0feab82bf1ce36d13a633dad8841b084f889447a36c7145ff8c56366200eac7b
5
5
  SHA512:
6
- metadata.gz: 0d64e695c6e4acdae6cea8f22c718d0cda3af5eb8f6dcec251e45ce0ef4df7fae6f17b299462241e197245fe4d0003f525aa89deab14999a48699531a2f0d90b
7
- data.tar.gz: 9520553f368435012c93c95a3e80e39f50b716987db7803759c30608c32f7cbee53f652a5ce6c4c7a014234457e13814dae7b5e2519ed585dc70f67212c4f089
6
+ metadata.gz: 6cce15623638121d186749153fe78f1b95e043099e1a41350bf9a92eaecf086e1519ba74729fcb135ff5f37a92e23053a94a718c91fd7f31e36067169a4ef001
7
+ data.tar.gz: 5dc1b56de742f50e76b994c2260e7858ef191f1e031d6ea6a1d76c7b35a8bee32239932dec92a1c578419f443be00439941469aa053423bbb8622351fd72617d
data/README.markdown CHANGED
@@ -1,5 +1,3 @@
1
- # Overview
2
-
3
1
  ## Informant Common
4
2
 
5
3
  The informant-common gem provides underlying common functionality for building
data/Rakefile CHANGED
@@ -1,9 +1,12 @@
1
- if !ENV['APPRAISAL_INITIALIZED']
2
- require 'appraisal/task'
3
- Appraisal::Task.new
4
- task default: :appraisal
5
- else
1
+ default_task = :spec
2
+
3
+ if ENV['APPRAISAL_INITIALIZED']
6
4
  require 'rspec/core/rake_task'
7
5
  RSpec::Core::RakeTask.new
8
- task default: :spec
6
+ else
7
+ require 'appraisal/task'
8
+ Appraisal::Task.new
9
+ default_task = :appraisal
9
10
  end
11
+
12
+ task default: default_task
@@ -4,7 +4,8 @@ module InformantCommon
4
4
  @instance ||= InformantCommon::Config.new
5
5
  end
6
6
 
7
- attr_writer :api_token
7
+ attr_writer :api_token, :exclude_models, :filter_parameters, :value_tracking
8
+
8
9
  def api_token
9
10
  @api_token ||= ENV['INFORMANT_API_KEY']
10
11
  end
@@ -13,22 +14,19 @@ module InformantCommon
13
14
  !api_token.nil? && api_token != ''
14
15
  end
15
16
 
16
- attr_writer :exclude_models
17
17
  def exclude_models
18
18
  @exclude_models ||= []
19
19
  end
20
20
 
21
- attr_writer :filter_parameters
22
21
  def filter_parameters
23
22
  @filter_parameters ||= []
24
23
  end
25
24
 
26
- attr_writer :value_tracking
27
25
  def value_tracking?
28
- if !defined?(@value_tracking)
29
- @value_tracking = true
30
- else
26
+ if defined?(@value_tracking)
31
27
  @value_tracking
28
+ else
29
+ @value_tracking = true
32
30
  end
33
31
  end
34
32
 
@@ -24,7 +24,7 @@ module InformantCommon
24
24
  end
25
25
 
26
26
  def self.net_http_start_arguments
27
- @net_http_start_arguments ||= [endpoint.host, endpoint.port, use_ssl: endpoint.scheme == 'https']
27
+ @net_http_start_arguments ||= [endpoint.host, endpoint.port, { use_ssl: endpoint.scheme == 'https' }]
28
28
  end
29
29
 
30
30
  def net_http_start_arguments
@@ -5,8 +5,8 @@ module InformantCommon
5
5
  self.id = active_model.object_id
6
6
  self.name = active_model.class.name
7
7
  self.errors = []
8
- active_model.errors.each do |field, error|
9
- add_error(field.to_s, extract_value(active_model, field), error)
8
+ active_model.errors.messages.each do |field, errors|
9
+ add_error(field.to_s, extract_value(active_model, field), errors.first)
10
10
  end
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module InformantCommon
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: informant-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Informant, LLC
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-30 00:00:00.000000000 Z
11
+ date: 2021-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -50,8 +50,9 @@ files:
50
50
  homepage: https://www.informantapp.com
51
51
  licenses:
52
52
  - MIT
53
- metadata: {}
54
- post_install_message:
53
+ metadata:
54
+ rubygems_mfa_required: 'true'
55
+ post_install_message:
55
56
  rdoc_options: []
56
57
  require_paths:
57
58
  - lib
@@ -59,15 +60,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
60
  requirements:
60
61
  - - ">="
61
62
  - !ruby/object:Gem::Version
62
- version: '0'
63
+ version: 2.6.0
63
64
  required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  requirements:
65
66
  - - ">="
66
67
  - !ruby/object:Gem::Version
67
68
  version: '0'
68
69
  requirements: []
69
- rubygems_version: 3.1.2
70
- signing_key:
70
+ rubygems_version: 3.2.32
71
+ signing_key:
71
72
  specification_version: 4
72
73
  summary: The Informant tracks server-side validation errors and gives you metrics
73
74
  you never dreamed of.