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 +4 -4
- data/README.md +5 -3
- data/Rakefile +5 -5
- data/lib/informant-sinatra/bootstrap.rb +1 -1
- data/lib/informant-sinatra/config.rb +4 -0
- data/lib/informant-sinatra/diagnostic.rb +9 -4
- data/lib/informant-sinatra/version.rb +1 -1
- data/lib/tasks/diagnostic.rake +1 -0
- metadata +26 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe14072b9287da27d4e8beaf8ce246378b7a8b93b81cb4be25a8501f972ebb7
|
4
|
+
data.tar.gz: c3636db91a37a9f3578f3f0e5af84f30e013c82756c7458f16edbde44b6a9bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
@@ -5,11 +5,11 @@ module InformantSinatra
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def run
|
8
|
-
if Config.
|
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(
|
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
|
|
data/lib/tasks/diagnostic.rake
CHANGED
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.
|
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:
|
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.
|
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.
|
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
|
-
|
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:
|
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.
|
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.
|