rubypitaya 2.25.1 → 2.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55bc3adc9c4e44304aceddc76204d67e147be13409f34116fd43fad42ec7a1ec
4
- data.tar.gz: 003b0bf7ad5d1e3f2917327e0db98344b35f388e4f924da92be7f8861891c307
3
+ metadata.gz: 8c289b7e66999cba7c278e77dd8658527cd101218009709e533fe853b5f43250
4
+ data.tar.gz: 4dd6b6fe78b6c22b30b1a7564a9972da484753c8d8716e4fd5dabd0e0f5ae001
5
5
  SHA512:
6
- metadata.gz: b70ab8dad9c768b8d1cd6ba66472d539397db4898b83be9d2624f9af0df989f311cc91c28463d5d3ed4a3ee586c8b488232e89862e2d920a0912bf80c3d85e71
7
- data.tar.gz: ccd0ec9c84bb26d06fd1f9394e38f3ec8be31097dafd2ba91d6370e323351398dc928b821b8d918af5ce78f6197b2e01b6881f2920bb966bc012ec90c9d30234
6
+ metadata.gz: 3faa2a8b0cda879621cb823ae920271477596c556c9938881fcd829e185a7563d6da3492bb7a387c5a58766ce5d8f990dbc1c73bf997a19c3e0eaf5db6153ccc
7
+ data.tar.gz: ee519fc3028078226cc0e5e01e0b706bd96962481b10ca263e60c28f371b354bd0480b0fa3452e4fc9007ea4f786bbf0ba2ca75c330a6ad72b901cbf9defae9c
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '2.25.1'
3
+ gem 'rubypitaya', '2.26.0'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.14.0'
@@ -111,7 +111,7 @@ GEM
111
111
  rspec-support (~> 3.10.0)
112
112
  rspec-support (3.10.2)
113
113
  ruby2_keywords (0.0.5)
114
- rubypitaya (2.25.1)
114
+ rubypitaya (2.26.0)
115
115
  activerecord (= 6.1.3)
116
116
  etcdv3 (= 0.10.2)
117
117
  mongo (= 2.15.0)
@@ -152,7 +152,7 @@ DEPENDENCIES
152
152
  listen (= 3.4.1)
153
153
  pry (= 0.14.0)
154
154
  rspec (= 3.10.0)
155
- rubypitaya (= 2.25.1)
155
+ rubypitaya (= 2.26.0)
156
156
 
157
157
  BUNDLED WITH
158
158
  2.1.4
@@ -1,6 +1,6 @@
1
1
  require 'active_record'
2
2
 
3
- class CreateUserMigration < ActiveRecord::Migration[6.0]
3
+ class CreateUserMigration < ActiveRecord::Migration[6.1]
4
4
 
5
5
  enable_extension 'pgcrypto'
6
6
 
@@ -6,6 +6,8 @@ module RubyPitaya
6
6
 
7
7
  class HandlerRouter
8
8
 
9
+ INVALID_ACTION_NAMES = ['initialize', 'set_attributes']
10
+
9
11
  def initialize()
10
12
  routes_path = Path::ROUTES_FILE_PATH
11
13
  handler_folder_paths = Path::Plugins::HANDLERS_FOLDER_PATHS + [Path::HANDLERS_FOLDER_PATH]
@@ -59,13 +61,14 @@ module RubyPitaya
59
61
  unless @handler_name_map.include?(handler_name)
60
62
  return {
61
63
  code: StatusCodes::CODE_HANDLER_NOT_FOUND,
62
- msg: "Handler #{handler_name} not founded"
64
+ message: "Handler #{handler_name} not found"
63
65
  }
64
66
  end
65
- unless @handler_name_map[handler_name].public_methods(false).include?(action_name.to_sym)
67
+ if INVALID_ACTION_NAMES.include?(action_name) ||
68
+ !@handler_name_map[handler_name].public_methods(false).include?(action_name.to_sym)
66
69
  return {
67
70
  code: StatusCodes::CODE_ACTION_NOT_FOUND,
68
- msg: "Handler #{handler_name} action #{action_name} not founded"
71
+ message: "Handler #{handler_name} action #{action_name} not found"
69
72
  }
70
73
  end
71
74
 
@@ -81,7 +84,7 @@ module RubyPitaya
81
84
  else
82
85
  return {
83
86
  code: StatusCodes::CODE_NOT_AUTHENTICATED,
84
- msg: 'Not authenticated',
87
+ message: 'Not authenticated',
85
88
  }
86
89
  end
87
90
  end
@@ -1,9 +1,11 @@
1
1
  require 'sinatra/base'
2
+ require 'sinatra/activerecord'
2
3
  require 'rubypitaya/core/parameters'
3
4
 
4
5
  module RubyPitaya
5
6
 
6
7
  class HttpRoutes < Sinatra::Base
8
+ register Sinatra::ActiveRecordExtension
7
9
 
8
10
  def self.auto_reload
9
11
  require 'sinatra/reloader'
@@ -1,6 +1,6 @@
1
1
  require 'active_record'
2
2
 
3
- class <%= class_name %> < ActiveRecord::Migration[6.0]
3
+ class <%= class_name %> < ActiveRecord::Migration[6.1]
4
4
 
5
5
  enable_extension 'pgcrypto'
6
6
 
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '2.25.1'
2
+ VERSION = '2.26.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypitaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.25.1
4
+ version: 2.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-27 00:00:00.000000000 Z
11
+ date: 2021-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 13.0.3
33
+ version: 13.0.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 13.0.3
40
+ version: 13.0.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nats
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 4.2.5
75
+ version: 4.4.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 4.2.5
82
+ version: 4.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: etcdv3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.10.2
89
+ version: 0.11.3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.10.2
96
+ version: 0.11.3
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sinatra
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,70 +114,84 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.3.3
117
+ version: 0.4.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.3.3
124
+ version: 0.4.0
125
125
  - !ruby/object:Gem::Dependency
126
- name: sinatra-contrib
126
+ name: protobuf
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 2.1.0
131
+ version: 3.10.4
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 2.1.0
138
+ version: 3.10.4
139
139
  - !ruby/object:Gem::Dependency
140
- name: protobuf
140
+ name: activerecord
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - '='
144
144
  - !ruby/object:Gem::Version
145
- version: 3.10.0
145
+ version: 6.1.4.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
- version: 3.10.0
152
+ version: 6.1.4.1
153
153
  - !ruby/object:Gem::Dependency
154
- name: activerecord
154
+ name: sinatra-contrib
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 2.1.0
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 2.1.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: sinatra-activerecord
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - '='
158
172
  - !ruby/object:Gem::Version
159
- version: 6.1.3
173
+ version: 2.0.23
160
174
  type: :runtime
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - '='
165
179
  - !ruby/object:Gem::Version
166
- version: 6.1.3
180
+ version: 2.0.23
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: pry
169
183
  requirement: !ruby/object:Gem::Requirement
170
184
  requirements:
171
185
  - - '='
172
186
  - !ruby/object:Gem::Version
173
- version: 0.14.0
187
+ version: 0.14.1
174
188
  type: :development
175
189
  prerelease: false
176
190
  version_requirements: !ruby/object:Gem::Requirement
177
191
  requirements:
178
192
  - - '='
179
193
  - !ruby/object:Gem::Version
180
- version: 0.14.0
194
+ version: 0.14.1
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: bundler
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -212,28 +226,28 @@ dependencies:
212
226
  requirements:
213
227
  - - '='
214
228
  - !ruby/object:Gem::Version
215
- version: 3.4.1
229
+ version: 3.7.0
216
230
  type: :development
217
231
  prerelease: false
218
232
  version_requirements: !ruby/object:Gem::Requirement
219
233
  requirements:
220
234
  - - '='
221
235
  - !ruby/object:Gem::Version
222
- version: 3.4.1
236
+ version: 3.7.0
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: cucumber
225
239
  requirement: !ruby/object:Gem::Requirement
226
240
  requirements:
227
241
  - - '='
228
242
  - !ruby/object:Gem::Version
229
- version: 5.3.0
243
+ version: 7.0.0
230
244
  type: :development
231
245
  prerelease: false
232
246
  version_requirements: !ruby/object:Gem::Requirement
233
247
  requirements:
234
248
  - - '='
235
249
  - !ruby/object:Gem::Version
236
- version: 5.3.0
250
+ version: 7.0.0
237
251
  description: RubyPitaya is an application to create servers using the pitaya protocol.
238
252
  email:
239
253
  - lucianopcbr@gmail.com