gpr-fetch 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +1 -0
- data/gpr-fetch.gemspec +24 -0
- data/lib/gpr/actions/fetch.rb +15 -0
- data/lib/gpr/commands/fetch.rb +37 -0
- data/lib/gpr/fetch.rb +2 -0
- data/lib/gpr/fetch/version.rb +5 -0
- metadata +110 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 533481e56f82f60cda8ff98a6539a4467fc0a9cd
|
4
|
+
data.tar.gz: 30c5b537a40be2777e93155f971f681a94bbda98
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a9eff3972f616676ddcceb1fd362ca0df174b4c5850125fbd60e44bc2ebc67420f7b93b5ab3303bc7dd8d4b8f5450803011c623ab85c98ae200b0cbcc40a4290
|
7
|
+
data.tar.gz: 8f3e8fa80ad2bdf82e147d916bffee2b4a296b65640884d065c182a4231bfd63dd258745cf25437416102738348ce01efb3b87ccd25f87f8117a9c286d0c0220
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 kaihar4
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Gpr::Fetch
|
2
|
+
|
3
|
+
Gpr plugin to fetch all registered repositories.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your gpr's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'gpr-fetch'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```sh
|
16
|
+
# e.g. gpr fetch origin
|
17
|
+
$ gpr fetch <remote repository>
|
18
|
+
```
|
19
|
+
|
20
|
+
Also possible to specify the branch.
|
21
|
+
|
22
|
+
```sh
|
23
|
+
# e.g. gpr fetch origin master
|
24
|
+
$ gpr fetch <remote repository> <branch>
|
25
|
+
```
|
26
|
+
|
27
|
+
If you run for short, it means `gpr fetch origin`.
|
28
|
+
|
29
|
+
```sh
|
30
|
+
$ gpr fetch
|
31
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/gpr-fetch.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$LOAD_PATH << File.expand_path('../lib', __FILE__)
|
2
|
+
require 'gpr/fetch/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = 'gpr-fetch'
|
6
|
+
spec.version = Gpr::Fetch::VERSION
|
7
|
+
spec.authors = ['kaihar4']
|
8
|
+
spec.email = ['kaihar4@gmail.com']
|
9
|
+
spec.summary = 'Gpr plugin to fetch all registered repositories'
|
10
|
+
spec.description = spec.summary
|
11
|
+
spec.homepage = 'https://github.com/kaihar4/gpr-fetch'
|
12
|
+
spec.license = 'MIT'
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_dependency 'gpr'
|
20
|
+
spec.add_dependency 'safe_colorize'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'safe_colorize'
|
2
|
+
|
3
|
+
require 'gpr/actions/fetch'
|
4
|
+
|
5
|
+
module Gpr
|
6
|
+
module Commands
|
7
|
+
class Fetch < Base
|
8
|
+
using SafeColorize
|
9
|
+
|
10
|
+
def initialize(thor)
|
11
|
+
thor.class_eval do
|
12
|
+
include ::Gpr::Actions::Fetch
|
13
|
+
|
14
|
+
desc 'fetch', 'Fetch the registered repositories.'
|
15
|
+
def fetch(remote = 'origin', branch = nil, path = nil)
|
16
|
+
if path.nil?
|
17
|
+
repositories = repository_list
|
18
|
+
repositories.each do |repository|
|
19
|
+
repo_info = parse_repository(repository)
|
20
|
+
|
21
|
+
puts "#{repo_info[:host].color(:yellow)} - #{repo_info[:repository].color(:blue)}"
|
22
|
+
|
23
|
+
git_fetch(repository, remote, branch)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
repo_info = parse_repository(path)
|
27
|
+
|
28
|
+
puts "#{repo_info[:host].color(:yellow)} - #{repo_info[:repository].color(:blue)}"
|
29
|
+
|
30
|
+
git_fetch(path, remote, branch)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/gpr/fetch.rb
ADDED
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gpr-fetch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- kaihar4
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gpr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: safe_colorize
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Gpr plugin to fetch all registered repositories
|
70
|
+
email:
|
71
|
+
- kaihar4@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- LICENSE.txt
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- gpr-fetch.gemspec
|
82
|
+
- lib/gpr/actions/fetch.rb
|
83
|
+
- lib/gpr/commands/fetch.rb
|
84
|
+
- lib/gpr/fetch.rb
|
85
|
+
- lib/gpr/fetch/version.rb
|
86
|
+
homepage: https://github.com/kaihar4/gpr-fetch
|
87
|
+
licenses:
|
88
|
+
- MIT
|
89
|
+
metadata: {}
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 2.4.5
|
107
|
+
signing_key:
|
108
|
+
specification_version: 4
|
109
|
+
summary: Gpr plugin to fetch all registered repositories
|
110
|
+
test_files: []
|