cnc 0.1.4 → 0.1.5

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: 7839cbe6156c9e89640d56f53a98b41398362fc28d21b5914e4c52efeaa16705
4
- data.tar.gz: c8419733674fd2a46613a25a3bde83d0766f55d068a5565057d5b56f405ead23
3
+ metadata.gz: 9397b7a6d013228b0aacbdb960d2d1e926af5aed6b7942f267de5be171e5e86d
4
+ data.tar.gz: 9f3327dc68947db9dc7f24e1b5366e98b168bc1fe3a42bc86e78c714d02b7e37
5
5
  SHA512:
6
- metadata.gz: 3b084618068293d9de59e04c506e09cb4d00719ee72e896373e36a8400cbfe9e1d8c1c84875751f4f05d1892220dc4a2749a7686ed6987cce52b9f89a72c633d
7
- data.tar.gz: 764bcc76bea5064c904f26f7cfc9c43507be07827123754630136e0554db99bfb0af67bf97406ef6f3ad3a53cc467fb66a9e12c9d86d075f66308b1b3cde32e2
6
+ metadata.gz: d34b3543d0a2d90b235f96001a11fb1d19c0d9d525a14df9f689b7024153b1152182e38be8a4a86420749ecfcd995110462093be7cf8e3a7158135e6997997ad
7
+ data.tar.gz: 2f24d60005dd07b903ee6cb89143c0accdf2bd45236f1015c4576363c4f242685c60216bfce14f12f174a4f7465fe75fd120f3fe2e184c4e72b82785101d9652
data/.rubocop.yml CHANGED
@@ -1,40 +1,2 @@
1
- inherit_gem:
2
- rubocop-rails-omakase: rubocop.yml
3
-
4
- AllCops:
5
- # ParserEngine: parser_prism
6
- TargetRubyVersion: 3.3
7
-
8
- Layout/ArgumentAlignment:
9
- EnforcedStyle: with_first_argument
10
-
11
- Layout/ClassStructure:
12
- Enabled: true
13
-
14
- Layout/EndAlignment:
15
- EnforcedStyleAlignWith: keyword
16
-
17
- Layout/IndentationConsistency:
18
- EnforcedStyle: normal
19
- Enabled: true
20
-
21
- Layout/IndentationWidth:
22
- Width: 2
23
- Enabled: true
24
-
25
- Layout/SpaceInsideArrayLiteralBrackets:
26
- EnforcedStyle: no_space
27
-
28
- Layout/SpaceInsideBlockBraces:
29
- SpaceBeforeBlockParameters: false
30
-
31
- Layout/SpaceInsideHashLiteralBraces:
32
- EnforcedStyle: no_space
33
-
34
- Style/HashSyntax:
35
- EnforcedShorthandSyntax: always
36
-
37
- Style/StringLiterals:
38
- Enabled: true
39
- EnforcedStyle: double_quotes
40
- # Include: ["*"]
1
+ inherit_from:
2
+ - rubocop.yml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "cnc/version"
4
+
3
5
  module CNC
4
6
  module CLI
5
7
  module Commands
data/lib/cnc/engine.rb CHANGED
@@ -1,6 +1,9 @@
1
+ require "active_support"
2
+
1
3
  module CNC
2
4
  class Engine < ::Rails::Engine
3
5
  isolate_namespace CNC
6
+ config.autoload_paths += paths["lib"].to_a
4
7
 
5
8
  initializer "cnc.inflections" do
6
9
  ActiveSupport::Inflector.inflections { _1.acronym "CNC" }
data/lib/cnc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CNC
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/cnc.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require "cnc/version"
2
2
  require "cnc/engine"
3
3
 
4
+ require_relative "object"
5
+
4
6
  module CNC
5
7
  end
data/lib/object.rb ADDED
@@ -0,0 +1,30 @@
1
+ Object.class_eval do
2
+ def rubymine(file, line = 0)
3
+ puts "rubymine --line #{line || 0} #{file} "
4
+ system("rubymine --line #{line || 0} #{file} ")
5
+ end
6
+
7
+ def locate_method(name)
8
+ method(name)
9
+ rescue NameError
10
+ instance_method(name)
11
+ end
12
+
13
+ def vim(method_name = nil)
14
+ if method_name
15
+ file, line = locate_method(method_name).source_location
16
+ elsif is_a?(Method)
17
+ file, line = source_location
18
+ elsif is_a?(Module)
19
+ file, line = module_parent.const_source_location(name)
20
+ else
21
+ raise "What is this? I can't edit this..."
22
+ end
23
+
24
+ # return system("tmux split-window -h \"vim #{file} +#{line}\"") if file
25
+ # return system("$VISUAL --goto #{file}:#{line || 0}") if file
26
+ return rubymine(file, line || 0) if file
27
+
28
+ puts 'Source not available. Is this a C extension?'
29
+ end
30
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Peterson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop-rails-omakase
@@ -78,6 +78,7 @@ files:
78
78
  - lib/cnc/cli/commands.rb
79
79
  - lib/cnc/engine.rb
80
80
  - lib/cnc/version.rb
81
+ - lib/object.rb
81
82
  - lib/tasks/cnc_tasks.rake
82
83
  homepage: https://github.com/craft-concept/cnc
83
84
  licenses: