update_repo 0.7.0 → 0.7.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00f7cdd0ea4d8be3e8cde3ce7af7d2bea7edfa18
4
- data.tar.gz: b4d2f9eba172fa64293855bb3acb03e09b16024e
3
+ metadata.gz: bf4845833185e2067044f7580d23908be0d37348
4
+ data.tar.gz: 77f8f8759f3935e8b05554b6ad9b0ccf2d3812da
5
5
  SHA512:
6
- metadata.gz: 4442b8cf9ffc01891eef1828f5fcf4c88f417cfcb7a7ec2268d0d9b1e19c7b0b0ddd7e922ea3b99de9b47c1065cf871300e08ae7f84274bd553d592af91e0bd4
7
- data.tar.gz: 25439ccabe091bcc00b4c968272c3b00043aa3ffcf4a285b740877d47423ca9d9830dd26160d84631ff109fcbbcfab618b1c82eeabaf710d166d205d0125a98a
6
+ metadata.gz: 950adcd0cf990f8db0d05c1ca868ae331d17a87c4a406754ba3972ea78863c84346d2cae93cdc1dcbb2f3b787e2211122391ca1bbcb6ce9d8c7d09117d6fb476
7
+ data.tar.gz: 595ff551349993782849041945d28d6a4a49b38f4cfe50aa58ab77ccd231f842f4abeb85be0321932e7fc4f114541ce1e58c14d1a23bfe93144bc892183a46dd
data/README.md CHANGED
@@ -9,6 +9,7 @@
9
9
  A Simple Gem to keep multiple locally-cloned Git Repositories up to date.
10
10
 
11
11
  This is the conversion to a Gem of one of my standalone Ruby scripts. Still very much a work in progress but the required basic functionality is there.
12
+ The script will simply run `git pull` on every local clone of a git repository that it finds under the specified directory or directories.
12
13
 
13
14
  ## Usage
14
15
 
@@ -38,7 +39,8 @@ $ update_repo
38
39
 
39
40
  ## Configuration
40
41
  #### Configuration file
41
- The configuration file defaults to `~/.updaterepo` and is a standard [YAML](http://yaml.org/)-formatted text file. The first line must contain the YAML frontmatter of 3 dashes (`---`). After that, the following sections can follow in any order. Only the `location:` section is compulsory, and that must contain at least one entry.
42
+ The configuration file defaults to `~/.updaterepo` and is a standard [YAML](http://yaml.org/)-formatted text file. If this configuration file is not found, the script will terminate with an error.
43
+ The first line must contain the YAML frontmatter of 3 dashes (`---`). After that, the following sections can follow in any order. Only the `location:` section is compulsory, and that must contain at least one entry.
42
44
 
43
45
  `location:` - at least one directory which contains the locally cloned repository(s) to update. There is no limit on how many directories can be listed :
44
46
  ```yaml
@@ -65,6 +67,12 @@ Options:
65
67
  -d, --dump Dump a list of Directories and Git URL's to STDOUT in CSV format
66
68
  -p, --prune=<i> Number of directory levels to remove from the --dump output.
67
69
  Only valid when --dump or -d specified (Default: 0)
70
+ -i, --import Import a previous dump of directories and Git repository URL's,
71
+ (created using --dump) then proceed to clone them locally.
72
+ -l, --log Create a logfile of all program output to './update_repo.log'.
73
+ Any older logs will be overwritten.
74
+ -t, --timestamp Timestamp the logfile instead of overwriting. Does nothing unless the
75
+ --log option is also specified.
68
76
  -v, --version Print version and exit
69
77
  -h, --help Show this message
70
78
  ```
@@ -90,6 +98,7 @@ Not in any specific order :
90
98
  - Add Import & Export functionality :
91
99
  * ability to export a text dump of each repo location `[DONE]`
92
100
  * re-import the above dump on a different machine or after reinstall
101
+ - Add option to use alternative git command if required, either globally or on a case-by-case basis (see also comments on 'variants' above). Currently the script just uses a blanket `git pull` command on all repositories.
93
102
  - Document configuration file format and options.
94
103
  - Add testing!
95
104
 
@@ -234,7 +234,7 @@ EOS
234
234
  @metrics[:failed] += 1
235
235
  else
236
236
  print_log ' ', line.cyan
237
- @metrics[:updated] += 1 if line =~ %r{^From\shttps?://}
237
+ @metrics[:updated] += 1 if line =~ %r{^From\s(?:https?|git)://}
238
238
  end
239
239
  end
240
240
  end
@@ -1,4 +1,4 @@
1
1
  module UpdateRepo
2
2
  # constant, current version of this Gem
3
- VERSION = '0.7.0'.freeze
3
+ VERSION = '0.7.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update_repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Ramsay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2016-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler