resizing 0.8.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +24 -11
- data/Gemfile +4 -1
- data/lib/resizing/carrier_wave.rb +1 -1
- data/lib/resizing/client.rb +7 -6
- data/lib/resizing/configuration.rb +20 -6
- data/lib/resizing/http_clientable.rb +1 -1
- data/lib/resizing/version.rb +1 -1
- data/lib/resizing/video/client.rb +14 -3
- data/resizing.gemspec +0 -4
- data/test/resizing/carrier_wave_test.rb +2 -1
- data/test/resizing/client_test.rb +2 -1
- data/test/resizing/configuration_test.rb +29 -6
- data/test/resizing/video/client_test.rb +10 -1
- metadata +2 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1384a3c771598b82c8431a7099658805b56001d64d5a6d5eef82c128093a70db
|
4
|
+
data.tar.gz: 716a43f90b50839b4f024e936316ac1184f65d00d26cd571ba48e3c7e09ac7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c197bbbd6916a416b43225ff52c7e198dcb947a6a92e1a40ee6bfa11e39e0fe33d31b38c31e856056dece662a853116fbee8af8c655c557514ac6d87026dce6
|
7
|
+
data.tar.gz: 312ce7a349404264bda32ea7f0c478bcf92d95f314883c4cbd194578ba84c8a1259b426746214ec7785f67b9a2b1f9436ec4ffcc4c309a8af5c0eb31b1087b6e
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [v0.8.1](https://github.com/jksy/resizing-gem/tree/v0.8.1) (2021-03-06)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.8.0...v0.8.1)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- version 0.8.1 [\#51](https://github.com/jksy/resizing-gem/pull/51) ([jksy](https://github.com/jksy))
|
10
|
+
- fix test [\#50](https://github.com/jksy/resizing-gem/pull/50) ([jksy](https://github.com/jksy))
|
11
|
+
- Feature/separate subdomain [\#49](https://github.com/jksy/resizing-gem/pull/49) ([jksy](https://github.com/jksy))
|
12
|
+
|
13
|
+
## [v0.8.0](https://github.com/jksy/resizing-gem/tree/v0.8.0) (2021-02-21)
|
4
14
|
|
5
15
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.7.0...v0.8.0)
|
6
16
|
|
7
17
|
**Merged pull requests:**
|
8
18
|
|
19
|
+
- Feature/update v0.8.0 [\#48](https://github.com/jksy/resizing-gem/pull/48) ([jksy](https://github.com/jksy))
|
9
20
|
- Add supporting API of videos [\#47](https://github.com/jksy/resizing-gem/pull/47) ([jksy](https://github.com/jksy))
|
21
|
+
- Update faraday requirement from ~\> 1.0.1 to \>= 1.0.1, \< 1.4.0 [\#46](https://github.com/jksy/resizing-gem/pull/46) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
22
|
+
- Update rake requirement from ~\> 12.0 to ~\> 13.0 [\#45](https://github.com/jksy/resizing-gem/pull/45) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
10
23
|
- update changelog and add rake task [\#44](https://github.com/jksy/resizing-gem/pull/44) ([jksy](https://github.com/jksy))
|
11
24
|
|
12
25
|
## [v0.7.0](https://github.com/jksy/resizing-gem/tree/v0.7.0) (2020-12-11)
|
@@ -15,8 +28,7 @@
|
|
15
28
|
|
16
29
|
**Merged pull requests:**
|
17
30
|
|
18
|
-
-
|
19
|
-
- APIError\#decoded\_body return hash always [\#42](https://github.com/jksy/resizing-gem/pull/42) ([jksy](https://github.com/jksy))
|
31
|
+
- change version string when put request with mockclient [\#32](https://github.com/jksy/resizing-gem/pull/32) ([jksy](https://github.com/jksy))
|
20
32
|
|
21
33
|
## [v0.6.0](https://github.com/jksy/resizing-gem/tree/v0.6.0) (2020-12-08)
|
22
34
|
|
@@ -33,7 +45,6 @@
|
|
33
45
|
**Merged pull requests:**
|
34
46
|
|
35
47
|
- Feature/fix raise error [\#40](https://github.com/jksy/resizing-gem/pull/40) ([jksy](https://github.com/jksy))
|
36
|
-
- save original filename [\#37](https://github.com/jksy/resizing-gem/pull/37) ([jksy](https://github.com/jksy))
|
37
48
|
|
38
49
|
## [v0.5.2](https://github.com/jksy/resizing-gem/tree/v0.5.2) (2020-10-11)
|
39
50
|
|
@@ -53,6 +64,7 @@
|
|
53
64
|
|
54
65
|
**Merged pull requests:**
|
55
66
|
|
67
|
+
- v0.7.0 [\#43](https://github.com/jksy/resizing-gem/pull/43) ([jksy](https://github.com/jksy))
|
56
68
|
- fix raise error if tempfile is assinged [\#38](https://github.com/jksy/resizing-gem/pull/38) ([jksy](https://github.com/jksy))
|
57
69
|
|
58
70
|
## [v0.4.1](https://github.com/jksy/resizing-gem/tree/v0.4.1) (2020-10-01)
|
@@ -66,6 +78,7 @@
|
|
66
78
|
|
67
79
|
**Merged pull requests:**
|
68
80
|
|
81
|
+
- save original filename [\#37](https://github.com/jksy/resizing-gem/pull/37) ([jksy](https://github.com/jksy))
|
69
82
|
- columnがnilの時はdefault\_urlを返す \#33 [\#34](https://github.com/jksy/resizing-gem/pull/34) ([jksy](https://github.com/jksy))
|
70
83
|
|
71
84
|
## [v0.2.1](https://github.com/jksy/resizing-gem/tree/v0.2.1) (2020-09-29)
|
@@ -78,7 +91,7 @@
|
|
78
91
|
|
79
92
|
**Merged pull requests:**
|
80
93
|
|
81
|
-
-
|
94
|
+
- APIError\#decoded\_body return hash always [\#42](https://github.com/jksy/resizing-gem/pull/42) ([jksy](https://github.com/jksy))
|
82
95
|
- add delete method [\#31](https://github.com/jksy/resizing-gem/pull/31) ([jksy](https://github.com/jksy))
|
83
96
|
- Feature/add identifier to public [\#30](https://github.com/jksy/resizing-gem/pull/30) ([jksy](https://github.com/jksy))
|
84
97
|
- add identifier [\#29](https://github.com/jksy/resizing-gem/pull/29) ([jksy](https://github.com/jksy))
|
@@ -92,10 +105,6 @@
|
|
92
105
|
|
93
106
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.3.1...v0.3.2)
|
94
107
|
|
95
|
-
**Merged pull requests:**
|
96
|
-
|
97
|
-
- fix raise error when call remove! with nil column [\#23](https://github.com/jksy/resizing-gem/pull/23) ([jksy](https://github.com/jksy))
|
98
|
-
|
99
108
|
## [v0.3.1](https://github.com/jksy/resizing-gem/tree/v0.3.1) (2020-09-11)
|
100
109
|
|
101
110
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.3.0...v0.3.1)
|
@@ -114,9 +123,9 @@
|
|
114
123
|
|
115
124
|
**Merged pull requests:**
|
116
125
|
|
126
|
+
- fix raise error when call remove! with nil column [\#23](https://github.com/jksy/resizing-gem/pull/23) ([jksy](https://github.com/jksy))
|
117
127
|
- version 0.2.0 [\#21](https://github.com/jksy/resizing-gem/pull/21) ([jksy](https://github.com/jksy))
|
118
128
|
- support f\_auto, q\_auto parameter [\#20](https://github.com/jksy/resizing-gem/pull/20) ([jksy](https://github.com/jksy))
|
119
|
-
- add mock client for test environments [\#14](https://github.com/jksy/resizing-gem/pull/14) ([jksy](https://github.com/jksy))
|
120
129
|
|
121
130
|
## [v0.1.4](https://github.com/jksy/resizing-gem/tree/v0.1.4) (2020-08-08)
|
122
131
|
|
@@ -138,6 +147,10 @@
|
|
138
147
|
|
139
148
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.1.1...v0.1.2)
|
140
149
|
|
150
|
+
**Merged pull requests:**
|
151
|
+
|
152
|
+
- ignore response if delete method is received 404 status code [\#17](https://github.com/jksy/resizing-gem/pull/17) ([jksy](https://github.com/jksy))
|
153
|
+
|
141
154
|
## [v0.1.1](https://github.com/jksy/resizing-gem/tree/v0.1.1) (2020-06-12)
|
142
155
|
|
143
156
|
[Full Changelog](https://github.com/jksy/resizing-gem/compare/v0.1.0...v0.1.1)
|
@@ -152,7 +165,7 @@
|
|
152
165
|
|
153
166
|
**Merged pull requests:**
|
154
167
|
|
155
|
-
-
|
168
|
+
- add mock client for test environments [\#14](https://github.com/jksy/resizing-gem/pull/14) ([jksy](https://github.com/jksy))
|
156
169
|
- Feature/add test test for remove xxx [\#13](https://github.com/jksy/resizing-gem/pull/13) ([jksy](https://github.com/jksy))
|
157
170
|
- add rubocop & fix some tests [\#12](https://github.com/jksy/resizing-gem/pull/12) ([jksy](https://github.com/jksy))
|
158
171
|
- fix the column cant be update by null value [\#11](https://github.com/jksy/resizing-gem/pull/11) ([jksy](https://github.com/jksy))
|
data/Gemfile
CHANGED
@@ -48,7 +48,7 @@ module Resizing
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def build_url
|
51
|
-
"#{Resizing.configure.
|
51
|
+
"#{Resizing.configure.image_host}#{model.read_attribute(serialization_column)}"
|
52
52
|
end
|
53
53
|
|
54
54
|
# need override this. if you want to return some url when target_column is nil
|
data/lib/resizing/client.rb
CHANGED
@@ -5,7 +5,8 @@ module Resizing
|
|
5
5
|
#--
|
6
6
|
# usage.
|
7
7
|
# options = {
|
8
|
-
#
|
8
|
+
# image_host: 'https://img.resizing.net',
|
9
|
+
# video_host: 'https://video.resizing.net',
|
9
10
|
# project_id: '098a2a0d-0000-0000-0000-000000000000',
|
10
11
|
# secret_token: '4g1cshg......rbs6'
|
11
12
|
# }
|
@@ -109,11 +110,11 @@ module Resizing
|
|
109
110
|
private
|
110
111
|
|
111
112
|
def build_get_url(image_id)
|
112
|
-
"#{config.
|
113
|
+
"#{config.image_host}/projects/#{config.project_id}/upload/images/#{image_id}"
|
113
114
|
end
|
114
115
|
|
115
116
|
def build_post_url
|
116
|
-
"#{config.
|
117
|
+
"#{config.image_host}/projects/#{config.project_id}/upload/images/"
|
117
118
|
end
|
118
119
|
|
119
120
|
def gather_filename file_or_binary, options
|
@@ -122,15 +123,15 @@ module Resizing
|
|
122
123
|
end
|
123
124
|
|
124
125
|
def build_put_url(image_id)
|
125
|
-
"#{config.
|
126
|
+
"#{config.image_host}/projects/#{config.project_id}/upload/images/#{image_id}"
|
126
127
|
end
|
127
128
|
|
128
129
|
def build_delete_url(image_id)
|
129
|
-
"#{config.
|
130
|
+
"#{config.image_host}/projects/#{config.project_id}/upload/images/#{image_id}"
|
130
131
|
end
|
131
132
|
|
132
133
|
def build_metadata_url(image_id)
|
133
|
-
"#{config.
|
134
|
+
"#{config.image_host}/projects/#{config.project_id}/upload/images/#{image_id}/metadata"
|
134
135
|
end
|
135
136
|
|
136
137
|
|
@@ -15,8 +15,10 @@ module Resizing
|
|
15
15
|
# Resizing::Client.new(configuration)
|
16
16
|
#++
|
17
17
|
class Configuration
|
18
|
-
attr_reader :
|
18
|
+
attr_reader :image_host, :video_host, :project_id, :secret_token, :open_timeout, :response_timeout, :enable_mock
|
19
19
|
DEFAULT_HOST = 'https://img.resizing.net'
|
20
|
+
DEFAULT_IMAGE_HOST = 'https://img.resizing.net'
|
21
|
+
DEFAULT_VIDEO_HOST = 'https://video.resizing.net'
|
20
22
|
DEFAULT_OPEN_TIMEOUT = 2
|
21
23
|
DEFAULT_RESPONSE_TIMEOUT = 10
|
22
24
|
|
@@ -25,7 +27,12 @@ module Resizing
|
|
25
27
|
def initialize(*attrs)
|
26
28
|
case attr = attrs.first
|
27
29
|
when Hash
|
28
|
-
|
30
|
+
if attr[:project_id].nil? || attr[:secret_token].nil?
|
31
|
+
raise_configiration_error
|
32
|
+
end
|
33
|
+
if attr[:host].present?
|
34
|
+
raise_configiration_error
|
35
|
+
end
|
29
36
|
|
30
37
|
initialize_by_hash attr
|
31
38
|
return
|
@@ -34,6 +41,11 @@ module Resizing
|
|
34
41
|
raise_configiration_error
|
35
42
|
end
|
36
43
|
|
44
|
+
def host
|
45
|
+
Kernel.warn "[DEPRECATED] The Configuration#host is deprecated. Use Configuration#image_host."
|
46
|
+
self.image_host
|
47
|
+
end
|
48
|
+
|
37
49
|
def generate_auth_header
|
38
50
|
current_timestamp = Time.now.to_i
|
39
51
|
data = [current_timestamp, secret_token].join('|')
|
@@ -54,7 +66,7 @@ module Resizing
|
|
54
66
|
parts << image_id
|
55
67
|
parts << version if version
|
56
68
|
parts << path unless path.empty?
|
57
|
-
"#{
|
69
|
+
"#{image_host}/projects/#{project_id}/upload/images/#{parts.join('/')}"
|
58
70
|
end
|
59
71
|
|
60
72
|
# this method should be divided other class
|
@@ -79,7 +91,7 @@ module Resizing
|
|
79
91
|
def ==(other)
|
80
92
|
return false unless self.class == other.class
|
81
93
|
|
82
|
-
%i[
|
94
|
+
%i[image_host video_host project_id secret_token open_timeout response_timeout].all? do |name|
|
83
95
|
send(name) == other.send(name)
|
84
96
|
end
|
85
97
|
end
|
@@ -87,11 +99,13 @@ module Resizing
|
|
87
99
|
private
|
88
100
|
|
89
101
|
def raise_configiration_error
|
90
|
-
raise ConfigurationError, 'need hash and some keys like :
|
102
|
+
raise ConfigurationError, 'need hash and some keys like :image_host, video_host, :project_id, :secret_token'
|
91
103
|
end
|
92
104
|
|
93
105
|
def initialize_by_hash(attr)
|
94
|
-
@host = attr[:host].dup.freeze || DEFAULT_HOST
|
106
|
+
# @host = attr[:host].dup.freeze || DEFAULT_HOST
|
107
|
+
@image_host = attr[:image_host].dup.freeze || DEFAULT_IMAGE_HOST
|
108
|
+
@video_host = attr[:video_host].dup.freeze || DEFAULT_VIDEO_HOST
|
95
109
|
@project_id = attr[:project_id].dup.freeze
|
96
110
|
@secret_token = attr[:secret_token].dup.freeze
|
97
111
|
@open_timeout = attr[:open_timeout] || DEFAULT_OPEN_TIMEOUT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Resizing
|
4
4
|
module HttpClientable
|
5
5
|
def http_client
|
6
|
-
@http_client ||= Faraday.new
|
6
|
+
@http_client ||= Faraday.new do |builder|
|
7
7
|
builder.options[:open_timeout] = config.open_timeout
|
8
8
|
builder.options[:timeout] = config.response_timeout
|
9
9
|
builder.request :multipart
|
data/lib/resizing/version.rb
CHANGED
@@ -33,6 +33,17 @@ module Resizing
|
|
33
33
|
handle_upload_completed_response response
|
34
34
|
end
|
35
35
|
|
36
|
+
def delete response_or_url
|
37
|
+
url = url_from response_or_url, 'destroy_url'
|
38
|
+
|
39
|
+
response = handle_faraday_error do
|
40
|
+
http_client.put(url) do |request|
|
41
|
+
request.headers['X-ResizingToken'] = config.generate_auth_header
|
42
|
+
end
|
43
|
+
end
|
44
|
+
handle_upload_completed_response response
|
45
|
+
end
|
46
|
+
|
36
47
|
def metadata response_or_url
|
37
48
|
url = url_from response_or_url, 'self_url'
|
38
49
|
|
@@ -44,12 +55,12 @@ module Resizing
|
|
44
55
|
handle_metadata_response response
|
45
56
|
end
|
46
57
|
|
47
|
-
private
|
48
|
-
|
49
58
|
def build_prepare_url
|
50
|
-
"#{config.
|
59
|
+
"#{config.video_host}/projects/#{config.project_id}/upload/videos/prepare"
|
51
60
|
end
|
52
61
|
|
62
|
+
private
|
63
|
+
|
53
64
|
def url_from response_or_url, name
|
54
65
|
if response_or_url.kind_of? String
|
55
66
|
response_or_url
|
data/resizing.gemspec
CHANGED
@@ -29,16 +29,12 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
spec.add_runtime_dependency 'faraday', '>= 1.0.1', '< 1.4.0'
|
32
|
-
spec.add_development_dependency 'byebug'
|
33
32
|
spec.add_development_dependency 'carrierwave'
|
34
33
|
spec.add_development_dependency 'fog-aws'
|
35
34
|
spec.add_development_dependency 'minitest'
|
36
35
|
spec.add_development_dependency 'minitest-ci'
|
37
|
-
spec.add_development_dependency 'mysql2'
|
38
|
-
spec.add_development_dependency 'pry-byebug'
|
39
36
|
spec.add_development_dependency 'rails', '~> 5.2.3'
|
40
37
|
spec.add_development_dependency 'rubocop'
|
41
38
|
spec.add_development_dependency 'timecop'
|
42
39
|
spec.add_development_dependency 'vcr'
|
43
|
-
spec.add_development_dependency 'github_changelog_generator'
|
44
40
|
end
|
@@ -9,7 +9,8 @@ module Resizing
|
|
9
9
|
TestJPGModel.delete_all
|
10
10
|
|
11
11
|
@configuration_template = {
|
12
|
-
|
12
|
+
image_host: 'http://192.168.56.101:5000',
|
13
|
+
video_host: 'http://192.168.56.101:5000',
|
13
14
|
project_id: 'e06e710d-f026-4dcf-b2c0-eab0de8bb83f',
|
14
15
|
secret_token: 'ewbym2r1pk49x1d2lxdbiiavnqp25j2kh00hsg3koy0ppm620x5mhlmgl3rq5ci8',
|
15
16
|
open_timeout: 10,
|
@@ -6,7 +6,8 @@ module Resizing
|
|
6
6
|
class ClientTest < Minitest::Test
|
7
7
|
def setup
|
8
8
|
@configuration_template = {
|
9
|
-
|
9
|
+
image_host: 'http://192.168.56.101:5000',
|
10
|
+
video_host: 'http://192.168.56.101:5000',
|
10
11
|
project_id: 'e06e710d-f026-4dcf-b2c0-eab0de8bb83f',
|
11
12
|
secret_token: 'ewbym2r1pk49x1d2lxdbiiavnqp25j2kh00hsg3koy0ppm620x5mhlmgl3rq5ci8',
|
12
13
|
open_timeout: 10,
|
@@ -6,7 +6,8 @@ module Resizing
|
|
6
6
|
class ConfigurationTest < Minitest::Test
|
7
7
|
def setup
|
8
8
|
@template = {
|
9
|
-
|
9
|
+
image_host: 'http://192.168.56.101:5000',
|
10
|
+
video_host: 'http://192.168.56.101:5000',
|
10
11
|
project_id: '098a2a0d-c387-4135-a071-1254d6d7e70a',
|
11
12
|
secret_token: '4g1cshg2lq8j93ufhvqrpjswxmtjz12yhfvq6w79jpwi7cr7nnknoqgwzkwerbs6',
|
12
13
|
open_timeout: 10,
|
@@ -18,17 +19,39 @@ module Resizing
|
|
18
19
|
# NOP
|
19
20
|
end
|
20
21
|
|
21
|
-
def
|
22
|
+
def test_that_it_has_default_image_host
|
22
23
|
template = @template.dup
|
23
|
-
template.delete(:
|
24
|
+
template.delete(:image_host)
|
24
25
|
config = Resizing::Configuration.new template
|
25
|
-
assert_equal(config.host, Resizing::Configuration::
|
26
|
+
assert_equal(config.host, Resizing::Configuration::DEFAULT_IMAGE_HOST)
|
27
|
+
assert_equal(config.image_host, Resizing::Configuration::DEFAULT_IMAGE_HOST)
|
26
28
|
end
|
27
29
|
|
28
|
-
def
|
30
|
+
def test_that_it_has_default_video_host
|
29
31
|
template = @template.dup
|
32
|
+
template.delete(:video_host)
|
30
33
|
config = Resizing::Configuration.new template
|
31
|
-
assert_equal(config.
|
34
|
+
assert_equal(config.video_host, Resizing::Configuration::DEFAULT_VIDEO_HOST)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_that_it_need_raise_exception_if_host_presented
|
38
|
+
template = @template.dup
|
39
|
+
template[:host] = 'need raise execption if host is presented'
|
40
|
+
assert_raises ConfigurationError do
|
41
|
+
config = Resizing::Configuration.new template
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_that_it_has_same_image_host_value
|
46
|
+
template = @template.dup
|
47
|
+
config = Resizing::Configuration.new template
|
48
|
+
assert_equal(config.image_host, template[:image_host])
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_that_it_has_same_video_host_value
|
52
|
+
template = @template.dup
|
53
|
+
config = Resizing::Configuration.new template
|
54
|
+
assert_equal(config.video_host, template[:video_host])
|
32
55
|
end
|
33
56
|
|
34
57
|
def test_that_it_has_no_project_id
|
@@ -9,7 +9,8 @@ module Resizing
|
|
9
9
|
# TODO
|
10
10
|
# refactoring
|
11
11
|
@configuration_template = {
|
12
|
-
|
12
|
+
image_host: 'http://192.168.56.101:5000',
|
13
|
+
video_host: 'http://192.168.56.101:5000',
|
13
14
|
project_id: 'f11dfad4-2247-4220-b3b2-efeb82864a97',
|
14
15
|
secret_token: 'xn2fkkrrp2uiragliaigkx3mwnmjis6dg35sa3kya12sq133t3xjp36s7iwamp64',
|
15
16
|
open_timeout: 10,
|
@@ -36,6 +37,14 @@ module Resizing
|
|
36
37
|
assert_equal(client.config, config)
|
37
38
|
end
|
38
39
|
|
40
|
+
def test_is_callable_build_prepare_url
|
41
|
+
Resizing.configure = @configuration_template
|
42
|
+
|
43
|
+
client = Resizing::Video::Client.new
|
44
|
+
url = client.build_prepare_url
|
45
|
+
assert_equal(url, 'http://192.168.56.101:5000/projects/f11dfad4-2247-4220-b3b2-efeb82864a97/upload/videos/prepare')
|
46
|
+
end
|
47
|
+
|
39
48
|
def test_is_callable_prepare
|
40
49
|
Resizing.configure = @configuration_template
|
41
50
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resizing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Junichiro Kasuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -30,20 +30,6 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.4.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: byebug
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
47
33
|
- !ruby/object:Gem::Dependency
|
48
34
|
name: carrierwave
|
49
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,34 +86,6 @@ dependencies:
|
|
100
86
|
- - ">="
|
101
87
|
- !ruby/object:Gem::Version
|
102
88
|
version: '0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: mysql2
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - ">="
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: pry-byebug
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - ">="
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
131
89
|
- !ruby/object:Gem::Dependency
|
132
90
|
name: rails
|
133
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,20 +142,6 @@ dependencies:
|
|
184
142
|
- - ">="
|
185
143
|
- !ruby/object:Gem::Version
|
186
144
|
version: '0'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: github_changelog_generator
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - ">="
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '0'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - ">="
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0'
|
201
145
|
description: 'Client and utilities for Resizing '
|
202
146
|
email:
|
203
147
|
- junichiro.kasuya@gmail.com
|