mj 0.9.0 → 0.9.2

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: 40c3258afb7e8d688b06de487bb9286f0acb6999355a7156b099a77095206cc5
4
- data.tar.gz: 301506dcf36dee5629e0912a6fd5d89e6d130f73daab6255a86aefc802e14763
3
+ metadata.gz: 491af2ce87f053d61a6521c756d7f6b26947b1d92146d10845ead7aeda56fe92
4
+ data.tar.gz: 7338045904d1fb8cba4a6d093a7155f9db9eddd0c07da5f966e405bca7902541
5
5
  SHA512:
6
- metadata.gz: 32a385ff987a4ff7ebb24b4b4329bdbbe018194e976aea69c4dc650cf66679e690d609550f8be34a914adb480a82751241d1f4090921a8319176bcacb3a0c6c5
7
- data.tar.gz: b2ef3335c6cab5e6d6da130755130f07b5e829dd1a703e6f4ecda2a5b8098a61c427d18a68923ff262a352b0ac7b15cbbc53b655a7211f0d0be891d2e51e75cf
6
+ metadata.gz: a5df4a249deffebe270dc9132fcc25c39b705594a9151a4133460908841cf534d9493a54167c3c006ae1a09f981b34819c090d9ce38fd521a0804ec33e0e6f18
7
+ data.tar.gz: 3a924762bab7fde391373972169c99050c8d95d440bfc3a31044dcf9057513ea19c4e17b4091b02bc6af316b64c02db84117e79c1de08a231a2f3242fc9b6388
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mj (0.9.0)
4
+ mj (0.9.2)
5
5
  colorize
6
6
  koine-rest_client
7
7
  mj-hash_utils
@@ -9,10 +9,10 @@ module Mj
9
9
 
10
10
  def apply_to?(file)
11
11
  file.end_with?(
12
- "component.rb",
13
- "component.html.erb",
14
- "component_test.rb",
15
- "component_spec.rb"
12
+ ".rb",
13
+ ".html.erb",
14
+ "_test.rb",
15
+ "_spec.rb"
16
16
  )
17
17
  end
18
18
 
@@ -28,11 +28,18 @@ module Mj
28
28
  file = file.sub(/_component(_test|_spec)?.rb$/, "_component.html.erb")
29
29
  file = file.sub(/^(spec|test)/, "app")
30
30
  add_candidate(file, "component_template", to: candidates)
31
+
32
+ file = file.sub(/(_test|_spec)?.rb$/, ".html.erb")
33
+ file = file.sub(/^(spec|test)/, "app")
34
+ add_candidate(file, "component_template", to: candidates)
31
35
  end
32
36
 
33
37
  def resolve_component_class(file, candidates)
34
38
  file_name = file.sub(/_component.html.erb$/, "_component.rb")
35
39
  add_candidate(file_name, "component_class", to: candidates)
40
+
41
+ file_name = file.sub(/.html.erb$/, ".rb")
42
+ add_candidate(file_name, "component_class", to: candidates)
36
43
  end
37
44
  end
38
45
  end
@@ -22,6 +22,11 @@ module Mj
22
22
 
23
23
  winner = branches.min_by(&:length)
24
24
 
25
+ if winner.nil?
26
+ puts("No branche found matching #{command.branch}", color: :red)
27
+ exit(1)
28
+ end
29
+
25
30
  puts(winner.checkout_command, color: :green)
26
31
 
27
32
  if command.dry_run?
data/lib/mj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mj
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-11 00:00:00.000000000 Z
11
+ date: 2024-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -159,7 +159,7 @@ metadata:
159
159
  source_code_uri: https://github.com/mjacobus/mj
160
160
  changelog_uri: https://github.com/mjacobus/mj/blob/main/CHANGELOG.md
161
161
  rubygems_mfa_required: 'true'
162
- post_install_message:
162
+ post_install_message:
163
163
  rdoc_options: []
164
164
  require_paths:
165
165
  - lib
@@ -174,8 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 3.4.10
178
- signing_key:
177
+ rubygems_version: 3.5.14
178
+ signing_key:
179
179
  specification_version: 4
180
180
  summary: My personal CLI
181
181
  test_files: []