dockerfile-rails 1.6.12 → 1.6.13
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 +4 -4
 - data/lib/fly_replay.rb +29 -0
 - data/lib/generators/dockerfile_generator.rb +5 -1
 - data/lib/generators/templates/Dockerfile.erb +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6e248008553d63dc5b088dadfa1e79620d4f2db08f67bd67506a5f8a0421b973
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: de2ded8ae1828b7db4812fc9082928c9d4d57caf3ed4aa965134c2dec76dcb83
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8763575bc2a8d064e2ee20d3f6add987d81fede3656ba1f8c8b38c0f6808c8448ca31ca4e362ddac9bf275c38c10cb6baf0bbd113a842726623cff7a63b379c1
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: f54366d61f5f18d0db311922c5acae95950c5e56d6b56d262a93486c0019e29ac88744035d670eded6a2a08353a24c1a1f4093fdea38ba61a439322373c8dc22
         
     | 
    
        data/lib/fly_replay.rb
    ADDED
    
    | 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Fly
         
     | 
| 
      
 4 
     | 
    
         
            +
              class FlyReplay
         
     | 
| 
      
 5 
     | 
    
         
            +
                def initialize(app)
         
     | 
| 
      
 6 
     | 
    
         
            +
                  @app = app
         
     | 
| 
      
 7 
     | 
    
         
            +
                end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def call(env)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  # replay /prometheus/* to the prom proxy in bubblegum
         
     | 
| 
      
 11 
     | 
    
         
            +
                  if env["PATH_INFO"].starts_with?("/prometheus")
         
     | 
| 
      
 12 
     | 
    
         
            +
                    return [307, { "Fly-Replay" => "app=flyio-bubblegum-api" }, []]
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                  # replay /debug to the debug app. unsure if this is actually used
         
     | 
| 
      
 16 
     | 
    
         
            +
                  if env["PATH_INFO"].starts_with?("/debug")
         
     | 
| 
      
 17 
     | 
    
         
            +
                    return [307, { "Fly-Replay" => "app=debug" }, []]
         
     | 
| 
      
 18 
     | 
    
         
            +
                  end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  @status, @headers, @response = @app.call(env)
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                  context = OpenTelemetry::Trace.current_span.context
         
     | 
| 
      
 23 
     | 
    
         
            +
                  @headers["fly-trace-id"] = context.trace_id.unpack1("H*")
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @headers["fly-span-id"] = context.span_id.unpack1("H*")
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                  [@status, @headers, @response]
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -1169,7 +1169,7 @@ private 
     | 
|
| 
       1169 
1169 
     | 
    
         
             
                    nginx: '/usr/sbin/nginx -g "daemon off;"',
         
     | 
| 
       1170 
1170 
     | 
    
         
             
                    rails: "./bin/rails server -p 3001"
         
     | 
| 
       1171 
1171 
     | 
    
         
             
                  }
         
     | 
| 
       1172 
     | 
    
         
            -
                elsif  
     | 
| 
      
 1172 
     | 
    
         
            +
                elsif using_thruster?
         
     | 
| 
       1173 
1173 
     | 
    
         
             
                  {
         
     | 
| 
       1174 
1174 
     | 
    
         
             
                    rails: "bundle exec thrust ./bin/rails server"
         
     | 
| 
       1175 
1175 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -1180,6 +1180,10 @@ private 
     | 
|
| 
       1180 
1180 
     | 
    
         
             
                end
         
     | 
| 
       1181 
1181 
     | 
    
         
             
              end
         
     | 
| 
       1182 
1182 
     | 
    
         | 
| 
      
 1183 
     | 
    
         
            +
              def using_thruster?
         
     | 
| 
      
 1184 
     | 
    
         
            +
                options.thruster? || @gemfile.include?("thruster")
         
     | 
| 
      
 1185 
     | 
    
         
            +
              end
         
     | 
| 
      
 1186 
     | 
    
         
            +
             
     | 
| 
       1183 
1187 
     | 
    
         
             
              def fly_processes
         
     | 
| 
       1184 
1188 
     | 
    
         
             
                return unless File.exist? "fly.toml"
         
     | 
| 
       1185 
1189 
     | 
    
         
             
                return unless using_sidekiq? || using_solidq?
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: dockerfile-rails
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.6.13
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Sam Ruby
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-05-16 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -37,6 +37,7 @@ files: 
     | 
|
| 
       37 
37 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       38 
38 
     | 
    
         
             
            - lib/dockerfile-rails.rb
         
     | 
| 
       39 
39 
     | 
    
         
             
            - lib/dockerfile-rails/scanner.rb
         
     | 
| 
      
 40 
     | 
    
         
            +
            - lib/fly_replay.rb
         
     | 
| 
       40 
41 
     | 
    
         
             
            - lib/generators/dockerfile_generator.rb
         
     | 
| 
       41 
42 
     | 
    
         
             
            - lib/generators/templates/Dockerfile.erb
         
     | 
| 
       42 
43 
     | 
    
         
             
            - lib/generators/templates/_apt_install.erb
         
     |