lib/client/client.rb in factor-0.1.01 vs lib/client/client.rb in factor-0.1.02

- old
+ new

@@ -9,11 +9,10 @@ module Client class Client attr_accessor :host def initialize(host="http://factor.io") - #def initialize(host="http://localhost:3000/") @host=host end def register(email,password) end @@ -76,14 +75,13 @@ code.call("unzipping '#{channel['name']}'") # unzip download zip into unzipped directory unzip(temp_file.path,unzip_dir) - code.call("loading '#{channel['zip_url']}' into engine") - Dir.glob("#{unzip_dir}/**/*.rb").each do |ruby_file_name| - engine.load_channel(ruby_file_name) - end - + filename = unzip_dir + "/" + channel['name'].split(/(?=[A-Z])/).map{ |x| x.downcase }.join('_') + ".rb" + + code.call("loading '#{filename}' into engine") + engine.load_channel(filename) end engine end \ No newline at end of file