rails-env 1.0.8 → 2.0.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.
- checksums.yaml +4 -4
- data/.github/workflows/ruby-tests.yml +13 -13
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +3 -2
- data/gemfiles/rails_7_0.gemfile +6 -0
- data/lib/rails-env/version.rb +1 -1
- data/lib/rails-env.rb +18 -7
- data/rails-env.gemspec +2 -1
- metadata +10 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ea802749d2e70a95ff81d1b0b0a1de144edd4e6832c7c82d2572f27261628f81
         | 
| 4 | 
            +
              data.tar.gz: 8c145d8d22615140b8522e5cfdac2ad3b8306901d26d40827ac0e8a4025ba746
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7304f1800a93bb07c64c51c1bd514576935110bfda4d1a5121c81920076c14b1e5ba327d222deb8d689d647657c63b671d84ddcbaafff72b78bfc80a45c8f6a0
         | 
| 7 | 
            +
              data.tar.gz: e00b9ac0a8c4dd4196709d042c8042afdb668ad1edb8714f0eb549405ad25a0fb07ff1a6a3a96eb38b4e88992cd4f479a40a28970d7895f0830ea0b201cdff50
         | 
| @@ -1,15 +1,11 @@ | |
| 1 | 
            +
            ---
         | 
| 1 2 | 
             
            name: ruby-tests
         | 
| 2 3 |  | 
| 3 4 | 
             
            on:
         | 
| 4 5 | 
             
              pull_request:
         | 
| 5 | 
            -
                branches:
         | 
| 6 | 
            -
                  - main
         | 
| 7 6 | 
             
              push:
         | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
              schedule:
         | 
| 12 | 
            -
                - cron: "0 10 * * *"
         | 
| 7 | 
            +
              workflow_dispatch:
         | 
| 8 | 
            +
                inputs: {}
         | 
| 13 9 |  | 
| 14 10 | 
             
            jobs:
         | 
| 15 11 | 
             
              build:
         | 
| @@ -18,23 +14,27 @@ jobs: | |
| 18 14 | 
             
                strategy:
         | 
| 19 15 | 
             
                  fail-fast: false
         | 
| 20 16 | 
             
                  matrix:
         | 
| 21 | 
            -
                    ruby: [2. | 
| 17 | 
            +
                    ruby: [2.7.x, 3.0.x]
         | 
| 22 18 | 
             
                    gemfile:
         | 
| 23 19 | 
             
                      - Gemfile
         | 
| 20 | 
            +
                      - gemfiles/rails_7_0.gemfile
         | 
| 21 | 
            +
                      - gemfiles/rails_6_0.gemfile
         | 
| 24 22 |  | 
| 25 23 | 
             
                steps:
         | 
| 26 | 
            -
                  - uses: actions/checkout@ | 
| 24 | 
            +
                  - uses: actions/checkout@v2.4.0
         | 
| 27 25 |  | 
| 28 | 
            -
                  - uses: actions/cache@v2
         | 
| 26 | 
            +
                  - uses: actions/cache@v2.1.7
         | 
| 29 27 | 
             
                    with:
         | 
| 30 28 | 
             
                      path: vendor/bundle
         | 
| 31 29 | 
             
                      key: >
         | 
| 32 | 
            -
                        ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ | 
| 30 | 
            +
                        ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
         | 
| 31 | 
            +
                        hashFiles(matrix.gemfile) }}
         | 
| 33 32 | 
             
                      restore-keys: >
         | 
| 34 | 
            -
                        ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ | 
| 33 | 
            +
                        ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
         | 
| 34 | 
            +
                        hashFiles(matrix.gemfile) }}
         | 
| 35 35 |  | 
| 36 36 | 
             
                  - name: Set up Ruby
         | 
| 37 | 
            -
                    uses: actions/setup-ruby@v1
         | 
| 37 | 
            +
                    uses: actions/setup-ruby@v1.1.3
         | 
| 38 38 | 
             
                    with:
         | 
| 39 39 | 
             
                      ruby-version: ${{ matrix.ruby }}
         | 
| 40 40 |  | 
    
        data/.rubocop.yml
    CHANGED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/rails-env/version.rb
    CHANGED
    
    
    
        data/lib/rails-env.rb
    CHANGED
    
    | @@ -8,7 +8,7 @@ module Rails | |
| 8 8 | 
             
                remove_method(:env=)
         | 
| 9 9 |  | 
| 10 10 | 
             
                define_method :env= do |env|
         | 
| 11 | 
            -
                  env_method. | 
| 11 | 
            +
                  env_method.bind_call(self, env)
         | 
| 12 12 | 
             
                  Rails.env.extend(RailsEnv::Extension)
         | 
| 13 13 | 
             
                end
         | 
| 14 14 | 
             
              end
         | 
| @@ -51,9 +51,16 @@ module RailsEnv | |
| 51 51 | 
             
                                         .compact
         | 
| 52 52 | 
             
                                         .map(&:to_sym)
         | 
| 53 53 | 
             
                                         .uniq
         | 
| 54 | 
            +
             | 
| 54 55 | 
             
                if config.i18n.default_locale
         | 
| 55 56 | 
             
                  I18n.default_locale = config.i18n.default_locale
         | 
| 56 57 | 
             
                end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                if config.i18n.respond_to?(:raise_on_missing_translations)
         | 
| 60 | 
            +
                  ActionView::Base.raise_on_missing_translations =
         | 
| 61 | 
            +
                    config.i18n.raise_on_missing_translations
         | 
| 62 | 
            +
                end
         | 
| 63 | 
            +
             | 
| 57 64 | 
             
                I18n.locale = config.i18n.locale if config.i18n.locale
         | 
| 58 65 | 
             
                I18n.load_path += config.i18n.load_path if config.i18n.load_path
         | 
| 59 66 | 
             
              end
         | 
| @@ -62,13 +69,17 @@ module RailsEnv | |
| 62 69 | 
             
                all_autoload_paths = (
         | 
| 63 70 | 
             
                  config.autoload_paths +
         | 
| 64 71 | 
             
                  config.eager_load_paths +
         | 
| 65 | 
            -
                  config.autoload_once_paths
         | 
| 66 | 
            -
             | 
| 72 | 
            +
                  config.autoload_once_paths +
         | 
| 73 | 
            +
                  ActiveSupport::Dependencies.autoload_paths
         | 
| 74 | 
            +
                ).uniq.freeze
         | 
| 75 | 
            +
             | 
| 76 | 
            +
                all_autoload_once_paths = (
         | 
| 77 | 
            +
                  config.autoload_once_paths +
         | 
| 78 | 
            +
                  ActiveSupport::Dependencies.autoload_once_paths
         | 
| 79 | 
            +
                ).uniq.freeze
         | 
| 67 80 |  | 
| 68 | 
            -
                ActiveSupport::Dependencies.autoload_paths | 
| 69 | 
            -
                ActiveSupport::Dependencies.autoload_once_paths | 
| 70 | 
            -
                  *config.autoload_once_paths
         | 
| 71 | 
            -
                )
         | 
| 81 | 
            +
                ActiveSupport::Dependencies.autoload_paths = all_autoload_paths
         | 
| 82 | 
            +
                ActiveSupport::Dependencies.autoload_once_paths = all_autoload_once_paths
         | 
| 72 83 | 
             
              end
         | 
| 73 84 |  | 
| 74 85 | 
             
              def self.propagate(options_name, target_name, target_property = nil)
         | 
    
        data/rails-env.gemspec
    CHANGED
    
    | @@ -7,11 +7,12 @@ Gem::Specification.new do |spec| | |
| 7 7 | 
             
              spec.version = RailsEnv::VERSION
         | 
| 8 8 | 
             
              spec.authors = ["Nando Vieira"]
         | 
| 9 9 | 
             
              spec.email   = ["me@fnando.com"]
         | 
| 10 | 
            +
              spec.metadata = {"rubygems_mfa_required" => "true"}
         | 
| 10 11 |  | 
| 11 12 | 
             
              spec.summary     = "Avoid environment detection on Rails"
         | 
| 12 13 | 
             
              spec.description = spec.summary
         | 
| 13 14 | 
             
              spec.license     = "MIT"
         | 
| 14 | 
            -
              spec.required_ruby_version = Gem::Requirement.new(">= 2. | 
| 15 | 
            +
              spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
         | 
| 15 16 |  | 
| 16 17 | 
             
              github_url = "https://github.com/fnando/rails_env"
         | 
| 17 18 | 
             
              github_tree_url = "#{github_url}/tree/v#{spec.version}"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rails-env
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version:  | 
| 4 | 
            +
              version: 2.0.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Nando Vieira
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2021-12-06 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: minitest
         | 
| @@ -148,6 +148,7 @@ files: | |
| 148 148 | 
             
            - gemfiles/rails_5_0.gemfile
         | 
| 149 149 | 
             
            - gemfiles/rails_5_2.gemfile
         | 
| 150 150 | 
             
            - gemfiles/rails_6_0.gemfile
         | 
| 151 | 
            +
            - gemfiles/rails_7_0.gemfile
         | 
| 151 152 | 
             
            - lib/rails-env.rb
         | 
| 152 153 | 
             
            - lib/rails-env/version.rb
         | 
| 153 154 | 
             
            - rails-env.gemspec
         | 
| @@ -155,12 +156,13 @@ homepage: https://github.com/fnando/rails_env | |
| 155 156 | 
             
            licenses:
         | 
| 156 157 | 
             
            - MIT
         | 
| 157 158 | 
             
            metadata:
         | 
| 159 | 
            +
              rubygems_mfa_required: 'true'
         | 
| 158 160 | 
             
              homepage_uri: https://github.com/fnando/rails_env
         | 
| 159 161 | 
             
              bug_tracker_uri: https://github.com/fnando/rails_env/issues
         | 
| 160 | 
            -
              source_code_uri: https://github.com/fnando/rails_env/tree/ | 
| 161 | 
            -
              changelog_uri: https://github.com/fnando/rails_env/tree/ | 
| 162 | 
            -
              documentation_uri: https://github.com/fnando/rails_env/tree/ | 
| 163 | 
            -
              license_uri: https://github.com/fnando/rails_env/tree/ | 
| 162 | 
            +
              source_code_uri: https://github.com/fnando/rails_env/tree/v2.0.0
         | 
| 163 | 
            +
              changelog_uri: https://github.com/fnando/rails_env/tree/v2.0.0/CHANGELOG.md
         | 
| 164 | 
            +
              documentation_uri: https://github.com/fnando/rails_env/tree/v2.0.0/README.md
         | 
| 165 | 
            +
              license_uri: https://github.com/fnando/rails_env/tree/v2.0.0/LICENSE.md
         | 
| 164 166 | 
             
            post_install_message:
         | 
| 165 167 | 
             
            rdoc_options: []
         | 
| 166 168 | 
             
            require_paths:
         | 
| @@ -169,14 +171,14 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 169 171 | 
             
              requirements:
         | 
| 170 172 | 
             
              - - ">="
         | 
| 171 173 | 
             
                - !ruby/object:Gem::Version
         | 
| 172 | 
            -
                  version: 2. | 
| 174 | 
            +
                  version: 2.7.0
         | 
| 173 175 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 174 176 | 
             
              requirements:
         | 
| 175 177 | 
             
              - - ">="
         | 
| 176 178 | 
             
                - !ruby/object:Gem::Version
         | 
| 177 179 | 
             
                  version: '0'
         | 
| 178 180 | 
             
            requirements: []
         | 
| 179 | 
            -
            rubygems_version: 3. | 
| 181 | 
            +
            rubygems_version: 3.2.32
         | 
| 180 182 | 
             
            signing_key:
         | 
| 181 183 | 
             
            specification_version: 4
         | 
| 182 184 | 
             
            summary: Avoid environment detection on Rails
         |