fitting 2.13.0 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +33 -0
  3. data/.rubocop.yml +1 -1
  4. data/.ruby-version +1 -1
  5. data/.tool-versions +1 -1
  6. data/CHANGELOG.md +52 -0
  7. data/README.md +83 -259
  8. data/example.png +0 -0
  9. data/example2.png +0 -0
  10. data/fitting.gemspec +5 -5
  11. data/lib/fitting/cover/json_schema.rb +8 -6
  12. data/lib/fitting/cover/json_schema_enum.rb +8 -6
  13. data/lib/fitting/cover/json_schema_one_of.rb +7 -5
  14. data/lib/fitting/records/spherical/requests.rb +3 -1
  15. data/lib/fitting/report/action.rb +53 -0
  16. data/lib/fitting/report/actions.rb +51 -0
  17. data/lib/fitting/report/combination.rb +37 -0
  18. data/lib/fitting/report/combinations.rb +47 -0
  19. data/lib/fitting/report/console.rb +41 -0
  20. data/lib/fitting/report/prefix.rb +88 -0
  21. data/lib/fitting/report/prefixes.rb +54 -0
  22. data/lib/fitting/report/response.rb +71 -0
  23. data/lib/fitting/report/responses.rb +48 -0
  24. data/lib/fitting/report/test.rb +75 -0
  25. data/lib/fitting/report/tests.rb +69 -0
  26. data/lib/fitting/tests.rb +0 -1
  27. data/lib/fitting/version.rb +1 -1
  28. data/lib/tasks/fitting.rake +130 -0
  29. data/lib/templates/bomboniere/.gitignore +21 -0
  30. data/lib/templates/bomboniere/.tool-versions +1 -0
  31. data/lib/templates/bomboniere/README.md +19 -0
  32. data/lib/templates/bomboniere/dist/css/app.aa2bcd8a.css +1 -0
  33. data/lib/templates/bomboniere/dist/css/chunk-vendors.ec5f6c3f.css +1 -0
  34. data/lib/templates/bomboniere/dist/favicon.ico +0 -0
  35. data/lib/templates/bomboniere/dist/index.html +1 -0
  36. data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js +2 -0
  37. data/lib/templates/bomboniere/dist/js/app.e5f1a5ec.js.map +1 -0
  38. data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js +13 -0
  39. data/lib/templates/bomboniere/dist/js/chunk-vendors.0f99b670.js.map +1 -0
  40. data/lib/templates/bomboniere/package-lock.json +9277 -0
  41. data/lib/templates/bomboniere/package.json +27 -0
  42. data/lib/templates/bomboniere/public/favicon.ico +0 -0
  43. data/lib/templates/bomboniere/public/index.html +17 -0
  44. data/lib/templates/bomboniere/src/App.vue +102 -0
  45. data/lib/templates/bomboniere/src/assets/logo.png +0 -0
  46. data/lib/templates/bomboniere/src/components/HelloWorld.vue +201 -0
  47. data/lib/templates/bomboniere/src/main.js +10 -0
  48. data/lib/templates/bomboniere/src/router/index.js +31 -0
  49. data/lib/templates/bomboniere/src/views/About.vue +5 -0
  50. data/lib/templates/bomboniere/src/views/Action.vue +173 -0
  51. data/lib/templates/bomboniere/src/views/Home.vue +17 -0
  52. data/lib/templates/bomboniere/vue.config.js +3 -0
  53. metadata +68 -31
  54. data/.travis.yml +0 -4
@@ -0,0 +1,27 @@
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
+ }
@@ -0,0 +1,17 @@
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>
@@ -0,0 +1,102 @@
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>
@@ -0,0 +1,201 @@
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
+ </router-link>
57
+ </div>
58
+ </div>
59
+
60
+ </div>
61
+
62
+ </div>
63
+
64
+ </div>
65
+
66
+ </div>
67
+
68
+ </div>
69
+ </template>
70
+
71
+ <script>
72
+ export default {
73
+ name: 'HelloWorld',
74
+ props: {
75
+ msg: String
76
+ },
77
+ data() {
78
+ return {
79
+ myJson: {'stub': 'prefixes report'}
80
+ }
81
+ },
82
+ methods: {
83
+ accordion: function (event) {
84
+ event.target.classList.toggle('active');
85
+ }
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
91
+ <style scoped>
92
+ h3 {
93
+ margin: 40px 0 0;
94
+ }
95
+ ul {
96
+ list-style-type: none;
97
+ padding: 0;
98
+ }
99
+ li {
100
+ display: inline-block;
101
+ margin: 0 10px;
102
+ }
103
+ a {
104
+ color: #42b983;
105
+ }
106
+
107
+ .tests_without_prefixes {
108
+ background-color: #273645;
109
+ color: #b94283;
110
+ margin: 2px 0px;
111
+ padding: 0px 8px;
112
+ height: 20px;
113
+ text-align: left;
114
+ }
115
+
116
+ .tests_without_prefixes:hover {
117
+ background-color: #2b2b2b;
118
+ }
119
+
120
+ .test_without_prefixes {
121
+ background-color: #273645;
122
+ color: #b94283;
123
+ margin: 2px 0px 0px 16px;
124
+ height: 20px;
125
+ text-align: left;
126
+ padding: 0px 8px;
127
+ }
128
+
129
+ .tests_without_actions {
130
+ background-color: #273645;
131
+ color: #b94283;
132
+ margin: 2px 0px 0px 16px;
133
+ padding: 0px 8px;
134
+ height: 20px;
135
+ text-align: left;
136
+ }
137
+
138
+ .tests_without_actions:hover {
139
+ background-color: #2b2b2b;
140
+ }
141
+
142
+ .test_without_actions {
143
+ background-color: #273645;
144
+ color: #b94283;
145
+ margin: 2px 0px 0px 24px;
146
+ height: 20px;
147
+ text-align: left;
148
+ padding: 0px 8px;
149
+ }
150
+
151
+ .response_good {
152
+ float: left;
153
+ text-align: left;
154
+ padding: 0px 2px;
155
+ color: #42b983;
156
+ }
157
+
158
+ .response_bad {
159
+ float: left;
160
+ text-align: left;
161
+ padding: 0px 2px;
162
+ color: #b94283;
163
+ }
164
+
165
+ .action:hover {
166
+ background-color: #2b2b2b;
167
+ }
168
+
169
+ .response {
170
+ width: 50px;
171
+ float: left;
172
+ text-align: left;
173
+ }
174
+
175
+ .error {
176
+ color: red;
177
+ width: 10px;
178
+ float: left;
179
+ text-align: left;
180
+ }
181
+
182
+ a:link {
183
+ color: #42b983;
184
+ text-decoration: none;
185
+ }
186
+
187
+ a:visited {
188
+ color: #42b983;
189
+ text-decoration: none;
190
+ }
191
+
192
+ a:hover {
193
+ color: #42b983;
194
+ text-decoration: none;
195
+ }
196
+
197
+ a:active {
198
+ color: #42b983;
199
+ text-decoration: none;
200
+ }
201
+ </style>
@@ -0,0 +1,10 @@
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')
@@ -0,0 +1,31 @@
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
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="about">
3
+ <h1>This is an about page</h1>
4
+ </div>
5
+ </template>
@@ -0,0 +1,173 @@
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>