repo_tools 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -16
  3. data/lib/repo_tools/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 926c107e9eb4b6a7208322ea7ca32dbf6ab31212
4
- data.tar.gz: 31baca717a1ed231df15a940f66af2c3f8fff815
3
+ metadata.gz: 37ee8b7b18157243c974e04d9d88028e40b2c6b4
4
+ data.tar.gz: efeafc9e3a11229778811080b9adacf824fbce11
5
5
  SHA512:
6
- metadata.gz: 15d5485262dbfef94959734756d5caa9e2c21fdab103fa1d96bb2bfb42ae0778c3df298161a6d5faf5011e271bf6bcb64b6a20382f24c11c949f84578ec16b67
7
- data.tar.gz: d7c34a817258f3c0b70c3b721fa92974a7c3da7f562d3391b9f8c2be85611fb509c21093161aca6f136730b7e9a1c87210f5833a56a1910828ddef7bb32f4ecd
6
+ metadata.gz: 26f77d8a48b61e1bbabf9c8ad6377308af15b93ab2df907e9915dd38ab1a7fc33fd3013457e20cec74c4def46e974eb4bd5a3e91f0a8bcb92e147c067f8c7c09
7
+ data.tar.gz: 2b85bc4d932fefff66338d354fdfabf6bd4b845477f4f378d1d803aecb3c7ccbe2887a2861d4480584a0e8478b3f2ec5ebc1ccee53120e8b7ebadaf9954640b3
data/README.md CHANGED
@@ -1,38 +1,45 @@
1
1
  # RepoTools
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/repo_tools`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ The RepoTools gem can be used to clone Git repositories into a local application and only reclone the Git repository when it is behind origin/master.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Usage
6
6
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
7
+ The following code will clone the `frontend-generators` in the `/root/path/tmp/test/frontend-generators` directory:
10
8
 
11
9
  ```ruby
12
- gem 'repo_tools'
10
+ puller = RepoTools::Puller.new("git@github.com:MrPowers/frontend-generators.git", "/root/path", "test")
11
+ puller.clean_and_clone
13
12
  ```
14
13
 
15
- And then execute:
14
+ If origin/master stays the same and you run `#clean_and_clone` again, the repo will not be cloned again (because cloning is an expensive operation).
16
15
 
17
- $ bundle
16
+ If origin/master is updated, then the repo will be re-cloned. This code will cause the repo to be re-cloned for example:
18
17
 
19
- Or install it yourself as:
18
+ ```
19
+ cd /root/path/tmp/test/frontend-generators
20
+ git reset --hard HEAD~4
21
+ ```
20
22
 
21
- $ gem install repo_tools
23
+ ```ruby
24
+ puller = RepoTools::Puller.new("git@github.com:MrPowers/frontend-generators.git", "/root/path", "test")
25
+ puller.clean_and_clone
26
+ ```
22
27
 
23
- ## Usage
28
+ ## Installation
24
29
 
25
- TODO: Write usage instructions here
30
+ Add this line to your application's Gemfile:
26
31
 
27
- ## Development
32
+ ```ruby
33
+ gem 'repo_tools'
34
+ ```
28
35
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
36
+ And then execute:
30
37
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+ $ bundle
32
39
 
33
40
  ## Contributing
34
41
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/repo_tools.
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/MrPowers/repo_tools.
36
43
 
37
44
 
38
45
  ## License
@@ -1,3 +1,3 @@
1
1
  module RepoTools
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repo_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MrPowers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler