sugar_utils 0.6.0 → 0.7.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
- SHA1:
3
- metadata.gz: b7c411a9357b3eaec0a69621f5d90158e73cb529
4
- data.tar.gz: 89c32ae0e47afda5f96e893497779a9c50faf183
2
+ SHA256:
3
+ metadata.gz: a82e583baf8090370611445ae00050bf247d2687d947d84d98fbbac7f8cd1cbe
4
+ data.tar.gz: 134411bdbc2a675dfc799d73a6d25d5dc0d8760bd8bc3a0583611a7cd1cb50a4
5
5
  SHA512:
6
- metadata.gz: 5dd4e7190bacaf4eb839da4cc06395c0533b5f21e77e548d634466eb6f2c1aa17e6d38c5578850bbc2e2c93a678ec3626e65b8de2e68e5ae8ebf05866d8e4185
7
- data.tar.gz: baf241f695e61396cfd8eaff4ccedca6a8e2c4771a9668d39930fa1c967e0d2bc3a7b055cf167bfa4820d5a6b86ed1b1fb3a132bfa56675b269e6897acdbcabd
6
+ metadata.gz: 3fe928e0ec9a19db849034a7691cd44231282f7dbb58dba921d50f62f3403f9f2abf6fdb9c576182c4abc22b50498aee871a3faa7f82879aabe14678cc831845
7
+ data.tar.gz: d54adcfcaf340cbbf81fb40bd520c772e80c825b3dc02788d0c70fb608f58abf66d84811e163e830968b13cee3e1b6789c6096df24c02ef297fd6fa3fe147e83
@@ -0,0 +1,17 @@
1
+ name: CI
2
+ on: [push]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ubuntu-latest, macos-latest]
9
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', head]
10
+ runs-on: ${{ matrix.os }}
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ bundler-cache: true
17
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -7,4 +7,3 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- .ruby-version
data/.rubocop.yml CHANGED
@@ -1,12 +1,14 @@
1
1
  require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.2
4
+ TargetRubyVersion: 2.6
5
+ NewCops: enable
5
6
 
6
- Documentation:
7
- Enabled: false
7
+ Layout/HashAlignment:
8
+ EnforcedHashRocketStyle: table
9
+ EnforcedColonStyle: table
8
10
 
9
- Metrics/LineLength:
11
+ Layout/LineLength:
10
12
  Max: 150
11
13
  Include:
12
14
  - 'spec/**/*'
@@ -27,3 +29,12 @@ RSpec/ExpectInHook:
27
29
 
28
30
  RSpec/MessageSpies:
29
31
  Enabled: false
32
+
33
+ RSpec/EmptyLineAfterExample:
34
+ Enabled: false
35
+
36
+ # NOTE: The rspec-tabular commands get confused with the default syntax is used
37
+ # for Hashes, so disabling this check for specs so that `Hash[]` can be used.
38
+ Style/HashConversion:
39
+ Exclude:
40
+ - 'spec/**/*'
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.2
data/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.7.0] - 2022-10-07
10
+ ### Changed
11
+ - update the required ruby version from v2.2 to v2.6
12
+ - Sugar::Utils.ensure_boolean to consider `0` to be false
13
+ - Sugar::Utils.ensure_boolean to ignore whitespace around strings before
14
+ checking if they are 'false'
15
+
9
16
  ## [0.6.0] - 2019-05-31
10
17
  ### Added
11
18
  - SugarUtils::File.append, which is explicitly for appending to a file. It will
data/README.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # sugar_utils
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/sugar_utils.svg)](http://badge.fury.io/rb/sugar_utils)
4
- [![Build Status](https://travis-ci.org/sugarcrm/sugar_utils.svg?branch=master)](https://travis-ci.org/sugarcrm/sugar_utils)
4
+ [![Build Status](https://github.com/sugarcrm/sugar_utils/actions/workflows/ci.yml/badge.svg)](https://github.com/sugarcrm/sugar_utils/actions/workflows/ci.yml)
5
5
  [![Code Climate](https://codeclimate.com/github/sugarcrm/sugar_utils/badges/gpa.svg)](https://codeclimate.com/github/sugarcrm/sugar_utils)
6
6
  [![Test Coverage](https://codeclimate.com/github/sugarcrm/sugar_utils/badges/coverage.svg)](https://codeclimate.com/github/sugarcrm/sugar_utils/coverage)
7
- [![Inline docs](http://inch-ci.org/github/sugarcrm/sugar_utils.svg)](http://inch-ci.org/github/sugarcrm/sugar_utils)
8
7
  [![License](http://img.shields.io/badge/license-Apache2-green.svg?style=flat)](LICENSE)
9
8
 
9
+ [![Inline docs](http://inch-ci.org/github/sugarcrm/sugar_utils.svg)](http://inch-ci.org/github/sugarcrm/sugar_utils)
10
+ [![RubyDoc](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://rubydoc.org/gems/sugar_utils)
11
+ [![CucumberPro](https://img.shields.io/badge/cucumber.pro-sugar_utils-3d10af.svg)](https://app.cucumber.pro/projects/sugar_utils)
12
+
10
13
  Utility methods extracted from SugarCRM Ruby projects.
11
14
 
12
15
  These methods are included:
@@ -24,20 +27,6 @@ These methods are included:
24
27
  * SugarUtils::File.write_json
25
28
  * SugarUtils::File.append
26
29
 
27
- These methods will probably be included in the future:
28
-
29
- * sizeof_dir
30
- * find_files
31
- * find_file!
32
- * gzip
33
- * gunzip
34
- * tarball
35
- * untarball
36
- * tarball_list
37
- * encrypt
38
- * http_get_file
39
- * timeout_retry
40
-
41
30
  ## Installation
42
31
 
43
32
  Add this line to your application's Gemfile:
@@ -58,6 +47,36 @@ Or install it yourself as:
58
47
  $ gem install sugar_utils
59
48
  ```
60
49
 
50
+ ## Roadmap
51
+
52
+ These methods might be added in the future:
53
+
54
+ * sizeof_dir
55
+ * find_files
56
+ * find_file!
57
+ * gzip
58
+ * gunzip
59
+ * tarball
60
+ * untarball
61
+ * tarball_list
62
+ * encrypt
63
+ * http_get_file
64
+ * timeout_retry
65
+
66
+ ## Elsewhere on the web
67
+
68
+ Links to other places on the web where this projects exists:
69
+
70
+ * [Code Climate](https://codeclimate.com/github/sugarcrm/sugar_utils)
71
+ * [CucumberPro](https://app.cucumber.pro/projects/sugar_utils)
72
+ * [InchCI](http://inch-ci.org/github/sugarcrm/sugar_utils)
73
+ * [Github](https://github.com/sugarcrm/sugar_utils)
74
+ * [OpenHub](https://www.openhub.net/p/sugar_utils)
75
+ * [RubyDoc](http://rubydoc.org/gems/sugar_utils)
76
+ * [RubyGems](https://rubygems.org/gems/sugar_utils)
77
+ * [Ruby LibHunt](https://ruby.libhunt.com/sugar_utils-alternatives)
78
+ * [Ruby Toolbox](https://www.ruby-toolbox.com/projects/sugar_utils)
79
+
61
80
  ## Contributing
62
81
 
63
82
  See [CONTRIBUTING](CONTRIBUTING.md) for how you can contribute changes back into this project.
data/Rakefile CHANGED
@@ -17,6 +17,7 @@ RSpec::Core::RakeTask.new(:spec) do |task|
17
17
  end
18
18
 
19
19
  Cucumber::Rake::Task.new(:features) do |task|
20
+ task.cucumber_opts = '--publish-quiet'
20
21
  end
21
22
 
22
23
  RuboCop::RakeTask.new(:rubocop) do |task|
@@ -5,19 +5,19 @@
5
5
  :why:
6
6
  :versions: []
7
7
  :when: 2018-06-13 15:20:17.351348000 Z
8
- - - :whitelist
8
+ - - :permit
9
9
  - Apache 2.0
10
10
  - :who: Andrew Sullivan Cant <mail@andrewsullivancant.ca>
11
11
  :why: SugarCRM's primary approved open source license
12
12
  :versions: []
13
13
  :when: 2018-06-18 19:28:33.314061000 Z
14
- - - :whitelist
14
+ - - :permit
15
15
  - MIT
16
16
  - :who: Andrew Sullivan Cant <mail@andrewsullivancant.ca>
17
17
  :why: SugarCRM's secondary approved open source license
18
18
  :versions: []
19
19
  :when: 2018-06-13 15:18:36.240771000 Z
20
- - - :whitelist
20
+ - - :permit
21
21
  - BSD
22
22
  - :who: Andrew Sullivan Cant <mail@andrewsullivancant.ca>
23
23
  :why: SugarCRM's secondary approved open source license
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  When('I run the following Ruby code:') do |code|
2
4
  run_command_and_stop %(ruby -e "#{code}")
3
5
  end
@@ -75,7 +75,7 @@ module SugarUtils
75
75
  # @raise [SugarUtils::File::Error]
76
76
  #
77
77
  # @return [String]
78
- def self.read(filename, options = {}) # rubocop:disable MethodLength
78
+ def self.read(filename, options = {}) # rubocop:disable Metrics/MethodLength
79
79
  options[:value_on_missing] ||= ''
80
80
  options[:raise_on_missing] = true if options[:raise_on_missing].nil?
81
81
 
@@ -130,7 +130,7 @@ module SugarUtils
130
130
  write_options = WriteOptions.new(filename, options)
131
131
 
132
132
  FileUtils.mkdir_p(::File.dirname(filename))
133
- FileUtils.touch(filename, write_options.slice(:mtime))
133
+ FileUtils.touch(filename, **write_options.slice(:mtime))
134
134
  change_access(
135
135
  filename,
136
136
  write_options.owner,
@@ -161,7 +161,7 @@ module SugarUtils
161
161
  # @raise [SugarUtils::File::Error]
162
162
  #
163
163
  # @return [void]
164
- def self.write(filename, data, options = {}) # rubocop:disable MethodLength, AbcSize
164
+ def self.write(filename, data, options = {}) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
165
165
  write_options = WriteOptions.new(filename, options)
166
166
 
167
167
  FileUtils.mkdir_p(::File.dirname(filename))
@@ -214,7 +214,7 @@ module SugarUtils
214
214
  # @raise [SugarUtils::File::Error]
215
215
  #
216
216
  # @return [void]
217
- def self.atomic_write(filename, data, options = {}) # rubocop:disable MethodLength, AbcSize
217
+ def self.atomic_write(filename, data, options = {}) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
218
218
  write_options = WriteOptions.new(filename, options)
219
219
 
220
220
  # @note This method is similar to the atomic_write which is implemented in
@@ -302,7 +302,7 @@ module SugarUtils
302
302
  # @raise [SugarUtils::File::Error]
303
303
  #
304
304
  # @return [void]
305
- def self.append(filename, data, options = {}) # rubocop:disable MethodLength, AbcSize
305
+ def self.append(filename, data, options = {}) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
306
306
  write_options = WriteOptions.new(filename, options)
307
307
 
308
308
  FileUtils.mkdir_p(::File.dirname(filename))
@@ -338,7 +338,7 @@ module SugarUtils
338
338
  # Following the same pattern as the existing stdlib method deprecation
339
339
  # module.
340
340
  # @see http://ruby-doc.org/stdlib-2.0.0/libdoc/rubygems/rdoc/Gem/Deprecate.html
341
- def self.deprecate_option(_method, option_name, option_repl, year, month) # rubocop:disable MethodLength
341
+ def self.deprecate_option(_method, option_name, option_repl, year, month) # rubocop:disable Metrics/MethodLength
342
342
  return if Gem::Deprecate.skip
343
343
 
344
344
  klass = is_a?(Module)
@@ -361,7 +361,11 @@ module SugarUtils
361
361
  else
362
362
  "; use :#{option_repl} instead"
363
363
  end,
364
- format('. It will be removed on or after %4d-%02d-01.', year, month),
364
+ format(
365
+ '. It will be removed on or after %<year>4d-%<month>02d-01.',
366
+ year: year,
367
+ month: month
368
+ ),
365
369
  "\n#{target}#{method} called from #{location_of_external_caller}"
366
370
  ]
367
371
  warn("#{msg.join}.")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SugarUtils
4
- VERSION = '0.6.0'.freeze
4
+ VERSION = '0.7.0'
5
5
  end
data/lib/sugar_utils.rb CHANGED
@@ -9,7 +9,9 @@ module SugarUtils
9
9
  #
10
10
  # @return [Boolean]
11
11
  def self.ensure_boolean(value)
12
- return false if value.respond_to?(:to_s) && value.to_s.casecmp('false').zero?
12
+ return false if value == 0 # rubocop:disable Style/NumericPredicate
13
+
14
+ return false if value.respond_to?(:to_s) && value.to_s.strip.casecmp('false').zero?
13
15
 
14
16
  value ? true : false
15
17
  end
@@ -48,7 +50,7 @@ module SugarUtils
48
50
  data.encoding,
49
51
  'binary',
50
52
  invalid: :replace,
51
- undef: :replace, # rubocop:disable Layout/AlignHash
53
+ undef: :replace,
52
54
  replace: replacement_character
53
55
  )
54
56
  end
@@ -125,7 +125,7 @@ describe SugarUtils::File do
125
125
  let(:options) { { key: :value } }
126
126
 
127
127
  before do
128
- expect(described_class).to receive(:flock_shared)
128
+ allow(described_class).to receive(:flock_shared)
129
129
  .with(kind_of(File), options)
130
130
  .and_raise(Timeout::Error)
131
131
  end
@@ -162,7 +162,7 @@ describe SugarUtils::File do
162
162
 
163
163
  before do
164
164
  allow(described_class).to receive(:read)
165
- .with(:filename, key: :value, value_on_missing: :missing)
165
+ .with(:filename, { key: :value, value_on_missing: :missing })
166
166
  .and_return(file_content)
167
167
  end
168
168
 
@@ -182,7 +182,7 @@ describe SugarUtils::File do
182
182
  let(:options) { [] }
183
183
 
184
184
  it { expect_not_to_raise_error }
185
- its_side_effects_are { expect(File.exist?(filename)).to eq(true) }
185
+ its_side_effects_are { expect(File.exist?(filename)).to be(true) }
186
186
  end
187
187
 
188
188
  context 'with options, and :mode key' do
@@ -238,7 +238,7 @@ describe SugarUtils::File do
238
238
  let(:options) { {} }
239
239
 
240
240
  before do
241
- expect(described_class).to receive(:flock_exclusive)
241
+ allow(described_class).to receive(:flock_exclusive)
242
242
  .with(kind_of(File), options)
243
243
  .and_raise(Timeout::Error)
244
244
  end
@@ -341,7 +341,7 @@ describe SugarUtils::File do
341
341
  let(:options) { {} }
342
342
 
343
343
  before do
344
- expect(described_class).to receive(:flock_exclusive)
344
+ allow(described_class).to receive(:flock_exclusive)
345
345
  .with(kind_of(File), options)
346
346
  .and_raise(Timeout::Error)
347
347
  end
@@ -458,7 +458,7 @@ describe SugarUtils::File do
458
458
  let(:options) { {} }
459
459
 
460
460
  before do
461
- expect(described_class).to receive(:flock_exclusive)
461
+ allow(described_class).to receive(:flock_exclusive)
462
462
  .with(kind_of(File), options)
463
463
  .and_raise(Timeout::Error)
464
464
  end
@@ -4,24 +4,35 @@ require 'spec_helper'
4
4
 
5
5
  describe SugarUtils do
6
6
  it 'has a version number' do
7
- expect(SugarUtils::VERSION).not_to be nil
7
+ expect(SugarUtils::VERSION).not_to be_nil
8
8
  end
9
9
 
10
10
  describe '.ensure_boolean' do
11
11
  subject { described_class.ensure_boolean(value) }
12
12
 
13
13
  inputs :value
14
- it_with nil, false
15
- it_with false, false
16
- it_with true, true
17
- it_with :value, true
18
- it_with 'value', true
19
- it_with 'false', false
20
- it_with 'FALSE', false
21
- it_with 'FaLsE', false
22
- it_with :false, false # rubocop:disable Lint/BooleanSymbol
23
- it_with :FALSE, false
24
- it_with :FaLsE, false
14
+ it_with nil, false
15
+ it_with false, false
16
+ it_with true, true
17
+ it_with 0, false
18
+ it_with 1, true
19
+ it_with 2, true
20
+ it_with 42, true
21
+ it_with :value, true
22
+ it_with 'value', true
23
+ it_with ' value ', true
24
+ it_with 'false', false
25
+ it_with ' false ', false
26
+ it_with "\n false \n", false
27
+ it_with 'FALSE', false
28
+ it_with ' FALSE ', false
29
+ it_with "\n FALSE \n", false
30
+ it_with 'FaLsE', false
31
+ it_with ' FaLsE ', false
32
+ it_with "\n FaLsE \n", false
33
+ it_with :false, false # rubocop:disable Lint/BooleanSymbol
34
+ it_with :FALSE, false
35
+ it_with :FaLsE, false
25
36
  end
26
37
 
27
38
  describe '.ensure_integer' do
data/sugar_utils.gemspec CHANGED
@@ -15,30 +15,29 @@ Gem::Specification.new do |spec|
15
15
  spec.license = 'Apache-2.0'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ['lib']
20
19
 
21
- spec.required_ruby_version = '>= 2.2.0'
20
+ spec.required_ruby_version = '>= 2.6.0'
21
+
22
+ spec.metadata['rubygems_mfa_required'] = 'true'
22
23
 
23
24
  spec.add_dependency 'multi_json', '~> 1.0'
24
25
  spec.add_dependency 'solid_assert', '~> 1.0'
25
26
 
26
- spec.add_development_dependency 'aruba', '~> 0.14.9'
27
- spec.add_development_dependency 'bundler', '~> 1.7'
28
- spec.add_development_dependency 'cucumber', '~> 3.1.2'
29
- spec.add_development_dependency 'fakefs', '~> 0.7'
30
- spec.add_development_dependency 'rake', '~> 12.0'
31
- spec.add_development_dependency 'rspec', '~> 3.8.0'
27
+ spec.add_development_dependency 'aruba', '~> 2.0'
28
+ spec.add_development_dependency 'bundler', '~> 2.0'
29
+ spec.add_development_dependency 'cucumber', '~> 8.0'
30
+ spec.add_development_dependency 'fakefs', '~> 1.0'
31
+ spec.add_development_dependency 'rake', '~> 13.0'
32
+ spec.add_development_dependency 'rspec', '~> 3.8'
32
33
  spec.add_development_dependency 'rspec-side_effects', '~> 0.2.0'
33
- spec.add_development_dependency 'rspec-tabular', '~> 0.2.0'
34
+ spec.add_development_dependency 'rspec-tabular', '~> 0.3.0'
34
35
 
35
36
  # Dependencies whose APIs we do not really depend upon, and can be upgraded
36
37
  # without limiting.
37
38
  spec.add_development_dependency 'bundler-audit'
38
39
  spec.add_development_dependency 'license_finder'
39
- # HACK: Limit ourselves to Rubocop versions which still support Ruby2.2. This
40
- # can be removed once we drop support for Ruby2.2.
41
- spec.add_development_dependency 'rubocop', '~> 0.68.0'
40
+ spec.add_development_dependency 'rubocop'
42
41
  spec.add_development_dependency 'rubocop-rspec'
43
42
  spec.add_development_dependency 'simplecov'
44
43
  spec.add_development_dependency 'yard'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugar_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Sullivan Cant
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-31 00:00:00.000000000 Z
11
+ date: 2022-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -44,84 +44,84 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.14.9
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.14.9
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '2.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.7'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cucumber
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 3.1.2
75
+ version: '8.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 3.1.2
82
+ version: '8.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: fakefs
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.7'
89
+ version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.7'
96
+ version: '1.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '12.0'
103
+ version: '13.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '12.0'
110
+ version: '13.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 3.8.0
117
+ version: '3.8'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 3.8.0
124
+ version: '3.8'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec-side_effects
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.2.0
145
+ version: 0.3.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.2.0
152
+ version: 0.3.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: bundler-audit
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: rubocop
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: 0.68.0
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: 0.68.0
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rubocop-rspec
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -248,17 +248,18 @@ dependencies:
248
248
  - - ">="
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
- description:
251
+ description:
252
252
  email:
253
253
  - acant@sugarcrm.com
254
254
  executables: []
255
255
  extensions: []
256
256
  extra_rdoc_files: []
257
257
  files:
258
+ - ".github/workflows/ci.yml"
258
259
  - ".gitignore"
259
260
  - ".rspec"
260
261
  - ".rubocop.yml"
261
- - ".travis.yml"
262
+ - ".ruby-version"
262
263
  - CHANGELOG.md
263
264
  - CONTRIBUTING.md
264
265
  - CONTRIBUTOR_TERMS.md
@@ -293,8 +294,9 @@ files:
293
294
  homepage: http://github.com/sugarcrm/sugar_utils
294
295
  licenses:
295
296
  - Apache-2.0
296
- metadata: {}
297
- post_install_message:
297
+ metadata:
298
+ rubygems_mfa_required: 'true'
299
+ post_install_message:
298
300
  rdoc_options: []
299
301
  require_paths:
300
302
  - lib
@@ -302,34 +304,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
302
304
  requirements:
303
305
  - - ">="
304
306
  - !ruby/object:Gem::Version
305
- version: 2.2.0
307
+ version: 2.6.0
306
308
  required_rubygems_version: !ruby/object:Gem::Requirement
307
309
  requirements:
308
310
  - - ">="
309
311
  - !ruby/object:Gem::Version
310
312
  version: '0'
311
313
  requirements: []
312
- rubyforge_project:
313
- rubygems_version: 2.6.14
314
- signing_key:
314
+ rubygems_version: 3.0.3
315
+ signing_key:
315
316
  specification_version: 4
316
317
  summary: Utility methods extracted from SugarCRM Ruby projects.
317
- test_files:
318
- - features/append_file.feature
319
- - features/atomic_write_file.feature
320
- - features/change_file_access.feature
321
- - features/ensure_boolean.feature
322
- - features/ensure_integer.feature
323
- - features/lock_file.feature
324
- - features/read_file.feature
325
- - features/read_json_file.feature
326
- - features/scrub_encoding.feature
327
- - features/step_definitions/steps.rb
328
- - features/support/env.rb
329
- - features/touch_file.feature
330
- - features/write_file.feature
331
- - features/write_json_file.feature
332
- - spec/spec_helper.rb
333
- - spec/sugar_utils/file/write_options_spec.rb
334
- - spec/sugar_utils/file_spec.rb
335
- - spec/sugar_utils_spec.rb
318
+ test_files: []
data/.travis.yml DELETED
@@ -1,39 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2
4
- - 2.3
5
- - 2.4.5
6
- - 2.5.4
7
- - 2.6.2
8
- - ruby-head
9
- - jruby
10
- matrix:
11
- exclude:
12
- - rvm: jruby
13
- os: osx
14
- - rvm: ruby-head
15
- os: osx
16
- allow_failures:
17
- - rvm: ruby-head
18
- - rvm: jruby
19
- os:
20
- - linux
21
- - osx
22
- sudo: false
23
- cache:
24
- bundler: true
25
- before_script:
26
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > ./cc-test-reporter ; fi
27
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter ; fi
28
- - chmod +x ./cc-test-reporter
29
- - ./cc-test-reporter before-build
30
- after_script:
31
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
32
-
33
- # HACK: Continue to use bundler <2 because of Ruby v2.2 support. Once the
34
- # lowest dependency is Ruby v2.3 we can consider upgrading to Bundler 2.x.
35
- # @see https://docs.travis-ci.com/user/languages/ruby/#bundler-20
36
- before_install:
37
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
38
- - gem install bundler -v '< 2'
39
-