nexus_cli 0.0.3 → 0.0.4
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.
- data/.gitignore +2 -1
- data/Gemfile +2 -0
- data/README.md +4 -3
- data/VERSION +1 -1
- data/lib/nexus_cli.rb +5 -4
- data/lib/nexus_cli/cli.rb +2 -34
- data/lib/nexus_cli/tasks.rb +39 -0
- data/nexus_cli.gemspec +3 -2
- metadata +60 -16
data/.gitignore
CHANGED
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -16,9 +16,10 @@ Installation
|
|
16
16
|
3. Give the file the following information:
|
17
17
|
|
18
18
|
```
|
19
|
-
url:
|
20
|
-
|
21
|
-
|
19
|
+
url: "http://my-nexus-server/nexus/"
|
20
|
+
repository: "my-repository-id"
|
21
|
+
username: "username"
|
22
|
+
password: "password"
|
22
23
|
```
|
23
24
|
|
24
25
|
Usage
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/lib/nexus_cli.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require 'nexus_cli/tasks'
|
2
|
+
require 'nexus_cli/cli'
|
3
|
+
require 'nexus_cli/errors'
|
4
|
+
require 'nexus_cli/kernel'
|
5
|
+
require 'nexus_cli/remote'
|
5
6
|
|
6
7
|
module NexusCli
|
7
8
|
class << self
|
data/lib/nexus_cli/cli.rb
CHANGED
@@ -1,39 +1,7 @@
|
|
1
1
|
require 'thor'
|
2
2
|
|
3
3
|
module NexusCli
|
4
|
-
|
5
|
-
|
6
|
-
base.send :include, ::Thor::Actions
|
7
|
-
base.class_eval do
|
8
|
-
|
9
|
-
desc "pull_artifact artifact", "Pulls an artifact from Nexus and places it on your machine."
|
10
|
-
method_option :destination, :default => nil # defaults to the current working directory
|
11
|
-
def pull_artifact(artifact)
|
12
|
-
begin
|
13
|
-
path_to_artifact = Remote.pull_artifact(artifact, options[:destination])
|
14
|
-
puts "Artifact has been retrived and can be found at path: #{path_to_artifact}"
|
15
|
-
rescue NexusCliError => e
|
16
|
-
puts e.message
|
17
|
-
exit e.status_code
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
desc "push_artifact artifact file", "Pushes an artifact from your machine onto the Nexus."
|
22
|
-
def push_artifact(artifact, file)
|
23
|
-
Remote.push_artifact(artifact, file)
|
24
|
-
puts "Artifact #{artifact} has been successfully pushed to Nexus."
|
25
|
-
end
|
26
|
-
|
27
|
-
desc "get_artifact_info artifact", "Gets and returns the XML information about a particular artifact."
|
28
|
-
def get_artifact_info(artifact)
|
29
|
-
begin
|
30
|
-
puts Remote.get_artifact_info(artifact)
|
31
|
-
rescue NexusCliError => e
|
32
|
-
puts e.message
|
33
|
-
exit e.status_code
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
4
|
+
class Cli < Thor
|
5
|
+
include NexusCli::Tasks
|
38
6
|
end
|
39
7
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module NexusCli
|
4
|
+
module Tasks
|
5
|
+
def self.included(base)
|
6
|
+
base.send :include, ::Thor::Actions
|
7
|
+
base.class_eval do
|
8
|
+
|
9
|
+
desc "pull_artifact artifact", "Pulls an artifact from Nexus and places it on your machine."
|
10
|
+
method_option :destination, :default => nil # defaults to the current working directory
|
11
|
+
def pull_artifact(artifact)
|
12
|
+
begin
|
13
|
+
path_to_artifact = Remote.pull_artifact(artifact, options[:destination])
|
14
|
+
puts "Artifact has been retrived and can be found at path: #{path_to_artifact}"
|
15
|
+
rescue NexusCliError => e
|
16
|
+
puts e.message
|
17
|
+
exit e.status_code
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "push_artifact artifact file", "Pushes an artifact from your machine onto the Nexus."
|
22
|
+
def push_artifact(artifact, file)
|
23
|
+
Remote.push_artifact(artifact, file)
|
24
|
+
puts "Artifact #{artifact} has been successfully pushed to Nexus."
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "get_artifact_info artifact", "Gets and returns the XML information about a particular artifact."
|
28
|
+
def get_artifact_info(artifact)
|
29
|
+
begin
|
30
|
+
puts Remote.get_artifact_info(artifact)
|
31
|
+
rescue NexusCliError => e
|
32
|
+
puts e.message
|
33
|
+
exit e.status_code
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/nexus_cli.gemspec
CHANGED
@@ -7,13 +7,13 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = NexusCli.version
|
8
8
|
s.authors = ["Kyle Allan"]
|
9
9
|
s.email = ["kallan@riotgames.com"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "https://github.com/RiotGames/nexus_cli"
|
11
11
|
s.summary = %q{A command-line wrapper for making REST calls to Sonatype Nexus.}
|
12
12
|
s.description = s.summary
|
13
13
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
-
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
|
19
19
|
s.add_dependency 'thor'
|
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency 'rspec'
|
23
23
|
s.add_development_dependency 'aruba'
|
24
24
|
s.add_development_dependency 'cucumber'
|
25
|
+
s.add_development_dependency 'rake'
|
25
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: rest-client
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: rspec
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: aruba
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: '0'
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: cucumber
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ! '>='
|
@@ -65,15 +85,38 @@ dependencies:
|
|
65
85
|
version: '0'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rake
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
69
110
|
description: A command-line wrapper for making REST calls to Sonatype Nexus.
|
70
111
|
email:
|
71
112
|
- kallan@riotgames.com
|
72
|
-
executables:
|
113
|
+
executables:
|
114
|
+
- nexus-cli
|
73
115
|
extensions: []
|
74
116
|
extra_rdoc_files: []
|
75
117
|
files:
|
76
118
|
- .gitignore
|
119
|
+
- Gemfile
|
77
120
|
- LICENSE
|
78
121
|
- README.md
|
79
122
|
- Rakefile
|
@@ -88,10 +131,11 @@ files:
|
|
88
131
|
- lib/nexus_cli/errors.rb
|
89
132
|
- lib/nexus_cli/kernel.rb
|
90
133
|
- lib/nexus_cli/remote.rb
|
134
|
+
- lib/nexus_cli/tasks.rb
|
91
135
|
- lib/nexus_cli/version.rb
|
92
136
|
- nexus_cli.gemspec
|
93
137
|
- spec/remote_spec.rb
|
94
|
-
homepage:
|
138
|
+
homepage: https://github.com/RiotGames/nexus_cli
|
95
139
|
licenses: []
|
96
140
|
post_install_message:
|
97
141
|
rdoc_options: []
|
@@ -105,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
149
|
version: '0'
|
106
150
|
segments:
|
107
151
|
- 0
|
108
|
-
hash:
|
152
|
+
hash: 4305968249871314487
|
109
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
154
|
none: false
|
111
155
|
requirements:
|
@@ -114,10 +158,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
158
|
version: '0'
|
115
159
|
segments:
|
116
160
|
- 0
|
117
|
-
hash:
|
161
|
+
hash: 4305968249871314487
|
118
162
|
requirements: []
|
119
163
|
rubyforge_project:
|
120
|
-
rubygems_version: 1.8.
|
164
|
+
rubygems_version: 1.8.21
|
121
165
|
signing_key:
|
122
166
|
specification_version: 3
|
123
167
|
summary: A command-line wrapper for making REST calls to Sonatype Nexus.
|