2.1.0 - Fix skeleton init

This commit is contained in:
Mispy 2013-11-16 07:02:05 -08:00
parent 95e96ceef9
commit c1d91d1693
3 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
# twitter\_ebooks 2.0.9 # twitter\_ebooks 2.1.0
Complete rewrite of twitter\_ebooks. Allows context-sensitive responsive bots via the Twitter streaming API, along with higher-quality ngram modeling. Still needs a bit of cleaning and documenting. Complete rewrite of twitter\_ebooks. Allows context-sensitive responsive bots via the Twitter streaming API, along with higher-quality ngram modeling. Still needs a bit of cleaning and documenting.

View file

@ -5,29 +5,29 @@ require 'twitter_ebooks'
module Ebooks module Ebooks
APP_PATH = Dir.pwd # XXX do some recursive thing instead APP_PATH = Dir.pwd # XXX do some recursive thing instead
def self.new(target) def self.new(reponame)
usage = "Usage: ebooks new <reponame>" usage = "Usage: ebooks new <reponame>"
if target.nil? if reponame.nil?
log usage log usage
exit exit
end end
target = "./#{reponame}" reponame = "./#{reponame}"
if File.exists?(target) if File.exists?(reponame)
log "#{target} already exists. Please remove if you want to recreate." log "#{reponame} already exists. Please remove if you want to recreate."
exit exit
end end
FileUtils.cp_r(SKELETON_PATH, target) FileUtils.cp_r(SKELETON_PATH, reponame)
File.open(File.join(target, 'bots.rb'), 'w') do |f| File.open(File.join(reponame, 'bots.rb'), 'w') do |f|
template = File.read(File.join(SKELETON_PATH, 'bots.rb')) template = File.read(File.join(SKELETON_PATH, 'bots.rb'))
f.write(template.gsub("{{BOT_NAME}}", reponame)) f.write(template.gsub("{{BOT_NAME}}", reponame))
end end
log "New twitter_ebooks app created at #{target}" log "New twitter_ebooks app created at #{reponame}"
end end
def self.consume(pathes) def self.consume(pathes)

View file

@ -1,3 +1,3 @@
module Ebooks module Ebooks
VERSION = "2.0.9" VERSION = "2.1.0"
end end