Skip to content
New issue

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

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

Already on GitHub? # to your account

Extract useful methods to outside of action_class #620

Open
Lasering opened this issue May 5, 2023 · 1 comment
Open

Extract useful methods to outside of action_class #620

Lasering opened this issue May 5, 2023 · 1 comment
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
@damacus
Copy link
Member

damacus commented Jan 7, 2025

@Lasering we'll always take PRs for this. Sorry it's taken so long to respond.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature Request Enhancement to existing functionality or new functionality
Projects
None yet
Development

No branches or pull requests

2 participants