Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract useful methods to outside of action_class #620

Open
Lasering opened this issue May 5, 2023 · 0 comments
Open

Extract useful methods to outside of action_class #620

Lasering opened this issue May 5, 2023 · 0 comments
Labels
Feature Request Enhancement to existing functionality or new functionality

Comments

@Lasering
Copy link

Lasering commented May 5, 2023

The nginx_site resource defines the method config_file inside action_class. This method would be very useful to be used like:

site = nginx_site 'service-discovery' do
  conf_dir ::File.join(config.nginx_dir, 'sites-available')
  cookbook 'dsi-consul-servers'
  template 'service-discovery.conf.erb'
  variables(
     ...
  )
  action :create
end

link site.config_file do    # HERE
  to "../sites-enabled/#{site.name}"
end

To allow this usage the method should be defined outside of action_class. I can make a PR if this is something that would be merged.

@Lasering Lasering added the Feature Request Enhancement to existing functionality or new functionality label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Enhancement to existing functionality or new functionality
Projects
None yet
Development

No branches or pull requests

1 participant