muxify 0.1.12 → 0.2.0
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 +4 -4
- data/lib/muxify/builder.rb +11 -9
- data/lib/muxify/version.rb +1 -1
- data/lib/muxify.rb +6 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99b06fb29cb0313ee692a84da4cfa068931256fd8e19325c3431e45463d4ef76
|
4
|
+
data.tar.gz: ebfe044c5cd37f1f62574fd289a2ec0038ee56ab34f2eb14a80fe0ea6c704827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fcf84278243026a0e7c9e5b80cb31924172f1ee3300da85641c174cf768f3183de26aa4c40aacfdf793049a47b4a5f8d5bd46a3a7cdf2b54607d12431628f3e
|
7
|
+
data.tar.gz: 97a6fceaf5887c62cae38a8919bdd35d43aa59ff1b0e5af0119e3ce953b9d665247fae166b9f289d8e39e79eddb0bc3f38b5fa57683c15abd2c39e77b69f351c
|
data/lib/muxify/builder.rb
CHANGED
@@ -7,14 +7,13 @@ module Muxify
|
|
7
7
|
DEFAULT_CUSTOM_CONFIG_PATH = File.join(ENV["HOME"], ".muxifyrc")
|
8
8
|
private_constant :DEFAULT_CUSTOM_CONFIG_PATH
|
9
9
|
|
10
|
-
def self.call(
|
11
|
-
new(
|
10
|
+
def self.call(path, **kwargs)
|
11
|
+
new(path, **kwargs).to_yaml
|
12
12
|
end
|
13
13
|
|
14
|
-
def initialize(root, name: nil
|
14
|
+
def initialize(root, name: nil)
|
15
15
|
@root = File.expand_path(root)
|
16
16
|
@name = name || File.basename(@root)
|
17
|
-
@custom_config_path = custom_config_path
|
18
17
|
end
|
19
18
|
|
20
19
|
def to_yaml
|
@@ -23,7 +22,7 @@ module Muxify
|
|
23
22
|
|
24
23
|
private
|
25
24
|
|
26
|
-
attr_reader :root, :name
|
25
|
+
attr_reader :root, :name
|
27
26
|
|
28
27
|
def config
|
29
28
|
{
|
@@ -34,11 +33,15 @@ module Muxify
|
|
34
33
|
end
|
35
34
|
|
36
35
|
def windows
|
37
|
-
Windows.new(root).all.tap do |windows|
|
36
|
+
windows = Windows.new(root).all.tap do |windows|
|
38
37
|
custom_windows.each do |name, command|
|
39
38
|
windows << {name => command}
|
40
39
|
end
|
41
40
|
end
|
41
|
+
|
42
|
+
windows
|
43
|
+
.each_with_object({}) { |window, result| result[window.keys.first] = window.values.first }
|
44
|
+
.each_with_object([]) { |(k, v), result| result << {k => v} }
|
42
45
|
end
|
43
46
|
|
44
47
|
def custom_windows
|
@@ -54,7 +57,6 @@ module Muxify
|
|
54
57
|
[
|
55
58
|
DEFAULT_CUSTOM_CONFIG_PATH,
|
56
59
|
project_custom_config_path,
|
57
|
-
custom_config_path
|
58
60
|
].compact.uniq.select(&File.method(:exist?))
|
59
61
|
end
|
60
62
|
|
@@ -95,7 +97,7 @@ module Muxify
|
|
95
97
|
end
|
96
98
|
|
97
99
|
def git?
|
98
|
-
|
100
|
+
system("git rev-parse &>/dev/null")
|
99
101
|
end
|
100
102
|
|
101
103
|
def editor
|
@@ -123,7 +125,7 @@ module Muxify
|
|
123
125
|
[
|
124
126
|
{"db" => "rails db"},
|
125
127
|
{"console" => "rails console"},
|
126
|
-
{"server" => File.
|
128
|
+
{"server" => File.join(Muxify.root, "bin/rails_server_with_puma_dev")},
|
127
129
|
]
|
128
130
|
end
|
129
131
|
|
data/lib/muxify/version.rb
CHANGED
data/lib/muxify.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muxify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zubin Henner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- zubin@users.noreply.github.com
|
100
100
|
executables:
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
homepage: https://github.com/zubin/muxify
|
125
125
|
licenses: []
|
126
126
|
metadata: {}
|
127
|
-
post_install_message:
|
127
|
+
post_install_message:
|
128
128
|
rdoc_options: []
|
129
129
|
require_paths:
|
130
130
|
- lib
|
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
-
signing_key:
|
142
|
+
rubygems_version: 3.3.7
|
143
|
+
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Simple tmux project config
|
146
146
|
test_files: []
|