obst 0.1.9 → 0.1.10

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: 8ceae774176f6f2f1ce1b638f7d3dcfd316405421f4942a5d0bb87f9c45a3e74
4
- data.tar.gz: 1a4499843d98a6d4b41cb918c9afc7cabf00ab4a1a82bf10ef40af2a22c688f7
3
+ metadata.gz: 7e034c9801c0f95847ebff1b7538619cc3a4d2fd54fcb8b237719ef1ef14b021
4
+ data.tar.gz: '059acbb56ec335954730fd95dfab999065fd35c20065568ed61338d69b7a007a'
5
5
  SHA512:
6
- metadata.gz: ee87ab6d88d959604b220cb9a59203f53ade814af0ad0a6449f182785639891ce6dbcc85e6612394f8427a1a1127bea8137d94a0adf510a48049871bf33d95fc
7
- data.tar.gz: ed0485c9bb2e1b7d07b7efac59ac88819e8290df741878d1e0d5772405690e3722baafb49ffb63d3bf4ad07f335f3567c4c7c95c7f7617d9615b03ad3cf4fa0e
6
+ metadata.gz: f0a819a3308f2cc93e03a358fc52d366ecff5d8ff2eba8042ccb1416919732db129d1206cdcf091c7828ceacbf0e6a09ff5fa5d7f1e253b6461a9e699532ab9f
7
+ data.tar.gz: 58edfed39383f457dfd4c5739a928f05f39a8c0eb7918ff9597fd4f463de87ca242a6e331bb088159727b08d66c747bfa931274d6d897295509142c25b6fbb70
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /tmp/
9
9
  /Gemfile.lock
10
10
  /*.gem
11
+ .ruby-version
data/lib/obst/notes.rb CHANGED
@@ -34,9 +34,5 @@ module Obst
34
34
  def each(&block)
35
35
  @notes.each(&block)
36
36
  end
37
-
38
- def tags
39
- @gitlog.map(&:tags).flatten.tally.sort{ |t1, t2| [t2[1], t2[0]] <=> [t1[1], t1[0]] }.to_h
40
- end
41
37
  end
42
38
  end
@@ -8,9 +8,17 @@ module Obst
8
8
 
9
9
  def to_s
10
10
  buffer = ["# Tags\n"]
11
- @notes.map(&:tags).flatten.tally.sort{ |t1, t2| [t2[1], t2[0]] <=> [t1[1], t1[0]] }.each do |(tag, count)|
12
- buffer << "- #{tag}: #{count}"
11
+
12
+ @notes.map(&:tags).flatten.tally.sort do |t1, t2|
13
+ if (compare_count = (t2[1] <=> t1[1])) == 0
14
+ t1[0] <=> t2[0]
15
+ else
16
+ compare_count
17
+ end
18
+ end.each_with_index do |(tag, count), idx|
19
+ buffer << "#{idx + 1}. #{tag}: #{count}"
13
20
  end
21
+
14
22
  buffer.join("\n")
15
23
  end
16
24
  end
data/lib/obst/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Obst
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obst
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.4.10
65
+ rubygems_version: 3.4.1
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Obsidian stats