flame 5.0.0.rc8 → 5.0.0.rc10

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: 1e91ec965639f616e5725b91181ea2bb884e171bd5140f9e0ce7211454a5ec1e
4
- data.tar.gz: 71292f6bd5b6862689f63e06904255f551f3c4e5501e16e922ac08b27a824f27
3
+ metadata.gz: b9f5ed6826ce10190699edca72f191a08887d3acf0bf4f8b563457d6c13c3287
4
+ data.tar.gz: e6f1cb17ebfe5edefad9c7f692e07f1394e94cf869219872201068703177a970
5
5
  SHA512:
6
- metadata.gz: 6cc534f9f11bd57d96fbc368ef26910d82361e57c4e74eff98272ffe82d7b385f87c84f59ff8f270334def88d6ece6a98a7bfc58b169914de69f09c58ba9b72c
7
- data.tar.gz: 73b669cad763c69abe253e579cf48d97a237cdd0988b95787605a7d80face682950c01f704202890f06482100957ecdc5ecd9a611e8b95b81326973407a2ddc6
6
+ metadata.gz: caeabdc659c818aab2ad4b9e50f204ef4eae3e6ef398e4a1c38ef4b0e0d7c632dcc2956e490e68c2fd6ddd9c7521ce6f2ed9dd5bf5b524c44a37c1a4b53e9968
7
+ data.tar.gz: d06cecef3a6a12e154e9f8b24ecff2eeda41f0fe9ee48a2eddbc4e051ea6da6faa4a50dd2ff11618792ceab4edb208b283c8c2ba22938e76c378f25dae484775
data/CHANGELOG.md CHANGED
@@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
11
11
  But you can disable it with `nested: false` option for `mount`,
12
12
  for example, for conditional umbrella application.
13
13
  * Allow to mount anonymous controllers
14
- * Add support for Ruby 3.0
14
+ * Add support for Ruby 3.0 ­– 3.4
15
15
  * Add support of `OPTIONS` HTTP-method
16
16
  * Add `Application.require_dirs` method
17
17
  * Add `Controller#path_to_back` method
@@ -89,7 +89,7 @@ All notable changes to this project will be documented in this file.
89
89
  ### Removed
90
90
 
91
91
  * Remove `Application#config` and `Application#router` methods
92
- * Remove Ruby < 2.6 support
92
+ * Remove Ruby < 2.7 support
93
93
  * Remove HTML tags (`<h1>`) from default body \
94
94
  There is no `Content-Type` HTTP header, also there is no reason to return exactly HTML content \
95
95
  (Flame can be used only for API or something else).
@@ -130,7 +130,7 @@ module Flame
130
130
  cache = config[:environment] == 'production' if cache.nil?
131
131
  template = Flame::Render.new(
132
132
  self,
133
- (path || caller_locations(1, 1)[0].label.to_sym),
133
+ (path || caller_locations(1, 1)[0].base_label.to_sym),
134
134
  options
135
135
  )
136
136
  template.render(cache: cache, &block)
@@ -10,7 +10,7 @@ module Flame
10
10
  ## @param directory [String] directory in which file was not found
11
11
  def initialize(file_name, directory)
12
12
  directory = directory.sub(%r{^/+}, '').sub(%r{/+$}, '')
13
- super "Config file '#{file_name}' not found in '#{directory}/'"
13
+ super("Config file '#{file_name}' not found in '#{directory}/'")
14
14
  end
15
15
  end
16
16
  end
@@ -23,7 +23,7 @@ module Flame
23
23
  path: "Action '#{ctrl}##{action}'"
24
24
  }[extra[:place]]
25
25
 
26
- super "#{entity} has no #{extra[:type_name]} arguments #{extra[:args].inspect}"
26
+ super("#{entity} has no #{extra[:type_name]} arguments #{extra[:args].inspect}")
27
27
  end
28
28
  end
29
29
  end
@@ -11,7 +11,7 @@ module Flame
11
11
  def initialize(controller, path)
12
12
  controller = controller.class unless controller.is_a? Class
13
13
 
14
- super "Template '#{path}' not found for '#{controller}'"
14
+ super("Template '#{path}' not found for '#{controller}'")
15
15
  end
16
16
  end
17
17
  end
data/lib/flame/path.rb CHANGED
@@ -94,7 +94,7 @@ module Flame
94
94
  ## Assign arguments to path for `Controller#path_to`
95
95
  ## @param args [Hash] arguments for assigning
96
96
  def assign_arguments(args = {})
97
- result_parts = parts.map { |part| assign_argument(part, args) }.compact
97
+ result_parts = parts.filter_map { |part| assign_argument(part, args) }
98
98
  self.class.merge result_parts.unshift(nil)
99
99
  end
100
100
 
data/lib/flame/render.rb CHANGED
@@ -95,12 +95,9 @@ module Flame
95
95
  def find_file(path)
96
96
  caller_path = caller_locations(4..4).first.path
97
97
 
98
- caller_dir =
99
- begin
100
- File.dirname(caller_path).sub(views_dir, '') if Tilt[caller_path]
101
- rescue LoadError
102
- nil
103
- end
98
+ ## It now never causes `LoadError`, but returning `nil`, as I want
99
+ ## https://github.com/jeremyevans/tilt/issues/2
100
+ caller_dir = File.dirname(caller_path).sub(views_dir, '') if Tilt[caller_path]
104
101
 
105
102
  find_files(path, controller_dirs | Array(caller_dir))
106
103
  .find { |file| Tilt[file] }
@@ -86,7 +86,7 @@ module Flame
86
86
  end
87
87
 
88
88
  PADDING_SIZE = Router::HTTP_METHODS.map(&:size).max
89
- PADDING_FORMAT = "%#{PADDING_SIZE}.#{PADDING_SIZE}s"
89
+ PADDING_FORMAT = "%#{PADDING_SIZE}.#{PADDING_SIZE}s".freeze
90
90
 
91
91
  ## Output routes in human readable format
92
92
  def to_s(prefix = '/')
data/lib/flame/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Flame
4
- VERSION = '5.0.0.rc8'
4
+ VERSION = '5.0.0.rc10'
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc8
4
+ version: 5.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-09-24 00:00:00.000000000 Z
10
+ date: 2024-12-30 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: addressable
@@ -64,14 +63,14 @@ dependencies:
64
63
  requirements:
65
64
  - - "~>"
66
65
  - !ruby/object:Gem::Version
67
- version: '4.0'
66
+ version: '5.0'
68
67
  type: :runtime
69
68
  prerelease: false
70
69
  version_requirements: !ruby/object:Gem::Requirement
71
70
  requirements:
72
71
  - - "~>"
73
72
  - !ruby/object:Gem::Version
74
- version: '4.0'
73
+ version: '5.0'
75
74
  - !ruby/object:Gem::Dependency
76
75
  name: rack
77
76
  requirement: !ruby/object:Gem::Requirement
@@ -88,200 +87,18 @@ dependencies:
88
87
  version: '3.0'
89
88
  - !ruby/object:Gem::Dependency
90
89
  name: tilt
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '2.0'
96
- type: :runtime
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '2.0'
103
- - !ruby/object:Gem::Dependency
104
- name: pry-byebug
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '3.9'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '3.9'
117
- - !ruby/object:Gem::Dependency
118
- name: bundler
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '2.0'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '2.0'
131
- - !ruby/object:Gem::Dependency
132
- name: bundler-audit
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: 0.9.0
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: 0.9.0
145
- - !ruby/object:Gem::Dependency
146
- name: gem_toys
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: 0.12.1
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: 0.12.1
159
- - !ruby/object:Gem::Dependency
160
- name: toys
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: 0.13.1
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: 0.13.1
173
- - !ruby/object:Gem::Dependency
174
- name: better_errors
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '2.0'
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - "~>"
185
- - !ruby/object:Gem::Version
186
- version: '2.0'
187
- - !ruby/object:Gem::Dependency
188
- name: rack-test
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - "~>"
192
- - !ruby/object:Gem::Version
193
- version: '2.0'
194
- type: :development
195
- prerelease: false
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '2.0'
201
- - !ruby/object:Gem::Dependency
202
- name: rspec
203
- requirement: !ruby/object:Gem::Requirement
204
- requirements:
205
- - - "~>"
206
- - !ruby/object:Gem::Version
207
- version: '3.9'
208
- type: :development
209
- prerelease: false
210
- version_requirements: !ruby/object:Gem::Requirement
211
- requirements:
212
- - - "~>"
213
- - !ruby/object:Gem::Version
214
- version: '3.9'
215
- - !ruby/object:Gem::Dependency
216
- name: simplecov
217
- requirement: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - "~>"
220
- - !ruby/object:Gem::Version
221
- version: 0.21.2
222
- type: :development
223
- prerelease: false
224
- version_requirements: !ruby/object:Gem::Requirement
225
- requirements:
226
- - - "~>"
227
- - !ruby/object:Gem::Version
228
- version: 0.21.2
229
- - !ruby/object:Gem::Dependency
230
- name: simplecov-cobertura
231
90
  requirement: !ruby/object:Gem::Requirement
232
91
  requirements:
233
92
  - - "~>"
234
93
  - !ruby/object:Gem::Version
235
94
  version: '2.1'
236
- type: :development
95
+ type: :runtime
237
96
  prerelease: false
238
97
  version_requirements: !ruby/object:Gem::Requirement
239
98
  requirements:
240
99
  - - "~>"
241
100
  - !ruby/object:Gem::Version
242
101
  version: '2.1'
243
- - !ruby/object:Gem::Dependency
244
- name: rubocop
245
- requirement: !ruby/object:Gem::Requirement
246
- requirements:
247
- - - "~>"
248
- - !ruby/object:Gem::Version
249
- version: 1.36.0
250
- type: :development
251
- prerelease: false
252
- version_requirements: !ruby/object:Gem::Requirement
253
- requirements:
254
- - - "~>"
255
- - !ruby/object:Gem::Version
256
- version: 1.36.0
257
- - !ruby/object:Gem::Dependency
258
- name: rubocop-performance
259
- requirement: !ruby/object:Gem::Requirement
260
- requirements:
261
- - - "~>"
262
- - !ruby/object:Gem::Version
263
- version: '1.0'
264
- type: :development
265
- prerelease: false
266
- version_requirements: !ruby/object:Gem::Requirement
267
- requirements:
268
- - - "~>"
269
- - !ruby/object:Gem::Version
270
- version: '1.0'
271
- - !ruby/object:Gem::Dependency
272
- name: rubocop-rspec
273
- requirement: !ruby/object:Gem::Requirement
274
- requirements:
275
- - - "~>"
276
- - !ruby/object:Gem::Version
277
- version: 2.13.2
278
- type: :development
279
- prerelease: false
280
- version_requirements: !ruby/object:Gem::Requirement
281
- requirements:
282
- - - "~>"
283
- - !ruby/object:Gem::Version
284
- version: 2.13.2
285
102
  description: |
286
103
  Use controller's classes with instance methods as routing actions,
287
104
  mounting its in application class.
@@ -330,12 +147,11 @@ licenses:
330
147
  metadata:
331
148
  rubygems_mfa_required: 'true'
332
149
  bug_tracker_uri: https://github.com/AlexWayfer/flame/issues
333
- changelog_uri: https://github.com/AlexWayfer/flame/blob/v5.0.0.rc8/CHANGELOG.md
334
- documentation_uri: http://www.rubydoc.info/gems/flame/5.0.0.rc8
150
+ changelog_uri: https://github.com/AlexWayfer/flame/blob/v5.0.0.rc10/CHANGELOG.md
151
+ documentation_uri: http://www.rubydoc.info/gems/flame/5.0.0.rc10
335
152
  homepage_uri: https://github.com/AlexWayfer/flame
336
153
  source_code_uri: https://github.com/AlexWayfer/flame
337
154
  wiki_uri: https://github.com/AlexWayfer/flame/wiki
338
- post_install_message:
339
155
  rdoc_options: []
340
156
  require_paths:
341
157
  - lib
@@ -343,18 +159,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
343
159
  requirements:
344
160
  - - ">="
345
161
  - !ruby/object:Gem::Version
346
- version: '2.6'
162
+ version: '3.0'
347
163
  - - "<"
348
164
  - !ruby/object:Gem::Version
349
- version: '4'
165
+ version: '3.5'
350
166
  required_rubygems_version: !ruby/object:Gem::Requirement
351
167
  requirements:
352
- - - ">"
168
+ - - ">="
353
169
  - !ruby/object:Gem::Version
354
- version: 1.3.1
170
+ version: '0'
355
171
  requirements: []
356
- rubygems_version: 3.3.7
357
- signing_key:
172
+ rubygems_version: 3.6.2
358
173
  specification_version: 4
359
174
  summary: Web-framework, based on MVC-pattern
360
175
  test_files: []