Skip to content

Commit b15a52b

Browse files
committed
refactor Models namespace to Script
in order to allow for more logical namespaces
1 parent 1fa9058 commit b15a52b

File tree

22 files changed

+30
-30
lines changed

22 files changed

+30
-30
lines changed

lib/bashly.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
requires 'bashly/settings'
1111
requires 'bashly/exceptions'
12-
requires 'bashly/models/base'
12+
requires 'bashly/script/base'
1313
requires 'bashly/commands/base'
1414
requires 'bashly'

lib/bashly/commands/add.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def config
108108
end
109109

110110
def command
111-
@command ||= Models::Command.new config
111+
@command ||= Script::Command.new config
112112
end
113113

114114
def completions

lib/bashly/commands/generate.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def create_master_script
6969
end
7070

7171
def script
72-
@script ||= Models::Script.new(command, args['--wrap'])
72+
@script ||= Script::Wrapper.new(command, args['--wrap'])
7373
end
7474

7575
def master_script_path
@@ -81,7 +81,7 @@ def config
8181
end
8282

8383
def command
84-
@command ||= Models::Command.new config
84+
@command ||= Script::Command.new config
8585
end
8686

8787
end

lib/bashly/commands/preview.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class Preview < Base
1010

1111
def run
1212
config = Config.new "#{Settings.source_dir}/bashly.yml"
13-
command = Models::Command.new(config)
14-
script = Models::Script.new command
13+
command = Script::Command.new(config)
14+
script = Script::Wrapper.new command
1515
puts script.code
1616
end
1717
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bashly
2-
module Models
2+
module Script
33
class Argument < Base
44
def usage_string
55
required ? name.upcase : "[#{name.upcase}]"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bashly
2-
module Models
2+
module Script
33
class Base
44
include Renderable
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bashly
2-
module Models
2+
module Script
33
class Command < Base
44
include Completions
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bashly
2-
module Models
2+
module Script
33
class EnvironmentVariable < Base
44
def usage_string(extended: false)
55
result = [name.upcase]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Bashly
2-
module Models
2+
module Script
33
class Flag < Base
44
def aliases
55
if long and short
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Bashly
2-
module Models
3-
class Script
2+
module Script
3+
class Wrapper
44
include Renderable
55

66
attr_reader :command, :function_name

0 commit comments

Comments
 (0)