modulesync icon indicating copy to clipboard operation
modulesync copied to clipboard

Files without ERB extension not syncing

Open cdenneen opened this issue 7 years ago • 4 comments

Leaving .rb extension

 ~/src/gitlab/puppet/modulesync_configs  master ?  msync update -m "Test change" --noop
Syncing puppet-pes3backup
Cloning repository fresh
Cloning from https://gitlab.domain.local/puppet/puppet-pes3backup.git
No config file under modules/puppet-pes3backup/.sync.yml found, using default values
Using no-op. Files in puppet-pes3backup may be changed but will not be committed.
Files changed:
Files added:


--------------------------------
Syncing puppet-monitoring_scripts
Cloning repository fresh
Cloning from https://gitlab.domain.local/puppet/puppet-monitoring_scripts.git
No config file under modules/puppet-monitoring_scripts/.sync.yml found, using default values
Using no-op. Files in puppet-monitoring_scripts may be changed but will not be committed.
Files changed:
Files added:


--------------------------------
Syncing puppet-profile_base
Cloning repository fresh
Cloning from https://gitlab.domain.local/puppet/puppet-profile_base.git
No config file under modules/puppet-profile_base/.sync.yml found, using default values
Using no-op. Files in puppet-profile_base may be changed but will not be committed.
Files changed:
Files added:


--------------------------------
 ~/src/gitlab/puppet/modulesync_configs  master ?  ls -la modules/*/spec/spec_helper_local.rb
-rw-r--r--  1 cdenneen  staff   340B Jun  6 15:09 modules/puppet-monitoring_scripts/spec/spec_helper_local.rb
-rw-r--r--  1 cdenneen  staff    54B Jun  6 15:09 modules/puppet-profile_base/spec/spec_helper_local.rb

Changing extension to erb

 ~/src/gitlab/puppet/modulesync_configs  master ?  cp moduleroot/spec/spec_helper_local.rb moduleroot/spec/spec_helper_local.rb.erb
 ~/src/gitlab/puppet/modulesync_configs  master ?  msync update -m "Test change" --noop
Syncing puppet-pes3backup
Overriding any local changes to repositories in modules
No config file under modules/puppet-pes3backup/.sync.yml found, using default values
Using no-op. Files in puppet-pes3backup may be changed but will not be committed.
Files changed:
Files added:
spec/spec_helper_local.rb


--------------------------------
Syncing puppet-monitoring_scripts
Overriding any local changes to repositories in modules
No config file under modules/puppet-monitoring_scripts/.sync.yml found, using default values
Using no-op. Files in puppet-monitoring_scripts may be changed but will not be committed.
Files changed:
Files added:


--------------------------------
Syncing puppet-profile_base
Overriding any local changes to repositories in modules
No config file under modules/puppet-profile_base/.sync.yml found, using default values
Using no-op. Files in puppet-profile_base may be changed but will not be committed.
Files changed:
Files added:


--------------------------------
 ~/src/gitlab/puppet/modulesync_configs  master ?  ls -la modules/*/spec/spec_helper_local.rb
-rw-r--r--  1 cdenneen  staff   405B Jun  6 15:09 modules/puppet-monitoring_scripts/spec/spec_helper_local.rb
-rw-r--r--  1 cdenneen  staff   405B Jun  6 15:09 modules/puppet-pes3backup/spec/spec_helper_local.rb
-rw-r--r--  1 cdenneen  staff   405B Jun  6 15:09 modules/puppet-profile_base/spec/spec_helper_local.rb

NOTE: The above file size changes without "FIles changed:" showing any difference is shown in #120 @DavidS

cdenneen avatar Jun 07 '17 14:06 cdenneen

This looks to have been a deliberate change https://github.com/voxpupuli/modulesync/commit/ba191b028a26c63a66da755f78470d51b4980c19

timhughes avatar Sep 20 '17 10:09 timhughes

There was much discussion for this change in https://github.com/voxpupuli/modulesync/pull/113

james-powis avatar Sep 20 '17 13:09 james-powis

We probably can close this issue as a "won't fix". Or would that need to be better documented?

Is there an alternative?

Personally, I think, the .erb extension for everything makes it all more difficult. Certainly, from a user perspective, it makes things that could be obvious less transparent. But it seems unlikely that this decision will be undone.

Then again, couldn't we make this a user choice? In theory, it should be feasible to add an option to the ModuleSync configuration whether you use .erb as an extension or not in your project, keeping the current behavior as a default.

Does that sound like something people want? Put your :+1: here.

bittner avatar May 18 '20 12:05 bittner

The long term idea was that every file with a .erb extension would be templated and all files without an extension are synced without ERB templating.

ekohl avatar May 18 '20 12:05 ekohl