hiiro 0.1.246 → 0.1.247

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/h-branch +6 -17
  3. data/exe/h +1 -1
  4. data/lib/hiiro/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bfe4b9c356a502d288415cb04d05d63eaa5ba590e5cd65a6146ae9c538d4d63
4
- data.tar.gz: 12cf7e0c27e3f6c1dadb19400a930f340b4c927eccf056f2d153f134b6477fe2
3
+ metadata.gz: c2d2a1e2e4ffabb320cf96596b5f4e09d248693266ea17625b72e43ce2d31b22
4
+ data.tar.gz: 47525e1929904632aba3f28f10c4ae0959d7a69acfffc31c83f60e162179e813
5
5
  SHA512:
6
- metadata.gz: 5e73eadaf5b66a61f72baa404788a83fa513b15f2633ea2f8f0ae1955c792a6194b0e19f14a5f4b85d55a57696cfce103e0746be1276523bdfdf4849ace440a8
7
- data.tar.gz: e19abec87d466385cd3c01fbf75d21818b57f1f4f9688e9648e70bc8a0a2da871d6b300916cc0316aea0a23fdfaf72f3bd48e1d29037b8589bb21af44580eee4
6
+ metadata.gz: '0936325092f5106b15ba7b95c81f80ae63d5317d009dc3462e57e5beeaba7727e8f23961f19e2b666b68753adeca8a108c14cc8a17ce4fd92b80c59f4bb2ecc7'
7
+ data.tar.gz: 76063e8050533a38e6eed7fd03c097d205f80b796fe7a38e2810040c6f70bbd6acc1887f05f0750630f0817b68ac517cb5806cf4b32beae5a107abeb328d82ca
data/bin/h-branch CHANGED
@@ -158,15 +158,12 @@ Hiiro.run(*ARGV) do
158
158
  branches = git.branches(sort_by: 'authordate', ignore_case: true)
159
159
 
160
160
  if opts.edit
161
- branch_lines = branches.map { |b| "- #{b}" }
161
+ branch_lines = branches.map { |b| "#{b}:" }
162
162
  yaml_content = <<~YAML
163
163
  # Select branches to tag and list the tags to apply.
164
164
  # All listed branches will receive all listed tags.
165
165
 
166
- branches:
167
- #{branch_lines.join("\n")}
168
-
169
- tags:
166
+ #{branch_lines.join("\n -\n")}
170
167
  -
171
168
  YAML
172
169
 
@@ -184,23 +181,15 @@ Hiiro.run(*ARGV) do
184
181
  next
185
182
  end
186
183
 
187
- selected = Array(parsed['branches']).map(&:to_s).reject(&:empty?)
188
- new_tags = Array(parsed['tags']).map(&:to_s).reject(&:empty?)
189
-
190
- if selected.empty? || new_tags.empty?
191
- puts "Aborted: need at least one branch and one tag"
192
- next
193
- end
194
-
195
- selected.each do |b|
196
- tag_store.add(b, *new_tags)
197
- puts "Tagged #{b} with: #{new_tags.join(', ')}"
184
+ parsed.each do |branch, tags|
185
+ tag_store.add(branch, *tags)
186
+ puts "Tagged #{branch} with: #{tags.join(', ')}"
198
187
  end
199
188
  else
200
189
  branch = opts.args[0] || git.branch
201
190
  tag_names = opts.args[1..]
202
191
 
203
- if tag_names.empty?
192
+ if tag_names&.count.to_i == 0
204
193
  puts "Usage: h branch tag [branch] <tag> [tag2 ...]"
205
194
  puts " h branch tag -e (bulk edit mode)"
206
195
  next
data/exe/h CHANGED
@@ -6,7 +6,7 @@ require "fileutils"
6
6
  def update_hiiro(version=nil)
7
7
  ver = version || Hiiro::Rbenv.current_version
8
8
  puts
9
- puts "INSTALLING RUBY VERSION #{ver}"
9
+ puts "INSTALLING hiiro for RUBY #{ver}"
10
10
 
11
11
  Hiiro::Rbenv.install_gem('hiiro', version: ver)
12
12
  Hiiro::Rbenv.run('h', 'setup', version: ver)
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.246"
2
+ VERSION = "0.1.247"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.246
4
+ version: 0.1.247
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota