fitting 3.0.2 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +16 -0
  5. data/README.md +327 -108
  6. data/fitting.gemspec +2 -2
  7. data/images/b1.png +0 -0
  8. data/images/b2.png +0 -0
  9. data/images/w1.png +0 -0
  10. data/images/w2.png +0 -0
  11. data/lib/fitting/action.rb +105 -0
  12. data/lib/fitting/cover/json_schema.rb +2 -2
  13. data/lib/fitting/cover/json_schema_one_of.rb +4 -2
  14. data/lib/fitting/debug.rb +47 -0
  15. data/lib/fitting/doc/action.rb +141 -0
  16. data/lib/fitting/doc/code.rb +53 -0
  17. data/lib/fitting/doc/combination_enum.rb +110 -0
  18. data/lib/fitting/doc/combination_one_of.rb +61 -0
  19. data/lib/fitting/doc/combination_optional.rb +54 -0
  20. data/lib/fitting/doc/combination_step.rb +48 -0
  21. data/lib/fitting/doc/content_type.rb +152 -0
  22. data/lib/fitting/doc/json_schema.rb +112 -0
  23. data/lib/fitting/doc/step.rb +102 -0
  24. data/lib/fitting/doc.rb +107 -0
  25. data/lib/fitting/host.rb +37 -0
  26. data/lib/fitting/log.rb +102 -0
  27. data/lib/fitting/nocov.rb +68 -0
  28. data/lib/fitting/prefix.rb +62 -0
  29. data/lib/fitting/railtie.rb +0 -1
  30. data/lib/fitting/records/spherical/request.rb +7 -4
  31. data/lib/fitting/records/spherical/response.rb +22 -16
  32. data/lib/fitting/records/tested/request.rb +6 -1
  33. data/lib/fitting/records/tested/response.rb +6 -1
  34. data/lib/fitting/rep/html.rb +32 -0
  35. data/lib/fitting/rep.rb +24 -0
  36. data/lib/fitting/report/action.rb +9 -15
  37. data/lib/fitting/report/actions.rb +22 -33
  38. data/lib/fitting/report/combination.rb +10 -6
  39. data/lib/fitting/report/combinations.rb +9 -29
  40. data/lib/fitting/report/prefix.rb +7 -24
  41. data/lib/fitting/report/prefixes.rb +11 -25
  42. data/lib/fitting/report/response.rb +12 -22
  43. data/lib/fitting/report/responses.rb +23 -27
  44. data/lib/fitting/report/tests.rb +4 -8
  45. data/lib/fitting/skip/action.rb +44 -0
  46. data/lib/fitting/skip/api.rb +29 -0
  47. data/lib/fitting/skip.rb +21 -0
  48. data/lib/fitting/version.rb +1 -1
  49. data/lib/fitting.rb +12 -28
  50. data/lib/tasks/fitting.rake +23 -84
  51. data/lib/templates/htmlcss/bootstrap-nightshade.min.css +12 -0
  52. data/lib/templates/htmlcss/bootstrap.min.js +7 -0
  53. data/lib/templates/htmlcss/darkmode.min.js +6 -0
  54. data/lib/templates/htmlcss/fitting.html +196 -0
  55. data/lib/templates/htmlcss/jquery-3.6.0.min.js +2 -0
  56. metadata +40 -39
  57. data/lib/fitting/configuration.rb +0 -17
  58. data/lib/fitting/records/spherical/requests.rb +0 -25
  59. data/lib/fitting/storage/responses.rb +0 -21
  60. data/lib/fitting/tests.rb +0 -31
  61. data/lib/tasks/fitting_outgoing.rake +0 -91
  62. data/lib/templates/bomboniere/.gitignore +0 -21
  63. data/lib/templates/bomboniere/.tool-versions +0 -1
  64. data/lib/templates/bomboniere/README.md +0 -19
  65. data/lib/templates/bomboniere/dist/css/app.aa2bcd8a.css +0 -1
  66. data/lib/templates/bomboniere/dist/css/chunk-vendors.ec5f6c3f.css +0 -1
  67. data/lib/templates/bomboniere/dist/favicon.ico +0 -0
  68. data/lib/templates/bomboniere/dist/index.html +0 -1
  69. data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js +0 -2
  70. data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js.map +0 -1
  71. data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js +0 -13
  72. data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js.map +0 -1
  73. data/lib/templates/bomboniere/package-lock.json +0 -9292
  74. data/lib/templates/bomboniere/package.json +0 -27
  75. data/lib/templates/bomboniere/public/favicon.ico +0 -0
  76. data/lib/templates/bomboniere/public/index.html +0 -17
  77. data/lib/templates/bomboniere/src/App.vue +0 -102
  78. data/lib/templates/bomboniere/src/assets/logo.png +0 -0
  79. data/lib/templates/bomboniere/src/components/HelloWorld.vue +0 -204
  80. data/lib/templates/bomboniere/src/main.js +0 -10
  81. data/lib/templates/bomboniere/src/router/index.js +0 -31
  82. data/lib/templates/bomboniere/src/views/About.vue +0 -5
  83. data/lib/templates/bomboniere/src/views/Action.vue +0 -173
  84. data/lib/templates/bomboniere/src/views/Home.vue +0 -17
  85. data/lib/templates/bomboniere/vue.config.js +0 -3
@@ -1,27 +0,0 @@
1
- {
2
- "name": "bomboniere",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "serve": "vue-cli-service serve",
7
- "build": "vue-cli-service build"
8
- },
9
- "dependencies": {
10
- "vue": "^2.6.11",
11
- "vue-json-compare": "^2.0.9",
12
- "vue-router": "^3.2.0"
13
- },
14
- "devDependencies": {
15
- "@vue/cli-plugin-router": "~4.4.0",
16
- "@vue/cli-service": "~4.4.0",
17
- "vue-template-compiler": "^2.6.11",
18
- "serialize-javascript": ">=3.1.0",
19
- "node-forge": ">=0.10.0",
20
- "highlight.js": ">=10.4.1"
21
- },
22
- "browserslist": [
23
- "> 1%",
24
- "last 2 versions",
25
- "not dead"
26
- ]
27
- }
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
- <title><%= htmlWebpackPlugin.options.title %></title>
9
- </head>
10
- <body>
11
- <noscript>
12
- <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
- </noscript>
14
- <div id="app"></div>
15
- <!-- built files will be auto injected -->
16
- </body>
17
- </html>
@@ -1,102 +0,0 @@
1
- <template>
2
- <div id="app">
3
- <div id="nav">
4
- <router-link to="/">Prefixes</router-link> |
5
- <router-link to="/about">About</router-link>
6
- </div>
7
- <router-view/>
8
- </div>
9
- </template>
10
-
11
- <style>
12
- body {
13
- background-color: #2c3e50;
14
- }
15
-
16
- h1,h2,h3,h4,h5,h6,p {
17
- color: #42b983;
18
- }
19
-
20
- .pink {
21
- color: #b94283
22
- }
23
-
24
- #app {
25
- font-family: Avenir, Helvetica, Arial, sans-serif;
26
- -webkit-font-smoothing: antialiased;
27
- -moz-osx-font-smoothing: grayscale;
28
- text-align: center;
29
- color: #2c3e50;
30
- }
31
-
32
- #nav {
33
- padding: 30px;
34
- }
35
-
36
- #nav a {
37
- font-weight: bold;
38
- color: #42b983;
39
- }
40
-
41
- #nav a.router-link-exact-active {
42
- color: #42b983;
43
- }
44
-
45
- #main {
46
- font-size: 10pt;
47
- }
48
-
49
- .prefix {
50
- background-color: #273645;
51
- color: #42b983;
52
- margin: 2px 0px;
53
- padding: 0px 8px;
54
- height: 20px;
55
- text-align: left;
56
- }
57
-
58
- .action {
59
- background-color: #273645;
60
- color: #42b983;
61
- margin: 2px 0px 0px 16px;
62
- height: 20px;
63
- }
64
-
65
- .method {
66
- width: 100px;
67
- float: left;
68
- padding: 0px 8px;
69
- text-align: left;
70
- }
71
-
72
- .path {
73
- width: 400px;
74
- float: left;
75
- text-align: left;
76
- }
77
-
78
- /* accordion */
79
- .accordion-item{
80
- position: relative;
81
- }
82
- .accordion-item-head{
83
- cursor: pointer;
84
- }
85
- .accordion-item-head:after{
86
- content: ' > ';
87
- display: block;
88
- position: absolute;
89
- right: 25px;
90
- transform: rotate(90deg) scaleY(2);
91
- top: 0px;
92
- }
93
- .accordion-item-head.active:after{
94
- content: ' < ';
95
- }
96
- .accordion-item-body{
97
- display: none;
98
- }
99
- .accordion-item-head.active + .accordion-item-body{
100
- display: block !important;
101
- }
102
- </style>
@@ -1,204 +0,0 @@
1
- <template>
2
- <div id="main">
3
- <div v-if="myJson.tests_without_prefixes.length != 0">
4
- <div class="accordion-item">
5
- <div class="tests_without_prefixes accordion-item-head" v-on:click="accordion">
6
- tests without prefixes: {{ myJson.tests_without_prefixes.length }} ✖
7
- </div>
8
- <div class="accordion-item-body">
9
- <div v-for="test_without_prefixes in myJson.tests_without_prefixes">
10
- <div class="test_without_prefixes">{{ test_without_prefixes }} ✖</div>
11
- </div>
12
- </div>
13
- </div>
14
- </div>
15
-
16
- <div v-for="prefix_details in myJson.prefixes_details">
17
-
18
- <div>
19
- <div class="accordion-item">
20
-
21
- <div class="prefix accordion-item-head active" v-on:click="accordion">
22
- {{ prefix_details.name }}
23
- </div>
24
-
25
- <div class="accordion-item-body">
26
-
27
- <div v-if="prefix_details.actions.tests_without_actions.length != 0">
28
- <div class="accordion-item">
29
- <div class="tests_without_actions accordion-item-head" v-on:click="accordion">
30
- tests without actions: {{ prefix_details.actions.tests_without_actions.length }} ✖
31
- </div>
32
- <div class="accordion-item-body">
33
- <div v-for="test_without_actions in prefix_details.actions.tests_without_actions">
34
- <div class="test_without_actions">{{ test_without_actions }} ✖</div>
35
- </div>
36
- </div>
37
- </div>
38
- </div>
39
-
40
- <div v-for="action_details in prefix_details.actions.actions_details">
41
- <div class="action">
42
- <router-link
43
- :to="{ path: 'action', query: { prefix: prefix_details.name, method: action_details.method, path: action_details.path }}">
44
- <div class="method">{{ action_details.method }}</div>
45
- <div class="path">{{ action_details.path }}</div>
46
- <div v-for="responses_details in action_details.responses.responses_details">
47
- <div v-if="responses_details.combinations.cover_percent == '100%'" class="response_good">
48
- {{ responses_details.combinations.cover_percent }}
49
- {{ responses_details.method }}
50
- </div>
51
- <div v-else class="response_bad">
52
- {{ responses_details.combinations.cover_percent }}
53
- {{ responses_details.method }}
54
- </div>
55
- </div>
56
- <div style="color: #b94283;" v-if="action_details.responses.tests_without_responses.length != 0">
57
- &#9888;
58
- </div>
59
- </router-link>
60
- </div>
61
- </div>
62
-
63
- </div>
64
-
65
- </div>
66
-
67
- </div>
68
-
69
- </div>
70
-
71
- </div>
72
- </template>
73
-
74
- <script>
75
- export default {
76
- name: 'HelloWorld',
77
- props: {
78
- msg: String
79
- },
80
- data() {
81
- return {
82
- myJson: {'stub': 'prefixes report'}
83
- }
84
- },
85
- methods: {
86
- accordion: function (event) {
87
- event.target.classList.toggle('active');
88
- }
89
- }
90
- }
91
- </script>
92
-
93
- <!-- Add "scoped" attribute to limit CSS to this component only -->
94
- <style scoped>
95
- h3 {
96
- margin: 40px 0 0;
97
- }
98
- ul {
99
- list-style-type: none;
100
- padding: 0;
101
- }
102
- li {
103
- display: inline-block;
104
- margin: 0 10px;
105
- }
106
- a {
107
- color: #42b983;
108
- }
109
-
110
- .tests_without_prefixes {
111
- background-color: #273645;
112
- color: #b94283;
113
- margin: 2px 0px;
114
- padding: 0px 8px;
115
- height: 20px;
116
- text-align: left;
117
- }
118
-
119
- .tests_without_prefixes:hover {
120
- background-color: #2b2b2b;
121
- }
122
-
123
- .test_without_prefixes {
124
- background-color: #273645;
125
- color: #b94283;
126
- margin: 2px 0px 0px 16px;
127
- height: 20px;
128
- text-align: left;
129
- padding: 0px 8px;
130
- }
131
-
132
- .tests_without_actions {
133
- background-color: #273645;
134
- color: #b94283;
135
- margin: 2px 0px 0px 16px;
136
- padding: 0px 8px;
137
- height: 20px;
138
- text-align: left;
139
- }
140
-
141
- .tests_without_actions:hover {
142
- background-color: #2b2b2b;
143
- }
144
-
145
- .test_without_actions {
146
- background-color: #273645;
147
- color: #b94283;
148
- margin: 2px 0px 0px 24px;
149
- height: 20px;
150
- text-align: left;
151
- padding: 0px 8px;
152
- }
153
-
154
- .response_good {
155
- float: left;
156
- text-align: left;
157
- padding: 0px 2px;
158
- color: #42b983;
159
- }
160
-
161
- .response_bad {
162
- float: left;
163
- text-align: left;
164
- padding: 0px 2px;
165
- color: #b94283;
166
- }
167
-
168
- .action:hover {
169
- background-color: #2b2b2b;
170
- }
171
-
172
- .response {
173
- width: 50px;
174
- float: left;
175
- text-align: left;
176
- }
177
-
178
- .error {
179
- color: red;
180
- width: 10px;
181
- float: left;
182
- text-align: left;
183
- }
184
-
185
- a:link {
186
- color: #42b983;
187
- text-decoration: none;
188
- }
189
-
190
- a:visited {
191
- color: #42b983;
192
- text-decoration: none;
193
- }
194
-
195
- a:hover {
196
- color: #42b983;
197
- text-decoration: none;
198
- }
199
-
200
- a:active {
201
- color: #42b983;
202
- text-decoration: none;
203
- }
204
- </style>
@@ -1,10 +0,0 @@
1
- import Vue from 'vue'
2
- import App from './App.vue'
3
- import router from './router'
4
-
5
- Vue.config.productionTip = false
6
-
7
- new Vue({
8
- router,
9
- render: function (h) { return h(App) }
10
- }).$mount('#app')
@@ -1,31 +0,0 @@
1
- import Vue from 'vue'
2
- import VueRouter from 'vue-router'
3
- import Home from '../views/Home.vue'
4
- import About from '../views/About.vue'
5
- import Action from '../views/Action.vue'
6
-
7
- Vue.use(VueRouter)
8
-
9
- const routes = [
10
- {
11
- path: '/',
12
- name: 'Home',
13
- component: Home
14
- },
15
- {
16
- path: '/about',
17
- name: 'About',
18
- component: About
19
- },
20
- {
21
- path: '/action',
22
- name: 'Action',
23
- component: Action
24
- }
25
- ]
26
-
27
- const router = new VueRouter({
28
- routes
29
- })
30
-
31
- export default router
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="about">
3
- <h1>This is an about page</h1>
4
- </div>
5
- </template>
@@ -1,173 +0,0 @@
1
- <template>
2
- <div id="main">
3
- <div v-for="prefix in myJson.prefixes_details">
4
- <div v-if="$route.query.prefix == prefix.name" class="accordion-item">
5
- <div class="prefix">{{prefix.name}}</div>
6
- <div v-for="action in prefix.actions.actions_details">
7
- <div v-if="$route.query.method == action.method && $route.query.path == action.path" class="accordion-item">
8
- <div class="action">
9
- <div class="method">{{action.method}}</div>
10
- <div class="path">{{action.path}}</div>
11
- </div>
12
-
13
- <div v-if="action.responses.tests_without_responses.length != 0">
14
- <div class="accordion-item">
15
- <div class="tests_without_responses accordion-item-head" v-on:click="accordion">
16
- tests without responses: {{ action.responses.tests_without_responses.length }} ✖
17
- </div>
18
- <div class="accordion-item-body">
19
- <div v-for="test_without_responses in action.responses.tests_without_responses">
20
- <div class="test_without_responses">
21
- {{ test_without_responses }} ✖
22
- {{tests[test_without_responses]}}
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- </div>
28
-
29
- <div v-for="response in action.responses.responses_details">
30
- <div class="response">
31
- <div class="accordion-item">
32
- <div class="accordion-item-head" v-on:click="accordion">
33
- <div v-if="response.combinations.cover_percent == '100%'" class="response_good">
34
- {{ response.combinations.cover_percent }}
35
- {{ response.method }}
36
- </div>
37
- <div v-else class="response_bad">
38
- {{ response.combinations.cover_percent }}
39
- {{ response.method }}
40
- </div>
41
- </div>
42
- <div class="accordion-item-body">
43
- <vue-json-compare :oldData="jsonSchemas[response.json_schema]"
44
- :newData="jsonSchemas[response.json_schema]"></vue-json-compare>
45
- </div>
46
- </div>
47
- </div>
48
- <div v-for="combination in response.combinations.combinations_details">
49
- <div class="combination">
50
- <div class="accordion-item">
51
- <div class="accordion-item-head" v-on:click="accordion">
52
- type: {{ combination.type }}, name: {{ combination.name }}, tests_size:
53
- {{ combination.tests_size }}
54
- </div>
55
- <div class="accordion-item-body">
56
- <vue-json-compare :oldData="jsonSchemas[response.json_schema]"
57
- :newData="combinations[combination.json_schema]"></vue-json-compare>
58
- </div>
59
- </div>
60
- </div>
61
- </div>
62
- </div>
63
- </div>
64
- </div>
65
- </div>
66
- </div>
67
- </div>
68
- </template>
69
-
70
- <script>
71
- import vueJsonCompare from 'vue-json-compare'
72
-
73
- export default {
74
- name: 'HelloWorld',
75
- props: {
76
- msg: String
77
- },
78
- components: {
79
- vueJsonCompare
80
- },
81
- data() {
82
- return {
83
- myJson: {'stub': 'for action page'},
84
- jsonSchemas: {'stub': 'json-schemas'},
85
- combinations: {'stub': 'combinations'},
86
- tests: {'stub': 'tests'}
87
- }
88
- },
89
- methods: {
90
- accordion: function (event) {
91
- event.target.classList.toggle('active');
92
- }
93
- }
94
- }
95
- </script>
96
-
97
- <style>
98
- .request {
99
- color: #42b983;
100
- background-color: #273645;
101
- padding: 0px 0px 0px 8px;
102
- }
103
-
104
- .tests_without_responses {
105
- text-align: left;
106
- padding: 0px 0px 0px 8px;
107
- color: #b94283;
108
- background-color: #273645;
109
- margin: 2px 0px 0px 24px;
110
- }
111
-
112
- .tests_without_responses:hover {
113
- background-color: #2b2b2b;
114
- }
115
-
116
- .test_without_responses {
117
- text-align: left;
118
- padding: 0px 0px 0px 8px;
119
- color: #b94283;
120
- background-color: #273645;
121
- margin: 2px 0px 0px 32px;
122
- }
123
-
124
- .test_without_responses:hover {
125
- background-color: #2b2b2b;
126
- }
127
-
128
- .response {
129
- text-align: left;
130
- padding: 0px 0px 0px 8px;
131
- color: #42b983;
132
- background-color: #273645;
133
- margin: 2px 0px 0px 24px;
134
- }
135
-
136
- .response:hover {
137
- background-color: #2b2b2b;
138
- }
139
-
140
- .response_good {
141
- color: #42b983;
142
- }
143
-
144
- .response_bad {
145
- color: #b94283;
146
- }
147
-
148
- .combination {
149
- text-align: left;
150
- padding: 0px 0px 0px 8px;
151
- color: #42b983;
152
- background-color: #273645;
153
- margin: 2px 0px 0px 32px;
154
- }
155
-
156
- .combination:hover {
157
- background-color: #2b2b2b;
158
- }
159
-
160
- /* darkmode */
161
- .alpaca-json{
162
- background-color: #131a20;
163
- }
164
- .alpaca-add{
165
- background-color: #004313;
166
- }
167
- .alpaca-del {
168
- background-color: #160004;
169
- }
170
- .alpaca-upd{
171
- background-color: #423200;
172
- }
173
- </style>
@@ -1,17 +0,0 @@
1
- <template>
2
- <div class="home">
3
- <HelloWorld msg="Welcome to Your Vue.js App"/>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- // @ is an alias to /src
9
- import HelloWorld from '@/components/HelloWorld.vue'
10
-
11
- export default {
12
- name: 'Home',
13
- components: {
14
- HelloWorld
15
- }
16
- }
17
- </script>
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- publicPath: ''
3
- }