forcast 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/COPYRIGHTS +11 -0
- data/Gemfile +22 -0
- data/Gemfile.lock +166 -0
- data/PENDIENTES +39 -0
- data/README.md +35 -0
- data/Rakefile +7 -0
- data/VERSION +1 -0
- data/bin/console +14 -0
- data/bin/rake +28 -0
- data/bin/setup +8 -0
- data/forcast.gemspec +73 -0
- data/lib/forcast.rb +5 -0
- data/lib/forcast/controllers/all.rb +2 -0
- data/lib/forcast/controllers/application/all.rb +12 -0
- data/lib/forcast/controllers/application/crud.rb +91 -0
- data/lib/forcast/controllers/application/database.rb +34 -0
- data/lib/forcast/controllers/application/error.rb +18 -0
- data/lib/forcast/controllers/application/exception_handler.rb +25 -0
- data/lib/forcast/controllers/application/json.rb +83 -0
- data/lib/forcast/controllers/application/locale.rb +30 -0
- data/lib/forcast/controllers/application/log.rb +22 -0
- data/lib/forcast/controllers/application/login.rb +41 -0
- data/lib/forcast/controllers/application/meta.rb +61 -0
- data/lib/forcast/controllers/application/model.rb +17 -0
- data/lib/forcast/controllers/application/permitirtodo.rb +27 -0
- data/lib/forcast/controllers/application/utils.rb +28 -0
- data/lib/forcast/controllers/controller/all.rb +8 -0
- data/lib/forcast/controllers/controller/asociar.rb +121 -0
- data/lib/forcast/controllers/controller/busqueda.rb +151 -0
- data/lib/forcast/controllers/controller/definitor/definitor.rb +322 -0
- data/lib/forcast/controllers/controller/definitor/definitor_page.rb +40 -0
- data/lib/forcast/controllers/controller/definitor_all.rb +2 -0
- data/lib/forcast/controllers/controller/filtro.rb +48 -0
- data/lib/forcast/controllers/controller/login/controllers/base_controller.rb +135 -0
- data/lib/forcast/controllers/controller/login/controllers/login_controller.rb +38 -0
- data/lib/forcast/controllers/controller/login/login.rb +71 -0
- data/lib/forcast/controllers/controller/login_all.rb +1 -0
- data/lib/forcast/controllers/controller/paper_trail/paper_trail.rb +21 -0
- data/lib/forcast/controllers/controller/paper_trail_all.rb +1 -0
- data/lib/forcast/controllers/controller/relacion.rb +157 -0
- data/lib/forcast/controllers/controller/rule_engine/action_engine.rb +92 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/action_logs_controller.rb +12 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/actions_controller.rb +10 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/pollings_controller.rb +13 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/rule_logs_controller.rb +12 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/rules_controller.rb +19 -0
- data/lib/forcast/controllers/controller/rule_engine/controllers/webhooks_controller.rb +27 -0
- data/lib/forcast/controllers/controller/rule_engine/polling_engine.rb +76 -0
- data/lib/forcast/controllers/controller/rule_engine/rule_controller.rb +27 -0
- data/lib/forcast/controllers/controller/rule_engine/rule_engine.rb +88 -0
- data/lib/forcast/controllers/controller/rule_engine/webhook_engine.rb +38 -0
- data/lib/forcast/controllers/controller/rule_engine_all.rb +5 -0
- data/lib/forcast/jobs/all.rb +2 -0
- data/lib/forcast/jobs/jobs_assets.rb +25 -0
- data/lib/forcast/jobs/jobs_wrapper.rb +25 -0
- data/lib/forcast/jobs/rule_engine/jobs_actions.rb +73 -0
- data/lib/forcast/jobs/rule_engine/jobs_pollings.rb +77 -0
- data/lib/forcast/jobs/rule_engine/jobs_webhooks.rb +54 -0
- data/lib/forcast/migrations/0_migracion_general.rb +44 -0
- data/lib/forcast/migrations/paper_trail/versions.rb +61 -0
- data/lib/forcast/migrations/rule_engine/action_logs.rb +15 -0
- data/lib/forcast/migrations/rule_engine/actions.rb +15 -0
- data/lib/forcast/migrations/rule_engine/pollings.rb +26 -0
- data/lib/forcast/migrations/rule_engine/rule_logs.rb +22 -0
- data/lib/forcast/migrations/rule_engine/rules.rb +27 -0
- data/lib/forcast/migrations/rule_engine/webhooks.rb +25 -0
- data/lib/forcast/models/all.rb +8 -0
- data/lib/forcast/models/asociar.rb +74 -0
- data/lib/forcast/models/busqueda.rb +17 -0
- data/lib/forcast/models/login/authorization.rb +37 -0
- data/lib/forcast/models/login/json_web_token.rb +15 -0
- data/lib/forcast/models/login/login.rb +26 -0
- data/lib/forcast/models/login_all.rb +2 -0
- data/lib/forcast/models/meta.rb +19 -0
- data/lib/forcast/models/modelo.rb +125 -0
- data/lib/forcast/models/models/meta.rb +6 -0
- data/lib/forcast/models/paper_trail/paper_trail.rb +13 -0
- data/lib/forcast/models/paper_trail_all.rb +1 -0
- data/lib/forcast/models/permitirtodo.rb +57 -0
- data/lib/forcast/models/rule_engine/action_engine.rb +19 -0
- data/lib/forcast/models/rule_engine/models/action.rb +41 -0
- data/lib/forcast/models/rule_engine/models/action_log.rb +40 -0
- data/lib/forcast/models/rule_engine/models/polling.rb +43 -0
- data/lib/forcast/models/rule_engine/models/rule.rb +44 -0
- data/lib/forcast/models/rule_engine/models/rule_log.rb +39 -0
- data/lib/forcast/models/rule_engine/models/webhook.rb +43 -0
- data/lib/forcast/models/rule_engine/polling_engine.rb +113 -0
- data/lib/forcast/models/rule_engine/rule.rb +62 -0
- data/lib/forcast/models/rule_engine/rule_engine.rb +137 -0
- data/lib/forcast/models/rule_engine/rule_scope.rb +35 -0
- data/lib/forcast/models/rule_engine/webhook_engine.rb +55 -0
- data/lib/forcast/models/rule_engine_all.rb +6 -0
- data/lib/forcast/routes/concerns/asociar.rb +15 -0
- data/lib/forcast/routes/concerns/buscar.rb +6 -0
- data/lib/forcast/routes/concerns/definitor.rb +3 -0
- data/lib/forcast/routes/concerns/modelo.rb +6 -0
- data/lib/forcast/routes/database.rb +4 -0
- data/lib/forcast/routes/login.rb +4 -0
- data/lib/forcast/routes/paper_trail/paper_trail.rb +3 -0
- data/lib/forcast/routes/rule_engine/rule.rb +5 -0
- data/lib/forcast/tasks/.giosaveZr0hbs +21 -0
- data/lib/forcast/tasks/.keep +0 -0
- data/lib/forcast/tasks/all.rb +16 -0
- data/lib/forcast/tasks/diagramas.rake +32 -0
- data/lib/forcast/tasks/documentation/documentation.rb +100 -0
- data/lib/forcast/tasks/env.rake +10 -0
- data/lib/forcast/tasks/git.rake +22 -0
- data/lib/forcast/tasks/indy/indy.rb +28 -0
- data/lib/forcast/tasks/logs.rake +13 -0
- data/lib/forcast/tasks/process.rake +18 -0
- data/lib/forcast/tasks/schema.rake +17 -0
- data/lib/forcast/tasks/schema/recips/action.rb +18 -0
- data/lib/forcast/tasks/schema/recips/controller.rb +29 -0
- data/lib/forcast/tasks/schema/recips/definitor.rb +38 -0
- data/lib/forcast/tasks/schema/recips/model.rb +43 -0
- data/lib/forcast/tasks/schema/recips/project.rb +19 -0
- data/lib/forcast/tasks/schema/recips/route.rb +9 -0
- data/lib/forcast/tasks/schema/recips/tmp/controller.rb +0 -0
- data/lib/forcast/tasks/schema/recips/tmp/model.rb +0 -0
- data/lib/forcast/tasks/schema/recips/tmp/model/.keep +0 -0
- data/lib/forcast/tasks/schema/rule_engine/rule_engine.rb +98 -0
- data/lib/forcast/tasks/schema/schema.rb +346 -0
- data/lib/forcast/tasks/test.rake +129 -0
- data/lib/forcast/tasks/utils.rake +68 -0
- data/lib/forcast/tasks/yard.rake +18 -0
- data/lib/forcast/utils/all.rb +4 -0
- data/lib/forcast/utils/email.rb +49 -0
- data/lib/forcast/utils/email/forcast/utils/email/layout/default.html.erb +3 -0
- data/lib/forcast/utils/email/forcast/utils/email/layout/default.text.erb +5 -0
- data/lib/forcast/utils/firebase.rb +60 -0
- data/lib/forcast/utils/firebase_database.rb +117 -0
- data/lib/forcast/utils/measure.rb +44 -0
- data/lib/forcast/utils/qvo.rb +141 -0
- data/lib/forcast/utils/server.rb +296 -0
- data/lib/forcast/utils/telegram.rb +82 -0
- data/lib/forcast/utils/thing.rb +180 -0
- data/lib/forcast/version.rb +15 -0
- data/lib/lib/backup.rb +42 -0
- data/lib/lib/deploy.sh +40 -0
- data/lib/lib/forcast_servidor_rails.sh +11 -0
- data/lib/lib/pg_generator.sh +10 -0
- data/lib/lib/production.rb +66 -0
- data/lib/lib/production/production.rb +30 -0
- data/lib/lib/systemctl_maker.rb +88 -0
- data/lib/lib/update.rb +100 -0
- data/production.rb +31 -0
- metadata +301 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a4c41bdcd52c92ef38e91d717ad538f008b3767c
|
4
|
+
data.tar.gz: aca8343c46e399c5a939553fa1187354b6547bf0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b90e7862fc7d8be47c5d3d91662674937d6a55f270bb671ed58460c061604fd1b9496df9397e49ebd69724c792660d9e007695fc8ed43da0c472b99e70ef83d3
|
7
|
+
data.tar.gz: e79d3893480e484607d41a3cbdb86a0a51398524e7557091634bb8da5703be4fa29983357be0fb0c897d236c3f91c169a4dc559280986c57999183fc2c4d52ff
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/COPYRIGHTS
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#© CASTILLO ARCE DESARROLLO TECNOLÓGICO LIMITADA 2018: e.g. © FORCAST and contributors 2018
|
2
|
+
|
3
|
+
#2018-10-09
|
4
|
+
|
5
|
+
#Except as permitted by the copyright law applicable to you, you may not reproduce or communicate any of the content on this repository, without the permission of the copyright owner.
|
6
|
+
|
7
|
+
#FORCAST allows certain uses of content from the internet without the copyright owner’s permission. This includes uses by educational institutions and by Commonwealth and State governments, provided fair compensation is paid. For more information, see www.forcast.cl
|
8
|
+
|
9
|
+
#The owners of copyright in the content on this website may receive compensation for the use of their content by educational institutions and governments, including from licensing schemes managed by Copyright Agency.
|
10
|
+
|
11
|
+
#We may change these terms of use from time to time. Check before re-using any content from this website.
|
data/Gemfile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in forcast.gemspec
|
6
|
+
|
7
|
+
gem 'yard'
|
8
|
+
gem 'rails'
|
9
|
+
gem 'bcrypt'
|
10
|
+
gem 'sidekiq'
|
11
|
+
gem 'http'
|
12
|
+
gem 'net-http-digest_auth', '~> 1.2'
|
13
|
+
gem 'rails-erd'
|
14
|
+
gem 'pundit'
|
15
|
+
gem 'faker'
|
16
|
+
gem 'paper_trail'
|
17
|
+
|
18
|
+
|
19
|
+
gemspec
|
20
|
+
|
21
|
+
|
22
|
+
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
forcast (0.0.108)
|
5
|
+
bcrypt
|
6
|
+
http
|
7
|
+
net-http-digest_auth
|
8
|
+
rails
|
9
|
+
rails-erd
|
10
|
+
sidekiq
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
actioncable (5.1.6)
|
16
|
+
actionpack (= 5.1.6)
|
17
|
+
nio4r (~> 2.0)
|
18
|
+
websocket-driver (~> 0.6.1)
|
19
|
+
actionmailer (5.1.6)
|
20
|
+
actionpack (= 5.1.6)
|
21
|
+
actionview (= 5.1.6)
|
22
|
+
activejob (= 5.1.6)
|
23
|
+
mail (~> 2.5, >= 2.5.4)
|
24
|
+
rails-dom-testing (~> 2.0)
|
25
|
+
actionpack (5.1.6)
|
26
|
+
actionview (= 5.1.6)
|
27
|
+
activesupport (= 5.1.6)
|
28
|
+
rack (~> 2.0)
|
29
|
+
rack-test (>= 0.6.3)
|
30
|
+
rails-dom-testing (~> 2.0)
|
31
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
32
|
+
actionview (5.1.6)
|
33
|
+
activesupport (= 5.1.6)
|
34
|
+
builder (~> 3.1)
|
35
|
+
erubi (~> 1.4)
|
36
|
+
rails-dom-testing (~> 2.0)
|
37
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
38
|
+
activejob (5.1.6)
|
39
|
+
activesupport (= 5.1.6)
|
40
|
+
globalid (>= 0.3.6)
|
41
|
+
activemodel (5.1.6)
|
42
|
+
activesupport (= 5.1.6)
|
43
|
+
activerecord (5.1.6)
|
44
|
+
activemodel (= 5.1.6)
|
45
|
+
activesupport (= 5.1.6)
|
46
|
+
arel (~> 8.0)
|
47
|
+
activesupport (5.1.6)
|
48
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
49
|
+
i18n (>= 0.7, < 2)
|
50
|
+
minitest (~> 5.1)
|
51
|
+
tzinfo (~> 1.1)
|
52
|
+
addressable (2.5.2)
|
53
|
+
public_suffix (>= 2.0.2, < 4.0)
|
54
|
+
arel (8.0.0)
|
55
|
+
bcrypt (3.1.12)
|
56
|
+
builder (3.2.3)
|
57
|
+
choice (0.2.0)
|
58
|
+
concurrent-ruby (1.0.5)
|
59
|
+
connection_pool (2.2.2)
|
60
|
+
crass (1.0.4)
|
61
|
+
domain_name (0.5.20180417)
|
62
|
+
unf (>= 0.0.5, < 1.0.0)
|
63
|
+
erubi (1.7.1)
|
64
|
+
globalid (0.4.1)
|
65
|
+
activesupport (>= 4.2.0)
|
66
|
+
http (3.3.0)
|
67
|
+
addressable (~> 2.3)
|
68
|
+
http-cookie (~> 1.0)
|
69
|
+
http-form_data (~> 2.0)
|
70
|
+
http_parser.rb (~> 0.6.0)
|
71
|
+
http-cookie (1.0.3)
|
72
|
+
domain_name (~> 0.5)
|
73
|
+
http-form_data (2.1.1)
|
74
|
+
http_parser.rb (0.6.0)
|
75
|
+
i18n (1.1.0)
|
76
|
+
concurrent-ruby (~> 1.0)
|
77
|
+
loofah (2.2.2)
|
78
|
+
crass (~> 1.0.2)
|
79
|
+
nokogiri (>= 1.5.9)
|
80
|
+
mail (2.7.0)
|
81
|
+
mini_mime (>= 0.1.1)
|
82
|
+
method_source (0.9.0)
|
83
|
+
mini_mime (1.0.1)
|
84
|
+
mini_portile2 (2.3.0)
|
85
|
+
minitest (5.11.3)
|
86
|
+
net-http-digest_auth (1.4.1)
|
87
|
+
nio4r (2.3.1)
|
88
|
+
nokogiri (1.8.5)
|
89
|
+
mini_portile2 (~> 2.3.0)
|
90
|
+
public_suffix (3.0.3)
|
91
|
+
rack (2.0.5)
|
92
|
+
rack-protection (2.0.4)
|
93
|
+
rack
|
94
|
+
rack-test (1.1.0)
|
95
|
+
rack (>= 1.0, < 3)
|
96
|
+
rails (5.1.6)
|
97
|
+
actioncable (= 5.1.6)
|
98
|
+
actionmailer (= 5.1.6)
|
99
|
+
actionpack (= 5.1.6)
|
100
|
+
actionview (= 5.1.6)
|
101
|
+
activejob (= 5.1.6)
|
102
|
+
activemodel (= 5.1.6)
|
103
|
+
activerecord (= 5.1.6)
|
104
|
+
activesupport (= 5.1.6)
|
105
|
+
bundler (>= 1.3.0)
|
106
|
+
railties (= 5.1.6)
|
107
|
+
sprockets-rails (>= 2.0.0)
|
108
|
+
rails-dom-testing (2.0.3)
|
109
|
+
activesupport (>= 4.2.0)
|
110
|
+
nokogiri (>= 1.6)
|
111
|
+
rails-erd (1.5.2)
|
112
|
+
activerecord (>= 3.2)
|
113
|
+
activesupport (>= 3.2)
|
114
|
+
choice (~> 0.2.0)
|
115
|
+
ruby-graphviz (~> 1.2)
|
116
|
+
rails-html-sanitizer (1.0.4)
|
117
|
+
loofah (~> 2.2, >= 2.2.2)
|
118
|
+
railties (5.1.6)
|
119
|
+
actionpack (= 5.1.6)
|
120
|
+
activesupport (= 5.1.6)
|
121
|
+
method_source
|
122
|
+
rake (>= 0.8.7)
|
123
|
+
thor (>= 0.18.1, < 2.0)
|
124
|
+
rake (12.3.1)
|
125
|
+
redis (4.0.2)
|
126
|
+
ruby-graphviz (1.2.3)
|
127
|
+
sidekiq (5.2.2)
|
128
|
+
connection_pool (~> 2.2, >= 2.2.2)
|
129
|
+
rack-protection (>= 1.5.0)
|
130
|
+
redis (>= 3.3.5, < 5)
|
131
|
+
sprockets (3.7.2)
|
132
|
+
concurrent-ruby (~> 1.0)
|
133
|
+
rack (> 1, < 3)
|
134
|
+
sprockets-rails (3.2.1)
|
135
|
+
actionpack (>= 4.0)
|
136
|
+
activesupport (>= 4.0)
|
137
|
+
sprockets (>= 3.0.0)
|
138
|
+
thor (0.20.0)
|
139
|
+
thread_safe (0.3.6)
|
140
|
+
tzinfo (1.2.5)
|
141
|
+
thread_safe (~> 0.1)
|
142
|
+
unf (0.1.4)
|
143
|
+
unf_ext
|
144
|
+
unf_ext (0.0.7.5)
|
145
|
+
websocket-driver (0.6.5)
|
146
|
+
websocket-extensions (>= 0.1.0)
|
147
|
+
websocket-extensions (0.1.3)
|
148
|
+
yard (0.9.16)
|
149
|
+
|
150
|
+
PLATFORMS
|
151
|
+
ruby
|
152
|
+
|
153
|
+
DEPENDENCIES
|
154
|
+
bcrypt
|
155
|
+
bundler (~> 1.16)
|
156
|
+
forcast!
|
157
|
+
http
|
158
|
+
net-http-digest_auth (~> 1.2)
|
159
|
+
rails
|
160
|
+
rails-erd
|
161
|
+
rake (~> 12.3.1)
|
162
|
+
sidekiq
|
163
|
+
yard
|
164
|
+
|
165
|
+
BUNDLED WITH
|
166
|
+
1.16.5
|
data/PENDIENTES
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
AGREGAR
|
2
|
+
|
3
|
+
000. Template Proyecto Forcast
|
4
|
+
00. Crear un metodo para crear muchos registros de una vez [Listo]
|
5
|
+
0. Documentacion API con Yard [Listo]
|
6
|
+
1. Paper-Trail [Tabla dinámica logs recursos]
|
7
|
+
1.1 Agregar Pagination a los recursos
|
8
|
+
1.2 Encriptar parametros de request
|
9
|
+
1.3 Agregar filtro para pedir solo los atributos que necesito
|
10
|
+
1.4 Modificar multiples atributos de un recurso en una misma solicitud [Listo, se debe pasar variable=all]
|
11
|
+
1.5 Borrar multiples recursos desde una misma solicitud
|
12
|
+
1.6 Modulo para copiar recursos (con todas sus anidaciones)
|
13
|
+
1.7 Serializador abstraido [action :serializare]
|
14
|
+
1.8 Definidor de vistas del Fron-End (En proceso)
|
15
|
+
1.9 Modulo de autorizacion por permisos (Pudnit)
|
16
|
+
1.10 Hash_id with 'friendly_id'
|
17
|
+
2. Swagger Abstract
|
18
|
+
3. Autentificación con servidor externo
|
19
|
+
4. Telegram [Listo ]/ Slack
|
20
|
+
5. Push noticaciones App Store [Listo]
|
21
|
+
6. Qvo #Pagos [Listo]
|
22
|
+
6.1 Paypal / Stripe
|
23
|
+
7. Personalizar Webhooks (definir una regla que cuando cambien en el backend, avise a una URL) [En proceso, terminado el Polling y Webhooh como módulo, falta complejizarlo un poco mas]
|
24
|
+
7.1 Servidor de Alertas [En proceso]
|
25
|
+
8. Backdoor
|
26
|
+
9. Manejo de Logs (Enviar a un servidor externo, analyze, alertas)
|
27
|
+
10. Rake: Dockerizar app
|
28
|
+
10.1 Rake: Compilar app [Ya no es importante]
|
29
|
+
10.2 Rake: Goacces app
|
30
|
+
10.3 Script de Deploy con cap
|
31
|
+
10.4 Rake: Generador de recursos [Terminado al fin]
|
32
|
+
11. Envio de información mediante sockets (ActionCable)
|
33
|
+
12. Generacion de PDF prawn
|
34
|
+
13. Manejor de Mails templates
|
35
|
+
14. API Tests [Revisar]
|
36
|
+
15. Generador de Excel dinámicos en funcion de reglas del front-end
|
37
|
+
|
38
|
+
|
39
|
+
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Forcast
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/forcast`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'forcast'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install forcast
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/forcast.
|
data/Rakefile
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.110
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "forcast"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/rake
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
require "pathname"
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
12
|
+
Pathname.new(__FILE__).realpath)
|
13
|
+
|
14
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
15
|
+
|
16
|
+
if File.file?(bundle_binstub)
|
17
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
18
|
+
load(bundle_binstub)
|
19
|
+
else
|
20
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
21
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
require "rubygems"
|
26
|
+
require "bundler/setup"
|
27
|
+
|
28
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/setup
ADDED
data/forcast.gemspec
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
#https://medium.com/@SunnyB/my-first-ruby-gem-part-2-a-look-under-the-hood-efe4a68ba42
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
#Dir.glob("#{lib}/forcast/tasks/**/*.rake").each { |f| load f }
|
5
|
+
|
6
|
+
require "date"
|
7
|
+
require "forcast/version"
|
8
|
+
|
9
|
+
version = Forcast::VERSION.to_s
|
10
|
+
if File.exists?("VERSION")
|
11
|
+
f = File.read("VERSION")
|
12
|
+
version = f.split(".")
|
13
|
+
version[0] = version[0].to_i
|
14
|
+
version[1] = version[1].to_i
|
15
|
+
version[2] = version[2].to_i + 1
|
16
|
+
# if version[2] < 10
|
17
|
+
# version[2] = version[0] + 1
|
18
|
+
# else
|
19
|
+
# version[2] = 0
|
20
|
+
# if version[1] < 10
|
21
|
+
# version[1] = version[1] + 1
|
22
|
+
# else
|
23
|
+
# version[1] = 0
|
24
|
+
# version[0] = version[0] + 1
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
version = version.join(".")
|
28
|
+
File.write("VERSION","#{version}")
|
29
|
+
end
|
30
|
+
date = DateTime.now.strftime("%Y-%m-%d").to_s
|
31
|
+
dependency = [Hash.new]
|
32
|
+
Gem::Specification.new do |spec|
|
33
|
+
spec.name = 'forcast'
|
34
|
+
spec.author = 'Oscar Castillo Arce'
|
35
|
+
spec.email = 'contacto@forcast.cl'
|
36
|
+
spec.homepage = 'https://www.forcast.cl'
|
37
|
+
spec.version = "#{version}"
|
38
|
+
spec.date = "#{date}"
|
39
|
+
spec.summary = 'FORCAST Desarrollo Tecnológico'
|
40
|
+
dependency = [{:gem => 'rails'},
|
41
|
+
{:gem => 'bcrypt'},
|
42
|
+
{:gem => 'sidekiq'},
|
43
|
+
{:gem => 'http'},
|
44
|
+
{:gem => 'rails-erd'},
|
45
|
+
{:gem => 'net-http-digest_auth', :option => '~> 1.2'}
|
46
|
+
]
|
47
|
+
dependency.each do |dep|
|
48
|
+
unless dep[:option].nil?
|
49
|
+
spec.add_dependency(dep[:gem])
|
50
|
+
else
|
51
|
+
spec.add_dependency(dep[:gem],dep[:option])
|
52
|
+
end
|
53
|
+
end
|
54
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
55
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
56
|
+
if spec.respond_to?(:metadata)
|
57
|
+
#spec.metadata["allowed_push_host"] = "https://opcastil11@bitbucket.org/backdevforcast/forcast_gem.git"
|
58
|
+
else
|
59
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
60
|
+
"public gem pushes."
|
61
|
+
end
|
62
|
+
# Specify which files should be added to the gem when it is released.
|
63
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
64
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
65
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
66
|
+
end
|
67
|
+
spec.bindir = "exe"
|
68
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| }
|
69
|
+
spec.require_paths = ["lib"]
|
70
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
71
|
+
spec.add_development_dependency "rake", "~> 12.3.1"
|
72
|
+
|
73
|
+
end
|
data/lib/forcast.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require "forcast/controllers/application/crud"
|
2
|
+
require "forcast/controllers/application/meta"
|
3
|
+
require "forcast/controllers/application/error"
|
4
|
+
require "forcast/controllers/application/exception_handler"
|
5
|
+
require "forcast/controllers/application/json"
|
6
|
+
require "forcast/controllers/application/model"
|
7
|
+
require "forcast/controllers/application/locale"
|
8
|
+
require "forcast/controllers/application/log"
|
9
|
+
require "forcast/controllers/application/login"
|
10
|
+
require "forcast/controllers/application/permitirtodo"
|
11
|
+
require "forcast/controllers/application/utils"
|
12
|
+
require "forcast/controllers/application/database"
|