README.md in git_cloner-0.0.2 vs README.md in git_cloner-0.0.3

- old
+ new

@@ -14,11 +14,11 @@ Or install it yourself as: $ gem install git_cloner -## Usage +## CLI-Usage ### generate Gitclonerfile ~~~bash gitcloner init @@ -32,16 +32,23 @@ # default_output allow only String # default_output's default value => "./" default_output "./" # git repositries -# repo allow only Array(in Array, Hash[:place, :output]) -# repo's default value => [] +# repos allow only Array(in Array, Hash[:place, :output, :copies]) +# copies is option. +# copies must have Array[Hash{:from, :to}]. +# you can copy files or directories. +# repos's default value => [] repos [ { place: 'https://github.com/tbpgr/rspec_piccolo.git', - output: './tmp' + output: './tmp', + copies: [ + {from: "./tmp/rspec_piccolo/lib/rspec_piccolo", to: "./"}, + {from: "./tmp/rspec_piccolo/spec", to: "./sample"} + ] } ] ~~~ ### edit Gitclonerfile manually @@ -86,10 +93,36 @@ | └rspec_piccolo └─tbpgr_utils └many files... ~~~ +## Direct Usage +if you want to use GitCloner directry, you can use like this sample. + +~~~ruby +require 'git_cloner_core' + +default_output = "./", +repos = [ + { + place: "https://github.com/tbpgr/rspec_piccolo.git", + output: "./tmp", + copies: [ + {from: "./tmp/rspec_piccolo/lib/rspec_piccolo", to: "./"}, + {from: "./tmp/rspec_piccolo/spec", to: "./sample"}, + {from: "./tmp/rspec_piccolo/spec/spec_helper.rb", to: "./helper/helper.rb"}, + ] + }, + { + place: "https://github.com/tbpgr/tbpgr_utils.git", + } +] + +GitCloner::Core.new.clone default_output, repos +~~~ + ## History +* version 0.0.3 : enable direct call clone. * version 0.0.2 : add files,directories copy. * version 0.0.1 : first release. ## Contributing