rails_twirp 0.13.2 → 0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/Gemfile +2 -0
  4. data/Rakefile +2 -0
  5. data/lib/commands/twirp/routes_command.rb +2 -0
  6. data/lib/rails_twirp/application.rb +2 -0
  7. data/lib/rails_twirp/engine.rb +2 -0
  8. data/lib/rails_twirp/errors.rb +2 -0
  9. data/lib/rails_twirp/exception_handling.rb +2 -0
  10. data/lib/rails_twirp/implicit_render.rb +2 -0
  11. data/lib/rails_twirp/instrumentation.rb +2 -0
  12. data/lib/rails_twirp/log_subscriber.rb +2 -0
  13. data/lib/rails_twirp/mapper.rb +2 -0
  14. data/lib/rails_twirp/render_pb.rb +2 -0
  15. data/lib/rails_twirp/rescue.rb +2 -0
  16. data/lib/rails_twirp/route_set.rb +2 -0
  17. data/lib/rails_twirp/testing/integration_test.rb +2 -0
  18. data/lib/rails_twirp/url_for.rb +2 -0
  19. data/lib/rails_twirp/version.rb +3 -1
  20. data/lib/rails_twirp.rb +2 -0
  21. data/rails_twirp.gemspec +2 -0
  22. data/test/dummy/Rakefile +2 -0
  23. data/test/dummy/app/channels/application_cable/channel.rb +2 -0
  24. data/test/dummy/app/channels/application_cable/connection.rb +2 -0
  25. data/test/dummy/app/controllers/application_controller.rb +2 -0
  26. data/test/dummy/app/controllers/application_twirp_controller.rb +2 -0
  27. data/test/dummy/app/controllers/dummy_controller.rb +2 -0
  28. data/test/dummy/app/controllers/pings_controller.rb +2 -0
  29. data/test/dummy/app/controllers/testmod/nested/other_controller.rb +2 -0
  30. data/test/dummy/app/helpers/application_helper.rb +2 -0
  31. data/test/dummy/app/helpers/random_helper.rb +2 -0
  32. data/test/dummy/app/jobs/application_job.rb +2 -0
  33. data/test/dummy/app/mailers/application_mailer.rb +2 -0
  34. data/test/dummy/app/models/application_record.rb +2 -0
  35. data/test/dummy/config/application.rb +2 -0
  36. data/test/dummy/config/boot.rb +2 -0
  37. data/test/dummy/config/environment.rb +2 -0
  38. data/test/dummy/config/environments/development.rb +2 -0
  39. data/test/dummy/config/environments/production.rb +2 -0
  40. data/test/dummy/config/environments/test.rb +2 -0
  41. data/test/dummy/config/initializers/application_controller_renderer.rb +2 -0
  42. data/test/dummy/config/initializers/backtrace_silencers.rb +2 -0
  43. data/test/dummy/config/initializers/content_security_policy.rb +2 -0
  44. data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
  45. data/test/dummy/config/initializers/filter_parameter_logging.rb +2 -0
  46. data/test/dummy/config/initializers/inflections.rb +2 -0
  47. data/test/dummy/config/initializers/mime_types.rb +2 -0
  48. data/test/dummy/config/initializers/permissions_policy.rb +2 -0
  49. data/test/dummy/config/initializers/wrap_parameters.rb +2 -0
  50. data/test/dummy/config/puma.rb +4 -2
  51. data/test/dummy/config/routes.rb +2 -0
  52. data/test/dummy/config/twirp/routes.rb +2 -0
  53. data/test/dummy/config.ru +2 -0
  54. data/test/dummy/proto/api_pb.rb +2 -0
  55. data/test/dummy/proto/api_twirp.rb +2 -0
  56. data/test/dummy_test.rb +2 -0
  57. data/test/other_controller_test.rb +2 -0
  58. data/test/ping_controller_test.rb +2 -0
  59. data/test/rails_twirp_test.rb +2 -0
  60. data/test/test_helper.rb +2 -0
  61. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46c49b6df28547639b8c56395dfb5c9f327a4ec4b0c2b73b14cdf6b6594f1e17
4
- data.tar.gz: f232e0c6f6eac4d4034050cf6cc38a8c6bdfa6a77b260fe54a2d4473a0512350
3
+ metadata.gz: 9b7e742d4821b2a3745b2463d19aae223822eac419bd773d371f379143454d71
4
+ data.tar.gz: 1abf4446ebeea434ecdd7064a19e5ad7375c0e3e8f936af4afaf67a938923844
5
5
  SHA512:
6
- metadata.gz: e788cdd4ca43c5524ecc34f3dd43dbbbf7081689e0154133def3fcefd92955a46a3aa5abe280a44b51faef30b630f651bdcdbb00b5cade1194e83d969ddfac95
7
- data.tar.gz: 1bb844a44698a1a9d1c85f80a555191f8ce5d43a8212e5629b4bdd657b3f908a37b6b50a65d1f28913015bfb477d984c40a09a6a4ba3bf86b20f0da4914c89ae
6
+ metadata.gz: 6dfdf309ddc0f01d4da60b51205de47414fc11aff123a15f1e65fdbbd31d532c9c417fe7e73f5e5a4a9c0fb0d9f030c6a758bae1fc4a40df4f776167a64a2c84
7
+ data.tar.gz: 74840175fc2b2bac370dcddb5c906f89cebf072c7b5f678baca72f4c678d45c87ff15f0cfbe62c9e7d15ac3b8904eedc99ffd4d90fdb632439c18d575ad40a95
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 0.14.0
2
+ * Adding frozen_string_literal: true to all files.
3
+
1
4
  ### 0.13.2
2
5
  * revert - include `test/` folder in a final gem distribution
3
6
 
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in rails_twirp.gemspec.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/setup"
2
4
  require "bundler/gem_tasks"
3
5
  require "rake/testtask"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsTwirp
2
4
  module Command
3
5
  class RoutesCommand < Rails::Command::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails_twirp/route_set"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails_twirp/application"
2
4
  require "rails_twirp/route_set"
3
5
  require "rails/railtie"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "twirp/error"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "twirp/error"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "action_controller/metal/basic_implicit_render"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsTwirp
2
4
  module Instrumentation
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_support/log_subscriber"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "forwardable"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsTwirp
2
4
  # RenderPb makes it possible to do 'render pb: <proto object>', skipping templates
3
5
  # The way this module is written is inspired by ActionController::Renderers
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsTwirp
2
4
  module Rescue
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Most of this logic is stolen from Rails ActionDispatch::Routing::RouteSet
2
4
 
3
5
  require "rails_twirp/mapper"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "twirp/encoding"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "abstract_controller/url_for"
2
4
 
3
5
  module RailsTwirp
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RailsTwirp
2
- VERSION = "0.13.2"
4
+ VERSION = "0.14"
3
5
  end
data/lib/rails_twirp.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rails_twirp/version"
2
4
 
3
5
  require "rails_twirp/application"
data/rails_twirp.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "lib/rails_twirp/version"
2
4
 
3
5
  Gem::Specification.new do |spec|
data/test/dummy/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
4
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ApplicationCable
2
4
  class Channel < ActionCable::Channel::Base
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ApplicationCable
2
4
  class Connection < ActionCable::Connection::Base
3
5
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationController < ActionController::Base
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationTwirpController < RailsTwirp::Base
2
4
  rescue_from ActiveRecord::RecordNotFound, with: :handle_not_found
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class DummyController < RailsTwirp::Base
2
4
  def rpc_name_check
3
5
  @rpc_name = rpc_name
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class PingsController < ApplicationTwirpController
2
4
  before_action :respond_error, only: :before_error
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Testmod
2
4
  module Nested
3
5
  class OtherController < ApplicationTwirpController
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ApplicationHelper
2
4
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RandomHelper
2
4
  def does_this_work(n)
3
5
  n * 2
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationJob < ActiveJob::Base
2
4
  # Automatically retry jobs that encountered a deadlock
3
5
  # retry_on ActiveRecord::Deadlocked
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationMailer < ActionMailer::Base
2
4
  default from: "from@example.com"
3
5
  layout "mailer"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ApplicationRecord < ActiveRecord::Base
2
4
  self.abstract_class = true
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "boot"
2
4
 
3
5
  require "rails/all"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Set up gems listed in the Gemfile.
2
4
  ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Load the Rails application.
2
4
  require_relative "application"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_support/core_ext/integer/time"
2
4
 
3
5
  Rails.application.configure do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_support/core_ext/integer/time"
2
4
 
3
5
  Rails.application.configure do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_support/core_ext/integer/time"
2
4
 
3
5
  # The test environment is used exclusively to run your application's
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # ActiveSupport::Reloader.to_prepare do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # Define an application-wide content security policy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # Specify a serializer for the signed and encrypted cookie jars.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # Configure sensitive parameters which will be filtered from the log file.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # Add new inflection rules using the following format. Inflections
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # Add new mime types for use in respond_to blocks:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Define an application-wide HTTP permissions policy. For further
2
4
  # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Be sure to restart your server when you modify this file.
2
4
 
3
5
  # This file contains settings for ActionController::ParamsWrapper which
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Puma can serve each request in a thread from an internal thread pool.
2
4
  # The `threads` method setting takes two numbers: a minimum and maximum.
3
5
  # Any libraries that use thread pools should be configured to match
@@ -19,10 +21,10 @@ port ENV.fetch("PORT", 3000)
19
21
 
20
22
  # Specifies the `environment` that Puma will run in.
21
23
  #
22
- environment ENV.fetch("RAILS_ENV") { "development" }
24
+ environment ENV.fetch("RAILS_ENV", "development")
23
25
 
24
26
  # Specifies the `pidfile` that Puma will use.
25
- pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
27
+ pidfile ENV.fetch("PIDFILE", "tmp/pids/server.pid")
26
28
 
27
29
  # Specifies the number of `workers` to boot in clustered mode.
28
30
  # Workers are forked web server processes. If using threads and workers together
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Rails.application.routes.draw do
2
4
  mount RailsTwirp::Engine => "/twirp"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "../../proto/api_twirp"
2
4
 
3
5
  Rails.application.twirp.routes.draw do
data/test/dummy/config.ru CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is used by Rack-based servers to start the application.
2
4
 
3
5
  require_relative "config/environment"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
4
  # source: api.proto
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Code generated by protoc-gen-twirp_ruby 1.8.0, DO NOT EDIT.
2
4
  require "twirp"
3
5
  require_relative "api_pb"
data/test/dummy_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class DummyControllerTest < RailsTwirp::IntegrationTest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class OtherControllerTest < RailsTwirp::IntegrationTest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class PingControllerTest < RailsTwirp::IntegrationTest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "test_helper"
2
4
 
3
5
  class RailsTwirpTest < ActiveSupport::TestCase
data/test/test_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Configure Rails Environment
2
4
  ENV["RAILS_ENV"] = "test"
3
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_twirp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bouke van der Bijl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-25 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails