fog-core 1.45.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52a37f8e1b168c74d0d23ab2748a5217a99e2686
4
- data.tar.gz: 97606f8e95a6969a93b597e4018d73a28476a966
3
+ metadata.gz: e97b9e09ecd256672d64f6609d4a944ee0b467b9
4
+ data.tar.gz: 753439fe39482319e541798a52fd380fc969d3fb
5
5
  SHA512:
6
- metadata.gz: d9f52e3fd097a95f90d8a9419499fd1ce5cb013c1ee2816aafacc150eb9903684eb72db7fe41243fa49fa7be43e2eba8f5d23282b3fa3e4eb8fdc773b7e1c528
7
- data.tar.gz: 5133413d6aa3dc0004a70448ba63dc7042769cfb8609e8bcab0155ce2df7e02d0fa00c31672f64304029426a73011f8390a4145f07ac008ea04600c83b928845
6
+ metadata.gz: 451e3d2b4ed1feac5f73e24e26135fce90e65d7524529d62e768c9425910e3200c6f05c93e0d71e6e3a4bf3d035f4ce4a4aaa6b2e3c18db40278b4ea5b6d0a55
7
+ data.tar.gz: 3ff83ee817b848e7ff858bbf5f0c99ea922dd0d9e8b28c2a1726cccef5bc95f1b2f23ba3bc52dd521fe399ed9474d41cf21f979db28e0ef21c16a78861d380b2
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
+ - 2.0
4
5
  - 2.1
5
6
  - 2.2
6
7
  - 2.3
@@ -15,14 +16,6 @@ script: bundle exec rake travis
15
16
  matrix:
16
17
  fast_finish: true
17
18
  include:
18
- - rvm: 1.8.7
19
- gemfile: Gemfile.1.8.7
20
- - rvm: jruby-18mode
21
- gemfile: Gemfile.1.8.7
22
- - rvm: 1.9.3
23
- gemfile: Gemfile.1.9.3
24
- - rvm: jruby-19mode
25
- gemfile: Gemfile.1.9.3
26
19
  - rvm: 2.1
27
20
  gemfile: Gemfile
28
21
  env: COVERAGE=true
data/README.md CHANGED
@@ -25,17 +25,6 @@ Or install it yourself as:
25
25
 
26
26
  $ gem install fog-core
27
27
 
28
- ### Ruby 1.9.3
29
-
30
- Some of `fog-core`'s dependencies have dropped support for Ruby 1.9.3 in later
31
- versions. Rather than limit all `fog` users to older but compatible versions,
32
- if you are using 1.9.3 you will need to declare a compatible version in your
33
- application's `Gemfile` like:
34
-
35
- gem "net-ssh", "< 3.0"
36
-
37
- See `Gemfile.1.9.3` for the definitive list as tested by Travis.
38
-
39
28
  ## Usage
40
29
 
41
30
  TODO: Write usage instructions here
@@ -1,3 +1,11 @@
1
+ 2.0.0 01/03/2017
2
+ ==========================================================
3
+
4
+ fix association reload
5
+ drop ruby <2 support
6
+ fix net-ssh usage
7
+ add mime-type dependency
8
+
1
9
  1.45.0 08/01/2017
2
10
  ==========================================================
3
11
 
@@ -18,7 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '>= 2.0.0'
22
+
21
23
  spec.add_dependency("builder")
24
+ spec.add_dependency("mime-types")
22
25
  spec.add_dependency("excon", "~> 0.58")
23
26
  spec.add_dependency("formatador", "~> 0.2")
24
27
 
@@ -31,7 +34,7 @@ Gem::Specification.new do |spec|
31
34
  spec.add_development_dependency("minitest-stub-const")
32
35
  spec.add_development_dependency("pry")
33
36
  spec.add_development_dependency("rake")
34
- spec.add_development_dependency("rubocop") if RUBY_VERSION.to_s >= "1.9.3"
37
+ spec.add_development_dependency("rubocop")
35
38
  spec.add_development_dependency("thor")
36
39
  spec.add_development_dependency("yard")
37
40
  end
@@ -44,17 +44,13 @@ module Fog
44
44
  def reload
45
45
  requires :identity
46
46
 
47
- data = begin
48
- collection.get(identity)
49
- rescue Excon::Errors::SocketError
50
- nil
51
- end
47
+ object = collection.get(identity)
52
48
 
53
- return unless data
49
+ merge_attributes(object.all_associations_and_attributes)
54
50
 
55
- new_attributes = data.attributes
56
- merge_attributes(new_attributes)
57
51
  self
52
+ rescue Excon::Errors::SocketError
53
+ nil
58
54
  end
59
55
 
60
56
  def to_json(_options = {})
@@ -64,7 +64,7 @@ module Fog
64
64
 
65
65
  @address = address
66
66
  @username = username
67
- @options = { :paranoid => false }.merge(options)
67
+ @options = { :paranoid => false, :verify_host_key => false }.merge(options)
68
68
  end
69
69
 
70
70
  def upload(local_path, remote_path, upload_options = {}, &block)
@@ -36,13 +36,8 @@ module Fog
36
36
  Fog.const_get(provider_name).const_get(*const_get_args(service_name))
37
37
  end
38
38
 
39
- # Ruby 1.8 does not support the second 'inherit' argument to #const_get
40
39
  def const_get_args(*args)
41
- if RUBY_VERSION < '1.9'
42
- args
43
- else
44
- args + [false]
45
- end
40
+ args + [false]
46
41
  end
47
42
 
48
43
  def service_name
@@ -58,7 +58,7 @@ module Fog
58
58
 
59
59
  @address = address
60
60
  @username = username
61
- @options = { :paranoid => false }.merge(options)
61
+ @options = { :paranoid => false, :verify_host_key => false }.merge(options)
62
62
  end
63
63
 
64
64
  def run(commands, &blk)
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Core
3
- VERSION = "1.45.0"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -1,20 +1,15 @@
1
+ begin
2
+ # Use mime/types/columnar if available, for reduced memory usage
3
+ require 'mime/types/columnar'
4
+ rescue LoadError
5
+ require 'mime/types'
6
+ end
7
+
1
8
  module Fog
2
9
  module Storage
3
10
  extend Fog::ServicesMixin
4
11
 
5
12
  def self.new(orig_attributes)
6
- begin
7
- # Use mime/types/columnar if available, for reduced memory usage
8
- require 'mime/types/columnar'
9
- rescue LoadError
10
- begin
11
- require 'mime/types'
12
- rescue LoadError
13
- Fog::Logger.warning("'mime-types' missing, please install and try again.")
14
- raise
15
- end
16
- end
17
-
18
13
  attributes = orig_attributes.dup # prevent delete from having side effects
19
14
  case attributes.delete(:provider).to_s.downcase.to_sym
20
15
  when :internetarchive
@@ -33,12 +33,6 @@ def collection_tests(collection, params = {}, mocks_implemented = true)
33
33
  methods = %w(all? any? find detect collect map find_index flat_map
34
34
  collect_concat group_by none? one?)
35
35
 
36
- # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep
37
- # https://github.com/jruby/jruby/issues/1265
38
- if RUBY_PLATFORM == "java" && JRUBY_VERSION =~ /1\.7\.[5-8]/
39
- methods.delete("all?")
40
- end
41
-
42
36
  methods.each do |enum_method|
43
37
  next unless collection.respond_to?(enum_method)
44
38
  tests("##{enum_method}").succeeds do
@@ -96,15 +96,10 @@ describe "Fog::Storage" do
96
96
 
97
97
  describe ".get_body_size" do
98
98
  it "doesn't alter the encoding of the string passed to it" do
99
- # Ruby 1.8 doesn't support string encodings, so we can't test that
100
- if RUBY_VERSION >= "1.9.3"
101
- body = "foo".encode("UTF-8")
102
- Fog::Storage.get_body_size(body)
99
+ body = "foo".encode("UTF-8")
100
+ Fog::Storage.get_body_size(body)
103
101
 
104
- assert_equal("UTF-8", body.encoding.to_s)
105
- else
106
- skip
107
- end
102
+ assert_equal("UTF-8", body.encoding.to_s)
108
103
  end
109
104
 
110
105
  it "respects frozen strings" do
@@ -116,4 +111,4 @@ describe "Fog::Storage" do
116
111
  end
117
112
  end
118
113
  end
119
- end
114
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.45.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Light
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-01 00:00:00.000000000 Z
12
+ date: 2018-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: mime-types
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: excon
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -193,8 +207,6 @@ files:
193
207
  - CONTRIBUTING.md
194
208
  - CONTRIBUTORS.md
195
209
  - Gemfile
196
- - Gemfile.1.8.7
197
- - Gemfile.1.9.3
198
210
  - LICENSE.md
199
211
  - README.md
200
212
  - Rakefile
@@ -315,7 +327,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
327
  requirements:
316
328
  - - ">="
317
329
  - !ruby/object:Gem::Version
318
- version: '0'
330
+ version: 2.0.0
319
331
  required_rubygems_version: !ruby/object:Gem::Requirement
320
332
  requirements:
321
333
  - - ">="
@@ -323,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
335
  version: '0'
324
336
  requirements: []
325
337
  rubyforge_project:
326
- rubygems_version: 2.6.11
338
+ rubygems_version: 2.6.13
327
339
  signing_key:
328
340
  specification_version: 4
329
341
  summary: Shared classes and tests for fog providers and services.
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- gem 'rake', '~> 10.1.1'
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'net-ssh', '< 3.0'
6
- gem 'rubocop', '~> 0.41.2'
7
- gem 'term-ansicolor', '~> 1.3.2'
8
- gem 'tins', '~> 1.6.0'