aptly_cli 0.4.2 → 0.5.0

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
  SHA256:
3
- metadata.gz: c07bb5de71febaa4b92b293a1504859557992aea80f47ae90df6e91c36332b7d
4
- data.tar.gz: 6912c3b56d952f6a308194b79ccb389cfad82331dedc77ec07b0c912506f4572
3
+ metadata.gz: ceb07d514a0630db6a211ef67c423e70bbfb7366891566fca5eb82633ca45cd2
4
+ data.tar.gz: 64e5864e9bd063af826abf8aa1f8b4ba65f4288f0bd0bf3ba52a61352b7db34c
5
5
  SHA512:
6
- metadata.gz: 89267b4c87aa2ed9297f14720bcff9808d2a2c845c911740a133aabbe15575e7474822a9c2b5ef6c30edf0c514acfed4f56527a320d039a762c0e6214c6d929e
7
- data.tar.gz: 20d4da75a869a5ba0087e0bc48fc6ceb9a01f8526aea2e7d17bfe023fcaa5703d7a5dcb0dca8409f73c655380ee3fefe939d258c70384e5fec7bcba28238470a
6
+ metadata.gz: 348202e54b4fade990163e8cf1a2107f7f538d58ca894f07401c9cc57b3495f450cd032956010bcf5d84472c5b4c4a8895f8d0e69d25aa772258015875d409e2
7
+ data.tar.gz: 0d11506ac7051aef167bbfa558a22d982a373194bdb1f02dce97e16f6bff15bee4fdd85100a408c65c5e45a9f7d9e0fd0d75662fb599f2dfd8296de8442b8e8b
@@ -17,9 +17,10 @@ after_script:
17
17
  - rake docker_show_logs
18
18
 
19
19
  rvm:
20
- - 2.1.10
21
- - 2.2.5
22
- - 2.3.1
20
+ - 2.3.8
21
+ - 2.4.5
22
+ - 2.5.3
23
+ - 2.6.1
23
24
 
24
25
  deploy:
25
26
  provider: rubygems
data/README.md CHANGED
@@ -257,4 +257,3 @@ rake test # Run tests
257
257
 
258
258
  - [ruby-aptly](https://github.com/ryanuber/ruby-aptly) - Ruby client library
259
259
  - [aptly-web-ui](https://github.com/sdumetz/aptly-web-ui) - Web interface for aptly (JavaScript, React, Redux)
260
- - [debweb](https://github.com/AutogrowSystems/debweb) - Another web interface (Ruby on Rails)
@@ -32,7 +32,6 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency "simplecov"
33
33
  spec.add_development_dependency "rubocop"
34
34
 
35
- spec.add_dependency "httmultiparty", "~> 0.3.16"
36
- spec.add_dependency "httparty", "~> 0.13.0"
35
+ spec.add_dependency('httparty', '>= 0.16.2')
37
36
  spec.add_dependency "commander", "~> 4.3"
38
37
  end
@@ -501,7 +501,7 @@ command :graph do |c|
501
501
  c.syntax = 'aptly-cli graph [options]'
502
502
  c.summary = 'Download an svg or png graph of repository layout'
503
503
  c.description = 'Download a graph of repository layout. Current options are "svg" and "png"'
504
- c.example 'description', 'aptly-cli graph png > ~/repo_graph.png'
504
+ c.example 'description', 'aptly-cli graph --type png > ~/repo_graph.png'
505
505
  c.option '--type GRAPH_TYPE', String, 'Type of graph to download, present options are png or svg'
506
506
  c.action do |args, options|
507
507
  config = AptlyCli::AptlyLoad.new.configure_with($config_file)
@@ -1,5 +1,5 @@
1
1
  require 'aptly_cli/version'
2
- require 'httmultiparty'
2
+ require 'httparty'
3
3
 
4
4
  # Initializing
5
5
  module AptlyCli
@@ -1,3 +1,3 @@
1
1
  module AptlyCli
2
- VERSION = '0.4.2'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  module AptlyCli
2
2
  class AptlyCommand
3
- include HTTMultiParty
3
+ include HTTParty
4
4
 
5
5
  attr_accessor :config
6
6
  def initialize(config, options = nil)
@@ -1,7 +1,7 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
 
6
6
  module AptlyCli
7
7
  # Uploading file into Aptly
@@ -10,7 +10,8 @@ module AptlyCli
10
10
 
11
11
  def file_dir
12
12
  uri = '/files'
13
- self.class.get uri
13
+ response = self.class.get uri
14
+ response.parsed_response
14
15
  end
15
16
 
16
17
  def file_get(file_uri)
@@ -19,20 +20,24 @@ module AptlyCli
19
20
  else
20
21
  '/files/' + file_uri
21
22
  end
22
- self.class.get uri
23
+ response = self.class.get uri
24
+ response.parsed_response
23
25
  end
24
26
 
25
27
  def file_delete(file_uri)
26
28
  uri = '/files' + file_uri
27
- self.class.delete uri
29
+ response = self.class.delete uri
30
+ response.parsed_response
28
31
  end
29
32
 
30
33
  def file_post(post_options = {})
31
34
  api_file_uri = '/files' + post_options[:file_uri].to_s
32
- self.class.post(api_file_uri,
33
- query: {
35
+ response = self.class.post(api_file_uri,
36
+ body: {
34
37
  package: post_options[:package],
35
- file: File.new(post_options[:local_file]) })
38
+ file: File.new(post_options[:local_file])
39
+ })
40
+ response.parsed_response
36
41
  end
37
42
  end
38
43
  end
@@ -1,13 +1,13 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
  require 'json'
6
6
 
7
7
  module AptlyCli
8
8
  # Misc Aptly Class
9
9
  class AptlyMisc < AptlyCommand
10
- include HTTMultiParty
10
+ include HTTParty
11
11
 
12
12
  def get_graph(extension)
13
13
  uri = "/graph.#{extension}"
@@ -16,7 +16,8 @@ module AptlyCli
16
16
 
17
17
  def get_version
18
18
  uri = '/version'
19
- self.class.get(uri)
19
+ response = self.class.get(uri)
20
+ response.parsed_response
20
21
  end
21
22
  end
22
23
  end
@@ -1,13 +1,13 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
  require 'json'
6
6
 
7
7
  module AptlyCli
8
8
  # Aptly Package API
9
9
  class AptlyPackage < AptlyCommand
10
- include HTTMultiParty
10
+ include HTTParty
11
11
 
12
12
  def package_show(package_key)
13
13
  uri = "/packages/#{package_key}"
@@ -1,13 +1,13 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
  require 'json'
6
6
 
7
7
  module AptlyCli
8
8
  # :nodoc:
9
9
  class AptlyPublish < AptlyCommand
10
- include HTTMultiParty
10
+ include HTTParty
11
11
 
12
12
  @@available_gpg_options = [:skip, :batch, :gpgKey, :keyring, :secretKeyring,
13
13
  :passphrase, :passphraseFile]
@@ -92,8 +92,8 @@ module AptlyCli
92
92
 
93
93
  @body_json = @body.to_json
94
94
 
95
- self.class.post(uri, headers: { 'Content-Type' => 'application/json' },
96
- body: @body_json)
95
+ self.class.post(uri, :headers => { 'Content-Type' => 'application/json' },
96
+ :body => @body_json)
97
97
  end
98
98
 
99
99
  def publish_update(publish_options={})
@@ -118,8 +118,8 @@ module AptlyCli
118
118
  uri += "/#{publish_options[:distribution]}"
119
119
 
120
120
  @body_json = @body.to_json
121
- self.class.put(uri, headers: { 'Content-Type' => 'application/json' },
122
- body: @body_json)
121
+ self.class.put(uri, :headers => { 'Content-Type' => 'application/json' },
122
+ :body => @body_json)
123
123
  end
124
124
  end
125
125
  end
@@ -1,14 +1,14 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
  require 'json'
6
6
  require 'uri'
7
7
 
8
8
  module AptlyCli
9
9
  # Aptly class to work with Repo API
10
10
  class AptlyRepo < AptlyCommand
11
- include HTTMultiParty
11
+ include HTTParty
12
12
 
13
13
  def repo_create(repo_options = { name: nil,
14
14
  comment: nil,
@@ -20,11 +20,11 @@ module AptlyCli
20
20
  default_distribution = repo_options[:DefaultDistribution]
21
21
  default_component = repo_options[:DefaultComponent]
22
22
  self.class.post(uri,
23
- query:
23
+ :body =>
24
24
  { 'Name' => name, 'Comment' => comment,
25
25
  'DefaultDistribution' => default_distribution,
26
26
  'DefaultComponent' => default_component }.to_json,
27
- headers: { 'Content-Type' => 'application/json' })
27
+ :headers => { 'Content-Type' => 'application/json' })
28
28
  end
29
29
 
30
30
  def repo_delete(repo_options = { name: nil, force: nil })
@@ -42,8 +42,8 @@ module AptlyCli
42
42
  repo_value = v
43
43
  end
44
44
 
45
- self.class.put(uri, query: { repo_option => repo_value }.to_json,
46
- headers: { 'Content-Type' => 'application/json' })
45
+ self.class.put(uri, :body => { repo_option => repo_value }.to_json,
46
+ :headers => { 'Content-Type' => 'application/json' })
47
47
  end
48
48
 
49
49
  def repo_list
@@ -59,8 +59,8 @@ module AptlyCli
59
59
  uri = '/repos/' + repo_options[:name] + '/packages'
60
60
  self.class.post(
61
61
  uri,
62
- body: { PackageRefs: packages }.to_json,
63
- headers: { 'Content-Type' => 'application/json' }
62
+ :body => { PackageRefs: packages }.to_json,
63
+ :headers => { 'Content-Type' => 'application/json' }
64
64
  )
65
65
  end
66
66
 
@@ -72,8 +72,8 @@ module AptlyCli
72
72
  uri = '/repos/' + repo_options[:name] + '/packages'
73
73
  self.class.delete(
74
74
  uri,
75
- body: { PackageRefs: packages }.to_json,
76
- headers: { 'Content-Type' => 'application/json' }
75
+ :body => { PackageRefs: packages }.to_json,
76
+ :headers => { 'Content-Type' => 'application/json' }
77
77
  )
78
78
  end
79
79
 
@@ -1,13 +1,13 @@
1
1
  require 'aptly_cli/version'
2
2
  require 'aptly_command'
3
3
  require 'aptly_load'
4
- require 'httmultiparty'
4
+ require 'httparty'
5
5
  require 'json'
6
6
 
7
7
  module AptlyCli
8
8
  # Aptly class to work with Snapshot API
9
9
  class AptlySnapshot < AptlyCommand
10
- include HTTMultiParty
10
+ include HTTParty
11
11
 
12
12
  def snapshot_delete(name, force=nil)
13
13
  uri = "/snapshots/#{name}"
@@ -25,10 +25,10 @@ module AptlyCli
25
25
  # Build uri to create snapshot, requires name of snap and name of repo
26
26
  uri = "/repos/#{repo}/" + 'snapshots'
27
27
 
28
- self.class.post(uri, query:
28
+ self.class.post(uri, :body =>
29
29
  { 'Name' => name,
30
30
  'Description' => description }.to_json,
31
- headers: { 'Content-Type' => 'application/json' })
31
+ :headers => { 'Content-Type' => 'application/json' })
32
32
  end
33
33
 
34
34
  def snapshot_create_ref(name, description=nil,
@@ -36,10 +36,10 @@ module AptlyCli
36
36
  uri = '/snapshots'
37
37
  begin
38
38
  self.class.post(uri,
39
- query: { 'Name' => name, 'Description' => description,
39
+ :body => { 'Name' => name, 'Description' => description,
40
40
  'SourceSnapshots' => sourcesnapshots,
41
41
  'PackageRefs' => packagerefs }.to_json,
42
- headers: { 'Content-Type' => 'application/json' })
42
+ :headers => { 'Content-Type' => 'application/json' })
43
43
  rescue HTTParty::Error => e
44
44
  return e
45
45
  end
@@ -83,7 +83,7 @@ module AptlyCli
83
83
  @query[:Description] = description unless description.nil?
84
84
  @query_json = @query.to_json
85
85
  begin
86
- self.class.put(uri, query: @query_json, headers:
86
+ self.class.put(uri, :body => @query_json, :headers =>
87
87
  { 'Content-Type' => 'application/json' })
88
88
  rescue HTTParty::Error => e
89
89
  puts e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptly_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-26 00:00:00.000000000 Z
11
+ date: 2019-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,34 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: httmultiparty
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.3.16
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.3.16
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: httparty
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - "~>"
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: 0.13.0
103
+ version: 0.16.2
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - "~>"
108
+ - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: 0.13.0
110
+ version: 0.16.2
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: commander
127
113
  requirement: !ruby/object:Gem::Requirement