standup_md 0.3.10 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +2 -4
  5. data/Rakefile +1 -1
  6. data/lib/standup_md/cli/helpers.rb +3 -8
  7. data/lib/standup_md/config/cli.rb +3 -2
  8. data/lib/standup_md/config/entry_list.rb +0 -2
  9. data/lib/standup_md/config/file.rb +11 -15
  10. data/lib/standup_md/entry.rb +1 -1
  11. data/lib/standup_md/entry_list.rb +12 -6
  12. data/lib/standup_md/file/helpers.rb +7 -2
  13. data/lib/standup_md/version.rb +3 -1
  14. data/standup_md.gemspec +2 -2
  15. metadata +3 -60
  16. data/doc/README_md.html +0 -393
  17. data/doc/StandupMD/Cli/Helpers.html +0 -146
  18. data/doc/StandupMD/Cli.html +0 -406
  19. data/doc/StandupMD/Config/Cli.html +0 -296
  20. data/doc/StandupMD/Config/Entry.html +0 -240
  21. data/doc/StandupMD/Config/EntryList.html +0 -171
  22. data/doc/StandupMD/Config/File.html +0 -481
  23. data/doc/StandupMD/Config.html +0 -193
  24. data/doc/StandupMD/Entry.html +0 -367
  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/StandupMD.html +0 -238
  29. data/doc/created.rid +0 -15
  30. data/doc/css/fonts.css +0 -167
  31. data/doc/css/rdoc.css +0 -619
  32. data/doc/fonts/Lato-Light.ttf +0 -0
  33. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  34. data/doc/fonts/Lato-Regular.ttf +0 -0
  35. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  36. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  37. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  38. data/doc/images/add.png +0 -0
  39. data/doc/images/arrow_up.png +0 -0
  40. data/doc/images/brick.png +0 -0
  41. data/doc/images/brick_link.png +0 -0
  42. data/doc/images/bug.png +0 -0
  43. data/doc/images/bullet_black.png +0 -0
  44. data/doc/images/bullet_toggle_minus.png +0 -0
  45. data/doc/images/bullet_toggle_plus.png +0 -0
  46. data/doc/images/date.png +0 -0
  47. data/doc/images/delete.png +0 -0
  48. data/doc/images/find.png +0 -0
  49. data/doc/images/loadingAnimation.gif +0 -0
  50. data/doc/images/macFFBgHack.png +0 -0
  51. data/doc/images/package.png +0 -0
  52. data/doc/images/page_green.png +0 -0
  53. data/doc/images/page_white_text.png +0 -0
  54. data/doc/images/page_white_width.png +0 -0
  55. data/doc/images/plugin.png +0 -0
  56. data/doc/images/ruby.png +0 -0
  57. data/doc/images/tag_blue.png +0 -0
  58. data/doc/images/tag_green.png +0 -0
  59. data/doc/images/transparent.png +0 -0
  60. data/doc/images/wrench.png +0 -0
  61. data/doc/images/wrench_orange.png +0 -0
  62. data/doc/images/zoom.png +0 -0
  63. data/doc/index.html +0 -382
  64. data/doc/js/darkfish.js +0 -84
  65. data/doc/js/navigation.js +0 -105
  66. data/doc/js/navigation.js.gz +0 -0
  67. data/doc/js/search.js +0 -110
  68. data/doc/js/search_index.js +0 -1
  69. data/doc/js/search_index.js.gz +0 -0
  70. data/doc/js/searcher.js +0 -229
  71. data/doc/js/searcher.js.gz +0 -0
  72. data/doc/table_of_contents.html +0 -401
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 911436a3ca07345eb0085c99efa994e3e56732f2d7de641a2a427c2ce02d0407
4
- data.tar.gz: ba4eba776394f67ef44f02a0033374748da0b036b7a4384062e618e1b7f376bf
3
+ metadata.gz: e9e2449a7136b2b9b9633db530b2304ddc986050bb404c951cb0da1cb299330b
4
+ data.tar.gz: 52106b7870dee25cf07070fd6e6ff689c84e3142bdb1249077f8ea757d56eac1
5
5
  SHA512:
6
- metadata.gz: 2e7fa07198da5f302671be61e83c21052f1f8c5a99cb25a0d4bb0c2963fc12489c1bac338523048be6cf14efad53754c5b4eb6cda8bc78cfe42a02b95a115ef6
7
- data.tar.gz: f6abec7ecb3171139fedf90e3ead734ab06d580bad3d958186f931513b4c78cc747615557e620aa2b0e96e9060727518564e7334ab8d70a6f6810b8a68c0285b
6
+ metadata.gz: 27248294c5f4d85bb5b1c4ae5df44d4133bfbe968acc30aba3917df29424f00b56c56bb12ea1219fe0b0c2ce311699f912957f616526db5ee43939c11abf7def
7
+ data.tar.gz: dfc856d09518702f57bc7fdb2a1610ce5143c165340709e067a4509ca7fc7789bd247422f6ac3952a678006789dc939a8f8e12b7f318b3e63cec140dab5c82b3
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  standup_md-*.gem
2
2
  coverage/*
3
+ docs/*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standup_md (0.3.10)
4
+ standup_md (0.3.13)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -9,9 +9,7 @@
9
9
  A highly customizable and automated way to keep track of daily standups in
10
10
  markdown files.
11
11
 
12
- View on: [Github](https://github.com/evanthegrayt/standup_md) |
13
- [GitHub Pages](https://evanthegrayt.github.io/standup_md/) |
14
- [RubyGems](https://rubygems.org/gems/standup_md)
12
+ You can view the documentation [here](https://evanthegrayt.github.io/standup_md/).
15
13
 
16
14
  ## About
17
15
  I've now been at two separate companies where we post our daily standups in a
@@ -263,7 +261,7 @@ end
263
261
 
264
262
  ## API
265
263
  The API is fully documented in the
266
- [RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
264
+ [RDoc Documentation](https://evanthegrayt.github.io/standup_md/).
267
265
 
268
266
  This was mainly written as a command line utility, but the API is very robust,
269
267
  and is available for use in your own projects. A quick example of how to write a
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new do |rdoc|
16
16
  rdoc.main = 'README.md'
17
- rdoc.rdoc_dir = 'doc'
17
+ rdoc.rdoc_dir = 'docs'
18
18
  rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
19
19
  end
20
20
 
@@ -12,10 +12,8 @@ module StandupMD
12
12
  #
13
13
  # @return [nil]
14
14
  def print(entry)
15
- if entry.nil?
16
- puts "No record found for #{config.cli.date}"
17
- return
18
- end
15
+ return puts "No record found for #{config.cli.date}" if entry.nil?
16
+
19
17
  puts header(entry)
20
18
  config.file.sub_header_order.each do |header_type|
21
19
  tasks = entry.public_send(header_type)
@@ -142,7 +140,6 @@ module StandupMD
142
140
  # @return [Array]
143
141
  def previous_entry(file)
144
142
  return config.entry.previous_entry unless config.cli.auto_fill_previous
145
-
146
143
  return prev_entry(prev_file.load.entries) if file.new? && prev_file
147
144
 
148
145
  prev_entry(file.entries)
@@ -155,9 +152,7 @@ module StandupMD
155
152
  #
156
153
  # @return [StandupMD::Entry]
157
154
  def prev_entry(entries)
158
- return [] if entries.empty?
159
-
160
- entries.last.current
155
+ entries.empty? ? [] : entries.last.current
161
156
  end
162
157
 
163
158
  ##
@@ -19,8 +19,9 @@ module StandupMD
19
19
  write: true,
20
20
  print: false,
21
21
  auto_fill_previous: true,
22
- preference_file:
23
- ::File.expand_path(::File.join(ENV['HOME'], '.standuprc'))
22
+ preference_file: ::File.expand_path(
23
+ ::File.join(ENV['HOME'], '.standuprc')
24
+ )
24
25
  }.freeze
25
26
 
26
27
  ##
@@ -2,11 +2,9 @@
2
2
 
3
3
  module StandupMD
4
4
  class Config
5
-
6
5
  ##
7
6
  # The configuration class for StandupMD::EntryList
8
7
  class EntryList
9
-
10
8
  ##
11
9
  # The default options.
12
10
  #
@@ -2,11 +2,9 @@
2
2
 
3
3
  module StandupMD
4
4
  class Config
5
-
6
5
  ##
7
6
  # The configuration class for StandupMD::File
8
7
  class File
9
-
10
8
  ##
11
9
  # The default options.
12
10
  #
@@ -156,11 +154,9 @@ module StandupMD
156
154
  #
157
155
  # @return [Integer]
158
156
  def header_depth=(depth)
159
- if !depth.between?(1, 5)
160
- raise 'Header depth out of bounds (1..5)'
161
- elsif depth >= sub_header_depth
162
- @sub_header_depth = depth + 1
163
- end
157
+ raise 'Header depth out of bounds (1..5)' if !depth.between?(1, 5)
158
+
159
+ @sub_header_depth = depth + 1 if depth >= sub_header_depth
164
160
  @header_depth = depth
165
161
  end
166
162
 
@@ -172,11 +168,9 @@ module StandupMD
172
168
  #
173
169
  # @return [Integer]
174
170
  def sub_header_depth=(depth)
175
- if !depth.between?(2, 6)
176
- raise 'Sub-header depth out of bounds (2..6)'
177
- elsif depth <= header_depth
178
- @header_depth = depth - 1
179
- end
171
+ raise 'Sub-header depth out of bounds (2..6)' if !depth.between?(2, 6)
172
+
173
+ @header_depth = depth - 1 if depth <= header_depth
180
174
  @sub_header_depth = depth
181
175
  end
182
176
 
@@ -188,13 +182,15 @@ module StandupMD
188
182
  # @return [String]
189
183
  def bullet_character=(char)
190
184
  raise 'Must be "-" or "*"' unless %w[- *].include?(char)
185
+
191
186
  @bullet_character = char
192
187
  end
193
188
 
194
189
  ##
195
- # Setter for directory. Must be expanded in case the user uses `~` for home.
196
- # If the directory doesn't exist, it will be created. To reset instance
197
- # variables after changing the directory, you'll need to call load.
190
+ # Setter for directory. Must be expanded in case the user uses `~` for
191
+ # home. If the directory doesn't exist, it will be created. To reset
192
+ # instance variables after changing the directory, you'll need to call
193
+ # load.
198
194
  #
199
195
  # @param [String] directory
200
196
  #
@@ -78,8 +78,8 @@ module StandupMD
78
78
  # @param [Array] notes
79
79
  def initialize(date, current, previous, impediments, notes = [])
80
80
  raise unless date.is_a?(Date)
81
- @config = self.class.config
82
81
 
82
+ @config = self.class.config
83
83
  @date = date
84
84
  @current = current
85
85
  @previous = previous
@@ -24,10 +24,9 @@ module StandupMD
24
24
  #
25
25
  # @return [StandupMD::EntryList]
26
26
  def initialize(*entries)
27
+ entries.each { |entry| validate_entry(entry) }
28
+
27
29
  @config = self.class.config
28
- unless entries.all? { |e| e.is_a?(StandupMD::Entry) }
29
- raise ArgumentError, 'Entry must instance of StandupMD::Entry'
30
- end
31
30
  @entries = entries
32
31
  end
33
32
 
@@ -38,9 +37,8 @@ module StandupMD
38
37
  #
39
38
  # @return [Array]
40
39
  def <<(entry)
41
- unless entry.is_a?(StandupMD::Entry)
42
- raise ArgumentError, 'Entry must instance of StandupMD::Entry'
43
- end
40
+ validate_entry(entry)
41
+
44
42
  @entries << entry
45
43
  end
46
44
 
@@ -145,5 +143,13 @@ module StandupMD
145
143
  #
146
144
  # +last+:: The last record in the list.
147
145
  def_delegators :@entries, :each, :empty?, :size, :first, :last
146
+
147
+ private
148
+
149
+ def validate_entry(entry)
150
+ return if entry.is_a?(StandupMD::Entry)
151
+
152
+ raise ArgumentError, 'Entry must be an instance of StandupMD::Entry'
153
+ end
148
154
  end
149
155
  end
@@ -40,7 +40,10 @@ module StandupMD
40
40
 
41
41
  def new_entry(record) # :nodoc:
42
42
  Entry.new(
43
- Date.strptime(record['header'], StandupMD.config.file.header_date_format),
43
+ Date.strptime(
44
+ record['header'],
45
+ StandupMD.config.file.header_date_format
46
+ ),
44
47
  record[StandupMD.config.file.current_header],
45
48
  record[StandupMD.config.file.previous_header],
46
49
  record[StandupMD.config.file.impediments_header],
@@ -49,7 +52,9 @@ module StandupMD
49
52
  end
50
53
 
51
54
  def header(date)
52
- '#' * StandupMD.config.file.header_depth + ' ' + date.strftime(StandupMD.config.file.header_date_format)
55
+ '#' * StandupMD.config.file.header_depth +
56
+ ' ' +
57
+ date.strftime(StandupMD.config.file.header_date_format)
53
58
  end
54
59
 
55
60
  def sub_header(subhead)
@@ -21,7 +21,7 @@ module StandupMD
21
21
  # Patch version.
22
22
  #
23
23
  # @return [Integer]
24
- PATCH = 10
24
+ PATCH = 14
25
25
 
26
26
  ##
27
27
  # Version as +[MAJOR, MINOR, PATCH]+
@@ -47,4 +47,6 @@ module StandupMD
47
47
  Hash[%i[major minor patch].zip(to_a)]
48
48
  end
49
49
  end
50
+
51
+ VERSION = StandupMD::Version.to_s
50
52
  end
data/standup_md.gemspec CHANGED
@@ -2,7 +2,7 @@ require_relative 'lib/standup_md/version'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'standup_md'
5
- spec.version = StandupMD::Version.to_s
5
+ spec.version = StandupMD::VERSION
6
6
  spec.authors = ['Evan Gray']
7
7
  spec.email = 'evanthegrayt@vivaldi.net'
8
8
  spec.license = 'MIT'
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.metadata['source_code_uri'] =
23
23
  'https://github.com/evanthegrayt/standup_md'
24
24
  spec.metadata['documentation_uri'] =
25
- 'https://evanthegrayt.github.io/standup_md/doc/index.html'
25
+ 'https://evanthegrayt.github.io/standup_md/'
26
26
 
27
27
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
28
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-08 00:00:00.000000000 Z
11
+ date: 2021-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,63 +80,6 @@ files:
80
80
  - Rakefile
81
81
  - _config.yml
82
82
  - bin/standup
83
- - doc/README_md.html
84
- - doc/StandupMD.html
85
- - doc/StandupMD/Cli.html
86
- - doc/StandupMD/Cli/Helpers.html
87
- - doc/StandupMD/Config.html
88
- - doc/StandupMD/Config/Cli.html
89
- - doc/StandupMD/Config/Entry.html
90
- - doc/StandupMD/Config/EntryList.html
91
- - doc/StandupMD/Config/File.html
92
- - doc/StandupMD/Entry.html
93
- - doc/StandupMD/EntryList.html
94
- - doc/StandupMD/File.html
95
- - doc/StandupMD/Version.html
96
- - doc/created.rid
97
- - doc/css/fonts.css
98
- - doc/css/rdoc.css
99
- - doc/fonts/Lato-Light.ttf
100
- - doc/fonts/Lato-LightItalic.ttf
101
- - doc/fonts/Lato-Regular.ttf
102
- - doc/fonts/Lato-RegularItalic.ttf
103
- - doc/fonts/SourceCodePro-Bold.ttf
104
- - doc/fonts/SourceCodePro-Regular.ttf
105
- - doc/images/add.png
106
- - doc/images/arrow_up.png
107
- - doc/images/brick.png
108
- - doc/images/brick_link.png
109
- - doc/images/bug.png
110
- - doc/images/bullet_black.png
111
- - doc/images/bullet_toggle_minus.png
112
- - doc/images/bullet_toggle_plus.png
113
- - doc/images/date.png
114
- - doc/images/delete.png
115
- - doc/images/find.png
116
- - doc/images/loadingAnimation.gif
117
- - doc/images/macFFBgHack.png
118
- - doc/images/package.png
119
- - doc/images/page_green.png
120
- - doc/images/page_white_text.png
121
- - doc/images/page_white_width.png
122
- - doc/images/plugin.png
123
- - doc/images/ruby.png
124
- - doc/images/tag_blue.png
125
- - doc/images/tag_green.png
126
- - doc/images/transparent.png
127
- - doc/images/wrench.png
128
- - doc/images/wrench_orange.png
129
- - doc/images/zoom.png
130
- - doc/index.html
131
- - doc/js/darkfish.js
132
- - doc/js/navigation.js
133
- - doc/js/navigation.js.gz
134
- - doc/js/search.js
135
- - doc/js/search_index.js
136
- - doc/js/search_index.js.gz
137
- - doc/js/searcher.js
138
- - doc/js/searcher.js.gz
139
- - doc/table_of_contents.html
140
83
  - lib/standup_md.rb
141
84
  - lib/standup_md/cli.rb
142
85
  - lib/standup_md/cli/helpers.rb
@@ -158,7 +101,7 @@ metadata:
158
101
  allowed_push_host: https://rubygems.org
159
102
  homepage_uri: https://evanthegrayt.github.io/standup_md/
160
103
  source_code_uri: https://github.com/evanthegrayt/standup_md
161
- documentation_uri: https://evanthegrayt.github.io/standup_md/doc/index.html
104
+ documentation_uri: https://evanthegrayt.github.io/standup_md/
162
105
  post_install_message:
163
106
  rdoc_options: []
164
107
  require_paths: