fitting 2.11.0 → 2.14.0

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