rubypitaya 2.5.1 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84f3bb326f6529e6952dceb0f93ac795cfb862cd7661dd14c7d9714296094e6e
4
- data.tar.gz: 0c731e2b492a3392cb8ffc58999e407229ba9283af9f3ac425a864651f703678
3
+ metadata.gz: e320e8b3358448fe38fd1c1045f51f69819fe6295c22c7faf53465be8aa835a1
4
+ data.tar.gz: 222317d303922f8ff462f6c4cc948fe281a7a218a75894fc2e085073bf4f79ac
5
5
  SHA512:
6
- metadata.gz: f231eed02e593db2e16890cdba291d99ed58a48358c00b5e0bbd9d7136da0e76d21c532028b9133bf77478130978c2c6233cc212b577d6985d2d1b06a81363e6
7
- data.tar.gz: e3d32e830dc6a436a06a549ebd428dd004facbbd45cd0fb3107a34a8d01e48ef4da127eae55035989b941a997fc7da7d3d37a93e10973aedc80dbfe5a4ee637a
6
+ metadata.gz: a1c0594a2b41314ee342a75e74c1169f025afad5bf546e999dc07f2165a78a50c0565d16f3574dbdae06676e9c5a8d5262cdaf500c4187de32996928ca929d6c
7
+ data.tar.gz: 5c17f9d693ea7028882192bc5dae2a64abdf1f7749eb97ab218c461ffd9c3fc10fec3239687caed753cc35ed916a159a8522988e5f9b4ad9121a2b971bcb4f5a
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem 'rubypitaya', '2.5.1'
3
+ gem 'rubypitaya', '2.6.4'
4
4
 
5
5
  group :development do
6
6
  gem 'pry', '0.12.2'
@@ -12,14 +12,14 @@ GEM
12
12
  minitest (~> 5.1)
13
13
  tzinfo (~> 1.1)
14
14
  zeitwerk (~> 2.2)
15
- coderay (1.1.2)
15
+ coderay (1.1.3)
16
16
  concurrent-ruby (1.1.7)
17
- diff-lcs (1.3)
17
+ diff-lcs (1.4.4)
18
18
  etcdv3 (0.10.2)
19
19
  grpc (~> 1.17)
20
20
  eventmachine (1.2.7)
21
- ffi (1.12.2)
22
- google-protobuf (3.13.0)
21
+ ffi (1.13.1)
22
+ google-protobuf (3.14.0)
23
23
  googleapis-common-protos-types (1.0.5)
24
24
  google-protobuf (~> 3.11)
25
25
  grpc (1.32.0)
@@ -33,6 +33,9 @@ GEM
33
33
  method_source (0.9.2)
34
34
  middleware (0.1.0)
35
35
  minitest (5.14.2)
36
+ multi_json (1.15.0)
37
+ mustermann (1.1.1)
38
+ ruby2_keywords (~> 0.0.1)
36
39
  nats (0.11.0)
37
40
  eventmachine (~> 1.2, >= 1.2)
38
41
  pg (0.21.0)
@@ -44,8 +47,11 @@ GEM
44
47
  pry (0.12.2)
45
48
  coderay (~> 1.1.0)
46
49
  method_source (~> 0.9.0)
50
+ rack (2.2.3)
51
+ rack-protection (2.1.0)
52
+ rack
47
53
  rake (10.0.0)
48
- rb-fsevent (0.10.3)
54
+ rb-fsevent (0.10.4)
49
55
  rb-inotify (0.10.1)
50
56
  ffi (~> 1.0)
51
57
  redis (4.1.3)
@@ -62,7 +68,8 @@ GEM
62
68
  diff-lcs (>= 1.2.0, < 2.0)
63
69
  rspec-support (~> 3.8.0)
64
70
  rspec-support (3.8.3)
65
- rubypitaya (2.5.1)
71
+ ruby2_keywords (0.0.2)
72
+ rubypitaya (2.6.4)
66
73
  activerecord (= 6.0.2)
67
74
  etcdv3 (= 0.10.2)
68
75
  eventmachine (= 1.2.7)
@@ -71,11 +78,25 @@ GEM
71
78
  protobuf (= 3.10.0)
72
79
  rake (= 10.0)
73
80
  redis (= 4.1.3)
81
+ sinatra (= 2.1.0)
82
+ sinatra-contrib (= 2.1.0)
83
+ sinatra (2.1.0)
84
+ mustermann (~> 1.0)
85
+ rack (~> 2.2)
86
+ rack-protection (= 2.1.0)
87
+ tilt (~> 2.0)
88
+ sinatra-contrib (2.1.0)
89
+ multi_json
90
+ mustermann (~> 1.0)
91
+ rack-protection (= 2.1.0)
92
+ sinatra (= 2.1.0)
93
+ tilt (~> 2.0)
74
94
  thor (1.0.1)
75
95
  thread_safe (0.3.6)
96
+ tilt (2.0.10)
76
97
  tzinfo (1.2.8)
77
98
  thread_safe (~> 0.1)
78
- zeitwerk (2.4.1)
99
+ zeitwerk (2.4.2)
79
100
 
80
101
  PLATFORMS
81
102
  ruby
@@ -85,7 +106,7 @@ DEPENDENCIES
85
106
  listen (= 3.2.1)
86
107
  pry (= 0.12.2)
87
108
  rspec (= 3.8.0)
88
- rubypitaya (= 2.5.1)
109
+ rubypitaya (= 2.6.4)
89
110
 
90
111
  BUNDLED WITH
91
112
  1.17.2
@@ -10,6 +10,12 @@ module RubyPitaya
10
10
  register Sinatra::Reloader
11
11
  end
12
12
 
13
+ helpers do
14
+ def find_template(views, name, engine, &block)
15
+ views.each { |v| super(v, name, engine, &block) }
16
+ end
17
+ end
18
+
13
19
  before do
14
20
  content_type :json
15
21
 
@@ -17,8 +23,10 @@ module RubyPitaya
17
23
  @setup = settings.setup
18
24
  @config = settings.config
19
25
 
20
- request_body = request.body.read
21
- @params.merge!(JSON.parse(request_body)) if !request_body.blank?
26
+ if request.content_type == 'aplication/json'
27
+ request_body = request.body.read
28
+ @params.merge!(JSON.parse(request_body)) if !request_body.blank?
29
+ end
22
30
 
23
31
  @params = Parameters.new(@params)
24
32
  end
@@ -89,7 +89,7 @@ module RubyPitaya
89
89
  HttpRoutes.set :bll, @bll
90
90
  HttpRoutes.set :setup, @setup
91
91
  HttpRoutes.set :config, @config
92
- HttpRoutes.set :views, [Path::HTTP_VIEWS_PATH] + Path::Plugins::APP_CONFIG_FOLDER_PATHS;
92
+ HttpRoutes.set :views, [Path::HTTP_VIEWS_PATH] + Path::Plugins::HTTP_VIEWS_PATHS
93
93
 
94
94
  Thread.new do
95
95
  HttpRoutes.bind = '0.0.0.0'
@@ -1,3 +1,3 @@
1
1
  module RubyPitaya
2
- VERSION = '2.5.1'
2
+ VERSION = '2.6.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypitaya
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luciano Prestes Cavalcanti
@@ -227,7 +227,7 @@ files:
227
227
  - "./lib/rubypitaya/app-template/app/constants/status_codes.rb"
228
228
  - "./lib/rubypitaya/app-template/app/handlers/hello_world_handler.rb"
229
229
  - "./lib/rubypitaya/app-template/app/handlers/player_handler.rb"
230
- - "./lib/rubypitaya/app-template/app/http/hello_world.rb"
230
+ - "./lib/rubypitaya/app-template/app/http/hello_world_http.rb"
231
231
  - "./lib/rubypitaya/app-template/app/http/views/hello_world.erb"
232
232
  - "./lib/rubypitaya/app-template/app/models/player.rb"
233
233
  - "./lib/rubypitaya/app-template/app/models/user.rb"