Skip to content

Commit

Permalink
Fix dir structuring
Browse files Browse the repository at this point in the history
  • Loading branch information
claytongentry committed Apr 30, 2024
1 parent 61da2d7 commit bd7b87c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion bin/manifolds
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# frozen_string_literal: true

require "bundler/setup"
require "manifolds"

Manifolds::CLI.start(ARGV)
5 changes: 3 additions & 2 deletions lib/manifolds/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ def init(name)

desc "add PROJECT_NAME", "Add a new project within the current umbrella project"
def add(project_name)
project_path = "./projects/#{project_name}"
unless Dir.exist?("./projects")
@logger.error("Not inside a Manifolds umbrella project.")
return
end

FileUtils.mkdir_p("tables")
FileUtils.mkdir_p("routines")
FileUtils.mkdir_p("#{project_path}/tables")
FileUtils.mkdir_p("#{project_path}/routines")
@logger.info "Added project '#{project_name}' with tables and routines directories."
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/manifolds/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Manifolds
VERSION = "0.0.4"
VERSION = "0.0.5"
end
8 changes: 4 additions & 4 deletions spec/manifolds/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
FileUtils.rm_rf(project_name)
end

it "creates a tables directory" do
expect(Dir.exist?("tables")).to be true
it "creates a tables directory within the project" do
expect(Dir.exist?("./projects/#{sub_project_name}/tables")).to be true
end

it "creates a routines directory" do
expect(Dir.exist?("routines")).to be true
it "creates a routines directory within the project" do
expect(Dir.exist?("./projects/#{sub_project_name}/routines")).to be true
end
end

Expand Down

0 comments on commit bd7b87c

Please sign in to comment.