right_develop 2.2.2 → 2.2.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.2.3
@@ -281,11 +281,13 @@ module RightDevelop::Testing::Client::Rest::Request
281
281
  def fixture_file_path(kind, epoch)
282
282
  # remove API root from path because we are already under an API-specific
283
283
  # subdirectory and the route base path may be redundant.
284
- unless request_metadata.uri.path.start_with?(@route_path)
284
+ uri_path = request_metadata.uri.path
285
+ uri_path += '/' unless uri_path.end_with?('/')
286
+ unless uri_path.start_with?(@route_path)
285
287
  raise ::ArgumentError,
286
288
  "Request URI = #{request_metadata.uri.path.inspect} did not start with #{@route_path.inspect}."
287
289
  end
288
- route_relative_path = request_metadata.uri.path[@route_path.length..-1]
290
+ route_relative_path = uri_path[@route_path.length..-1]
289
291
  ::File.join(
290
292
  fixtures_route_dir(kind, epoch),
291
293
  route_relative_path,
@@ -234,7 +234,9 @@ module RightDevelop::Testing::Server::MightApi
234
234
  #
235
235
  # @return [Array] pair of [prefix, data] or nil
236
236
  def find_route(uri)
237
+ # ensure path is slash-terminated only for matching purposes.
237
238
  find_path = uri.path
239
+ find_path += '/' unless find_path.end_with?('/')
238
240
  logger.debug "Route URI path to match = #{find_path.inspect}"
239
241
  config.routes.find do |prefix, data|
240
242
  matched = find_path.start_with?(prefix)
@@ -58,10 +58,9 @@ module RightDevelop::Testing::Server::MightApi
58
58
 
59
59
  class DateTimeLoggerFormatter < ::Logger::Formatter
60
60
  def call(severity, time, progname, msg)
61
- sprintf("%s (%s) %s: %s\n",
61
+ sprintf("%s (%s): %s\n",
62
62
  ::Time.now,
63
63
  ::Thread.current.object_id,
64
- severity,
65
64
  msg2str(msg))
66
65
  end
67
66
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{right_develop}
8
- s.version = "2.2.2"
8
+ s.version = "2.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tony Spataro"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_develop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 2
10
- version: 2.2.2
9
+ - 3
10
+ version: 2.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tony Spataro
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-06-03 00:00:00 -07:00
18
+ date: 2014-06-04 00:00:00 -07:00
19
19
  default_executable: right_develop
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency