lib/TokiCLI/status.rb in TokiCLI-0.2.1 vs lib/TokiCLI/status.rb in TokiCLI-0.3.0
- old
+ new
@@ -1,41 +1,53 @@
# encoding: utf-8
module TokiCLI
- class Status
- def self.get_all
- "Toki_CLI is crawling your Toki App.net channel to get your data.\nIt could take a while, please be patient.\n\n"
+
+ module Status
+
+ module ClassMethods
+
+ def canceled
+ "\nCanceled.\n\n"
+ end
+
+ def version(version)
+ "\n-- TokiCLI --\n\nVersion:\t#{version}\nUrl:\t\thttp://github.com/ericdke/TokiCLI\n\n"
+ end
+
+ def wtf
+ "\nAn error occurred! Goodbye, and thanks for all the fish.\n\n"
+ end
+
+ def no_plist
+ "Unable to read the file, skipping...\n"
+ end
+
+ def no_data
+ "\nNo data for this request.\n\n"
+ end
+
+ def analysing(obj)
+ "Analyzing #{obj} ...\n"
+ end
+
+ def scanning
+ "\nScanning applications bundles to find their names.\n\n"
+ end
+
+ def file_saved(path)
+ "\nFile saved in #{path}\n\n"
+ end
+
+ def next_launch_with_names
+ "Starting with next launch, TokiCLI will display apps names. Run `toki scan` again to update the apps list.\n\n"
+ end
+
+ def please_scan
+ "\nPlease run `toki scan` to populate/refresh the applications names database.\n\n"
+ end
+
end
- def self.canceled
- "\n\nCanceled.\n\n"
- end
- def self.error(e)
- "\n\nStopped. Error: \n#{e}\n\n"
- end
- def self.no_channel
- "\n\nCan't find your Toki App.net channel, sorry.\n\n"
- end
- def self.paste_token
- "\nPlease paste your App.net token:\n\n"
- end
- def self.no_token
- "\nOops, I didn't get the token. Please try again.\n"
- end
- def self.no_db
- "\nOops, I can't find the Toki database. Please install Toki.app by http://app.net/keita.\n\n"
- end
- def self.done
- "\nDone.\n"
- end
- def self.specify_name
- "\nPlease specify the name of the app (or part of it).\n\n"
- end
- def self.specify_day
- "\nPlease specify the date with this format: 2014-04-19\n\n"
- end
- def self.specify_range
- "\nPlease specify the range with this format: 2014-04-17 2014-04-19\n\n"
- end
- def self.run_auth
- "\nPlease run `toki auth` first.\n\n"
- end
+
+ extend ClassMethods # This is a way to avoid having to declare self.xxx for each def
end
+
end