Skip to content

Commit efd20e2

Browse files
Merge pull request #106 from anthcor/master
fixing some command line prompts
2 parents f56d309 + 03c4c85 commit efd20e2

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

bin/ferry

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ OptionParser.new do |opts|
55
options = {}
66

77
def check_appro_args(number_of_args)
8-
raise "too many arguments for input" unless ARGV.length + 1 <= number_of_args
9-
raise "please enter the appropriate arguments" unless ARGV.length + 1 == number_of_args
8+
raise "too many arguments for input" unless ARGV.length <= number_of_args
9+
raise "please enter the appropriate arguments" unless ARGV.length == number_of_args
1010
end
1111

1212
opts.banner = "See more documentation at http://cmu-is-projects.github.io/ferry"
1313

1414
opts.on( "--dump ENVIRONMENT", "Dumps database from specified env to sql file." ) do |opt|
15-
check_appro_args(1)
15+
check_appro_args(0)
1616
dumper = Ferry::Dumper.new
1717
dumper.dump(opt)
1818
end
1919

2020
# TODO
2121
opts.on( "--fill ENVIRONMENT FILEPATH", "Overwrites database from specified file to the db in the specified env." ) do |opt|
22-
check_appro_args(2)
22+
check_appro_args(1)
2323
dumper = Ferry::Filler.new
2424
dumper.dump(opt, ARGV[0], ARGV[1])
2525
end

lib/ferry/dsl/captain.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'ferry'
2+
3+
class Captain < Ferry
4+
5+
# after initializing some captain class
6+
# we need to be able to
7+
# 0 know what kind of content we want to move
8+
# 1 know where we need to move data from
9+
# 2 know where we need to move data to
10+
# 3 any specifics of
11+
12+
def initialize(**opts)
13+
# @cargo ||= opts[:cargo]
14+
# @to_loc ||= opts[:to_loc]
15+
# @from_loc ||= opts[:form_loc]
16+
end
17+
end

lib/ferry/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Ferry
2-
VERSION = "1.3.1"
2+
VERSION = "1.3.2"
33
end

0 commit comments

Comments
 (0)