README.md in git_cloner-0.0.3 vs README.md in git_cloner-0.0.4
- old
+ new
@@ -1,9 +1,16 @@
# GitCloner
+[![Build Status](https://travis-ci.org/tbpgr/git_cloner.png?branch=master)](https://travis-ci.org/tbpgr/git_cloner)
+[![Coverage Status](https://coveralls.io/repos/tbpgr/git_cloner/badge.png)](https://coveralls.io/r/tbpgr/git_cloner)
+[![Code Climate](https://codeclimate.com/github/tbpgr/git_cloner.png)](https://codeclimate.com/github/tbpgr/git_cloner)
+
GitCloner clone git repositoris from Gitclonerfile settings.
+## Dependency
+GitCloner depends on git. GitCloner use 'git clone' command.
+
## Installation
Add this line to your application's Gemfile:
gem 'git_cloner'
@@ -14,23 +21,36 @@
Or install it yourself as:
$ gem install git_cloner
-## CLI-Usage
+## CLI Usage
+### show help
+
+~~~bash
+gitcloner h
+~~~
+
### generate Gitclonerfile
~~~bash
gitcloner init
~~~
+or
+
+~~~bash
+gitcloner i
+~~~
+
+Gitclonerfile contents is...
+
~~~ruby
# encoding: utf-8
# default_output place
-# default_output is required
# default_output allow only String
# default_output's default value => "./"
default_output "./"
# git repositries
@@ -70,35 +90,40 @@
place: "https://github.com/tbpgr/tbpgr_utils.git",
}
]
~~~
-### execute clone
+### execute clone repositories
~~~bash
gitcloner clone
~~~
+or
+
+~~~bash
+gitcloner c
+~~~
+
### confirm clone result
~~~bash
$ tree
-├─helper
-| └spec_helper.rb
-├─rspec_piccolo
-| └many files...
-├─sample
-| ├rspec_piccolo_spec.rb
-| └spec_helper.rb
-├─tmp
-| └rspec_piccolo
-└─tbpgr_utils
- └many files...
+┠helper
+┃ ┗spec_helper.rb
+┠rspec_piccolo
+┃ ┗many files...
+┠sample
+┃ ┠rspec_piccolo_spec.rb
+┃ ┗spec_helper.rb
+┠tmp
+┃ ┗rspec_piccolo
+┗tbpgr_utils
~~~
## Direct Usage
-if you want to use GitCloner directry, you can use like this sample.
+if you want to use GitCloner directry in your ruby logic, you can use like this sample.
~~~ruby
require 'git_cloner_core'
default_output = "./",
@@ -118,10 +143,46 @@
]
GitCloner::Core.new.clone default_output, repos
~~~
+## Sample Usage
+You want to copy chef cookbooks(cookbook1, cookbook2) to cookbooks directory.
+
+generate Gitclonerfile
+
+~~~
+gitcloner i
+~~~
+
+edit Gitclonerfile
+
+~~~ruby
+# encoding: utf-8
+default_output "./cookbooks"
+repos [
+ {place: "https://github.com/some_account/cookbook1.git"},
+ {place: "https://github.com/some_account/cookbook2.git"},
+]
+~~~
+
+execute clone repositories
+
+~~~bash
+gitcloner c
+~~~
+
+confirm results
+
+~~~
+$ tree
+┗cookbooks
+ ┠cookbook1
+ ┗cookbook2
+~~~
+
## History
+* version 0.0.4 : fix exit status.
* version 0.0.3 : enable direct call clone.
* version 0.0.2 : add files,directories copy.
* version 0.0.1 : first release.
## Contributing