Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

(MODULES-3704) Update gemfile template like windows #94

Merged
merged 1 commit into from
Nov 8, 2016

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Oct 18, 2016

No description provided.

@hunner
Copy link
Contributor Author

hunner commented Oct 19, 2016

This is a subset of the work done in #60

@hunner
Copy link
Contributor Author

hunner commented Oct 19, 2016

Still WIP, too.

@glennsarti
Copy link
Contributor

Apart from the rebase...Looks like a good start!

@ferventcoder
Copy link
Contributor

Looks like a good start!

end
end

<%
def build_location(gem)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed or was that changed based on the ruby-operator, ruby-version removals?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that this helped build out the gem information versus continually creating a longer string value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I see you cleaned it up some below from our template and yours, +1!

@@ -46,29 +46,23 @@ Gemfile:
- gem: parallel_tests
- gem: rubocop
version: '0.41.2'
ruby-operator: '<'
ruby-version: '2.0.0'
condition: "RUBY_VERSION < '2.0.0'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we don't do it yet, but using Gem::Version would be great for correct semver comparisons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great!

", :ref => '#{gem['ref']}'" if gem['ref'] %><%=
", :platforms => #{gem['platforms']}" if gem['platforms'] %><%=
" if #{gem['condition']}" if gem['condition'] %>
<% end -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way that this got cleaned up!

@hunner hunner force-pushed the update_gemfile branch 3 times, most recently from f481eb0 to d4742ef Compare November 4, 2016 19:29
@hunner hunner force-pushed the update_gemfile branch 6 times, most recently from 266a915 to 4647c22 Compare November 7, 2016 17:00
@ferventcoder
Copy link
Contributor

LGTM. Rekicked Travis build.

@ferventcoder
Copy link
Contributor

@hunner probably unrelated but travis is failing on

bundler: failed to load command: msync (/home/travis/build/puppetlabs/modulesync_configs/vendor/bundle/ruby/2.3.0/bin/msync)

- puppetlabs-reboot
- puppetlabs-registry
- puppetlabs-sqlserver
- puppetlabs-wsus_client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an interesting choice. I would have assumed this was going to be in a different file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the supports_windows be in the sync.yml instead of "magic" in modulesync?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer supports_windows to go away completely, but this is also in scope for MODULES-4027 (create a set of gems encapsulating our ruby-version-specific dependencies), so I'm supportive of adding a ugly hack here to get this merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferventcoder @configs does not expose variables outside of the config_defaults.yml structure under the Gemfile key to the template as far as I saw, so this was the only location without making the template do File.reads, which would be worse...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glennsarti Both @ferventcoder and I had a discussion in hipchat yesterday about how .sync.yml should be centralized and go away entirely, but that is a project for another time.

In the mean time, it is modulesync_configs that cares about which modules receive Gemfile template variants, and the modules themselves should be ignorant of "fiddly bits" inside of the templates anyway, so the quality of extra template contents should live with the templates themselves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidS Yes! It should go away entirely; see @ferventcoder's and my comment as such at #99 (comment)

@hunner hunner force-pushed the update_gemfile branch 2 times, most recently from 6e63f9a to db885e2 Compare November 8, 2016 17:41
Copy link
Contributor

@ferventcoder ferventcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ferventcoder ferventcoder merged commit ec6d873 into puppetlabs:master Nov 8, 2016
@hunner hunner deleted the update_gemfile branch November 8, 2016 18:44
This was referenced Nov 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants