lesli_babel 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_babel/application.js +108 -52
- data/app/assets/javascripts/lesli_babel/application.js.LICENSE.txt +282 -0
- data/app/assets/stylesheets/lesli_babel/application.scss +2 -1
- data/app/assets/stylesheets/lesli_babel/dashboards.scss +3 -2
- data/app/controllers/lesli_babel/buckets_controller.rb +32 -8
- data/app/controllers/lesli_babel/modules_controller.rb +24 -18
- data/app/controllers/lesli_babel/strings_controller.rb +10 -10
- data/app/controllers/lesli_babel/translations_controller.rb +23 -12
- data/app/models/lesli_babel/module.rb +10 -1
- data/app/models/lesli_babel/string.rb +26 -9
- data/app/services/lesli_babel/deploy_rails_service.rb +93 -0
- data/app/services/lesli_babel/module_service.rb +1 -1
- data/app/services/lesli_babel/string_service.rb +6 -3
- data/app/views/lesli_babel/partials/_engine-sidebar.html.erb +9 -11
- data/config/locales/translations.en.yml +5 -0
- data/config/locales/translations.es.yml +5 -0
- data/config/routes.rb +16 -16
- data/db/migrate/v1.0/0901100110_create_lesli_babel_modules.rb +2 -2
- data/db/migrate/v1.0/0901110110_create_lesli_babel_buckets.rb +1 -1
- data/lib/lesli_babel/version.rb +2 -1
- data/lib/tasks/lesli_babel_tasks.rake +38 -56
- data/lib/vue/application.js +23 -9
- data/lib/vue/apps/modules/show.vue +26 -17
- data/lib/vue/components/form-string-new.vue +51 -63
- data/lib/vue/stores/module.js +25 -11
- data/lib/vue/stores/translations.js +1 -1
- data/lib/vue/stores/translations.json +38 -0
- data/readme.md +61 -9
- metadata +11 -5
@@ -0,0 +1,282 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Lesli
|
4
|
+
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
6
|
+
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
8
|
+
it under the terms of the GNU General Public License as published by
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
|
+
|
12
|
+
This program is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
|
+
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
|
+
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
*/
|
32
|
+
|
33
|
+
/*
|
34
|
+
|
35
|
+
Lesli
|
36
|
+
|
37
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
38
|
+
|
39
|
+
This program is free software: you can redistribute it and/or modify
|
40
|
+
it under the terms of the GNU General Public License as published by
|
41
|
+
the Free Software Foundation, either version 3 of the License, or
|
42
|
+
(at your option) any later version.
|
43
|
+
|
44
|
+
This program is distributed in the hope that it will be useful,
|
45
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
46
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
47
|
+
GNU General Public License for more details.
|
48
|
+
|
49
|
+
You should have received a copy of the GNU General Public License
|
50
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
51
|
+
|
52
|
+
Lesli · Your Smart Business Assistant.
|
53
|
+
|
54
|
+
Made with ♥ by https://www.lesli.tech
|
55
|
+
Building a better future, one line of code at a time.
|
56
|
+
|
57
|
+
@contact hello@lesli.tech
|
58
|
+
@website https://lesli.tech
|
59
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
60
|
+
|
61
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
62
|
+
// ·
|
63
|
+
|
64
|
+
*/
|
65
|
+
|
66
|
+
/*
|
67
|
+
|
68
|
+
Lesli
|
69
|
+
|
70
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
71
|
+
|
72
|
+
This program is free software: you can redistribute it and/or modify
|
73
|
+
it under the terms of the GNU General Public License as published by
|
74
|
+
the Free Software Foundation, either version 3 of the License, or
|
75
|
+
(at your option) any later version.
|
76
|
+
|
77
|
+
This program is distributed in the hope that it will be useful,
|
78
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
79
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
80
|
+
GNU General Public License for more details.
|
81
|
+
|
82
|
+
You should have received a copy of the GNU General Public License
|
83
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
84
|
+
|
85
|
+
Lesli · Your Smart Business Assistant.
|
86
|
+
|
87
|
+
Made with ♥ by https://www.lesli.tech
|
88
|
+
Building a better future, one line of code at a time.
|
89
|
+
|
90
|
+
@contact hello@lesli.tech
|
91
|
+
@website https://lesli.tech
|
92
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
93
|
+
|
94
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
95
|
+
// ·
|
96
|
+
*/
|
97
|
+
|
98
|
+
/*
|
99
|
+
Lesli
|
100
|
+
|
101
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
102
|
+
|
103
|
+
This program is free software: you can redistribute it and/or modify
|
104
|
+
it under the terms of the GNU General Public License as published by
|
105
|
+
the Free Software Foundation, either version 3 of the License, or
|
106
|
+
(at your option) any later version.
|
107
|
+
|
108
|
+
This program is distributed in the hope that it will be useful,
|
109
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
110
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
111
|
+
GNU General Public License for more details.
|
112
|
+
|
113
|
+
You should have received a copy of the GNU General Public License
|
114
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
115
|
+
|
116
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
117
|
+
|
118
|
+
Made with ♥ by https://www.lesli.tech
|
119
|
+
Building a better future, one line of code at a time.
|
120
|
+
|
121
|
+
@contact hello@lesli.tech
|
122
|
+
@website https://www.lesli.dev
|
123
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
124
|
+
|
125
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
126
|
+
// ·
|
127
|
+
*/
|
128
|
+
|
129
|
+
/*
|
130
|
+
Lesli
|
131
|
+
|
132
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
133
|
+
|
134
|
+
This program is free software: you can redistribute it and/or modify
|
135
|
+
it under the terms of the GNU General Public License as published by
|
136
|
+
the Free Software Foundation, either version 3 of the License, or
|
137
|
+
(at your option) any later version.
|
138
|
+
|
139
|
+
This program is distributed in the hope that it will be useful,
|
140
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
141
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
142
|
+
GNU General Public License for more details.
|
143
|
+
|
144
|
+
You should have received a copy of the GNU General Public License
|
145
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
146
|
+
|
147
|
+
Lesli · Ruby on Rails SaaS development platform.
|
148
|
+
|
149
|
+
Made with ♥ by https://www.lesli.tech
|
150
|
+
Building a better future, one line of code at a time.
|
151
|
+
|
152
|
+
@contact hello@lesli.tech
|
153
|
+
@website https://www.lesli.tech
|
154
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
155
|
+
|
156
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
157
|
+
// ·
|
158
|
+
*/
|
159
|
+
|
160
|
+
/*
|
161
|
+
Lesli
|
162
|
+
|
163
|
+
Copyright (c) 2020, Lesli Technologies, S. A.
|
164
|
+
|
165
|
+
This program is free software: you can redistribute it and/or modify
|
166
|
+
it under the terms of the GNU General Public License as published by
|
167
|
+
the Free Software Foundation, either version 3 of the License, or
|
168
|
+
(at your option) any later version.
|
169
|
+
|
170
|
+
This program is distributed in the hope that it will be useful,
|
171
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
172
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
173
|
+
GNU General Public License for more details.
|
174
|
+
|
175
|
+
You should have received a copy of the GNU General Public License
|
176
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
177
|
+
|
178
|
+
Lesli JS - JavaScript utilities for JavaScript applications
|
179
|
+
|
180
|
+
Powered by LesliTech
|
181
|
+
Building a better future, one line of code at a time.
|
182
|
+
|
183
|
+
@contact <hello@lesli.tech>
|
184
|
+
@website <https://lesli.tech>
|
185
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
186
|
+
|
187
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
188
|
+
// ·
|
189
|
+
*/
|
190
|
+
|
191
|
+
/*
|
192
|
+
Lesli
|
193
|
+
|
194
|
+
Copyright (c) 2021, Lesli Technologies, S. A.
|
195
|
+
|
196
|
+
This program is free software: you can redistribute it and/or modify
|
197
|
+
it under the terms of the GNU General Public License as published by
|
198
|
+
the Free Software Foundation, either version 3 of the License, or
|
199
|
+
(at your option) any later version.
|
200
|
+
|
201
|
+
This program is distributed in the hope that it will be useful,
|
202
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
203
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
204
|
+
GNU General Public License for more details.
|
205
|
+
|
206
|
+
You should have received a copy of the GNU General Public License
|
207
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
208
|
+
|
209
|
+
Lesli JS - JavaScript utilities for JavaScript applications
|
210
|
+
|
211
|
+
Powered by LesliTech
|
212
|
+
Building a better future, one line of code at a time.
|
213
|
+
|
214
|
+
@contact <hello@lesli.tech>
|
215
|
+
@website <https://lesli.tech>
|
216
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
217
|
+
|
218
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
219
|
+
// ·
|
220
|
+
*/
|
221
|
+
|
222
|
+
/*
|
223
|
+
Lesli
|
224
|
+
|
225
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
226
|
+
|
227
|
+
This program is free software: you can redistribute it and/or modify
|
228
|
+
it under the terms of the GNU General Public License as published by
|
229
|
+
the Free Software Foundation, either version 3 of the License, or
|
230
|
+
(at your option) any later version.
|
231
|
+
|
232
|
+
This program is distributed in the hope that it will be useful,
|
233
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
234
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
235
|
+
GNU General Public License for more details.
|
236
|
+
|
237
|
+
You should have received a copy of the GNU General Public License
|
238
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
239
|
+
|
240
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
241
|
+
|
242
|
+
Made with ♥ by https://www.lesli.tech
|
243
|
+
Building a better future, one line of code at a time.
|
244
|
+
|
245
|
+
@contact hello@lesli.tech
|
246
|
+
@website https://www.lesli.dev
|
247
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
248
|
+
|
249
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
250
|
+
// ·
|
251
|
+
*/
|
252
|
+
|
253
|
+
/*
|
254
|
+
Lesli
|
255
|
+
|
256
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
257
|
+
|
258
|
+
This program is free software: you can redistribute it and/or modify
|
259
|
+
it under the terms of the GNU General Public License as published by
|
260
|
+
the Free Software Foundation, either version 3 of the License, or
|
261
|
+
(at your option) any later version.
|
262
|
+
|
263
|
+
This program is distributed in the hope that it will be useful,
|
264
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
265
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
266
|
+
GNU General Public License for more details.
|
267
|
+
|
268
|
+
You should have received a copy of the GNU General Public License
|
269
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
270
|
+
|
271
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
272
|
+
|
273
|
+
Made with ♥ by https://www.lesli.tech
|
274
|
+
Building a better future, one line of code at a time.
|
275
|
+
|
276
|
+
@contact hello@lesli.tech
|
277
|
+
@website https://www.lesli.tech
|
278
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
279
|
+
|
280
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
281
|
+
// ·
|
282
|
+
*/
|
@@ -33,12 +33,13 @@ Building a better future, one line of code at a time.
|
|
33
33
|
|
34
34
|
// ·
|
35
35
|
@import "lesli/templates/dashboards";
|
36
|
-
|
36
|
+
//@import "flag-icons";
|
37
|
+
|
37
38
|
|
38
39
|
// ·
|
39
40
|
.locales {
|
40
41
|
@include lesli-css-flex-columns($column-width: 200px);
|
41
|
-
justify-content:
|
42
|
+
justify-content: center;
|
42
43
|
|
43
44
|
.card {
|
44
45
|
padding: 1.8rem 1rem;
|
@@ -1,22 +1,46 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Lesli
|
4
|
+
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
6
|
+
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
8
|
+
it under the terms of the GNU General Public License as published by
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
|
+
|
12
|
+
This program is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
16
|
+
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
|
+
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
|
+
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
2
32
|
|
3
33
|
module LesliBabel
|
4
34
|
class BucketsController < ApplicationController
|
5
35
|
before_action :set_bucket, only: [:show, :edit, :update, :destroy]
|
6
36
|
|
7
|
-
def privileges
|
8
|
-
{
|
9
|
-
index: []
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
37
|
# GET /buckets
|
14
38
|
def index
|
15
39
|
respond_to do |format|
|
16
40
|
format.html { }
|
17
41
|
format.json {
|
18
42
|
respond_with_successful(
|
19
|
-
Module.find(params[:module_id]).buckets.order(
|
43
|
+
Module.find(params[:module_id]).buckets.order(:code)
|
20
44
|
)
|
21
45
|
}
|
22
46
|
end
|
@@ -1,33 +1,39 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
|
-
|
3
|
+
Lesli
|
4
4
|
|
5
|
-
|
6
|
-
industrial property, intellectual property, copyright and relative international laws.
|
7
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
8
|
-
pictures and any other information belongs to the owner of this platform.
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
9
6
|
|
10
|
-
|
11
|
-
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
8
|
+
it under the terms of the GNU General Public License as published by
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
12
11
|
|
13
|
-
|
12
|
+
This program is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
14
16
|
|
15
|
-
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
|
+
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
|
+
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
16
30
|
// ·
|
17
31
|
=end
|
18
32
|
|
19
|
-
require_dependency "cloud_babel/application_controller"
|
20
|
-
|
21
33
|
module LesliBabel
|
22
34
|
class ModulesController < ApplicationController
|
23
35
|
before_action :set_module, only: [:show, :edit, :update, :destroy]
|
24
36
|
|
25
|
-
def privileges
|
26
|
-
{
|
27
|
-
show: ['CloudBabel::StringsController#index']
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
37
|
# GET /modules
|
32
38
|
def index
|
33
39
|
respond_to do |format|
|
@@ -40,7 +46,7 @@ module LesliBabel
|
|
40
46
|
def show
|
41
47
|
respond_to do |format|
|
42
48
|
format.html { }
|
43
|
-
format.json { respond_with_successful(@module) }
|
49
|
+
format.json { respond_with_successful(@module.show) }
|
44
50
|
end
|
45
51
|
end
|
46
52
|
|
@@ -29,13 +29,16 @@ module LesliBabel
|
|
29
29
|
# POST /strings
|
30
30
|
def create
|
31
31
|
|
32
|
-
if String.find_by(
|
32
|
+
if String.find_by(
|
33
|
+
label: string_params[:label],
|
34
|
+
bucket_id: string_params[:bucket_id]
|
35
|
+
)
|
33
36
|
return respond_with_error("Duplicated string")
|
34
37
|
end
|
35
|
-
|
38
|
+
|
36
39
|
string = String.new(string_params)
|
37
40
|
if string.save
|
38
|
-
String.log_activity_create(current_user, string)
|
41
|
+
#String.log_activity_create(current_user, string)
|
39
42
|
respond_with_successful(string)
|
40
43
|
else
|
41
44
|
respond_with_error("Error on create translation string", string.errors)
|
@@ -65,7 +68,7 @@ module LesliBabel
|
|
65
68
|
|
66
69
|
end
|
67
70
|
|
68
|
-
|
71
|
+
Lesli.config.locales.keys.each do |locale|
|
69
72
|
|
70
73
|
# if translation changed
|
71
74
|
if @string[locale] != string_params[locale]
|
@@ -81,7 +84,7 @@ module LesliBabel
|
|
81
84
|
|
82
85
|
# We store the new attributes and compare the activities
|
83
86
|
new_attributes = @string.attributes
|
84
|
-
String.log_activity_update(current_user, @string, old_attributes, new_attributes)
|
87
|
+
#String.log_activity_update(current_user, @string, old_attributes, new_attributes)
|
85
88
|
|
86
89
|
respond_with_successful(@string)
|
87
90
|
else
|
@@ -130,11 +133,8 @@ module LesliBabel
|
|
130
133
|
:label,
|
131
134
|
:status,
|
132
135
|
:context,
|
133
|
-
:
|
134
|
-
|
135
|
-
:need_translation,
|
136
|
-
:cloud_babel_buckets_id,
|
137
|
-
Rails.application.config.lesli_settings["configuration"]["locales"]
|
136
|
+
:bucket_id,
|
137
|
+
Lesli.config.locales.keys
|
138
138
|
)
|
139
139
|
end
|
140
140
|
|
@@ -2,21 +2,32 @@
|
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
5
|
-
Copyright (c)
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
8
|
+
it under the terms of the GNU General Public License as published by
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
This program is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
14
16
|
|
15
|
-
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
16
19
|
|
17
|
-
|
18
|
-
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
|
+
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
19
24
|
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
20
31
|
=end
|
21
32
|
|
22
33
|
module LesliBabel
|
@@ -79,8 +90,8 @@ module LesliBabel
|
|
79
90
|
|
80
91
|
def deploy
|
81
92
|
#TranslationsService.clean
|
82
|
-
|
83
|
-
TranslationsService.restart_server
|
93
|
+
DeployRailsService.new(current_user, query).build
|
94
|
+
#TranslationsService.restart_server
|
84
95
|
respond_with_successful
|
85
96
|
end
|
86
97
|
|
@@ -18,12 +18,21 @@ module LesliBabel
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def show
|
22
|
+
{
|
23
|
+
:id => self.id,
|
24
|
+
:code => self.code.titleize,
|
25
|
+
:platform => self.platform,
|
26
|
+
:created_at => self.created_at
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
21
30
|
def format_module_name
|
22
31
|
|
23
32
|
return if self.platform == "lesli_core"
|
24
33
|
return if self.platform == "lesli_engine"
|
25
34
|
|
26
|
-
self.
|
35
|
+
self.code = self.code
|
27
36
|
.gsub(/[^0-9A-Za-z\s\-\_]/, '') # remove special characters from string
|
28
37
|
.gsub(/-/, '') # replace dashes with underscore
|
29
38
|
.gsub(/_/, '') # replace underscore with underscore
|
@@ -1,9 +1,31 @@
|
|
1
1
|
module LesliBabel
|
2
2
|
class String < ApplicationRecord
|
3
|
-
belongs_to :user
|
4
3
|
belongs_to :bucket
|
5
4
|
|
6
5
|
before_create :clean_label_string
|
6
|
+
=begin
|
7
|
+
enum prefix: {
|
8
|
+
# database
|
9
|
+
# controllers
|
10
|
+
# models
|
11
|
+
# views
|
12
|
+
# components
|
13
|
+
# elements
|
14
|
+
|
15
|
+
column
|
16
|
+
enum
|
17
|
+
|
18
|
+
message
|
19
|
+
|
20
|
+
navigation
|
21
|
+
toolbar
|
22
|
+
|
23
|
+
button
|
24
|
+
chart
|
25
|
+
title
|
26
|
+
form
|
27
|
+
}
|
28
|
+
=end
|
7
29
|
|
8
30
|
def self.index(current_user, query, params)
|
9
31
|
|
@@ -195,11 +217,10 @@ module LesliBabel
|
|
195
217
|
end
|
196
218
|
|
197
219
|
def path
|
198
|
-
self[:
|
220
|
+
self[:engine_code]
|
199
221
|
.downcase
|
200
|
-
.sub("cloud", "")
|
201
222
|
.concat(".")
|
202
|
-
.concat(self[:
|
223
|
+
.concat(self[:bucket_code])
|
203
224
|
.concat(".")
|
204
225
|
.concat(self[:label])
|
205
226
|
end
|
@@ -215,11 +236,7 @@ module LesliBabel
|
|
215
236
|
.gsub(/\s+/, '_') # replace spaces or spaces with single dash
|
216
237
|
|
217
238
|
self.status = "normal" if self.status.blank?
|
218
|
-
self.
|
219
|
-
|
220
|
-
self.reference_module_bucket = "#{self.bucket.reference_module}-#{self.bucket.name}"
|
221
|
-
|
239
|
+
self.reference_bucket = "#{self.bucket.reference_module}-#{self.bucket.code}"
|
222
240
|
end
|
223
|
-
|
224
241
|
end
|
225
242
|
end
|