Directory structure best practice?

Hi all!

What are the best practices concerning directory structures for Ruby
programs?

I want to run tests using Cucumber and RSpec, so referring to the RSpec
book I created a features/ and spec/ folders for the tests, a lib/
folder for my code, and a bin/ folder for all that shall be executed.

What do I need to roll out my own Gem, if needed? What is the expected
distribution format of a gem?

Also, is there a way to pack the app for distribution for Linux,
Windows, and Mac?

MrZombie wrote:

Hi all!

What are the best practices concerning directory structures for Ruby
programs?

I want to run tests using Cucumber and RSpec, so referring to the RSpec
book I created a features/ and spec/ folders for the tests, a lib/
folder for my code, and a bin/ folder for all that shall be executed.

What do I need to roll out my own Gem, if needed? What is the expected
distribution format of a gem?

Also, is there a way to pack the app for distribution for Linux,
Windows, and Mac?

You can , if you’re feeling lazy, install a gem called “jem” which
creates a typical structure the same as the one already mentioned.

This should be really helpful to you:
http://www.jamievandyke.com/building-a-gem-using-bdd

Also, look in gems you have installed.

Below here is what you asked for, typical and simple:

MyGem/
README
implDemo.rb
lib/
MyGem.rb
MyGem/
gemthis.rb
gemthat.rb
test/
unit.rb

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs