devinator 0.0.2 → 0.0.3
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/Gemfile.lock +6 -6
- data/README.md +1 -0
- data/bin/dev +4 -0
- data/bin/setup +7 -0
- data/lib/devinator/config.rb +6 -6
- data/lib/devinator/version.rb +1 -1
- data/lib/devinator.rb +1 -1
- data/spec/devinator_spec.rb +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 849893f1832cf84799047935f72eeaedc26a389668d5ef5f9e4727aed2493896
|
|
4
|
+
data.tar.gz: b758be13ae17fb04700bcdd2bafd5828d3864f1e006b023b18408bfd753169f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b29bb12d118f1cbd152cb54fc125d02f446a8b621681639de34a125d21da0edee73181ab3faf7d7c867c70a0f78c378a13079ff36f6c7933dd47207715952b04
|
|
7
|
+
data.tar.gz: 710b0d2463d0075bf2e0d1353726782be8e1d4e3cccbbf63e2b859b4a34c248c2b9dab250a6c19675ac7829e712fe35b8cc11cb03000b4f440bf0f5fc70e4b6a
|
data/Gemfile.lock
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
devinator (0.0.
|
|
4
|
+
devinator (0.0.3)
|
|
5
5
|
tty-command
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
specs:
|
|
9
|
-
pastel (0.8.0)
|
|
10
|
-
tty-color (~> 0.5)
|
|
11
|
-
tty-color (0.6.0)
|
|
12
|
-
tty-command (0.10.1)
|
|
13
|
-
pastel (~> 0.8)
|
|
14
9
|
|
|
15
10
|
GEM
|
|
16
11
|
remote: https://rubygems.org/
|
|
@@ -24,6 +19,8 @@ GEM
|
|
|
24
19
|
parser (3.3.9.0)
|
|
25
20
|
ast (~> 2.4.1)
|
|
26
21
|
racc
|
|
22
|
+
pastel (0.8.0)
|
|
23
|
+
tty-color (~> 0.5)
|
|
27
24
|
prism (1.6.0)
|
|
28
25
|
racc (1.8.1)
|
|
29
26
|
rainbow (3.1.1)
|
|
@@ -74,6 +71,9 @@ GEM
|
|
|
74
71
|
rubocop-performance (~> 1.25.0)
|
|
75
72
|
standardrb (1.0.1)
|
|
76
73
|
standard
|
|
74
|
+
tty-color (0.6.0)
|
|
75
|
+
tty-command (0.10.1)
|
|
76
|
+
pastel (~> 0.8)
|
|
77
77
|
unicode-display_width (3.2.0)
|
|
78
78
|
unicode-emoji (~> 4.1)
|
|
79
79
|
unicode-emoji (4.1.0)
|
data/README.md
CHANGED
|
@@ -28,6 +28,7 @@ environment. So running it would look more like:
|
|
|
28
28
|
## Installation for Linux/OSX
|
|
29
29
|
|
|
30
30
|
1. run `ruby --version` to confirm it's installed
|
|
31
|
+
1. run `tmux -V` to confirm it's installed
|
|
31
32
|
2. `gem install devinator`
|
|
32
33
|
3. `which devinator` to confirm it installed and is in your `$PATH`
|
|
33
34
|
|
data/bin/dev
ADDED
data/bin/setup
ADDED
data/lib/devinator/config.rb
CHANGED
|
@@ -19,10 +19,10 @@ class Devinator
|
|
|
19
19
|
|
|
20
20
|
@setup_commands += user_configuration.setup_commands
|
|
21
21
|
|
|
22
|
-
@setup_commands << "dx/build" if File.
|
|
23
|
-
@setup_commands << "dx/start" if File.
|
|
22
|
+
@setup_commands << "dx/build" if File.file? "dx/build"
|
|
23
|
+
@setup_commands << "dx/start" if File.file? "dx/start"
|
|
24
24
|
|
|
25
|
-
@setup_commands << dx_exec("bin/setup") if File.
|
|
25
|
+
@setup_commands << dx_exec("bin/setup") if File.file? "bin/setup"
|
|
26
26
|
|
|
27
27
|
@setup_commands << user_configuration.editor.command if user_configuration.editor.timing == :end_of_setup
|
|
28
28
|
|
|
@@ -39,13 +39,13 @@ class Devinator
|
|
|
39
39
|
}
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
if File.
|
|
42
|
+
if File.file? "Procfile.dev"
|
|
43
43
|
File.read("Procfile.dev").lines.each { |line|
|
|
44
44
|
name, command = line.split(":", 2)
|
|
45
45
|
@commands << {title: name, command: dx_exec(command.strip)}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
elsif File.
|
|
48
|
+
elsif File.file? "bin/dev"
|
|
49
49
|
@commands << {title: "dev", command: dx_exec("bin/dev")}
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -61,7 +61,7 @@ class Devinator
|
|
|
61
61
|
|
|
62
62
|
private_class_method def self.dx_exec(command)
|
|
63
63
|
result = ""
|
|
64
|
-
result << "dx/exec " if File.
|
|
64
|
+
result << "dx/exec " if File.file? "dx/exec"
|
|
65
65
|
result << command
|
|
66
66
|
end
|
|
67
67
|
end
|
data/lib/devinator/version.rb
CHANGED
data/lib/devinator.rb
CHANGED
|
@@ -8,7 +8,7 @@ class Devinator
|
|
|
8
8
|
tty = TTY::Command.new(uuid: false)
|
|
9
9
|
|
|
10
10
|
user_config_path = File.expand_path("~/.config/devinator.rb")
|
|
11
|
-
Kernel.require(user_config_path) if File.
|
|
11
|
+
Kernel.require(user_config_path) if File.file?(user_config_path)
|
|
12
12
|
|
|
13
13
|
Devinator::Config.setup_commands.each { tty.run it, only_output_on_error: true }
|
|
14
14
|
|
data/spec/devinator_spec.rb
CHANGED
|
@@ -15,7 +15,7 @@ describe Devinator do
|
|
|
15
15
|
|
|
16
16
|
it "runs the setup commands before run commands" do
|
|
17
17
|
expect(File).to receive(:expand_path).with("~/.config/devinator.rb").and_return("user config")
|
|
18
|
-
expect(File).to receive(:
|
|
18
|
+
expect(File).to receive(:file?).with("user config").and_return(false)
|
|
19
19
|
expect(TTY::Command).to receive(:new).with(uuid: false)
|
|
20
20
|
|
|
21
21
|
expect(Dir).to receive(:pwd).and_return("/path/to/project")
|
|
@@ -44,7 +44,7 @@ describe Devinator do
|
|
|
44
44
|
|
|
45
45
|
it "loads the user config" do
|
|
46
46
|
expect(File).to receive(:expand_path).with("~/.config/devinator.rb").and_return("user config")
|
|
47
|
-
expect(File).to receive(:
|
|
47
|
+
expect(File).to receive(:file?).with("user config").and_return(true)
|
|
48
48
|
|
|
49
49
|
expect(Kernel).to receive(:require).with("user config")
|
|
50
50
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devinator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean Earle
|
|
@@ -40,8 +40,10 @@ files:
|
|
|
40
40
|
- Gemfile.lock
|
|
41
41
|
- Makefile
|
|
42
42
|
- README.md
|
|
43
|
+
- bin/dev
|
|
43
44
|
- bin/devinator
|
|
44
45
|
- bin/pretty
|
|
46
|
+
- bin/setup
|
|
45
47
|
- bin/test
|
|
46
48
|
- devinator.gemspec
|
|
47
49
|
- lib/devinator.rb
|
|
@@ -74,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
74
76
|
- !ruby/object:Gem::Version
|
|
75
77
|
version: '0'
|
|
76
78
|
requirements: []
|
|
77
|
-
rubygems_version: 3.
|
|
79
|
+
rubygems_version: 3.7.2
|
|
78
80
|
specification_version: 4
|
|
79
81
|
summary: Start your development environment with one command!
|
|
80
82
|
test_files: []
|