informant-sinatra 1.0.0 → 1.3.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: 02f27a46d2c36eb6ddc7b96a0cf1562877ffbf2b287bce94c3e4472417281f04
4
- data.tar.gz: d2e4052d06c13b35016fec533114cc4061cf917766274d2d2ea07291dafab28f
3
+ metadata.gz: bfe14072b9287da27d4e8beaf8ce246378b7a8b93b81cb4be25a8501f972ebb7
4
+ data.tar.gz: c3636db91a37a9f3578f3f0e5af84f30e013c82756c7458f16edbde44b6a9bfb
5
5
  SHA512:
6
- metadata.gz: 4df3eff5e97481b98e355b12047f3faae1c97e9ba9aa858bb93b00c0f181ac7e28fc3a46e4a01f321245237c81595338ee7c49243b404302200ae239ba5348d5
7
- data.tar.gz: 5fb9ac00ca156dfcb81c45dc60cef3289fe46fe0565578bd2e550be1854ac9ae93bdaff2614356da2aa36b9771caad0184e52d19c7ccbd669c5f5d15abbd8067
6
+ metadata.gz: ca94accc1ea3c497aec50b8c9a3e4ab0a7eabc39c6095f02a61e4fa8585896f7e89f4ba4505aac84cf59c1a0e51998b3ad23081cc72b3823c07d1971755f124d
7
+ data.tar.gz: 7f2cacc230d1f1b7f641362da5778af7227ae49e562e299478053e49ea5f2bddca24c2451039424938026a2662d0bc5b50b4a74ae0bc1d4e2b324f59cba2ac49
data/README.md CHANGED
@@ -15,9 +15,7 @@ validation tracking for ActiveRecord and Mongoid models.
15
15
 
16
16
  ## Installation
17
17
 
18
- 1. Sign up for an account on https://www.informantapp.com or through one of our
19
- parters, [Heroku](https://dashboard.heroku.com) or
20
- [Manifold](https://manifold.co).
18
+ 1. Sign up for an account on https://www.informantapp.com or through [Heroku](https://dashboard.heroku.com).
21
19
  2. Add the `informant-sinatra` gem to your `Gemfile`.
22
20
 
23
21
  ```
@@ -35,6 +33,10 @@ validation tracking for ActiveRecord and Mongoid models.
35
33
  5. Deploy with the gem installed.
36
34
  6. Submit a form and you'll see it appear in [our web interface](https://console.informantapp.com).
37
35
 
36
+ We've set up
37
+ [informant-sinatra-example](https://gitlab.com/informantapp/informant-sinatra-example)
38
+ as a demonstrate of installation and operation.
39
+
38
40
  ## Troubleshooting
39
41
 
40
42
  The Informant gem includes a rake task to diagnose connectivity problems. From
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
- if !ENV['APPRAISAL_INITIALIZED']
2
- require 'appraisal/task'
3
- Appraisal::Task.new
4
- task default: :appraisal
5
- else
1
+ if ENV['APPRAISAL_INITIALIZED']
6
2
  require 'rspec/core/rake_task'
7
3
  RSpec::Core::RakeTask.new
8
4
  task default: :spec
5
+ else
6
+ require 'appraisal/task'
7
+ Appraisal::Task.new
8
+ task default: :appraisal
9
9
  end
@@ -1,7 +1,7 @@
1
1
  module InformantSinatra
2
2
  module Bootstrap
3
3
  def self.registered(app)
4
- return unless InformantCommon::Config.enabled?
4
+ return unless InformantSinatra::Config.enabled?
5
5
 
6
6
  transmit_agent_info
7
7
 
@@ -8,6 +8,10 @@ module InformantSinatra
8
8
  InformantCommon::Config.api_token = api_token
9
9
  end
10
10
 
11
+ def self.enabled?
12
+ InformantCommon::Config.enabled?
13
+ end
14
+
11
15
  def self.exclude_models
12
16
  InformantCommon::Config.exclude_models
13
17
  end
@@ -5,11 +5,11 @@ module InformantSinatra
5
5
  end
6
6
 
7
7
  def run
8
- if Config.api_token.nil? || Config.api_token == ''
9
- puts missing_api_token_message
10
- else
8
+ if Config.enabled?
11
9
  response = InformantCommon::Client.transmit(test_form_submission).join.value
12
10
  display_response_message(response)
11
+ else
12
+ puts missing_api_token_message
13
13
  end
14
14
 
15
15
  puts assistance_message
@@ -46,7 +46,12 @@ module InformantSinatra
46
46
  def test_form_submission
47
47
  InformantCommon::Event::FormSubmission.new.tap do |form_submission|
48
48
  form_submission.handler = 'Connectivity#test'
49
- form_submission.process_model(InformantCommon::Model::ActiveModel.new(TestClass.new.tap(&:valid?)))
49
+ form_submission.process_model(
50
+ InformantCommon::Model::Base.new(
51
+ name: 'TestClass',
52
+ field_errors: [InformantCommon::FieldError.new('field_name', nil, "can't be blank")]
53
+ )
54
+ )
50
55
  end
51
56
  end
52
57
 
@@ -1,3 +1,3 @@
1
1
  module InformantSinatra
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'informant-sinatra'
2
+ require 'json'
2
3
 
3
4
  namespace :informant do
4
5
  desc 'Verify connectivity from your app to Informant'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: informant-sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.3.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-31 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: informant-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.1
19
+ version: 1.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.1
26
+ version: 1.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sinatra
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +73,21 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: rubocop
76
+ name: rubocop-performance
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop-rspec
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - ">="
@@ -122,8 +136,9 @@ files:
122
136
  homepage: https://www.informantapp.com
123
137
  licenses:
124
138
  - MIT
125
- metadata: {}
126
- post_install_message:
139
+ metadata:
140
+ rubygems_mfa_required: 'true'
141
+ post_install_message:
127
142
  rdoc_options: []
128
143
  require_paths:
129
144
  - lib
@@ -131,15 +146,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
146
  requirements:
132
147
  - - ">="
133
148
  - !ruby/object:Gem::Version
134
- version: '0'
149
+ version: 2.7.0
135
150
  required_rubygems_version: !ruby/object:Gem::Requirement
136
151
  requirements:
137
152
  - - ">="
138
153
  - !ruby/object:Gem::Version
139
154
  version: '0'
140
155
  requirements: []
141
- rubygems_version: 3.0.3
142
- signing_key:
156
+ rubygems_version: 3.2.32
157
+ signing_key:
143
158
  specification_version: 4
144
159
  summary: The Informant tracks server-side validation errors and gives you metrics
145
160
  you never dreamed of.