Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding local env setup and pull request sections to 'CONTRIBUTING.md' #167

Merged
merged 4 commits into from
Jun 17, 2014
Merged

Conversation

supahgreg
Copy link
Contributor

Taking a stab at getting the dev setup process documented for #60.

@jerone
Copy link
Contributor

jerone commented Jun 14, 2014

Great first craft. Was just in the process of something similar.

One comment; can you define for what OS the #### Installation part is. I'm thinking Windows is a little different.

@Martii
Copy link
Member

Martii commented Jun 14, 2014

I'm thinking Windows is a little different.

Git 1.9.4 preview from their downloads comes with an optional bash shell so most everything that I've found there is identical to Linux... no need to download cygwin anymore I think. Mac is the one that I have no idea what it looks like with git since that machine has gone to Valhalla... it is probably the same but would be nice to know for sure.

@Zren
Copy link
Contributor

Zren commented Jun 14, 2014

Think he means the download locations. Windows/OS X deffinitely don't have sudo/apt-get. Btw, what version of Ruby? 1.x or 2.x?

@Martii
Copy link
Member

Martii commented Jun 14, 2014

heh... I think the devs at GH are playing... the whole content of all main issue bodies is missing when running a wide script. :\

@supahgreg
Copy link
Contributor Author

After some quick searching I've added links to RubyInstaller for Windows users. Also mentioned Windows users will need to kick off FakeS3 manually... not really sure what that process would look like.

@supahgreg
Copy link
Contributor Author

What would be the Mac equivalent of the commands, etc.?

@sizzlemctwizzle
Copy link
Member

Installing MongoDB locally isn't really needed since I have a dev DB already setup and configured. Do we want to encourage new devs to use their own DB or should the guide state that this is optional?

@Martii
Copy link
Member

Martii commented Jun 14, 2014

Do we want to encourage new devs to use their own DB

Depends on how advanced the contributor is... I am interested but you are right the dev db is a good common starting point. Maybe an advanced section?

What would be the Mac equivalent of the commands, etc.?

Well I know they have a bash similar shell too but packages and stuff... I never did that other than .dmg files.

@sizzlemctwizzle
Copy link
Member

What would be the Mac equivalent of the commands, etc.?

http://brew.sh

@Martii
Copy link
Member

Martii commented Jun 15, 2014

run the following to create an "upstream" remote:

  • git remote add upstream https://github.com/OpenUserJs/OpenUserJS.org.git

Some slightly older versions of $ git-gui on certain distros have troubles with the https address and need the ssh clone url of [email protected]:OpenUserJs/OpenUserJS.org.git to work... command line/console/terminal almost always works okay though.

and run npm install -d to install the dependencies

Is the d switch necessary? I've never used it and it seems to get all the dependencies here... nor is it listed in my $ npm --help and $ npm install --help.

$ npm -v
1.4.3

@Zren
Copy link
Contributor

Zren commented Jun 15, 2014

Is the d switch necessary?

It's a poorly named flag when you find the stackoverflow link already purple on Google...

https://stackoverflow.com/questions/8783230/what-is-the-d-in-npm-d-install

It's a shortcut for --loglevel info

@Martii
Copy link
Member

Martii commented Jun 15, 2014

It's a poorly named flag

Very... tried using -dddd and it's back to -d... this should probably be omitted in CONTRIBUTING.md in case npm ever does standardize switch/flags so we don't have to maintain that in the docs. I didn't see any special things that might help out with contributing support when I used it. Thanks Zren for the explanation and linkage.

* Using own MongoDB instance is optional
* SSH clone URL for old client compatibility
* Omit '-d' from 'npm install' of dependencies
* Improving Ruby install section and added Mac
@supahgreg
Copy link
Contributor Author

Updated with fa09c19

@Martii
Copy link
Member

Martii commented Jun 15, 2014

Open a terminal, navigate to the root of the OpenUserJS.org project, and run ./fakes3.sh. Windows users will need to run the script commands manually.

The Windows portion of this sentence is still baffling me... do you mean open up Command Prompt window or git preview instance (assuming this is possible and I'm not on my Win box now) ?

@supahgreg
Copy link
Contributor Author

The Windows portion is still baffling me... do you mean open up a Command Prompt?

Yes, for Windows it'd involve opening a command prompt and manually running the command(s) contained in fakes3.sh, which is currently just fakes3 -r fakeS3 -p 10001.

@supahgreg
Copy link
Contributor Author

Actually, adding a fakes3.bat with the same command (and mentioning that for Windows users) might be the best approach. Thoughts?

@Martii
Copy link
Member

Martii commented Jun 15, 2014

Yes, for Windows it'd involve opening a command prompt and manually running the command(s) contained in fakes3.sh, which is currently just fakes3 -r fakeS3 -p 10001.
...

Thoughts?

I didn't get this far in Windows the other day but I installed the latest git with the git bash option which gives me a bash terminal. I just checked that it can run two instances... It should run .sh scripts directly I think... confirmed it does. Since we all need the git scm exe for contributing under Windows should we focus on that rather than making .bat files (which may eventually be deprecated due to .cmd and powershell ... but with M$ one never knows for sure behind the closed doors or is that gates? ;) )

@sizzlemctwizzle
Copy link
Member

Actually, adding a fakes3.bat with the same command (and mentioning that for Windows users) might be the best approach. Thoughts?

Agreed. Does that command need to be modified at all to run on windows (fakes3.exe?)? The only time I built OUJS on windows I used cygwin.

@supahgreg
Copy link
Contributor Author

Installing the gem creates a fakes3.bat in the Ruby bin directory, which should be in the system path, so the command stays the same.

@Martii
Copy link
Member

Martii commented Jun 15, 2014

Installing the gem creates a fakes3.bat in the Ruby bin directory,

Oh good! That means we don't have to maintain that code and in the docs too. phew :)

which should be in the system path, so the command stays the same.

Needs confirmation.

@supahgreg
Copy link
Contributor Author

Needs confirmation.

edit: If you were saying the "command stays the same" needs testing, I had already tested it. Regarding the Ruby bin being in the system PATH:

ruby_installer_path_option

@Martii
Copy link
Member

Martii commented Jun 16, 2014

Needs confirmation.

edit: If you were saying the "command stays the same" needs testing, I had already tested it. Regarding the Ruby bin being in the system PATH:

Your screen image is perfect for confirmation. Thank you.

Although you did say:

Installing the gem creates a fakes3.bat in the Ruby bin directory,

... which implies that we should not be creating a .bat file as proposed in #176 since it's already done by those maintainers instead of us. Did I miss your intention? Just a note too I'm not against this if we need it since we have a .sh script to do the same thing. The gem here does not export anything .sh related to the env path by default for Linux ... but if it's already in the ruby directory and pathed why bother for Windows?

@supahgreg
Copy link
Contributor Author

which implies that we should not be creating a .bat file as proposed in #176 since it's already done by those maintainers instead of us.

The "fakes3.bat" in the Ruby bin is equivalent to the fakes3 command for Linux/Mac. The "fakes3.bat" in #176 is to start up a FakeS3 instance by invoking the actual fakes3 command ("fakes3.bat" in the Ruby bin) with some parameters. They just happen to share the same name.

@Martii
Copy link
Member

Martii commented Jun 16, 2014

They just happen to share the same name.

Okay... awesome and thank you for the clarification. :)

@Martii
Copy link
Member

Martii commented Jun 16, 2014

Btw, what version of Ruby? 1.x or 2.x?

Reiterated from Zren... Which Ruby version for Windows?

have quite a few current choices...:

* Ruby 2.0.0-p481
* Ruby 2.0.0-p481 (x64)
* Ruby 1.9.3-p545
* Ruby 1.8.7-p374

My Nix distro is using 1.9.3 soooo assuming this one?

@supahgreg supahgreg closed this Jun 17, 2014
@supahgreg
Copy link
Contributor Author

Feel free to use the modified document as-is or base something else off of the content I wrote. Rather not argue over trivialities.

@supahgreg supahgreg reopened this Jun 17, 2014
@supahgreg supahgreg closed this Jun 17, 2014
sizzlemctwizzle added a commit that referenced this pull request Jun 17, 2014
Adding local env setup and pull request sections to 'CONTRIBUTING.md'
@sizzlemctwizzle sizzlemctwizzle merged commit 13cb1b6 into OpenUserJS:master Jun 17, 2014
@sizzlemctwizzle
Copy link
Member

Feel free to use the modified document as-is or base something else off of the content I wrote.

Thank you for giving us a good starting point. It was something that was desperately needed. If someone wishes to modify the document, they can open a PR with their own proposed changes.

Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 2, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 2, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 2, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 2, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 3, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 3, 2014
* More descript elaboration
* Some spelling corrections.. ran it through a spell checker.
* Removed `upstream` label ref and question
* Changed `console` to `terminal` since console is more KDE oriented and terminal is more X oriented. e.g. devoid of Window Manager.

Applies to OpenUserJS#240, OpenUserJS#167 and OpenUserJS#60
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 3, 2014
…used together.

* e.g. let the hosting site resolve those.

Applies to OpenUserJS#240, OpenUserJS#167, OpenUserJS#116, and OpenUserJS#60
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 3, 2014
Martii pushed a commit to Martii/OpenUserJS.org that referenced this pull request Jul 3, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants