treely 1.0.5 → 1.0.7

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
  SHA256:
3
- metadata.gz: 1bec0d1ca8e19d52eeff6dbf056518ad4e19cced1abcd8f9d56ade1c0598064f
4
- data.tar.gz: bfe3492ea4e59c7e1224fa60e4253944094ff43a8b87a70609844214833d55c0
3
+ metadata.gz: baa98bb08c38105f10e629aa7e34356746b27402ae29ad7c05d459d281457166
4
+ data.tar.gz: 627b9afaf8b6d6a12e35c82098f3a814a7313a3f659508000fc7036f9f334e96
5
5
  SHA512:
6
- metadata.gz: c70eaf3f2ff1bc59168af0d7a3af2f804bc0dfd16ad041872d2cc6596135225e5e72ba8fe236e5ee8724af7320b0e4f759e10b9762b0c11e33df908359a797a6
7
- data.tar.gz: 47e31cb8706f82f9fcfcfe23da012cb2e8e3893f6ae3ba1fb9584061eed6544fd0137de6c9a70e8993302d5b437df4b627c6e0279df976195f6c6bc9ba82f715
6
+ metadata.gz: 031f4612e1eae8d823182008c7be10de46e69c8e16d291e00313eb780970e5b86f81429f5d72f8deb2baae2fdbda635275ae2fa94770761c91bc3f44e94430cd
7
+ data.tar.gz: dbf8587b48b5d28d4d908e0956671ab70b6c399c564da5b5b375103f9a07ff357372d8104b764e38f013804e80dc7f62af773272224e6b89396d1f18e66f9505
data/bin/treely CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require 'json'
4
3
  require 'pathname'
5
4
 
@@ -16,15 +15,15 @@ Mercenary.program(:treely) do |program|
16
15
 
17
16
  program.action do |args, options|
18
17
  contents = if args[0].present?
19
- Treely::Directory.new(args[0]).contents
20
- else
21
- JSON.parse(ARGF.read, symbolize_names: true)
22
- end
18
+ Treely::Directory.new(args[0]).contents
19
+ else
20
+ JSON.parse(ARGF.read, symbolize_names: true)
21
+ end
23
22
 
24
23
  if contents.any? { |item| item.has_key?(:files) }
25
24
  puts Treely.tree(contents[0..-2])
26
25
  puts %{}
27
- puts "%s %s, %s %s" % [
26
+ puts '%s %s, %s %s' % [
28
27
  contents[-1].fetch(:directories),
29
28
  %{directories}.pluralize(contents[-1][:directories]),
30
29
  contents[-1].fetch(:files),
data/lib/treely/tree.rb CHANGED
@@ -18,12 +18,12 @@ module Treely
18
18
  @contents << @style[index.zero? ? :dot : :bar]
19
19
  @contents << @style[:new_line]
20
20
  @contents << args.map { |name| @style[name] }.join
21
- @contents << @style[source[index + 1] ? :branch : :last_branch]
21
+ @contents << @style[source[index.next] ? :branch : :last_branch]
22
22
  @contents << item.fetch(:name)
23
23
  @contents << @style[:new_line]
24
24
 
25
25
  if item.has_key?(:contents)
26
- treely item[:contents], *args, (source[index + 1] ? :bar : :indent)
26
+ treely item[:contents], *args, (source[index.next] ? :bar : :indent)
27
27
  end
28
28
  end
29
29
  end
@@ -0,0 +1,3 @@
1
+ module Treely
2
+ VERSION = '1.0.7'
3
+ end
data/lib/treely.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'treely/configuration'
2
+ require 'treely/version'
2
3
  require 'treely/tree'
3
4
 
4
5
  module Treely
@@ -11,6 +12,4 @@ module Treely
11
12
  def [](name)
12
13
  configuration.send(name)
13
14
  end
14
-
15
- self.const_set 'version'.upcase, '1.0.5'
16
15
  end
metadata CHANGED
@@ -1,59 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treely
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
- - matark
7
+ - razeos at tossdev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-19 00:00:00.000000000 Z
11
+ date: 2023-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: minitest
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.11'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.11'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: activesupport
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '5.2'
19
+ version: '6.0'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '5.2'
26
+ version: '6.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: mercenary
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: 0.3.6
33
+ version: 0.4.0
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: 0.3.6
40
+ version: 0.4.0
55
41
  description:
56
- email: matark@naver.com
42
+ email:
57
43
  executables:
58
44
  - treely
59
45
  extensions: []
@@ -64,7 +50,8 @@ files:
64
50
  - lib/treely/configuration.rb
65
51
  - lib/treely/directory.rb
66
52
  - lib/treely/tree.rb
67
- homepage: https://opensource.matark.de/treely
53
+ - lib/treely/version.rb
54
+ homepage: https://github.com/tualand/treely
68
55
  licenses:
69
56
  - MIT
70
57
  metadata: {}
@@ -83,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
70
  - !ruby/object:Gem::Version
84
71
  version: '0'
85
72
  requirements: []
86
- rubygems_version: 3.0.3
73
+ rubygems_version: 3.1.2
87
74
  signing_key:
88
75
  specification_version: 4
89
- summary: A Ruby library for generating tree-like format
76
+ summary: A gem for generating tree-like format
90
77
  test_files: []