dorian-each 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/each +7 -10
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca854a994308f8b2ee7fed80c26e9dd141112db047e9678aa9ae026bb4ece9cd
4
- data.tar.gz: 873f8c9dd7326c6fa3f32d53fa26b95a38e3e265ee40c07ffc6927aa80e8b306
3
+ metadata.gz: 53b1afb015f36ef00cb836a68b07e9b381b535437b441615f13bf36f4b790677
4
+ data.tar.gz: 7607d6a60bb88a0d512624781c0ad83e3846c48c32c714b09a737eb6bff63351
5
5
  SHA512:
6
- metadata.gz: 0b81831f4bedec525b4d50c2e44f01a24185c8dc801258937c8f1ed9258de200f83fa8b966095cd5fe1ed245a71a19593c4e0ba48683dda338fde5b67cdb87bd
7
- data.tar.gz: d2d2e4cde64439d58e59283c2fbfe415d0cd566c3d8eba09f35fc051a0478584bd4811cb136e2f79e5b4334e420d9f14c6bb85acf38542863c74547b996c1d97
6
+ metadata.gz: 37688f2230fd20c128f7c700475a96b082abbe6976f31bfd5f7d6e2bbc47de22d0ab0a32a362b6a7a0e71a1325eb7933583da7c1961f150d6e92a78ce77aa0de
7
+ data.tar.gz: 14cd0329357eaf9562536af59d0d930f53c99607cf9e51b35248adf5380e67950db6f07cbe4665820bf7248576ffdd01618067e8bdb86926df27a726545fe54e
data/bin/each CHANGED
@@ -44,7 +44,7 @@ parsed =
44
44
  abort parsed.help if parsed.options.help
45
45
 
46
46
  if parsed.options.version
47
- abort File.read(File.expand_path("../../VERSION", __FILE__))
47
+ abort File.read(File.expand_path("../VERSION", __dir__))
48
48
  end
49
49
 
50
50
  input = parsed.files.map { |file| File.read(file) }.join("\n")
@@ -52,19 +52,16 @@ input = $stdin.each_line.to_a.map(&:strip).join("\n") if input.empty?
52
52
  inputs = input.lines.map(&:strip)
53
53
  ruby = parsed.arguments.join(" ")
54
54
  debug = parsed.options.debug
55
- stdout = parsed.options.stdout && !parsed.options.progress
56
- stderr = parsed.options.stderr && !parsed.options.progress
55
+ progress = parsed.options.progress
56
+ stdout = parsed.options.stdout
57
+ stderr = parsed.options.stderr
57
58
  colorize = parsed.options.colorize
58
59
  total = inputs.size
59
60
  format = parsed.options.progress_format
60
-
61
- if parsed.options.progress
62
- progress = Dorian::Progress.create(total:, format:)
63
- else
64
- progress = nil
65
- end
61
+ progress = progress ? Dorian::Progress.create(total:, format:) : nil
62
+ rails = parsed.options.rails
66
63
 
67
64
  inputs.each do |it|
68
- Dorian::Eval.eval(it:, ruby:, debug:, stdout:, stderr:, colorize:)
65
+ Dorian::Eval.eval(it:, ruby:, debug:, stdout:, stderr:, colorize:, rails:)
69
66
  progress&.increment
70
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-each
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-24 00:00:00.000000000 Z
11
+ date: 2024-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dorian-arguments
@@ -71,9 +71,9 @@ require_paths:
71
71
  - lib
72
72
  required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: '0'
76
+ version: 3.3.4
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="