From 5b7ce2fc22d5fefea46007f70828812dac19cc95 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sat, 13 Sep 2014 14:57:50 +0100 Subject: [PATCH 1/3] dev env rainforest --- source/contributing/dev-environment.html.md | 48 +++++++-------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/source/contributing/dev-environment.html.md b/source/contributing/dev-environment.html.md index 719bf2e7..dc3ecfd0 100644 --- a/source/contributing/dev-environment.html.md +++ b/source/contributing/dev-environment.html.md @@ -4,39 +4,29 @@ description: If you're looking to contribute to the CocoaPods project through fe order: 2 --- -> Create a clone of the CocoaPods source. +CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However for someone new to high-level library development in ruby this comes with a high learning curve. Because of this we will be using this guide to show how to set up using the CocoaPods Rainforest. + +Rainforest is a git repo that when bootstrapped has submodules of all the required gems for CocoaPods development. Let's clone it: ```shell -$ git clone git://github.com/CocoaPods/CocoaPods.git -$ cd CocoaPods +$ git clone https://github.com/CocoaPods/Rainforest.git +$ cd Rainforest ``` +All of the commands in Rainforest are Rake Tasks. This is a ruby varient of Make Tasks. You can take a look at all the available tasks by running `rake -t` in the terminal. -Update git submodules and install the dependencies. CocoaPods supports Ruby 1.8.7 and newer. Instructions for RVM are provided, but feel free to use whichever tool you prefer. - -> If you are using RVM: +To get started downloading run: ```shell -# Create a blank environment for CocoaPods. -$ echo "rvm use --create ruby-1.9.3-p194@cocoapods" > .rvmrc -$ echo ".rvmrc" >> .git/info/exclude - -# Reload the rvm config by jumping in and out of your dev folder -# then init & update git submodules and install ruby dependencies using a rake task. -$ cd .. ; cd - -$ rake bootstrap +$ rake bootstrap ``` -> Otherwise: +This will loop through all the known gems downloading them, and setting up their environments. To verify that everything is set up, run: `CocoaPods/bin/pod --help`. -```shell -# If bundler is not already installed. -$ sudo gem install bundler +### Working on CocoaPods -# Init & update git submodules and install ruby dependencies using a rake task. -$ rake bootstrap -``` +If you're not sure where your changes are going to be, you may way to look at the [Core Components](http://guides.cocoapods.org/contributing/components.html) to get a sense of where the change will take place. -> Verify that all specs pass and all examples build. (See rake -T for other tasks.) +Once in the correct gem you should verify that all specs pass and all examples build. ( See rake -T for other gem based tasks. ) ```shell $ rake spec @@ -53,30 +43,24 @@ Create your patch, verify all specs still pass and examples still build, and cre ## Using latest pod version -If you would like to run latest pod command in terminal for you project. +If you would like to run latest pod command in terminal for you project. > You could run it with full path, i.e. ```shell -$HOME/code/CocoaPods/bin/pod install +$DEV/Rainforest/CocoaPods/bin/pod install ``` > For convenience you could add the next alias to you .zshrc or .bashrc or similar: ```shell -alias pod-dev='$HOME/code/CocoaPods/bin/pod' +alias pod-dev='$DEV/Rainforest/CocoaPods/bin/pod' ``` Other advanced aliases: -> If you are using RVM and have specific gemset for cocoapods (i.e. with the same name) than you could use next alias: - -```shell -alias pod-dev='rvm ruby-1.9.3-p194@cocoapods do $HOME/code/CocoaPods/bin/pod' -``` - > If you want to autoload [Pry](https://github.com/pry/pry) and the [Awesome Print](https://github.com/michaeldv/awesome_print) gems set the ```COCOA_PODS_ENV``` environment variable to ```development```. This can be done with an alias like: ```shell alias pod-dev='COCOA_PODS_ENV=development ~/Documents/GitHub/CocoaPods/bin/pod' -``` \ No newline at end of file +``` From c35151dfb794c992bc9d156693c516c91a7557c8 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Sat, 13 Sep 2014 15:10:22 +0100 Subject: [PATCH 2/3] [Rainforest] Rake -T to show a list of tasks --- source/contributing/dev-environment.html.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/contributing/dev-environment.html.md b/source/contributing/dev-environment.html.md index dc3ecfd0..c6e783ed 100644 --- a/source/contributing/dev-environment.html.md +++ b/source/contributing/dev-environment.html.md @@ -4,7 +4,7 @@ description: If you're looking to contribute to the CocoaPods project through fe order: 2 --- -CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However for someone new to high-level library development in ruby this comes with a high learning curve. Because of this we will be using this guide to show how to set up using the CocoaPods Rainforest. +CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However, for someone new to high-level library development in ruby this comes with a high learning curve. Because of this we will be using this guide to show how to set up using the CocoaPods Rainforest. Rainforest is a git repo that when bootstrapped has submodules of all the required gems for CocoaPods development. Let's clone it: @@ -12,7 +12,7 @@ Rainforest is a git repo that when bootstrapped has submodules of all the requir $ git clone https://github.com/CocoaPods/Rainforest.git $ cd Rainforest ``` -All of the commands in Rainforest are Rake Tasks. This is a ruby varient of Make Tasks. You can take a look at all the available tasks by running `rake -t` in the terminal. +All of the commands in Rainforest are Rake Tasks. This is a ruby varient of Make Tasks. You can take a look at all the available tasks by running `rake -T` in the terminal. To get started downloading run: @@ -48,13 +48,13 @@ If you would like to run latest pod command in terminal for you project. > You could run it with full path, i.e. ```shell -$DEV/Rainforest/CocoaPods/bin/pod install +path/to/Rainforest/CocoaPods/bin/pod install ``` > For convenience you could add the next alias to you .zshrc or .bashrc or similar: ```shell -alias pod-dev='$DEV/Rainforest/CocoaPods/bin/pod' +alias pod-dev='path/to/Rainforest/CocoaPods/bin/pod' ``` Other advanced aliases: @@ -62,5 +62,5 @@ Other advanced aliases: > If you want to autoload [Pry](https://github.com/pry/pry) and the [Awesome Print](https://github.com/michaeldv/awesome_print) gems set the ```COCOA_PODS_ENV``` environment variable to ```development```. This can be done with an alias like: ```shell -alias pod-dev='COCOA_PODS_ENV=development ~/Documents/GitHub/CocoaPods/bin/pod' +alias pod-dev='COCOA_PODS_ENV=development path/to/CocoaPods/bin/pod' ``` From a419b32b2167ed593e67d5f5059086ef4ff269fc Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sat, 13 Sep 2014 17:54:50 +0100 Subject: [PATCH 3/3] minor improvements to environment --- source/contributing/dev-environment.html.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/contributing/dev-environment.html.md b/source/contributing/dev-environment.html.md index c6e783ed..7bcc676c 100644 --- a/source/contributing/dev-environment.html.md +++ b/source/contributing/dev-environment.html.md @@ -4,7 +4,7 @@ description: If you're looking to contribute to the CocoaPods project through fe order: 2 --- -CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However, for someone new to high-level library development in ruby this comes with a high learning curve. Because of this we will be using this guide to show how to set up using the CocoaPods Rainforest. +CocoaPods is a collection of ruby gems. It is possible to clone them individually and set up a bundler environment for working in CocoaPods. However, for someone new to high-level library development in ruby this comes with a high learning curve. Because of this we will be using this guide to show how to set up using the [CocoaPods Rainforest](https://github.com/CocoaPods/Rainforest). Rainforest is a git repo that when bootstrapped has submodules of all the required gems for CocoaPods development. Let's clone it: @@ -26,7 +26,7 @@ This will loop through all the known gems downloading them, and setting up their If you're not sure where your changes are going to be, you may way to look at the [Core Components](http://guides.cocoapods.org/contributing/components.html) to get a sense of where the change will take place. -Once in the correct gem you should verify that all specs pass and all examples build. ( See rake -T for other gem based tasks. ) +Once in the correct gem you should verify that all specs pass and all examples build. ( See rake -T for other per-gem based tasks. ) ```shell $ rake spec @@ -41,7 +41,7 @@ $ kicker -c Create your patch, verify all specs still pass and examples still build, and create a [pull request](https://github.com/CocoaPods/CocoaPods/compare). -## Using latest pod version +### Using latest pod command If you would like to run latest pod command in terminal for you project.