Skip to content

Commit

Permalink
chore: stop testing Rails secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jun 4, 2024
1 parent 2868aeb commit 48f5fc1
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 87 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- ruby: "3.2"
gemfile: "gemfiles/rails7.gemfile"
rbs: 'false'
- ruby: "3.2"
- ruby: "3.3"
gemfile: "gemfiles/railsmaster.gemfile"
rbs: 'false'
- ruby: "3.1"
Expand Down Expand Up @@ -69,9 +69,6 @@ jobs:
- name: Run RSpec without rails
run: |
bundle exec rake spec:norails
- name: Run Rails secrets tests for uninitialized app
run: |
bundle exec rake spec:secrets
- name: Run Rails autoload tests
run: |
bundle exec rake spec:autoload
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end

Using Ruby classes to represent configuration allows you to add helper methods and computed parameters easily, makes the configuration **testable**.

The `anyway_config` gem takes care of loading parameters from **different sources** (YAML, credentials/secrets, environment variables, etc.). Internally, we use a _pipeline pattern_ and provide the [Loaders API](#data-loaders) to manage and [extend](#custom-loaders) its functionality.
The `anyway_config` gem takes care of loading parameters from **different sources** (YAML, credentials, environment variables, etc.). Internally, we use a _pipeline pattern_ and provide the [Loaders API](#data-loaders) to manage and [extend](#custom-loaders) its functionality.

Check out the libraries using Anyway Config for more examples:

Expand Down Expand Up @@ -270,7 +270,6 @@ This feature is similar to `Rails.application.config_for` but more powerful:
| Feature | Rails | Anyway Config |
| ------------- |-------------:| -----:|
| Load data from `config/app.yml` |||
| Load data from `secrets` |||
| Load data from `credentials` |||
| Load data from environment |||
| Load data from [other sources](#data-loaders) |||
Expand Down
11 changes: 1 addition & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ RSpec::Core::RakeTask.new("spec:norails") do |task|
task.verbose = false
end

desc "Run Rails secrets tests for uninitialized app"
RSpec::Core::RakeTask.new("spec:secrets") do |task|
ENV["DO_NOT_INITIALIZE_RAILS"] = "1"
ENV["USE_APP_CONFIGS"] = "0"
ENV["NORAILS"] = "0"
task.rspec_opts = "--order defined --tag secrets"
task.verbose = false
end

desc "Run Rails autoload tests for app/configs"
RSpec::Core::RakeTask.new("spec:autoload") do |task|
ENV["USE_APP_CONFIGS"] = "1"
Expand Down Expand Up @@ -107,4 +98,4 @@ namespace :spec do
end

desc "Run the all specs"
task default: %w[rubocop rubocop:md steep spec:norails spec spec:secrets spec:autoload spec:rbs]
task default: %w[rubocop rubocop:md steep spec:norails spec spec:autoload spec:rbs]
1 change: 1 addition & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

module Dummy
class Application < Rails::Application
config.load_defaults Rails::VERSION::STRING.split(".").take(2).join(".").to_f
config.logger = Logger.new("/dev/null")
config.eager_load = ENV["DO_NOT_INITIALIZE_RAILS"] != "1"

Expand Down
32 changes: 0 additions & 32 deletions spec/dummy/config/secrets.yml

This file was deleted.

39 changes: 0 additions & 39 deletions spec/rails/loaders/secrets_spec.rb

This file was deleted.

0 comments on commit 48f5fc1

Please sign in to comment.