nexus 1.4.0 → 1.5.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
- SHA1:
3
- metadata.gz: 4aaa8e6fe12f2cb99e05e36d30645510e975dc2e
4
- data.tar.gz: cd62a2759cc1528fba9995e073eabd0c6e6b1d8f
2
+ SHA256:
3
+ metadata.gz: 210f5f076cb3baa04605d4761e4976f03901da8dbf4105e68b53067d31028772
4
+ data.tar.gz: 965602324a55a6f5a684cde56ac7aa66355acdde0ad43d5454371707b4a0547b
5
5
  SHA512:
6
- metadata.gz: 6481887bcbf1800d0bfe5e4524906f73bf37bec4073fd94b28e7c46fb7ea11cb5fef360399ae3ac1d5a0c2bc1d4c86e457b68fc9ab70729d3f435caa236ecefc
7
- data.tar.gz: b4bae96a5fcfbe925f01e3e630aab2daccbb7d6e13f16adddd8939525e05173a2fed37eb658d6cc50ea536a1663ba8e734f2b4006d15c015ebaed017b0bb9692
6
+ metadata.gz: 4771813a366dbb775ce709e2a51e01189aa7a1c3bf8bbf6cf5084c057e62c95e0d5d24007f8fc8edb5499602dd806a51446826b22c556cac36c0fd7c9076ba65
7
+ data.tar.gz: c73b63ddb527c01ace95b4e5a69d3da2922a35c76c9c8ca471a556f22ee1f4d85237eb41b43cf674d1b5912794926392d20e4b438ecba8f0d796bc651f1bccd1
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'rubygems/local_remote_options'
2
7
  require 'net/http'
3
8
  require 'base64'
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  class Gem::Commands::NexusCommand < Gem::AbstractCommand
2
7
 
3
8
  def description
data/lib/nexus/cipher.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'openssl'
2
7
  require 'base64'
3
8
 
data/lib/nexus/config.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'nexus/cipher'
2
7
  require 'nexus/config_file'
3
8
 
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'rubygems/local_remote_options'
2
7
  require 'net/http'
3
8
  require 'base64'
@@ -14,7 +19,7 @@ module Nexus
14
19
  if configfile.is_a?( String )
15
20
  @file = configfile
16
21
 
17
- if File.exists?( configfile )
22
+ if File.exist?( configfile )
18
23
  @all = YAML.load( ::File.read( configfile ) )
19
24
  else
20
25
  store # make sure we can write it
@@ -99,8 +104,8 @@ module Nexus
99
104
 
100
105
  def store
101
106
  dirname = File.dirname( @file )
102
- Dir.mkdir( dirname ) unless File.exists?( dirname )
103
- new = !File.exists?( @file )
107
+ Dir.mkdir( dirname ) unless File.exist?( dirname )
108
+ new = !File.exist?( @file )
104
109
 
105
110
  File.open( @file, 'w') do |f|
106
111
  f.write @all.to_yaml
data/lib/nexus/version.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  module Nexus
2
- VERSION = '1.4.0'.freeze
7
+ VERSION = '1.5.1'.freeze
3
8
  end
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'rubygems/command_manager'
2
7
  require 'commands/abstract_command'
3
8
 
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'command_helper'
2
7
 
3
8
  class Gem::Commands::FakeCommand < Gem::AbstractCommand
@@ -128,26 +133,6 @@ class AbstractCommandTest < CommandTest
128
133
  end
129
134
  end
130
135
 
131
- context 'separeted config per repo key' do
132
- should 'store the config on per key' do
133
- config_path = File.join( 'pkg', 'configrepo')
134
- FileUtils.rm_f( config_path )
135
- @command.options[ :nexus_config ] = config_path
136
- @command.options[ :nexus_repo ] = :first
137
- @command.config.url = :thing
138
- @command.options[ :nexus_repo ] = :second
139
- @command.send :instance_variable_set, '@config'.to_sym, nil
140
- @command.config.url = :otherthing
141
- @command.options[ :nexus_repo ] = nil
142
- @command.send :instance_variable_set, '@config'.to_sym, nil
143
- @command.config.url = :nothing
144
- assert_equal( Gem.configuration.load_file(config_path),
145
- { :first => {:url => :thing},
146
- :second => {:url => :otherthing},
147
- :url => :nothing } )
148
- end
149
- end
150
-
151
136
  context "clear username + password" do
152
137
 
153
138
  should "clear stored authorization" do
data/test/cipher_test.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'minitest/autorun'
2
7
  require 'shoulda'
3
8
  require 'fileutils'
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'minitest/autorun'
2
7
 
3
8
  require 'shoulda'
@@ -37,7 +42,7 @@ class CommandTest < ActiveSupport::TestCase
37
42
  end
38
43
 
39
44
  def stub_config(config)
40
- file = Gem::ConfigFile.new({})
45
+ file = Gem::ConfigFile.new([])
41
46
  config.each { |key, value| file[key] = value }
42
47
  stub(Gem).configuration { config }
43
48
  end
data/test/config_test.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'minitest/autorun'
2
7
  require 'shoulda'
3
8
  require 'fileutils'
@@ -87,7 +92,7 @@ class ConfigTest < ::MiniTest::Unit::TestCase
87
92
  end
88
93
 
89
94
  Nexus::Config.new( file ).new_secrets( sfile )
90
- assert File.exists?( sfile ), true
95
+ assert File.exist?( sfile ), true
91
96
 
92
97
  repos.each do |repo|
93
98
  c = Nexus::Config.new( sfile, repo )
@@ -105,7 +110,7 @@ class ConfigTest < ::MiniTest::Unit::TestCase
105
110
  end
106
111
 
107
112
  Nexus::Config.new( file ).new_secrets( nil )
108
- assert_equal File.exists?( sfile ), false
113
+ assert_equal File.exist?( sfile ), false
109
114
 
110
115
  repos.each do |repo|
111
116
  c = Nexus::Config.new( file, repo )
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'minitest/autorun'
2
7
  require 'shoulda'
3
8
  require 'fileutils'
@@ -9,7 +14,7 @@ class ConfigTest < ::MiniTest::Unit::TestCase
9
14
  context 'file' do
10
15
 
11
16
  should 'store key/values' do
12
- file = File.join( 'pkg', 'cfg' )
17
+ file = File.join('pkg', 'cfg' )
13
18
  FileUtils.rm_f file
14
19
  f = Nexus::ConfigFile.new( file )
15
20
  f[ 'asd_key', nil ] = 'dsa_value'
@@ -1,3 +1,8 @@
1
+ #
2
+ # Copyright (c) 2019-present Sonatype, Inc. All rights reserved.
3
+ # "Sonatype" is a trademark of Sonatype, Inc.
4
+ #
5
+
1
6
  require 'command_helper'
2
7
  require 'fileutils'
3
8
 
@@ -152,8 +157,8 @@ class NexusCommandTest < CommandTest
152
157
  @command.options[ :nexus_clear_all ] = true
153
158
  mock(@command).ask( 'delete all current credentials ? (y/N)' ){ 'y' }
154
159
  @command.execute
155
- assert_equal( File.exists?( @with + ".config" ), true )
156
- assert_equal( File.exists?( @with + ".secrets" ), false )
160
+ assert_equal( File.exist?( @with + ".config" ), true )
161
+ assert_equal( File.exist?( @with + ".secrets" ), false )
157
162
 
158
163
  @command.options.delete( :nexus_clear_all )
159
164
  mock(@command).sign_in
@@ -194,7 +199,7 @@ class NexusCommandTest < CommandTest
194
199
  @command.options[ :nexus_config ] = @with + ".config"
195
200
  @command.options[ :nexus_secrets ] = false
196
201
  @command.execute
197
- assert_equal( File.exists?( @with + ".secrets" ), false )
202
+ assert_equal( File.exist?( @with + ".secrets" ), false )
198
203
 
199
204
  @command.options.delete( :nexus_secrets )
200
205
  mock(@command).send_gem
@@ -206,7 +211,7 @@ class NexusCommandTest < CommandTest
206
211
  @command.options[ :nexus_config ] = @with
207
212
  @command.options[ :nexus_secrets ] = @with + '.newsecrets'
208
213
  @command.execute
209
- assert_equal( File.exists?( @with + ".newsecrets" ), true )
214
+ assert_equal( File.exist?( @with + ".newsecrets" ), true )
210
215
 
211
216
  @command.options.delete( :nexus_secrets )
212
217
  mock(@command).send_gem
@@ -218,8 +223,8 @@ class NexusCommandTest < CommandTest
218
223
  @command.options[ :nexus_config ] = @with + ".config"
219
224
  @command.options[ :nexus_secrets ] = @with + '.newsecrets'
220
225
  @command.execute
221
- assert_equal( File.exists?( @with + ".secrets" ), false )
222
- assert_equal( File.exists?( @with + ".newsecrets" ), true )
226
+ assert_equal( File.exist?( @with + ".secrets" ), false )
227
+ assert_equal( File.exist?( @with + ".newsecrets" ), true )
223
228
 
224
229
  @command.options.delete( :nexus_secrets )
225
230
  mock(@command).send_gem
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
- - Nick Quaranto
8
- - Christian Meier
9
- autorequire:
7
+ - Sonatype
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2017-07-03 00:00:00.000000000 Z
11
+ date: 2023-12-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
@@ -17,14 +16,14 @@ dependencies:
17
16
  requirements:
18
17
  - - "~>"
19
18
  - !ruby/object:Gem::Version
20
- version: '10.1'
19
+ version: '13.1'
21
20
  type: :development
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - "~>"
26
25
  - !ruby/object:Gem::Version
27
- version: '10.1'
26
+ version: '13.1'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: shoulda
30
29
  requirement: !ruby/object:Gem::Requirement
@@ -103,8 +102,7 @@ dependencies:
103
102
  version: '2.4'
104
103
  description: Adds a command to RubyGems for uploading gems to a nexus server.
105
104
  email:
106
- - nick@quaran.to
107
- - m.kristian@web.de
105
+ - nexus-gem@sonatype.com
108
106
  executables:
109
107
  - nbundle
110
108
  extensions: []
@@ -126,11 +124,11 @@ files:
126
124
  - test/config_test.rb
127
125
  - test/configfile_test.rb
128
126
  - test/nexus_command_test.rb
129
- homepage: https://github.com/sonatype/nexus-gem
127
+ homepage: https://links.sonatype.com/products/nxrm3/docs/nexus-gem
130
128
  licenses:
131
129
  - MIT
132
130
  metadata: {}
133
- post_install_message:
131
+ post_install_message:
134
132
  rdoc_options: []
135
133
  require_paths:
136
134
  - lib
@@ -145,9 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
143
  - !ruby/object:Gem::Version
146
144
  version: '0'
147
145
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.5.1
150
- signing_key:
146
+ rubygems_version: 3.5.3
147
+ signing_key:
151
148
  specification_version: 4
152
149
  summary: Gem Command to interact with Nexus server
153
150
  test_files: []