Documentation for merging a directory needs to specify that the require has to include the directory #107

Closed
carimura opened this Issue Jun 2, 2012 · 5 comments

Comments

Projects
None yet
2 participants
@carimura
Contributor

carimura commented Jun 2, 2012

No description provided.

@paddycarver

This comment has been minimized.

Show comment Hide comment
@paddycarver

paddycarver Jun 12, 2012

Contributor

@carimura Which language? Which documentation?

Contributor

paddycarver commented Jun 12, 2012

@carimura Which language? Which documentation?

@carimura

This comment has been minimized.

Show comment Hide comment
@carimura

carimura Jun 12, 2012

Contributor

Hmm I think I meant here: http://dev.iron.io/worker/reference/worker-files/

One hangup I ran into was not knowing to include the directory when I required the file. For example, this line in the .worker file:

dir '../app/models'

Caused me to have to require a specific file in the worker like this:

require 'models/user'

But remembering to include the "models/" in the require took a few frustrating minutes.

Contributor

carimura commented Jun 12, 2012

Hmm I think I meant here: http://dev.iron.io/worker/reference/worker-files/

One hangup I ran into was not knowing to include the directory when I required the file. For example, this line in the .worker file:

dir '../app/models'

Caused me to have to require a specific file in the worker like this:

require 'models/user'

But remembering to include the "models/" in the require took a few frustrating minutes.

@paddycarver

This comment has been minimized.

Show comment Hide comment
@paddycarver

paddycarver Jun 12, 2012

Contributor

Got it, thanks. This may be a "bug" in NG-I'll have to ask @iced what he thinks. We ran into a similar problem in April with the Python library, which has since been patched. Customers were expecting the merged folder to be the root, not be in the root. Either the docs need to specify this or the lib needs to evolve and change behaviour, or both.

Contributor

paddycarver commented Jun 12, 2012

Got it, thanks. This may be a "bug" in NG-I'll have to ask @iced what he thinks. We ran into a similar problem in April with the Python library, which has since been patched. Customers were expecting the merged folder to be the root, not be in the root. Either the docs need to specify this or the lib needs to evolve and change behaviour, or both.

@carimura

This comment has been minimized.

Show comment Hide comment
@carimura

carimura Jun 12, 2012

Contributor

My thought is that the lib is currently acting the correct way ... it's the missing piece of documentation that hung me up for 10 minutes or so.

Contributor

carimura commented Jun 12, 2012

My thought is that the lib is currently acting the correct way ... it's the missing piece of documentation that hung me up for 10 minutes or so.

@paddycarver

This comment has been minimized.

Show comment Hide comment
@paddycarver

paddycarver Jun 12, 2012

Contributor

I'm probably going to have the Python library follow NG's lead, as that's how it was designed in the first place. I just want to make sure I understand why that's the right way.

Should this be in the .worker file docs, though? My understanding is that those simply use the NG merge functions, so wouldn't it belong in the merge docs? We should find some way to call that out in the .worker docs, too, probably.

Contributor

paddycarver commented Jun 12, 2012

I'm probably going to have the Python library follow NG's lead, as that's how it was designed in the first place. I just want to make sure I understand why that's the right way.

Should this be in the .worker file docs, though? My understanding is that those simply use the NG merge functions, so wouldn't it belong in the merge docs? We should find some way to call that out in the .worker docs, too, probably.

@ghost ghost assigned paddycarver Jul 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment