repo_tools 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -16
- data/lib/repo_tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ee8b7b18157243c974e04d9d88028e40b2c6b4
|
4
|
+
data.tar.gz: efeafc9e3a11229778811080b9adacf824fbce11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26f77d8a48b61e1bbabf9c8ad6377308af15b93ab2df907e9915dd38ab1a7fc33fd3013457e20cec74c4def46e974eb4bd5a3e91f0a8bcb92e147c067f8c7c09
|
7
|
+
data.tar.gz: 2b85bc4d932fefff66338d354fdfabf6bd4b845477f4f378d1d803aecb3c7ccbe2887a2861d4480584a0e8478b3f2ec5ebc1ccee53120e8b7ebadaf9954640b3
|
data/README.md
CHANGED
@@ -1,38 +1,45 @@
|
|
1
1
|
# RepoTools
|
2
2
|
|
3
|
-
|
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
|
-
|
5
|
+
## Usage
|
6
6
|
|
7
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
18
|
+
```
|
19
|
+
cd /root/path/tmp/test/frontend-generators
|
20
|
+
git reset --hard HEAD~4
|
21
|
+
```
|
20
22
|
|
21
|
-
|
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
|
-
##
|
28
|
+
## Installation
|
24
29
|
|
25
|
-
|
30
|
+
Add this line to your application's Gemfile:
|
26
31
|
|
27
|
-
|
32
|
+
```ruby
|
33
|
+
gem 'repo_tools'
|
34
|
+
```
|
28
35
|
|
29
|
-
|
36
|
+
And then execute:
|
30
37
|
|
31
|
-
|
38
|
+
$ bundle
|
32
39
|
|
33
40
|
## Contributing
|
34
41
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/MrPowers/repo_tools.
|
36
43
|
|
37
44
|
|
38
45
|
## License
|
data/lib/repo_tools/version.rb
CHANGED
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
|
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-
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|