lecter 0.1.6 → 0.2.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/.all-contributorsrc +26 -0
- data/.circleci/config.yml +86 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +16 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +25 -0
- data/CHANGELOG.md +20 -0
- data/CONTRIBUTING.md +35 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +37 -69
- data/LICENSE.txt +1 -1
- data/README.md +162 -54
- data/Rakefile +5 -3
- data/app/controllers/lecter/diagnosis_controller.rb +28 -49
- data/app/views/layouts/lecter.html.erb +258 -0
- data/app/views/lecter/diagnosis/new.html.erb +61 -0
- data/app/views/lecter/diagnosis/show.html.erb +54 -0
- data/bin/console +1 -0
- data/bin/rails +2 -0
- data/config/locales/en.yml +4 -3
- data/config/locales/ru.yml +4 -3
- data/config/routes.rb +5 -1
- data/lecter.gemspec +9 -5
- data/lib/lecter/engine.rb +2 -0
- data/lib/lecter/formatter_headers.rb +26 -0
- data/lib/lecter/formatter_payload.rb +35 -0
- data/lib/lecter/html_generator.rb +66 -0
- data/lib/lecter/html_row.rb +42 -0
- data/lib/lecter/rack.rb +30 -36
- data/lib/lecter/railtie.rb +9 -0
- data/lib/lecter/requester.rb +63 -0
- data/lib/lecter/trace_point.rb +30 -0
- data/lib/lecter/version.rb +3 -1
- data/lib/lecter.rb +15 -11
- metadata +45 -19
- data/.travis.yml +0 -7
- data/app/assets/javascripts/lecter.js +0 -2
- data/app/assets/stylesheets/lecter.css +0 -261
- data/app/views/layouts/lecter.slim +0 -14
- data/app/views/lecter/diagnosis/new.erb +0 -20
- data/app/views/lecter/diagnosis/show.slim +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f10f155ae276bf6f3bb064246f793c91f151f16d83ecf7fe3213bbc9a33ed5aa
|
4
|
+
data.tar.gz: 9ca14c7801beefbb80a9be1447a31965a6bb6616c50229628ca59dbe558da880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f348dbdc4bee445dad4617e1f5a5f5964f5988adb168152c276c1a1424136dadab462aad32958cbae60dfaf22d9c215b419498e025a447283681224f89f6d38f
|
7
|
+
data.tar.gz: b16518ed4592c57b6168e13c0c3701cbbd6d8ece67f43e14d2312f6a69a3f9b1f8e4484f4e3aba2fe1376e10ec6cfa995c54e1069ab3da15af71da3152dcc488
|
data/.all-contributorsrc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"files": [
|
3
|
+
"README.md"
|
4
|
+
],
|
5
|
+
"imageSize": 100,
|
6
|
+
"commit": false,
|
7
|
+
"contributors": [
|
8
|
+
{
|
9
|
+
"login": "pineapplethief",
|
10
|
+
"name": "Aleksey Glukhov",
|
11
|
+
"avatar_url": "https://avatars1.githubusercontent.com/u/4012690?v=4",
|
12
|
+
"profile": "https://github.com/pineapplethief",
|
13
|
+
"contributions": [
|
14
|
+
"code",
|
15
|
+
"doc",
|
16
|
+
"maintenance"
|
17
|
+
]
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"contributorsPerLine": 7,
|
21
|
+
"projectName": "lecter",
|
22
|
+
"projectOwner": "Neodelf",
|
23
|
+
"repoType": "github",
|
24
|
+
"repoHost": "https://github.com",
|
25
|
+
"skipCi": true
|
26
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
working_directory: ~/bikeindex/bike_index
|
5
|
+
environment:
|
6
|
+
COVERAGE: true
|
7
|
+
docker:
|
8
|
+
- image: circleci/ruby:2.6.3
|
9
|
+
steps:
|
10
|
+
- checkout
|
11
|
+
- restore_cache:
|
12
|
+
keys:
|
13
|
+
# This branch if available
|
14
|
+
- v2-dep-{{ .Branch }}-
|
15
|
+
# Default branch if not
|
16
|
+
- v2-dep-master-
|
17
|
+
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
|
18
|
+
- v2-dep-
|
19
|
+
- run:
|
20
|
+
name: Install Bundler
|
21
|
+
command: gem install bundler -v 2.1.2
|
22
|
+
- run:
|
23
|
+
name: Bundle Gems
|
24
|
+
command: bundle install --path=vendor/bundle --jobs=4 --retry=3
|
25
|
+
- run:
|
26
|
+
name: Rubocop
|
27
|
+
command: bundle exec rubocop
|
28
|
+
- run:
|
29
|
+
name: Install Code Climate Test Reporter
|
30
|
+
command: |
|
31
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
32
|
+
chmod +x ./cc-test-reporter
|
33
|
+
- save_cache:
|
34
|
+
key: v2-dep-{{ .Branch }}-{{ epoch }}
|
35
|
+
paths:
|
36
|
+
- ./vendor/bundle
|
37
|
+
- ~/.bundle
|
38
|
+
- run:
|
39
|
+
name: Run tests
|
40
|
+
command: |
|
41
|
+
./cc-test-reporter before-build
|
42
|
+
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
43
|
+
bundle exec rspec --profile 10 \
|
44
|
+
--color \
|
45
|
+
--order random \
|
46
|
+
--format progress \
|
47
|
+
-- ${TESTFILES}
|
48
|
+
- run:
|
49
|
+
name: Code Climate Test Coverage
|
50
|
+
command: |
|
51
|
+
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
|
52
|
+
- persist_to_workspace:
|
53
|
+
root: coverage
|
54
|
+
paths:
|
55
|
+
- codeclimate.*.json
|
56
|
+
|
57
|
+
upload-coverage:
|
58
|
+
docker:
|
59
|
+
- image: circleci/ruby:2.6.3
|
60
|
+
environment:
|
61
|
+
CC_TEST_REPORTER_ID: 9ef6750a0b374973f31c70ccf4bc6be1a4c93b0f2d3537d16e77450ef01f7813
|
62
|
+
working_directory: ~/bikeindex/bike_index
|
63
|
+
|
64
|
+
steps:
|
65
|
+
- attach_workspace:
|
66
|
+
at: ~/bikeindex/bike_index
|
67
|
+
- run:
|
68
|
+
name: Install Code Climate Test Reporter
|
69
|
+
command: |
|
70
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
71
|
+
chmod +x ./cc-test-reporter
|
72
|
+
- run:
|
73
|
+
name: Upload Test Reporter To Codeclimate
|
74
|
+
command: |
|
75
|
+
./cc-test-reporter sum-coverage codeclimate.*.json --output codeclimate.total.json
|
76
|
+
./cc-test-reporter upload-coverage --input codeclimate.total.json
|
77
|
+
|
78
|
+
workflows:
|
79
|
+
version: 2
|
80
|
+
|
81
|
+
commit:
|
82
|
+
jobs:
|
83
|
+
- build
|
84
|
+
- upload-coverage:
|
85
|
+
requires:
|
86
|
+
- build
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Report an issue with Lecter you've found.
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**Actual behavior**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See an error
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Screenshots**
|
24
|
+
If applicable, add screenshots to help explain your problem, please.
|
25
|
+
|
26
|
+
**Additional context**
|
27
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest new Lecter features or improvements to existing features.
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
**Replace this text with a summary of the changes in your PR.
|
2
|
+
The more detailed you are, the better.**
|
3
|
+
|
4
|
+
-----------------
|
5
|
+
|
6
|
+
Before submitting the PR make sure the following are checked:
|
7
|
+
|
8
|
+
* [ ] The PR relates to *only* one subject with a clear title and description in grammatically correct, complete sentences.
|
9
|
+
* [ ] Wrote [good commit messages][1].
|
10
|
+
* [ ] Commit message starts with `[Fix #issue-number]` (if the related issue exists).
|
11
|
+
* [ ] Feature branch is up-to-date with `master` (if not - rebase it).
|
12
|
+
* [ ] Squashed related commits together.
|
13
|
+
* [ ] Added tests.
|
14
|
+
* [ ] Ran `bundle exec rake default`. It executes all tests and runs RuboCop on its own code.
|
15
|
+
|
16
|
+
[1]: https://chris.beams.io/posts/git-commit/
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'lib/lecter/html_generator.rb'
|
4
|
+
- 'lib/lecter/rack.rb'
|
5
|
+
- 'lib/lecter/trace_point.rb'
|
6
|
+
- 'vendor/**/*'
|
7
|
+
Documentation:
|
8
|
+
Enabled: false
|
9
|
+
Layout/LineLength:
|
10
|
+
Max: 100
|
11
|
+
Lint/RaiseException:
|
12
|
+
Enabled: true
|
13
|
+
Lint/StructNewOverride:
|
14
|
+
Enabled: true
|
15
|
+
Style/HashEachMethods:
|
16
|
+
Enabled: true
|
17
|
+
Style/HashTransformKeys:
|
18
|
+
Enabled: true
|
19
|
+
Style/HashTransformValues:
|
20
|
+
Enabled: true
|
21
|
+
Metrics/BlockLength:
|
22
|
+
ExcludedMethods: ['describe', 'context']
|
23
|
+
Layout/ArrayAlignment:
|
24
|
+
EnforcedStyle: with_fixed_indentation
|
25
|
+
IndentationWidth: 2
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Change log
|
2
|
+
|
3
|
+
## master (unreleased)
|
4
|
+
|
5
|
+
### New features
|
6
|
+
### Bug fixes
|
7
|
+
### Changes
|
8
|
+
|
9
|
+
## 0.2.0 (2022-02-15)
|
10
|
+
|
11
|
+
### New features
|
12
|
+
|
13
|
+
* [issue#74](https://github.com/Neodelf/lecter/pull/79): Add the headers parameters in the form ([@neodelf][])
|
14
|
+
|
15
|
+
### Changes
|
16
|
+
|
17
|
+
* [PR](https://github.com/Neodelf/lecter/pull/69): Set the simplecov gem version to 0.17.1 ([@neodelf][])
|
18
|
+
* [commit](https://github.com/Neodelf/lecter/commit/73e0ed69cf8e1773abed9e9b735e0742aa63dade): Update makeup. ([@neodelf][])
|
19
|
+
|
20
|
+
[@neodelf]: https://github.com/neodelf
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
If you discover issues, have ideas for improvements or new features,
|
4
|
+
please report them to the [issue tracker][1] of the repository or
|
5
|
+
submit a pull request. Please, try to follow these guidelines when you
|
6
|
+
do so.
|
7
|
+
|
8
|
+
## Issue reporting
|
9
|
+
|
10
|
+
* Check that the issue has not already been reported.
|
11
|
+
* Check that the issue has not already been fixed in the latest code
|
12
|
+
(a.k.a. `master`).
|
13
|
+
* Be clear, concise and precise in your description of the problem.
|
14
|
+
* Open an issue with a descriptive title and a summary in grammatically correct,
|
15
|
+
complete sentences.
|
16
|
+
|
17
|
+
* Include any relevant code to the issue summary.
|
18
|
+
|
19
|
+
## Pull requests
|
20
|
+
|
21
|
+
* Read [how to properly contribute to open source projects on GitHub][1].
|
22
|
+
* Fork the project.
|
23
|
+
* Use a topic/feature branch to easily amend a pull request later, if necessary.
|
24
|
+
* Write [good commit messages][2].
|
25
|
+
* Use the same coding conventions as the rest of the project.
|
26
|
+
* Commit and push until you are happy with your contribution.
|
27
|
+
* If your change has a corresponding open GitHub issue, prefix the commit message with `[Fix #github-issue-number]`.
|
28
|
+
* Make sure to add tests for it. This is important so I don't break it
|
29
|
+
in a future version unintentionally.
|
30
|
+
* Open a [pull request][3] that relates to *only* one subject with a clear title
|
31
|
+
and description in grammatically correct, complete sentences.
|
32
|
+
|
33
|
+
[1]: https://www.gun.io/blog/how-to-github-fork-branch-and-pull-request
|
34
|
+
[2]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
35
|
+
[3]: https://help.github.com/articles/about-pull-requests
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,73 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lecter (0.
|
4
|
+
lecter (0.2.0)
|
5
5
|
rest-client
|
6
|
-
|
6
|
+
simplecov (= 0.17.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
|
12
|
-
actionview (= 5.2.3)
|
13
|
-
activesupport (= 5.2.3)
|
14
|
-
rack (~> 2.0)
|
15
|
-
rack-test (>= 0.6.3)
|
16
|
-
rails-dom-testing (~> 2.0)
|
17
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
18
|
-
actionview (5.2.3)
|
19
|
-
activesupport (= 5.2.3)
|
20
|
-
builder (~> 3.1)
|
21
|
-
erubi (~> 1.4)
|
22
|
-
rails-dom-testing (~> 2.0)
|
23
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
24
|
-
activesupport (5.2.3)
|
25
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
|
-
i18n (>= 0.7, < 2)
|
27
|
-
minitest (~> 5.1)
|
28
|
-
tzinfo (~> 1.1)
|
29
|
-
builder (3.2.3)
|
30
|
-
concurrent-ruby (1.1.5)
|
31
|
-
crass (1.0.4)
|
11
|
+
ast (2.4.0)
|
32
12
|
diff-lcs (1.3)
|
13
|
+
docile (1.4.0)
|
33
14
|
domain_name (0.5.20190701)
|
34
15
|
unf (>= 0.0.5, < 1.0.0)
|
35
|
-
|
36
|
-
http-cookie (1.0.
|
16
|
+
http-accept (1.7.0)
|
17
|
+
http-cookie (1.0.4)
|
37
18
|
domain_name (~> 0.5)
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
crass (~> 1.0.2)
|
42
|
-
nokogiri (>= 1.5.9)
|
43
|
-
method_source (0.9.2)
|
44
|
-
mime-types (3.2.2)
|
19
|
+
jaro_winkler (1.5.4)
|
20
|
+
json (2.3.0)
|
21
|
+
mime-types (3.4.1)
|
45
22
|
mime-types-data (~> 3.2015)
|
46
|
-
mime-types-data (3.
|
47
|
-
mini_portile2 (2.4.0)
|
48
|
-
minitest (5.11.3)
|
23
|
+
mime-types-data (3.2022.0105)
|
49
24
|
netrc (0.11.0)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
nokogiri (>= 1.6)
|
58
|
-
rails-html-sanitizer (1.0.4)
|
59
|
-
loofah (~> 2.2, >= 2.2.2)
|
60
|
-
railties (5.2.3)
|
61
|
-
actionpack (= 5.2.3)
|
62
|
-
activesupport (= 5.2.3)
|
63
|
-
method_source
|
64
|
-
rake (>= 0.8.7)
|
65
|
-
thor (>= 0.19.0, < 2.0)
|
66
|
-
rake (10.5.0)
|
67
|
-
rest-client (2.0.2)
|
25
|
+
parallel (1.19.1)
|
26
|
+
parser (2.7.1.0)
|
27
|
+
ast (~> 2.4.0)
|
28
|
+
rainbow (3.0.0)
|
29
|
+
rake (13.0.1)
|
30
|
+
rest-client (2.1.0)
|
31
|
+
http-accept (>= 1.7.0, < 2.0)
|
68
32
|
http-cookie (>= 1.0.2, < 2.0)
|
69
33
|
mime-types (>= 1.16, < 4.0)
|
70
34
|
netrc (~> 0.8)
|
35
|
+
rexml (3.2.5)
|
71
36
|
rspec (3.8.0)
|
72
37
|
rspec-core (~> 3.8.0)
|
73
38
|
rspec-expectations (~> 3.8.0)
|
@@ -81,22 +46,24 @@ GEM
|
|
81
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
82
47
|
rspec-support (~> 3.8.0)
|
83
48
|
rspec-support (3.8.2)
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
49
|
+
rubocop (0.81.0)
|
50
|
+
jaro_winkler (~> 1.5.1)
|
51
|
+
parallel (~> 1.10)
|
52
|
+
parser (>= 2.7.0.1)
|
53
|
+
rainbow (>= 2.2.2, < 4.0)
|
54
|
+
rexml
|
55
|
+
ruby-progressbar (~> 1.7)
|
56
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
57
|
+
ruby-progressbar (1.10.1)
|
58
|
+
simplecov (0.17.1)
|
59
|
+
docile (~> 1.1)
|
60
|
+
json (>= 1.8, < 3)
|
61
|
+
simplecov-html (~> 0.10.0)
|
62
|
+
simplecov-html (0.10.2)
|
97
63
|
unf (0.1.4)
|
98
64
|
unf_ext
|
99
|
-
unf_ext (0.0.
|
65
|
+
unf_ext (0.0.8)
|
66
|
+
unicode-display_width (1.7.0)
|
100
67
|
|
101
68
|
PLATFORMS
|
102
69
|
ruby
|
@@ -104,8 +71,9 @@ PLATFORMS
|
|
104
71
|
DEPENDENCIES
|
105
72
|
bundler (~> 2.0)
|
106
73
|
lecter!
|
107
|
-
rake (~>
|
74
|
+
rake (~> 13.0)
|
108
75
|
rspec (~> 3.0)
|
76
|
+
rubocop
|
109
77
|
|
110
78
|
BUNDLED WITH
|
111
|
-
2.
|
79
|
+
2.1.2
|