This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2011, Xabier (slok) Larrakoetxea | |
# Copyright (c) 2011, Iraide (Sharem) Diaz | |
# | |
# 3 clause/New BSD license: | |
# opensource: http://www.opensource.org/licenses/BSD-3-Clause | |
# wikipedia: http://en.wikipedia.org/wiki/BSD_licenses | |
# | |
#----------------------------------------------------------------------- | |
# This script allows to upload to Fileserve with FTP various files at the same time | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
class Directory | |
attr :blog_root | |
def initialize(dir) | |
@blog_root = File.expand_path(dir) | |
@dirname = @blog_root.split('/').last | |
@gem_root = File.expand_path('../..',__FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Check | |
def initialize(arg) | |
@args = arg | |
end | |
def args_empty? | |
@args.empty? | |
end | |
def dirname? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
require_relative 'check' | |
require_relative 'directory' | |
options = {} | |
opt = OptionParser.new do |key| | |
key.banner = "Usage: serious DIRNAME [--views] [--public] [--heroku] [--no-git]\n" + | |
"Note: Only lowercase letters and dashes ('-') are allowed for DIRNMAE\n" + |