informant-sinatra 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e44462144eac6b2daa31346f129806d256457490786457c3e91d6fd7e750ee2d
|
|
4
|
+
data.tar.gz: 608c620667d34536e8735e7d0c7cf9f42093ee167557c5c2cfb72be1c4244170
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d10660a1314fcff28d4378eda18a39eac22e3867e576037dfeaf4f8f4809ce036556853367b93e60550150e9b626a3a0c3cb7f946902c0a0d83e4ed6ba7bb0f1
|
|
7
|
+
data.tar.gz: 17e34af9c913ee4babf7c383c8fa5f024f4a46c8af0bd750e2ab70c4ed6aa6b1d6642b92002da4dc0da3565b57e0a6b68ea00d2f180f1bf5ec43480c04ba3ded
|
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.1.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: 2021-04-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: informant-common
|
|
@@ -73,7 +73,7 @@ dependencies:
|
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
74
|
version: '0'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: rubocop
|
|
76
|
+
name: rubocop-rspec
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - ">="
|
|
@@ -123,7 +123,7 @@ homepage: https://www.informantapp.com
|
|
|
123
123
|
licenses:
|
|
124
124
|
- MIT
|
|
125
125
|
metadata: {}
|
|
126
|
-
post_install_message:
|
|
126
|
+
post_install_message:
|
|
127
127
|
rdoc_options: []
|
|
128
128
|
require_paths:
|
|
129
129
|
- lib
|
|
@@ -131,15 +131,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
131
131
|
requirements:
|
|
132
132
|
- - ">="
|
|
133
133
|
- !ruby/object:Gem::Version
|
|
134
|
-
version:
|
|
134
|
+
version: 2.6.0
|
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
137
|
- - ">="
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
139
|
version: '0'
|
|
140
140
|
requirements: []
|
|
141
|
-
rubygems_version: 3.
|
|
142
|
-
signing_key:
|
|
141
|
+
rubygems_version: 3.1.6
|
|
142
|
+
signing_key:
|
|
143
143
|
specification_version: 4
|
|
144
144
|
summary: The Informant tracks server-side validation errors and gives you metrics
|
|
145
145
|
you never dreamed of.
|