utopia 2.11.1 → 2.12.0

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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Rakefile +2 -0
  4. data/benchmarks/call_vs_check.rb +2 -0
  5. data/benchmarks/const_vs_hash.rb +2 -0
  6. data/benchmarks/hash_vs_openstruct.rb +2 -0
  7. data/benchmarks/string_vs_symbol.rb +2 -0
  8. data/benchmarks/struct_vs_class.rb +2 -0
  9. data/documentation/Gemfile +1 -0
  10. data/documentation/Rakefile +1 -0
  11. data/documentation/config.ru +1 -0
  12. data/documentation/config/environment.rb +1 -0
  13. data/documentation/pages/wiki/controller.rb +1 -0
  14. data/documentation/spec/website_context.rb +1 -0
  15. data/documentation/spec/website_spec.rb +1 -0
  16. data/lib/utopia.rb +2 -0
  17. data/lib/utopia/command.rb +2 -0
  18. data/lib/utopia/command/environment.rb +2 -0
  19. data/lib/utopia/command/server.rb +2 -0
  20. data/lib/utopia/command/site.rb +2 -0
  21. data/lib/utopia/content.rb +10 -1
  22. data/lib/utopia/content/document.rb +2 -0
  23. data/lib/utopia/content/link.rb +2 -0
  24. data/lib/utopia/content/links.rb +160 -124
  25. data/lib/utopia/content/markup.rb +2 -0
  26. data/lib/utopia/content/namespace.rb +2 -0
  27. data/lib/utopia/content/node.rb +6 -3
  28. data/lib/utopia/content/response.rb +2 -0
  29. data/lib/utopia/content/tags.rb +2 -0
  30. data/lib/utopia/content_length.rb +2 -0
  31. data/lib/utopia/controller.rb +2 -0
  32. data/lib/utopia/controller/actions.rb +2 -0
  33. data/lib/utopia/controller/base.rb +2 -0
  34. data/lib/utopia/controller/respond.rb +2 -0
  35. data/lib/utopia/controller/rewrite.rb +2 -0
  36. data/lib/utopia/controller/variables.rb +2 -0
  37. data/lib/utopia/exceptions.rb +2 -0
  38. data/lib/utopia/exceptions/handler.rb +2 -0
  39. data/lib/utopia/exceptions/mailer.rb +2 -0
  40. data/lib/utopia/extensions/array_split.rb +2 -0
  41. data/lib/utopia/extensions/date_comparisons.rb +2 -0
  42. data/lib/utopia/http.rb +2 -0
  43. data/lib/utopia/locale.rb +2 -0
  44. data/lib/utopia/localization.rb +2 -0
  45. data/lib/utopia/logger.rb +2 -0
  46. data/lib/utopia/middleware.rb +2 -0
  47. data/lib/utopia/path.rb +2 -0
  48. data/lib/utopia/path/matcher.rb +2 -0
  49. data/lib/utopia/redirection.rb +2 -0
  50. data/lib/utopia/session.rb +2 -0
  51. data/lib/utopia/session/lazy_hash.rb +2 -0
  52. data/lib/utopia/session/serialization.rb +2 -0
  53. data/lib/utopia/setup.rb +2 -0
  54. data/lib/utopia/static.rb +2 -0
  55. data/lib/utopia/static/local_file.rb +2 -0
  56. data/lib/utopia/static/mime_types.rb +2 -0
  57. data/lib/utopia/version.rb +3 -1
  58. data/setup/site/Gemfile +1 -0
  59. data/setup/site/Rakefile +1 -0
  60. data/setup/site/config.ru +1 -0
  61. data/setup/site/config/environment.rb +1 -0
  62. data/setup/site/falcon.rb +1 -0
  63. data/setup/site/spec/spec_helper.rb +1 -0
  64. data/setup/site/spec/website_context.rb +1 -0
  65. data/setup/site/spec/website_spec.rb +1 -0
  66. data/setup/site/tasks/deploy.rake +1 -0
  67. data/setup/site/tasks/development.rake +1 -0
  68. data/setup/site/tasks/environment.rake +1 -0
  69. data/setup/site/tasks/log.rake +1 -0
  70. data/setup/site/tasks/static.rake +1 -0
  71. data/setup/site/tasks/yarn.rake +1 -0
  72. data/spec/mock_node.rb +1 -0
  73. data/spec/spec_helper.rb +1 -0
  74. data/spec/utopia/command_spec.rb +2 -0
  75. data/spec/utopia/content/document_spec.rb +2 -0
  76. data/spec/utopia/content/link_spec.rb +1 -0
  77. data/spec/utopia/content/links_spec.rb +21 -21
  78. data/spec/utopia/content/markup_spec.rb +1 -0
  79. data/spec/utopia/content/namespace_spec.rb +2 -0
  80. data/spec/utopia/content/node_spec.rb +2 -0
  81. data/spec/utopia/content/response_spec.rb +2 -0
  82. data/spec/utopia/content/tags_spec.rb +2 -0
  83. data/spec/utopia/content_spec.rb +2 -0
  84. data/spec/utopia/content_spec.ru +1 -0
  85. data/spec/utopia/controller/actions_spec.rb +1 -0
  86. data/spec/utopia/controller/middleware_spec.rb +1 -0
  87. data/spec/utopia/controller/middleware_spec.ru +1 -0
  88. data/spec/utopia/controller/middleware_spec/controller/controller.rb +1 -0
  89. data/spec/utopia/controller/middleware_spec/controller/nested/controller.rb +1 -0
  90. data/spec/utopia/controller/middleware_spec/redirect/controller.rb +1 -0
  91. data/spec/utopia/controller/middleware_spec/redirect/test/controller.rb +1 -0
  92. data/spec/utopia/controller/respond_spec.rb +1 -0
  93. data/spec/utopia/controller/respond_spec.ru +1 -0
  94. data/spec/utopia/controller/respond_spec/api/controller.rb +1 -0
  95. data/spec/utopia/controller/respond_spec/errors/controller.rb +1 -0
  96. data/spec/utopia/controller/respond_spec/html/controller.rb +1 -0
  97. data/spec/utopia/controller/respond_spec/rewrite/controller.rb +1 -0
  98. data/spec/utopia/controller/rewrite_spec.rb +1 -0
  99. data/spec/utopia/controller/sequence_spec.rb +2 -1
  100. data/spec/utopia/controller/variables_spec.rb +1 -0
  101. data/spec/utopia/controller/websocket_spec.rb +1 -0
  102. data/spec/utopia/controller/websocket_spec.ru +1 -0
  103. data/spec/utopia/controller/websocket_spec/server/controller.rb +1 -0
  104. data/spec/utopia/exceptions/handler_spec.rb +1 -0
  105. data/spec/utopia/exceptions/handler_spec.ru +1 -0
  106. data/spec/utopia/exceptions/handler_spec/controller.rb +1 -0
  107. data/spec/utopia/exceptions/mailer_spec.rb +1 -0
  108. data/spec/utopia/exceptions/mailer_spec.ru +1 -0
  109. data/spec/utopia/extensions_spec.rb +2 -0
  110. data/spec/utopia/http/status_spec.rb +2 -0
  111. data/spec/utopia/locale_spec.rb +2 -0
  112. data/spec/utopia/localization_spec.rb +2 -0
  113. data/spec/utopia/localization_spec.ru +1 -0
  114. data/spec/utopia/localization_spec/controller.rb +1 -0
  115. data/spec/utopia/middleware_spec.rb +2 -0
  116. data/spec/utopia/path/matcher_spec.rb +1 -0
  117. data/spec/utopia/path_spec.rb +1 -0
  118. data/spec/utopia/performance_spec.rb +2 -0
  119. data/spec/utopia/performance_spec/config.ru +1 -0
  120. data/spec/utopia/performance_spec/pages/api/controller.rb +1 -0
  121. data/spec/utopia/rack_helper.rb +2 -0
  122. data/spec/utopia/redirection_spec.rb +2 -0
  123. data/spec/utopia/redirection_spec.ru +1 -0
  124. data/spec/utopia/session_spec.rb +2 -0
  125. data/spec/utopia/session_spec.ru +1 -0
  126. data/spec/utopia/setup_spec.rb +2 -0
  127. data/spec/utopia/static_spec.rb +2 -0
  128. data/spec/utopia/static_spec.ru +1 -0
  129. metadata +2 -2
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Content,
3
4
  root: File.expand_path('content_spec', __dir__)
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Controller,
3
4
  root: File.expand_path('middleware_spec', __dir__)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Redirection::Errors,
3
4
  404 => '/fail'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Respond, Actions
3
4
  respond.with_json
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Respond, Actions
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Respond, Actions
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Respond, Rewrite, Actions
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -45,7 +46,7 @@ module Utopia::Controller::SequenceSpec
45
46
  prepend Utopia::Controller::Actions
46
47
 
47
48
  def initialize
48
- @sequence = ""
49
+ @sequence = String.new
49
50
  end
50
51
 
51
52
  on('user/update') do
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Controller, root: File.expand_path('websocket_spec', __dir__)
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Exceptions::Handler, '/exception'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Exceptions::Mailer,
3
4
  delivery_method: :test,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
3
+
2
4
  # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
3
5
  #
4
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
3
+
2
4
  # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
3
5
  #
4
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  localization_spec_root = File.expand_path('localization_spec', __dir__)
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Actions
3
4
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env rackup
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'utopia'
4
5
  require 'json'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  prepend Respond, Actions
3
4
  respond.with_json
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Redirection::Rewrite, "/" => "/welcome/index"
3
4
 
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
3
+
2
4
  # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
3
5
  #
4
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Session,
3
4
  secret: "97111cabf4c1a5e85b8029cf7c61aa44424fc24a",
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
4
  #
3
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rspec
2
+ # frozen_string_literal: true
3
+
2
4
  # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
3
5
  #
4
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  use Utopia::Static, root: File.expand_path('static_spec', __dir__)
3
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni