Hi Judd,

On 07/10/2013 06:01 PM, Judd Maltin wrote:
> Inspired by Terpstra, I'd like to submit a few coding guidelines and 
> tasks for comment and addition: 

Awesome, thanks for starting this thread.

> 1. Create and document a pattern to enable devs to easily add 
> configuration switches for new code paths and features, for all 
> aspects of the MVC framework.
>

Yes we should definitely document this clearly somewhere in the dev 
guide. I've added support for these:

a) Crowbar 2.x (master branch): We're already using the RailsConfig gem 
[1], added about 4 months ago [2]. For an example on how to use it, see [3].

b) Crowbar 1.6 (release/pebbles/master branch): RailsConfig doesn't work 
on Rails 2.x, so we use similar but less flexible gem called app_config 
[4]. See [5] for a usage example (though there's a bunch of other code 
as well).

> 2. Offer Ruby Tailor and Chef Foodcritic plugins in Github
>

+100

Do you have anything specific in mind? I've implemented some Git 
pre-commit hooks that automatically run these checks on modified files 
and am intending to reuse that code to submit a couple of pull requests 
soon.

It'll also be good to have them running in Travis CI along with the tests.

> 3. Enforce code formatting patterns (hurts to say, as a Perl guy)
>

+100

The key is really to automate as much as possible, which both tailor and 
Foodcritic takes care of to some degree.

We use the following Ruby style guide at SUSE: 
https://github.com/SUSE/style-guides/blob/master/Ruby.md, which is based 
off some Ruby community style guide plus our own preferences. We could 
have a similar one for Crowbar.

We also use this Rails style guide: 
https://github.com/bbatsov/rails-style-guide. Of course there are plenty 
out there too that we can use as a base, along with variants for Bash, 
Javascript, and Chef cookbooks.

Cheers,
James T.

[1] https://github.com/railsjedi/rails_config#readme
[2] 
https://github.com/crowbar/barclamp-crowbar/commit/b1aee77b6865a5c15bfb2935df12590b8a6fdab0
[3] 
https://github.com/crowbar/barclamp-crowbar/commit/fa4c1a7d3783a23f4e294bc9fc27cade75f17a3b
[4] https://github.com/Oshuma/app_config/tree/v1.0.2
[5] 
https://github.com/crowbar/barclamp-crowbar/commit/6f4c7e5c5682ae50338ccb0224dafd292bc89956

_______________________________________________
Crowbar mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to