standup_md 0.3.7 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +6 -16
  5. data/Rakefile +1 -1
  6. data/lib/standup_md.rb +8 -5
  7. data/lib/standup_md/cli.rb +7 -7
  8. data/lib/standup_md/cli/helpers.rb +10 -13
  9. data/lib/standup_md/config/file.rb +3 -3
  10. data/lib/standup_md/entry.rb +7 -9
  11. data/lib/standup_md/entry_list.rb +2 -2
  12. data/lib/standup_md/version.rb +26 -4
  13. data/standup_md.gemspec +1 -1
  14. metadata +3 -60
  15. data/doc/README_md.html +0 -400
  16. data/doc/StandupMD.html +0 -235
  17. data/doc/StandupMD/Cli.html +0 -406
  18. data/doc/StandupMD/Cli/Helpers.html +0 -146
  19. data/doc/StandupMD/Config.html +0 -193
  20. data/doc/StandupMD/Config/Cli.html +0 -296
  21. data/doc/StandupMD/Config/Entry.html +0 -240
  22. data/doc/StandupMD/Config/EntryList.html +0 -171
  23. data/doc/StandupMD/Config/File.html +0 -481
  24. data/doc/StandupMD/Entry.html +0 -369
  25. data/doc/StandupMD/EntryList.html +0 -499
  26. data/doc/StandupMD/File.html +0 -483
  27. data/doc/StandupMD/Version.html +0 -143
  28. data/doc/created.rid +0 -15
  29. data/doc/css/fonts.css +0 -167
  30. data/doc/css/rdoc.css +0 -619
  31. data/doc/fonts/Lato-Light.ttf +0 -0
  32. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  33. data/doc/fonts/Lato-Regular.ttf +0 -0
  34. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  35. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  36. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  37. data/doc/images/add.png +0 -0
  38. data/doc/images/arrow_up.png +0 -0
  39. data/doc/images/brick.png +0 -0
  40. data/doc/images/brick_link.png +0 -0
  41. data/doc/images/bug.png +0 -0
  42. data/doc/images/bullet_black.png +0 -0
  43. data/doc/images/bullet_toggle_minus.png +0 -0
  44. data/doc/images/bullet_toggle_plus.png +0 -0
  45. data/doc/images/date.png +0 -0
  46. data/doc/images/delete.png +0 -0
  47. data/doc/images/find.png +0 -0
  48. data/doc/images/loadingAnimation.gif +0 -0
  49. data/doc/images/macFFBgHack.png +0 -0
  50. data/doc/images/package.png +0 -0
  51. data/doc/images/page_green.png +0 -0
  52. data/doc/images/page_white_text.png +0 -0
  53. data/doc/images/page_white_width.png +0 -0
  54. data/doc/images/plugin.png +0 -0
  55. data/doc/images/ruby.png +0 -0
  56. data/doc/images/tag_blue.png +0 -0
  57. data/doc/images/tag_green.png +0 -0
  58. data/doc/images/transparent.png +0 -0
  59. data/doc/images/wrench.png +0 -0
  60. data/doc/images/wrench_orange.png +0 -0
  61. data/doc/images/zoom.png +0 -0
  62. data/doc/index.html +0 -388
  63. data/doc/js/darkfish.js +0 -84
  64. data/doc/js/navigation.js +0 -105
  65. data/doc/js/navigation.js.gz +0 -0
  66. data/doc/js/search.js +0 -110
  67. data/doc/js/search_index.js +0 -1
  68. data/doc/js/search_index.js.gz +0 -0
  69. data/doc/js/searcher.js +0 -229
  70. data/doc/js/searcher.js.gz +0 -0
  71. data/doc/table_of_contents.html +0 -402
data/doc/js/darkfish.js DELETED
@@ -1,84 +0,0 @@
1
- /**
2
- *
3
- * Darkfish Page Functions
4
- * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
5
- *
6
- * Author: Michael Granger <mgranger@laika.com>
7
- *
8
- */
9
-
10
- /* Provide console simulation for firebug-less environments */
11
- /*
12
- if (!("console" in window) || !("firebug" in console)) {
13
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
14
- "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
15
-
16
- window.console = {};
17
- for (var i = 0; i < names.length; ++i)
18
- window.console[names[i]] = function() {};
19
- };
20
- */
21
-
22
-
23
- function showSource( e ) {
24
- var target = e.target;
25
- while (!target.classList.contains('method-detail')) {
26
- target = target.parentNode;
27
- }
28
- if (typeof target !== "undefined" && target !== null) {
29
- target = target.querySelector('.method-source-code');
30
- }
31
- if (typeof target !== "undefined" && target !== null) {
32
- target.classList.toggle('active-menu')
33
- }
34
- };
35
-
36
- function hookSourceViews() {
37
- document.querySelectorAll('.method-heading').forEach(function (codeObject) {
38
- codeObject.addEventListener('click', showSource);
39
- });
40
- };
41
-
42
- function hookSearch() {
43
- var input = document.querySelector('#search-field');
44
- var result = document.querySelector('#search-results');
45
- result.classList.remove("initially-hidden");
46
-
47
- var search_section = document.querySelector('#search-section');
48
- search_section.classList.remove("initially-hidden");
49
-
50
- var search = new Search(search_data, input, result);
51
-
52
- search.renderItem = function(result) {
53
- var li = document.createElement('li');
54
- var html = '';
55
-
56
- // TODO add relative path to <script> per-page
57
- html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
58
- if (result.params)
59
- html += '<span class="params">' + result.params + '</span>';
60
- html += '</a>';
61
-
62
-
63
- if (result.namespace)
64
- html += '<p class="search-namespace">' + this.hlt(result.namespace);
65
-
66
- if (result.snippet)
67
- html += '<div class="search-snippet">' + result.snippet + '</div>';
68
-
69
- li.innerHTML = html;
70
-
71
- return li;
72
- }
73
-
74
- search.select = function(result) {
75
- window.location.href = result.firstChild.firstChild.href;
76
- }
77
-
78
- search.scrollIntoView = search.scrollInWindow;
79
- };
80
-
81
- document.addEventListener('DOMContentLoaded', function() {
82
- hookSourceViews();
83
- hookSearch();
84
- });
data/doc/js/navigation.js DELETED
@@ -1,105 +0,0 @@
1
- /*
2
- * Navigation allows movement using the arrow keys through the search results.
3
- *
4
- * When using this library you will need to set scrollIntoView to the
5
- * appropriate function for your layout. Use scrollInWindow if the container
6
- * is not scrollable and scrollInElement if the container is a separate
7
- * scrolling region.
8
- */
9
- Navigation = new function() {
10
- this.initNavigation = function() {
11
- var _this = this;
12
-
13
- document.addEventListener('keydown', function(e) {
14
- _this.onkeydown(e);
15
- });
16
-
17
- this.navigationActive = true;
18
- }
19
-
20
- this.setNavigationActive = function(state) {
21
- this.navigationActive = state;
22
- }
23
-
24
- this.onkeydown = function(e) {
25
- if (!this.navigationActive) return;
26
- switch(e.keyCode) {
27
- case 37: //Event.KEY_LEFT:
28
- if (this.moveLeft()) e.preventDefault();
29
- break;
30
- case 38: //Event.KEY_UP:
31
- if (e.keyCode == 38 || e.ctrlKey) {
32
- if (this.moveUp()) e.preventDefault();
33
- }
34
- break;
35
- case 39: //Event.KEY_RIGHT:
36
- if (this.moveRight()) e.preventDefault();
37
- break;
38
- case 40: //Event.KEY_DOWN:
39
- if (e.keyCode == 40 || e.ctrlKey) {
40
- if (this.moveDown()) e.preventDefault();
41
- }
42
- break;
43
- case 13: //Event.KEY_RETURN:
44
- if (this.current) e.preventDefault();
45
- this.select(this.current);
46
- break;
47
- }
48
- if (e.ctrlKey && e.shiftKey) this.select(this.current);
49
- }
50
-
51
- this.moveRight = function() {
52
- }
53
-
54
- this.moveLeft = function() {
55
- }
56
-
57
- this.move = function(isDown) {
58
- }
59
-
60
- this.moveUp = function() {
61
- return this.move(false);
62
- }
63
-
64
- this.moveDown = function() {
65
- return this.move(true);
66
- }
67
-
68
- /*
69
- * Scrolls to the given element in the scrollable element view.
70
- */
71
- this.scrollInElement = function(element, view) {
72
- var offset, viewHeight, viewScroll, height;
73
- offset = element.offsetTop;
74
- height = element.offsetHeight;
75
- viewHeight = view.offsetHeight;
76
- viewScroll = view.scrollTop;
77
-
78
- if (offset - viewScroll + height > viewHeight) {
79
- view.scrollTop = offset - viewHeight + height;
80
- }
81
- if (offset < viewScroll) {
82
- view.scrollTop = offset;
83
- }
84
- }
85
-
86
- /*
87
- * Scrolls to the given element in the window. The second argument is
88
- * ignored
89
- */
90
- this.scrollInWindow = function(element, ignored) {
91
- var offset, viewHeight, viewScroll, height;
92
- offset = element.offsetTop;
93
- height = element.offsetHeight;
94
- viewHeight = window.innerHeight;
95
- viewScroll = window.scrollY;
96
-
97
- if (offset - viewScroll + height > viewHeight) {
98
- window.scrollTo(window.scrollX, offset - viewHeight + height);
99
- }
100
- if (offset < viewScroll) {
101
- window.scrollTo(window.scrollX, offset);
102
- }
103
- }
104
- }
105
-
Binary file
data/doc/js/search.js DELETED
@@ -1,110 +0,0 @@
1
- Search = function(data, input, result) {
2
- this.data = data;
3
- this.input = input;
4
- this.result = result;
5
-
6
- this.current = null;
7
- this.view = this.result.parentNode;
8
- this.searcher = new Searcher(data.index);
9
- this.init();
10
- }
11
-
12
- Search.prototype = Object.assign({}, Navigation, new function() {
13
- var suid = 1;
14
-
15
- this.init = function() {
16
- var _this = this;
17
- var observer = function(e) {
18
- switch(e.keyCode) {
19
- case 38: // Event.KEY_UP
20
- case 40: // Event.KEY_DOWN
21
- return;
22
- }
23
- _this.search(_this.input.value);
24
- };
25
- this.input.addEventListener('keyup', observer);
26
- this.input.addEventListener('click', observer); // mac's clear field
27
-
28
- this.searcher.ready(function(results, isLast) {
29
- _this.addResults(results, isLast);
30
- })
31
-
32
- this.initNavigation();
33
- this.setNavigationActive(false);
34
- }
35
-
36
- this.search = function(value, selectFirstMatch) {
37
- value = value.trim().toLowerCase();
38
- if (value) {
39
- this.setNavigationActive(true);
40
- } else {
41
- this.setNavigationActive(false);
42
- }
43
-
44
- if (value == '') {
45
- this.lastQuery = value;
46
- this.result.innerHTML = '';
47
- this.result.setAttribute('aria-expanded', 'false');
48
- this.setNavigationActive(false);
49
- } else if (value != this.lastQuery) {
50
- this.lastQuery = value;
51
- this.result.setAttribute('aria-busy', 'true');
52
- this.result.setAttribute('aria-expanded', 'true');
53
- this.firstRun = true;
54
- this.searcher.find(value);
55
- }
56
- }
57
-
58
- this.addResults = function(results, isLast) {
59
- var target = this.result;
60
- if (this.firstRun && (results.length > 0 || isLast)) {
61
- this.current = null;
62
- this.result.innerHTML = '';
63
- }
64
-
65
- for (var i=0, l = results.length; i < l; i++) {
66
- var item = this.renderItem.call(this, results[i]);
67
- item.setAttribute('id', 'search-result-' + target.childElementCount);
68
- target.appendChild(item);
69
- };
70
-
71
- if (this.firstRun && results.length > 0) {
72
- this.firstRun = false;
73
- this.current = target.firstChild;
74
- this.current.classList.add('search-selected');
75
- }
76
- //TODO: ECMAScript
77
- //if (jQuery.browser.msie) this.$element[0].className += '';
78
-
79
- if (isLast) this.result.setAttribute('aria-busy', 'false');
80
- }
81
-
82
- this.move = function(isDown) {
83
- if (!this.current) return;
84
- var next = isDown ? this.current.nextElementSibling : this.current.previousElementSibling;
85
- if (next) {
86
- this.current.classList.remove('search-selected');
87
- next.classList.add('search-selected');
88
- this.input.setAttribute('aria-activedescendant', next.getAttribute('id'));
89
- this.scrollIntoView(next, this.view);
90
- this.current = next;
91
- this.input.value = next.firstChild.firstChild.text;
92
- this.input.select();
93
- }
94
- return true;
95
- }
96
-
97
- this.hlt = function(html) {
98
- return this.escapeHTML(html).
99
- replace(/\u0001/g, '<em>').
100
- replace(/\u0002/g, '</em>');
101
- }
102
-
103
- this.escapeHTML = function(html) {
104
- return html.replace(/[&<>]/g, function(c) {
105
- return '&#' + c.charCodeAt(0) + ';';
106
- });
107
- }
108
-
109
- });
110
-
@@ -1 +0,0 @@
1
- var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","version","<<()","<=>()","@entries()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","echo()","echo()","edit()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","header_depth=()","initalize()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","to_s()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::version","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::entrylist#@entries()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::file#load()","standupmd::file::load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::version::to_s()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","<p>The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","<p>Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","<p>Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","<p>This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","<p>The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","<p>The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","<p>The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","<p>The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","<p>Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","<p>Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","<p>Class for handling reading and writing standup files.\n"],["StandupMD::Version","","StandupMD/Version.html","","<p>Module that contains all gem version information. Follows semantic versioning. Read: semver.org/\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","<p>Appends entries to list.\n<p>@param [StandupMD::Entry] entry\n<p>@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","<p>Sorting method for Comparable. Entries are compared by date.\n"],["@entries","StandupMD::EntryList","StandupMD/EntryList.html#method-i-40entries","","<p>The following are forwarded to @entries, which is the underly array of entries.\n<p><code>each</code> &mdash; Iterate over each …\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","<p>Setter for bullet_character. Must be * (asterisk) or - (dash).\n<p>@param [String] character\n<p>@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","<p>Method for accessing the configuration.\n<p>@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","<p>Has a config file been loaded?\n<p>@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","<p>Allows for configuration via a block. Useful when making config files.\n<p>@example\n\n<pre>StandupMD.configure { |s| ...</pre>\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","<p>Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","<p>Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn&#39;t …\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","<p>Quick access to Cli.echo.\n<p>@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","<p>Prints output if <code>verbose</code> is true.\n<p>@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","<p>Opens the file in an editor. Abandons the script.\n<p>@return [nil]\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","<p>Creates an instance of <code>StandupMD</code> and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","<p>Does the file exist?\n<p>@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","<p>Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","<p>Replaces entries with results of filter.\n<p>@param [Date] start_date\n<p>@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(date)","<p>Finds an entry based on date. This method assumes the list has already been sorted.\n<p>@param [Date] date …\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","<p>Find standup file in directory by file name.\n<p>@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","<p>Find standup file in directory by Date object.\n<p>@param [Date] date\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","<p>Number of octothorps (#) to use before the main header.\n<p>@param [Integer] depth\n<p>@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","<p>Initializes the config with default values.\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","<p>Loads the file&#39;s contents. TODO clean up this method.\n<p>@return [StandupMD::FileList]\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","<p>Convenience method for calling File.find(file_name).load\n<p>@param [String] file_name\n<p>@return [StandupMD::File] …\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","<p>Loads a config file.\n<p>@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","<p>Load the preference file.\n<p>@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","<p>Has the file been loaded?\n<p>@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","<p>Constructor. Sets defaults.\n<p>@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","<p>Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","<p>Constructs instance of <code>StandupMD::Entry</code>.\n<p>@param [Date] date\n<p>@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","<p>Contruct a list. Can pass any amount of <code>StandupMD::Entry</code> instances.\n<p>@param [Entry] entries\n<p>@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","<p>Constructs the instance.\n<p>@param [String] file_name\n<p>@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","<p>Was the file just now created?\n<p>@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","<p>Has the preference file been loaded?\n<p>@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","<p>Print an entry to the command line.\n<p>@param [StandupMD::Entry] entry\n<p>@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","<p>Reset all configuration values to their defaults.\n<p>@return [StandupMD::Config]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","<p>Replace entries with sorted entries by date.\n<p>@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","<p>Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n<p>@param [Integer] depth\n<p>@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","<p>Entry as a hash .\n<p>@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","<p>The list as a hash, with the dates as keys.\n<p>@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","<p>Entry as a json object.\n<p>@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","<p>The entry list as a json object.\n<p>@return [String]\n"],["to_s","StandupMD::Version","StandupMD/Version.html#method-c-to_s","()","<p>Version as <code>MAJOR.MINOR.PATCH</code>\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(**dates)","<p>Writes a new entry to the file if the first entry in the file isn&#39;t today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","<p>Writes entries to the file.\n<p>@return [Boolean] true if file was written\n"],["README","","README_md.html","","<p>The Standup Doctor\n<p><img src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fevanthegrayt%2Fstandup_md%2Fbadge%3Fref%3Dmaster&style=flat\"> …\n\n<blockquote>"]]}}
Binary file
data/doc/js/searcher.js DELETED
@@ -1,229 +0,0 @@
1
- Searcher = function(data) {
2
- this.data = data;
3
- this.handlers = [];
4
- }
5
-
6
- Searcher.prototype = new function() {
7
- // search is performed in chunks of 1000 for non-blocking user input
8
- var CHUNK_SIZE = 1000;
9
- // do not try to find more than 100 results
10
- var MAX_RESULTS = 100;
11
- var huid = 1;
12
- var suid = 1;
13
- var runs = 0;
14
-
15
- this.find = function(query) {
16
- var queries = splitQuery(query);
17
- var regexps = buildRegexps(queries);
18
- var highlighters = buildHilighters(queries);
19
- var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++};
20
- var _this = this;
21
-
22
- this.currentSuid = state.n;
23
-
24
- if (!query) return;
25
-
26
- var run = function() {
27
- // stop current search thread if new search started
28
- if (state.n != _this.currentSuid) return;
29
-
30
- var results =
31
- performSearch(_this.data, regexps, queries, highlighters, state);
32
- var hasMore = (state.limit > 0 && state.pass < 4);
33
-
34
- triggerResults.call(_this, results, !hasMore);
35
- if (hasMore) {
36
- setTimeout(run, 2);
37
- }
38
- runs++;
39
- };
40
- runs = 0;
41
-
42
- // start search thread
43
- run();
44
- }
45
-
46
- /* ----- Events ------ */
47
- this.ready = function(fn) {
48
- fn.huid = huid;
49
- this.handlers.push(fn);
50
- }
51
-
52
- /* ----- Utilities ------ */
53
- function splitQuery(query) {
54
- return query.split(/(\s+|::?|\(\)?)/).filter(function(string) {
55
- return string.match(/\S/);
56
- });
57
- }
58
-
59
- function buildRegexps(queries) {
60
- return queries.map(function(query) {
61
- return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i');
62
- });
63
- }
64
-
65
- function buildHilighters(queries) {
66
- return queries.map(function(query) {
67
- return query.split('').map(function(l, i) {
68
- return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2);
69
- }).join('');
70
- });
71
- }
72
-
73
- // function longMatchRegexp(index, longIndex, regexps) {
74
- // for (var i = regexps.length - 1; i >= 0; i--){
75
- // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false;
76
- // };
77
- // return true;
78
- // }
79
-
80
-
81
- /* ----- Mathchers ------ */
82
-
83
- /*
84
- * This record matches if the index starts with queries[0] and the record
85
- * matches all of the regexps
86
- */
87
- function matchPassBeginning(index, longIndex, queries, regexps) {
88
- if (index.indexOf(queries[0]) != 0) return false;
89
- for (var i=1, l = regexps.length; i < l; i++) {
90
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
91
- return false;
92
- };
93
- return true;
94
- }
95
-
96
- /*
97
- * This record matches if the longIndex starts with queries[0] and the
98
- * longIndex matches all of the regexps
99
- */
100
- function matchPassLongIndex(index, longIndex, queries, regexps) {
101
- if (longIndex.indexOf(queries[0]) != 0) return false;
102
- for (var i=1, l = regexps.length; i < l; i++) {
103
- if (!longIndex.match(regexps[i]))
104
- return false;
105
- };
106
- return true;
107
- }
108
-
109
- /*
110
- * This record matches if the index contains queries[0] and the record
111
- * matches all of the regexps
112
- */
113
- function matchPassContains(index, longIndex, queries, regexps) {
114
- if (index.indexOf(queries[0]) == -1) return false;
115
- for (var i=1, l = regexps.length; i < l; i++) {
116
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
117
- return false;
118
- };
119
- return true;
120
- }
121
-
122
- /*
123
- * This record matches if regexps[0] matches the index and the record
124
- * matches all of the regexps
125
- */
126
- function matchPassRegexp(index, longIndex, queries, regexps) {
127
- if (!index.match(regexps[0])) return false;
128
- for (var i=1, l = regexps.length; i < l; i++) {
129
- if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
130
- return false;
131
- };
132
- return true;
133
- }
134
-
135
-
136
- /* ----- Highlighters ------ */
137
- function highlightRegexp(info, queries, regexps, highlighters) {
138
- var result = createResult(info);
139
- for (var i=0, l = regexps.length; i < l; i++) {
140
- result.title = result.title.replace(regexps[i], highlighters[i]);
141
- result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
142
- };
143
- return result;
144
- }
145
-
146
- function hltSubstring(string, pos, length) {
147
- return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length);
148
- }
149
-
150
- function highlightQuery(info, queries, regexps, highlighters) {
151
- var result = createResult(info);
152
- var pos = 0;
153
- var lcTitle = result.title.toLowerCase();
154
-
155
- pos = lcTitle.indexOf(queries[0]);
156
- if (pos != -1) {
157
- result.title = hltSubstring(result.title, pos, queries[0].length);
158
- }
159
-
160
- result.namespace = result.namespace.replace(regexps[0], highlighters[0]);
161
- for (var i=1, l = regexps.length; i < l; i++) {
162
- result.title = result.title.replace(regexps[i], highlighters[i]);
163
- result.namespace = result.namespace.replace(regexps[i], highlighters[i]);
164
- };
165
- return result;
166
- }
167
-
168
- function createResult(info) {
169
- var result = {};
170
- result.title = info[0];
171
- result.namespace = info[1];
172
- result.path = info[2];
173
- result.params = info[3];
174
- result.snippet = info[4];
175
- result.badge = info[6];
176
- return result;
177
- }
178
-
179
- /* ----- Searching ------ */
180
- function performSearch(data, regexps, queries, highlighters, state) {
181
- var searchIndex = data.searchIndex;
182
- var longSearchIndex = data.longSearchIndex;
183
- var info = data.info;
184
- var result = [];
185
- var i = state.from;
186
- var l = searchIndex.length;
187
- var togo = CHUNK_SIZE;
188
- var matchFunc, hltFunc;
189
-
190
- while (state.pass < 4 && state.limit > 0 && togo > 0) {
191
- if (state.pass == 0) {
192
- matchFunc = matchPassBeginning;
193
- hltFunc = highlightQuery;
194
- } else if (state.pass == 1) {
195
- matchFunc = matchPassLongIndex;
196
- hltFunc = highlightQuery;
197
- } else if (state.pass == 2) {
198
- matchFunc = matchPassContains;
199
- hltFunc = highlightQuery;
200
- } else if (state.pass == 3) {
201
- matchFunc = matchPassRegexp;
202
- hltFunc = highlightRegexp;
203
- }
204
-
205
- for (; togo > 0 && i < l && state.limit > 0; i++, togo--) {
206
- if (info[i].n == state.n) continue;
207
- if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) {
208
- info[i].n = state.n;
209
- result.push(hltFunc(info[i], queries, regexps, highlighters));
210
- state.limit--;
211
- }
212
- };
213
- if (searchIndex.length <= i) {
214
- state.pass++;
215
- i = state.from = 0;
216
- } else {
217
- state.from = i;
218
- }
219
- }
220
- return result;
221
- }
222
-
223
- function triggerResults(results, isLast) {
224
- this.handlers.forEach(function(fn) {
225
- fn.call(this, results, isLast)
226
- });
227
- }
228
- }
229
-