Skip to content

Commit

Permalink
lib/gemify/ui/curses.rb: Added a build message
Browse files Browse the repository at this point in the history
  • Loading branch information
keita authored and judofyr committed Apr 14, 2008
1 parent 5c2b97c commit 4b863b7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/gemify/ui/curses.rb
Expand Up @@ -134,11 +134,8 @@ def start
when ?u, ::Curses::KEY_UP ; up
when ?d, ::Curses::KEY_DOWN ; down
when ?c, ::Curses::KEY_CTRL_J ; change
when ?b
unless @base.build! && exit
@result = "You need to fill out all the required fields"
end
when ?s; save!
when ?b; build
when ?s; save
when ?i; IncludedFiles.new(@base.files)
when ?q; quit
else
Expand All @@ -164,6 +161,15 @@ def down
@position += 1 unless @position == @tasks.size - 1
end

def build
unless @base.build!
@result = "You need to fill out all the required fields"
else
gemname = "#{@base.show(:name)}-#{@base.show(:version)}.gem"
@result = "Created " + gemname
end
end

def save
@changed = false
save!
Expand Down

0 comments on commit 4b863b7

Please sign in to comment.