files.com 1.1.747 → 1.1.748

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1493edbb62824e27bb74a9c5a69543151bbcfd4d06c065041ad5f0ac22e0ad5
4
- data.tar.gz: 07d6370de4af211f19d73c1b627f815500c562adc2a76b23b0a8bf6ea3111d7b
3
+ metadata.gz: 99d2043af738f0dc91a709fdf05e027dc45b10df5b2a4255802d345699041f2c
4
+ data.tar.gz: 9d00a7bf98e311bed7edbf406ed8944154f30663e75561d02ba246bd9c3c5b89
5
5
  SHA512:
6
- metadata.gz: b1fa485a1310614e57d21c5aefa64d1f9b0e74f56414ea8652ba23af7526640c65fe29c59565ab8f2a0b55f7edd722ab911f324b339504d0c2937268560cc198
7
- data.tar.gz: bfc81ea44c4828073a8a418a4a2e0838cd720cc7b505194efbc0ebf58b844667358ac3893fe8e7eb24c4bebca8159d1a0b3f97138195f52267a7952c10af445e
6
+ metadata.gz: 73650ccbcb0ab94d27919d6248fd21e5487a8bdc76ea58cd98de064bc3277edfd87e941bc41c29ed31194be0c5384ed0de4ad1711a24ee7ab07d7c8cf6f28f53
7
+ data.tar.gz: 12164135d7caf7f0fdf5dcf47e28dcfbb06a6236f30078a21a9a9d19354dc1319a5e9f26de7e29554e74df9e0cebdb5b7b5b26c161eb4ddca7a81b22f268c8fa
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.747
1
+ 1.1.748
data/bin/files CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # frozen_string_literal: true
4
4
 
5
- require "#{File.dirname(__FILE__)}/../lib/files.com"
6
- require "#{File.dirname(__FILE__)}/../lib/files.com/cli"
5
+ require "#{::File.dirname(__FILE__)}/../lib/files.com"
6
+ require "#{::File.dirname(__FILE__)}/../lib/files.com/cli"
7
7
 
8
8
  Files::Cli.new.run
data/bin/files-console CHANGED
@@ -5,7 +5,7 @@
5
5
  require "irb"
6
6
  require "irb/completion"
7
7
 
8
- require "#{File.dirname(__FILE__)}/../lib/files.com"
8
+ require "#{::File.dirname(__FILE__)}/../lib/files.com"
9
9
 
10
10
  # Config IRB to enable --simple-prompt and auto indent
11
11
  IRB.conf[:PROMPT_MODE] = :SIMPLE
@@ -41,7 +41,7 @@ module Files
41
41
  @type = kwargs.dig(:json_body, :type)
42
42
  @data = kwargs.dig(:json_body, :data)
43
43
 
44
- super
44
+ super(message, **kwargs)
45
45
  end
46
46
  end
47
47
 
@@ -222,7 +222,7 @@ module Files
222
222
 
223
223
  def initialize(*args)
224
224
  @attributes = (args[0].is_a?(Hash) && args[0]) || {}
225
- @options = args[1].is_a?(Hash) && args[1]
225
+ @options = (args[1].is_a?(Hash) && args[1])
226
226
  @options ||= (args[2].is_a?(Hash) && args[2]) || {}
227
227
  @attributes[:path] = args[0] if args[0].is_a?(String)
228
228
  @mode = args[1] || 'r' if args[1].is_a?(String)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.747"
4
+ VERSION = "1.1.748"
5
5
  end
data/setup.sh CHANGED
@@ -1,9 +1,21 @@
1
- #!/usr/bin/env bash
2
-
3
- # cd to the directory containing this file
4
- cd "$( dirname "${BASH_SOURCE[0]}" )"
1
+ #!/usr/bin/env ruby
2
+ require "bundler"
3
+ require "open3"
5
4
 
6
5
  # Auto-fix generated code, an important fix is where we use `inspect` to generate hashes
7
6
  # and these hashes do not have spaces around {} or =>
8
- # Note: we always return true so that offenses that cannot be auto-fixed are ignored for local developement, CI will catch them
9
- bundle install >/dev/null 2>/dev/null && bundle exec rubocop --cache false --format simple -a --ignore-parent-exclusion >/dev/null 2>/dev/null || true
7
+ # Use this target's bundle rather than the generator's, which `bundle exec` passes down to this script.
8
+ # Offenses that cannot be auto-fixed are ignored for local development, CI will catch them: `--fail-level error`
9
+ # fails only on generated code RuboCop cannot parse. Install failures and RuboCop errors fail as well.
10
+ Bundler.with_unbundled_env do
11
+ ENV["BUNDLE_GEMFILE"] = File.expand_path("Gemfile", __dir__)
12
+ Dir.chdir(__dir__) do
13
+ exit 1 unless system("bundle install --quiet")
14
+
15
+ report, status = Open3.capture2("bundle exec rubocop --cache false --format simple -a --ignore-parent-exclusion --fail-level error")
16
+ unless status.success?
17
+ puts report
18
+ exit 1
19
+ end
20
+ end
21
+ end
data/spec/spec_helper.rb CHANGED
@@ -30,6 +30,7 @@ RSpec.configure do |config|
30
30
  end
31
31
 
32
32
  config.shared_context_metadata_behavior = :apply_to_host_groups
33
+ config.fail_if_no_examples = true
33
34
  config.disable_monkey_patching!
34
35
  config.order = :random
35
36
  Kernel.srand config.seed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.747
4
+ version: 1.1.748
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com