xfrtuc 0.0.8 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8109216d2b9847adbf12b531021f04b5f534c9a50e107b5f3f3ceaffbce3a27a
4
+ data.tar.gz: 34f29944dbc0ad254b0cfbd2d8339b06dcc8bf661de5a770fefef9366b9e8db5
5
+ SHA512:
6
+ metadata.gz: f374eac9ed3de14481c22e58cab4813b3961e82e12f87406e19dc1a06517e83e732548654e2f2aefc01c6f8ff75f26fb2724d68a47fa6286ae1b2df4ad7f6abf
7
+ data.tar.gz: d3b7f52f4387faeb8c3efbf3ca6169db28174d02e58fb83eb250b91fd0575240e7cba1c3705263b4ccba563fef4b1a83f33caabd2e608e1052b56a217357339a
@@ -0,0 +1,16 @@
1
+ version: 2.1
2
+ orbs:
3
+ ruby: circleci/ruby@0.1.2
4
+
5
+ jobs:
6
+ build:
7
+ docker:
8
+ - image: cimg/ruby:3.0.0
9
+ executor: ruby/default
10
+ steps:
11
+ - checkout
12
+ - run:
13
+ name: Which bundler?
14
+ command: bundle -v
15
+ - ruby/bundle-install
16
+ - run: bundle exec rspec
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ .ruby-version
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- ruby '1.9.3'
4
-
5
3
  # Specify your gem's dependencies in xfrtuc.gemspec
6
4
  gemspec
data/lib/xfrtuc.rb CHANGED
@@ -29,7 +29,7 @@ module Xfrtuc
29
29
  @group_client ||= Xfrtuc::Group.new(self)
30
30
  else
31
31
  self.class.new(@username, @password,
32
- @base_url + "/groups/#{URI.encode(name)}")
32
+ @base_url + "/groups/#{CGI.escape(name)}")
33
33
  end
34
34
  end
35
35
 
@@ -64,7 +64,7 @@ module Xfrtuc
64
64
  def initialize(client); super; end
65
65
 
66
66
  def info(name)
67
- client.get("/groups/#{URI.encode(name)}")
67
+ client.get("/groups/#{CGI.escape(name)}")
68
68
  end
69
69
 
70
70
  def list
@@ -76,7 +76,7 @@ module Xfrtuc
76
76
  end
77
77
 
78
78
  def delete(name)
79
- client.delete("/groups/#{URI.encode(name)}")
79
+ client.delete("/groups/#{CGI.escape(name)}")
80
80
  end
81
81
  end
82
82
 
@@ -119,20 +119,19 @@ module Xfrtuc
119
119
  }
120
120
  payload.merge!(log_input_url: log_input_url) unless log_input_url.nil?
121
121
  payload.merge!(num_keep: num_keep) unless num_keep.nil?
122
-
123
122
  client.post("/transfers", payload)
124
123
  end
125
124
 
126
125
  def delete(id)
127
- client.delete("/transfers/#{URI.encode(id)}")
126
+ client.delete("/transfers/#{CGI.escape(id)}")
128
127
  end
129
128
 
130
129
  def cancel(id)
131
- client.post("/transfers/#{URI.encode(id)}/actions/cancel")
130
+ client.post("/transfers/#{CGI.escape(id)}/actions/cancel")
132
131
  end
133
132
 
134
133
  def public_url(id, opts={})
135
- client.post("/transfers/#{URI.encode(id)}/actions/public-url", opts)
134
+ client.post("/transfers/#{CGI.escape(id)}/actions/public-url", opts)
136
135
  end
137
136
  end
138
137
 
@@ -169,11 +168,11 @@ module Xfrtuc
169
168
  sched_opts[:retain_weeks] = retain_weeks unless retain_weeks.nil?
170
169
  sched_opts[:retain_months] = retain_months unless retain_months.nil?
171
170
 
172
- client.put("/schedules", sched_opts)
171
+ client.put("/schedules/#{CGI.escape(name)}", sched_opts)
173
172
  end
174
173
 
175
174
  def delete(id)
176
- client.delete("/schedules/#{URI.encode(id)}")
175
+ client.delete("/schedules/#{CGI.escape(id)}")
177
176
  end
178
177
  end
179
178
  end
@@ -1,3 +1,3 @@
1
1
  module Xfrtuc
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.13"
3
3
  end
data/spec/xfrtuc_spec.rb CHANGED
@@ -368,7 +368,7 @@ module Xfrtuc
368
368
  group_client = client.group(group_name)
369
369
  expect(group_client).to be_instance_of(Client)
370
370
  expect(group_client.base_url).to eq(client.base_url +
371
- "/groups/#{URI.encode(group_name)}")
371
+ "/groups/#{CGI.escape(group_name)}")
372
372
  end
373
373
  end
374
374
 
@@ -401,7 +401,7 @@ module Xfrtuc
401
401
  let(:client) { Client.new(username, password, "https://#{host}") }
402
402
 
403
403
  before do
404
- ShamRack.mount(fakesferatu, host, 443)
404
+ ShamRack.at(host, 443).mount(fakesferatu)
405
405
  end
406
406
 
407
407
  after do
data/xfrtuc.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.version = Xfrtuc::VERSION
16
16
  gem.license = "MIT"
17
17
 
18
- gem.add_runtime_dependency 'rest-client', '~> 1.6'
18
+ gem.add_runtime_dependency 'rest-client', '~> 2.0'
19
19
 
20
20
  gem.add_development_dependency 'rspec', '~> 3.0'
21
21
  gem.add_development_dependency 'sham_rack', '~> 1.3'
metadata CHANGED
@@ -1,62 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xfrtuc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
- prerelease:
4
+ version: 0.0.13
6
5
  platform: ruby
7
6
  authors:
8
7
  - Maciek Sakrejda
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rest-client
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '1.6'
19
+ version: '2.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.6'
26
+ version: '2.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '3.0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '3.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: sham_rack
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '1.3'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '1.3'
62
55
  description: Transferatu client
@@ -66,9 +59,9 @@ executables: []
66
59
  extensions: []
67
60
  extra_rdoc_files: []
68
61
  files:
69
- - .ruby-version
62
+ - ".circleci/config.yml"
63
+ - ".gitignore"
70
64
  - Gemfile
71
- - Gemfile.lock
72
65
  - LICENSE
73
66
  - lib/xfrtuc.rb
74
67
  - lib/xfrtuc/version.rb
@@ -78,28 +71,26 @@ files:
78
71
  homepage: https://github.com/heroku/xfrtuc
79
72
  licenses:
80
73
  - MIT
81
- post_install_message:
74
+ metadata: {}
75
+ post_install_message:
82
76
  rdoc_options: []
83
77
  require_paths:
84
78
  - lib
85
79
  required_ruby_version: !ruby/object:Gem::Requirement
86
- none: false
87
80
  requirements:
88
- - - ! '>='
81
+ - - ">="
89
82
  - !ruby/object:Gem::Version
90
83
  version: '0'
91
84
  required_rubygems_version: !ruby/object:Gem::Requirement
92
- none: false
93
85
  requirements:
94
- - - ! '>='
86
+ - - ">="
95
87
  - !ruby/object:Gem::Version
96
88
  version: '0'
97
89
  requirements: []
98
- rubyforge_project:
99
- rubygems_version: 1.8.23
100
- signing_key:
101
- specification_version: 3
102
- summary: ! 'Transferatu client: see https://github.com/heroku/transferatu'
90
+ rubygems_version: 3.2.3
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: 'Transferatu client: see https://github.com/heroku/transferatu'
103
94
  test_files:
104
95
  - spec/spec_helper.rb
105
96
  - spec/xfrtuc_spec.rb
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 1.9.3-p484
data/Gemfile.lock DELETED
@@ -1,38 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- xfrtuc (0.0.8)
5
- rest-client (~> 1.6)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- diff-lcs (1.2.5)
11
- mime-types (2.3)
12
- netrc (0.7.7)
13
- rack (1.5.2)
14
- rest-client (1.7.2)
15
- mime-types (>= 1.16, < 3.0)
16
- netrc (~> 0.7)
17
- rspec (3.0.0)
18
- rspec-core (~> 3.0.0)
19
- rspec-expectations (~> 3.0.0)
20
- rspec-mocks (~> 3.0.0)
21
- rspec-core (3.0.4)
22
- rspec-support (~> 3.0.0)
23
- rspec-expectations (3.0.4)
24
- diff-lcs (>= 1.2.0, < 2.0)
25
- rspec-support (~> 3.0.0)
26
- rspec-mocks (3.0.4)
27
- rspec-support (~> 3.0.0)
28
- rspec-support (3.0.4)
29
- sham_rack (1.3.6)
30
- rack
31
-
32
- PLATFORMS
33
- ruby
34
-
35
- DEPENDENCIES
36
- rspec (~> 3.0)
37
- sham_rack (~> 1.3)
38
- xfrtuc!