cloudinary 1.28.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadav Soferman
@@ -10,176 +10,302 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-06 00:00:00.000000000 Z
13
+ date: 2024-04-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: aws_cf_signer
16
+ name: faraday
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 2.0.1
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: 3.0.0
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
25
28
  requirements:
26
29
  - - ">="
27
30
  - !ruby/object:Gem::Version
28
- version: '0'
31
+ version: 2.0.1
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: 3.0.0
29
35
  - !ruby/object:Gem::Dependency
30
- name: rest-client
36
+ name: faraday-multipart
31
37
  requirement: !ruby/object:Gem::Requirement
32
38
  requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.0'
33
42
  - - ">="
34
43
  - !ruby/object:Gem::Version
35
- version: 2.0.0
44
+ version: 1.0.4
36
45
  type: :runtime
37
46
  prerelease: false
38
47
  version_requirements: !ruby/object:Gem::Requirement
39
48
  requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '1.0'
40
52
  - - ">="
41
53
  - !ruby/object:Gem::Version
42
- version: 2.0.0
54
+ version: 1.0.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday-follow_redirects
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 6.1.7
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: 8.0.0
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: 6.1.7
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: 8.0.0
89
+ - !ruby/object:Gem::Dependency
90
+ name: rexml
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 3.2.5
96
+ - - "<"
97
+ - !ruby/object:Gem::Version
98
+ version: 4.0.0
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 3.2.5
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: 4.0.0
43
109
  - !ruby/object:Gem::Dependency
44
110
  name: actionpack
45
111
  requirement: !ruby/object:Gem::Requirement
46
112
  requirements:
47
113
  - - ">="
48
114
  - !ruby/object:Gem::Version
49
- version: '0'
115
+ version: 6.1.7
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: 8.0.0
50
119
  type: :development
51
120
  prerelease: false
52
121
  version_requirements: !ruby/object:Gem::Requirement
53
122
  requirements:
54
123
  - - ">="
55
124
  - !ruby/object:Gem::Version
56
- version: '0'
125
+ version: 6.1.7
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: 8.0.0
57
129
  - !ruby/object:Gem::Dependency
58
130
  name: nokogiri
59
131
  requirement: !ruby/object:Gem::Requirement
60
132
  requirements:
61
133
  - - ">="
62
134
  - !ruby/object:Gem::Version
63
- version: '0'
135
+ version: 1.12.5
136
+ - - "<"
137
+ - !ruby/object:Gem::Version
138
+ version: 2.0.0
64
139
  type: :development
65
140
  prerelease: false
66
141
  version_requirements: !ruby/object:Gem::Requirement
67
142
  requirements:
68
143
  - - ">="
69
144
  - !ruby/object:Gem::Version
70
- version: '0'
145
+ version: 1.12.5
146
+ - - "<"
147
+ - !ruby/object:Gem::Version
148
+ version: 2.0.0
71
149
  - !ruby/object:Gem::Dependency
72
150
  name: rake
73
151
  requirement: !ruby/object:Gem::Requirement
74
152
  requirements:
75
153
  - - ">="
76
154
  - !ruby/object:Gem::Version
77
- version: 13.0.1
155
+ version: 13.0.6
156
+ - - "<"
157
+ - !ruby/object:Gem::Version
158
+ version: 14.0.0
78
159
  type: :development
79
160
  prerelease: false
80
161
  version_requirements: !ruby/object:Gem::Requirement
81
162
  requirements:
82
163
  - - ">="
83
164
  - !ruby/object:Gem::Version
84
- version: 13.0.1
165
+ version: 13.0.6
166
+ - - "<"
167
+ - !ruby/object:Gem::Version
168
+ version: 14.0.0
85
169
  - !ruby/object:Gem::Dependency
86
170
  name: sqlite3
87
171
  requirement: !ruby/object:Gem::Requirement
88
172
  requirements:
89
173
  - - ">="
90
174
  - !ruby/object:Gem::Version
91
- version: '0'
175
+ version: 1.4.2
176
+ - - "<"
177
+ - !ruby/object:Gem::Version
178
+ version: 2.0.0
92
179
  type: :development
93
180
  prerelease: false
94
181
  version_requirements: !ruby/object:Gem::Requirement
95
182
  requirements:
96
183
  - - ">="
97
184
  - !ruby/object:Gem::Version
98
- version: '0'
185
+ version: 1.4.2
186
+ - - "<"
187
+ - !ruby/object:Gem::Version
188
+ version: 2.0.0
99
189
  - !ruby/object:Gem::Dependency
100
190
  name: rspec
101
191
  requirement: !ruby/object:Gem::Requirement
102
192
  requirements:
103
193
  - - ">="
104
194
  - !ruby/object:Gem::Version
105
- version: '3.5'
195
+ version: 3.11.2
196
+ - - "<"
197
+ - !ruby/object:Gem::Version
198
+ version: 4.0.0
106
199
  type: :development
107
200
  prerelease: false
108
201
  version_requirements: !ruby/object:Gem::Requirement
109
202
  requirements:
110
203
  - - ">="
111
204
  - !ruby/object:Gem::Version
112
- version: '3.5'
205
+ version: 3.11.2
206
+ - - "<"
207
+ - !ruby/object:Gem::Version
208
+ version: 4.0.0
113
209
  - !ruby/object:Gem::Dependency
114
210
  name: rspec-retry
115
211
  requirement: !ruby/object:Gem::Requirement
116
212
  requirements:
117
213
  - - ">="
118
214
  - !ruby/object:Gem::Version
119
- version: '0'
215
+ version: 0.6.2
216
+ - - "<"
217
+ - !ruby/object:Gem::Version
218
+ version: 1.0.0
120
219
  type: :development
121
220
  prerelease: false
122
221
  version_requirements: !ruby/object:Gem::Requirement
123
222
  requirements:
124
223
  - - ">="
125
224
  - !ruby/object:Gem::Version
126
- version: '0'
225
+ version: 0.6.2
226
+ - - "<"
227
+ - !ruby/object:Gem::Version
228
+ version: 1.0.0
127
229
  - !ruby/object:Gem::Dependency
128
- name: rails
230
+ name: railties
129
231
  requirement: !ruby/object:Gem::Requirement
130
232
  requirements:
131
- - - "~>"
233
+ - - ">="
132
234
  - !ruby/object:Gem::Version
133
- version: '5.2'
235
+ version: 6.0.4
236
+ - - "<"
237
+ - !ruby/object:Gem::Version
238
+ version: 8.0.0
134
239
  type: :development
135
240
  prerelease: false
136
241
  version_requirements: !ruby/object:Gem::Requirement
137
242
  requirements:
138
- - - "~>"
243
+ - - ">="
139
244
  - !ruby/object:Gem::Version
140
- version: '5.2'
245
+ version: 6.0.4
246
+ - - "<"
247
+ - !ruby/object:Gem::Version
248
+ version: 8.0.0
141
249
  - !ruby/object:Gem::Dependency
142
250
  name: rspec-rails
143
251
  requirement: !ruby/object:Gem::Requirement
144
252
  requirements:
145
253
  - - ">="
146
254
  - !ruby/object:Gem::Version
147
- version: '0'
255
+ version: 6.0.4
256
+ - - "<"
257
+ - !ruby/object:Gem::Version
258
+ version: 7.0.0
148
259
  type: :development
149
260
  prerelease: false
150
261
  version_requirements: !ruby/object:Gem::Requirement
151
262
  requirements:
152
263
  - - ">="
153
264
  - !ruby/object:Gem::Version
154
- version: '0'
265
+ version: 6.0.4
266
+ - - "<"
267
+ - !ruby/object:Gem::Version
268
+ version: 7.0.0
155
269
  - !ruby/object:Gem::Dependency
156
270
  name: rubyzip
157
271
  requirement: !ruby/object:Gem::Requirement
158
272
  requirements:
159
273
  - - ">="
160
274
  - !ruby/object:Gem::Version
161
- version: '0'
275
+ version: 2.3.0
276
+ - - "<"
277
+ - !ruby/object:Gem::Version
278
+ version: 3.0.0
162
279
  type: :development
163
280
  prerelease: false
164
281
  version_requirements: !ruby/object:Gem::Requirement
165
282
  requirements:
166
283
  - - ">="
167
284
  - !ruby/object:Gem::Version
168
- version: '0'
285
+ version: 2.3.0
286
+ - - "<"
287
+ - !ruby/object:Gem::Version
288
+ version: 3.0.0
169
289
  - !ruby/object:Gem::Dependency
170
290
  name: simplecov
171
291
  requirement: !ruby/object:Gem::Requirement
172
292
  requirements:
173
- - - ">"
293
+ - - ">="
294
+ - !ruby/object:Gem::Version
295
+ version: 0.21.2
296
+ - - "<"
174
297
  - !ruby/object:Gem::Version
175
- version: 0.18.0
298
+ version: 1.0.0
176
299
  type: :development
177
300
  prerelease: false
178
301
  version_requirements: !ruby/object:Gem::Requirement
179
302
  requirements:
180
- - - ">"
303
+ - - ">="
304
+ - !ruby/object:Gem::Version
305
+ version: 0.21.2
306
+ - - "<"
181
307
  - !ruby/object:Gem::Version
182
- version: 0.18.0
308
+ version: 1.0.0
183
309
  description: Client library for easily using the Cloudinary service
184
310
  email:
185
311
  - nadav.soferman@cloudinary.com
@@ -206,6 +332,7 @@ files:
206
332
  - lib/cloudinary.rb
207
333
  - lib/cloudinary/account_api.rb
208
334
  - lib/cloudinary/account_config.rb
335
+ - lib/cloudinary/analytics.rb
209
336
  - lib/cloudinary/api.rb
210
337
  - lib/cloudinary/auth_token.rb
211
338
  - lib/cloudinary/base_api.rb
@@ -230,7 +357,6 @@ files:
230
357
  - lib/cloudinary/helper.rb
231
358
  - lib/cloudinary/migrator.rb
232
359
  - lib/cloudinary/missing.rb
233
- - lib/cloudinary/ostruct2.rb
234
360
  - lib/cloudinary/preloaded_file.rb
235
361
  - lib/cloudinary/railtie.rb
236
362
  - lib/cloudinary/responsive.rb
@@ -258,7 +384,7 @@ files:
258
384
  - vendor/assets/javascripts/cloudinary/jquery.ui.widget.js
259
385
  - vendor/assets/javascripts/cloudinary/load-image.all.min.js
260
386
  - vendor/assets/javascripts/cloudinary/processing.js
261
- homepage: http://cloudinary.com
387
+ homepage: https://cloudinary.com
262
388
  licenses:
263
389
  - MIT
264
390
  metadata: {}
@@ -268,16 +394,16 @@ require_paths:
268
394
  - lib
269
395
  required_ruby_version: !ruby/object:Gem::Requirement
270
396
  requirements:
271
- - - ">="
397
+ - - "~>"
272
398
  - !ruby/object:Gem::Version
273
- version: '0'
399
+ version: '3'
274
400
  required_rubygems_version: !ruby/object:Gem::Requirement
275
401
  requirements:
276
402
  - - ">="
277
403
  - !ruby/object:Gem::Version
278
404
  version: '0'
279
405
  requirements: []
280
- rubygems_version: 3.4.12
406
+ rubygems_version: 3.2.3
281
407
  signing_key:
282
408
  specification_version: 4
283
409
  summary: Client library for easily using the Cloudinary service
@@ -1,284 +0,0 @@
1
- #
2
- # = ostruct.rb: OpenStruct implementation
3
- #
4
- # Author:: Yukihiro Matsumoto
5
- # Documentation:: Gavin Sinclair
6
- #
7
- # OpenStruct allows the creation of data objects with arbitrary attributes.
8
- # See OpenStruct for an example.
9
- #
10
-
11
- #
12
- # An OpenStruct is a data structure, similar to a Hash, that allows the
13
- # definition of arbitrary attributes with their accompanying values. This is
14
- # accomplished by using Ruby's metaprogramming to define methods on the class
15
- # itself.
16
- #
17
- # == Examples:
18
- #
19
- # require 'ostruct'
20
- #
21
- # person = OpenStruct.new
22
- # person.name = "John Smith"
23
- # person.age = 70
24
- # person.pension = 300
25
- #
26
- # puts person.name # -> "John Smith"
27
- # puts person.age # -> 70
28
- # puts person.address # -> nil
29
- #
30
- # An OpenStruct employs a Hash internally to store the methods and values and
31
- # can even be initialized with one:
32
- #
33
- # australia = OpenStruct.new(:country => "Australia", :population => 20_000_000)
34
- # p australia # -> <OpenStruct country="Australia" population=20000000>
35
- #
36
- # Hash keys with spaces or characters that would normally not be able to use for
37
- # method calls (e.g. ()[]*) will not be immediately available on the
38
- # OpenStruct object as a method for retrieval or assignment, but can be still be
39
- # reached through the Object#send method.
40
- #
41
- # measurements = OpenStruct.new("length (in inches)" => 24)
42
- # measurements.send("length (in inches)") # -> 24
43
- #
44
- # data_point = OpenStruct.new(:queued? => true)
45
- # data_point.queued? # -> true
46
- # data_point.send("queued?=",false)
47
- # data_point.queued? # -> false
48
- #
49
- # Removing the presence of a method requires the execution the delete_field
50
- # method as setting the property value to +nil+ will not remove the method.
51
- #
52
- # first_pet = OpenStruct.new(:name => 'Rowdy', :owner => 'John Smith')
53
- # first_pet.owner = nil
54
- # second_pet = OpenStruct.new(:name => 'Rowdy')
55
- #
56
- # first_pet == second_pet # -> false
57
- #
58
- # first_pet.delete_field(:owner)
59
- # first_pet == second_pet # -> true
60
- #
61
- #
62
- # == Implementation:
63
- #
64
- # An OpenStruct utilizes Ruby's method lookup structure to and find and define
65
- # the necessary methods for properties. This is accomplished through the method
66
- # method_missing and define_method.
67
- #
68
- # This should be a consideration if there is a concern about the performance of
69
- # the objects that are created, as there is much more overhead in the setting
70
- # of these properties compared to using a Hash or a Struct.
71
- #
72
- class OpenStruct
73
- #
74
- # Creates a new OpenStruct object. By default, the resulting OpenStruct
75
- # object will have no attributes.
76
- #
77
- # The optional +hash+, if given, will generate attributes and values
78
- # (can be a Hash, an OpenStruct or a Struct).
79
- # For example:
80
- #
81
- # require 'ostruct'
82
- # hash = { "country" => "Australia", :population => 20_000_000 }
83
- # data = OpenStruct.new(hash)
84
- #
85
- # p data # -> <OpenStruct country="Australia" population=20000000>
86
- #
87
- def initialize(hash=nil)
88
- @table = {}
89
- if hash
90
- hash.each_pair do |k, v|
91
- k = k.to_sym
92
- @table[k] = v
93
- new_ostruct_member(k)
94
- end
95
- end
96
- end
97
-
98
- # Duplicate an OpenStruct object members.
99
- def initialize_copy(orig)
100
- super
101
- @table = @table.dup
102
- @table.each_key{|key| new_ostruct_member(key)}
103
- end
104
-
105
- #
106
- # Converts the OpenStruct to a hash with keys representing
107
- # each attribute (as symbols) and their corresponding values
108
- # Example:
109
- #
110
- # require 'ostruct'
111
- # data = OpenStruct.new("country" => "Australia", :population => 20_000_000)
112
- # data.to_h # => {:country => "Australia", :population => 20000000 }
113
- #
114
- def to_h
115
- @table.dup
116
- end
117
-
118
- #
119
- # Yields all attributes (as a symbol) along with the corresponding values
120
- # or returns an enumerator if not block is given.
121
- # Example:
122
- #
123
- # require 'ostruct'
124
- # data = OpenStruct.new("country" => "Australia", :population => 20_000_000)
125
- # data.each_pair.to_a # => [[:country, "Australia"], [:population, 20000000]]
126
- #
127
- def each_pair
128
- return to_enum __method__ unless block_given?
129
- @table.each_pair{|p| yield p}
130
- end
131
-
132
- #
133
- # Provides marshalling support for use by the Marshal library.
134
- #
135
- def marshal_dump
136
- @table
137
- end
138
-
139
- #
140
- # Provides marshalling support for use by the Marshal library.
141
- #
142
- def marshal_load(x)
143
- @table = x
144
- @table.each_key{|key| new_ostruct_member(key)}
145
- end
146
-
147
- #
148
- # Used internally to check if the OpenStruct is able to be
149
- # modified before granting access to the internal Hash table to be modified.
150
- #
151
- def modifiable
152
- begin
153
- @modifiable = true
154
- rescue
155
- raise TypeError, "can't modify frozen #{self.class}", caller(3)
156
- end
157
- @table
158
- end
159
- protected :modifiable
160
-
161
- #
162
- # Used internally to defined properties on the
163
- # OpenStruct. It does this by using the metaprogramming function
164
- # define_singleton_method for both the getter method and the setter method.
165
- #
166
- def new_ostruct_member(name)
167
- name = name.to_sym
168
- unless respond_to?(name)
169
- define_singleton_method(name) { @table[name] }
170
- define_singleton_method("#{name}=") { |x| modifiable[name] = x }
171
- end
172
- name
173
- end
174
- protected :new_ostruct_member
175
-
176
- def method_missing(mid, *args) # :nodoc:
177
- mname = mid.id2name
178
- len = args.length
179
- if mname.chomp!('=')
180
- if len != 1
181
- raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1)
182
- end
183
- modifiable[new_ostruct_member(mname)] = args[0]
184
- elsif len == 0
185
- @table[mid]
186
- else
187
- raise NoMethodError, "undefined method `#{mid}' for #{self}", caller(1)
188
- end
189
- end
190
-
191
- # Returns the value of a member.
192
- #
193
- # person = OpenStruct.new('name' => 'John Smith', 'age' => 70)
194
- # person[:age] # => 70, same as ostruct.age
195
- #
196
- def [](name)
197
- @table[name.to_sym]
198
- end
199
-
200
- #
201
- # Sets the value of a member.
202
- #
203
- # person = OpenStruct.new('name' => 'John Smith', 'age' => 70)
204
- # person[:age] = 42 # => equivalent to ostruct.age = 42
205
- # person.age # => 42
206
- #
207
- def []=(name, value)
208
- modifiable[new_ostruct_member(name)] = value
209
- end
210
-
211
- #
212
- # Remove the named field from the object. Returns the value that the field
213
- # contained if it was defined.
214
- #
215
- # require 'ostruct'
216
- #
217
- # person = OpenStruct.new('name' => 'John Smith', 'age' => 70)
218
- #
219
- # person.delete_field('name') # => 'John Smith'
220
- #
221
- def delete_field(name)
222
- sym = name.to_sym
223
- singleton_class.__send__(:remove_method, sym, "#{name}=")
224
- @table.delete sym
225
- end
226
-
227
- InspectKey = :__inspect_key__ # :nodoc:
228
-
229
- #
230
- # Returns a string containing a detailed summary of the keys and values.
231
- #
232
- def inspect
233
- str = "#<#{self.class}"
234
-
235
- ids = (Thread.current[InspectKey] ||= [])
236
- if ids.include?(object_id)
237
- return str << ' ...>'
238
- end
239
-
240
- ids << object_id
241
- begin
242
- first = true
243
- for k,v in @table
244
- str << "," unless first
245
- first = false
246
- str << " #{k}=#{v.inspect}"
247
- end
248
- return str << '>'
249
- ensure
250
- ids.pop
251
- end
252
- end
253
- alias :to_s :inspect
254
-
255
- attr_reader :table # :nodoc:
256
- protected :table
257
-
258
- #
259
- # Compares this object and +other+ for equality. An OpenStruct is equal to
260
- # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
261
- # equal.
262
- #
263
- def ==(other)
264
- return false unless other.kind_of?(OpenStruct)
265
- @table == other.table
266
- end
267
-
268
- #
269
- # Compares this object and +other+ for equality. An OpenStruct is eql? to
270
- # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
271
- # eql?.
272
- #
273
- def eql?(other)
274
- return false unless other.kind_of?(OpenStruct)
275
- @table.eql?(other.table)
276
- end
277
-
278
- # Compute a hash-code for this OpenStruct.
279
- # Two hashes with the same content will have the same hash code
280
- # (and will be eql?).
281
- def hash
282
- @table.hash
283
- end
284
- end