standup_md 0.3.3 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,40 +2,38 @@
2
2
 
3
3
  module StandupMD
4
4
  class File
5
-
6
5
  ##
7
6
  # Module responsible for reading and writing standup files.
8
7
  module Helpers # :nodoc:
9
-
10
8
  private
11
9
 
12
- def is_header?(line) # :nodoc:
10
+ def header?(line) # :nodoc:
13
11
  line.match(header_regex)
14
12
  end
15
13
 
16
- def is_sub_header?(line) # :nodoc:
14
+ def sub_header?(line) # :nodoc:
17
15
  line.match(sub_header_regex)
18
16
  end
19
17
 
20
18
  def header_regex # :nodoc:
21
- %r{^#{'#' * StandupMD.config.file.header_depth}\s+}
19
+ /^#{'#' * StandupMD.config.file.header_depth}\s+/
22
20
  end
23
21
 
24
22
  def sub_header_regex # :nodoc:
25
- %r{^#{'#' * StandupMD.config.file.sub_header_depth}\s+}
23
+ /^#{'#' * StandupMD.config.file.sub_header_depth}\s+/
26
24
  end
27
25
 
28
26
  def bullet_character_regex # :nodoc:
29
- %r{\s*#{StandupMD.config.file.bullet_character}\s*}
27
+ /\s*#{StandupMD.config.file.bullet_character}\s*/
30
28
  end
31
29
 
32
30
  def determine_section_type(line) # :nodoc:
33
- line = line.sub(%r{^\#{#{StandupMD.config.file.sub_header_depth}}\s*}, '')
34
- [
35
- StandupMD.config.file.current_header,
36
- StandupMD.config.file.previous_header,
37
- StandupMD.config.file.impediments_header,
38
- StandupMD.config.file.notes_header
31
+ line = line.sub(/^\#{#{StandupMD.config.file.sub_header_depth}}\s*/, '')
32
+ [
33
+ StandupMD.config.file.current_header,
34
+ StandupMD.config.file.previous_header,
35
+ StandupMD.config.file.impediments_header,
36
+ StandupMD.config.file.notes_header
39
37
  ].each { |header| return header if line.include?(header) }
40
38
  raise "Unrecognized header [#{line}]"
41
39
  end
@@ -54,8 +52,8 @@ module StandupMD
54
52
  '#' * StandupMD.config.file.header_depth + ' ' + date.strftime(StandupMD.config.file.header_date_format)
55
53
  end
56
54
 
57
- def sub_header(sh)
58
- '#' * StandupMD.config.file.sub_header_depth + ' ' + sh
55
+ def sub_header(subhead)
56
+ '#' * StandupMD.config.file.sub_header_depth + ' ' + subhead
59
57
  end
60
58
  end
61
59
  end
@@ -2,8 +2,26 @@
2
2
 
3
3
  module StandupMD
4
4
  ##
5
- # The gem verision
6
- #
7
- # @return [String]
8
- VERSION = '0.3.3'
5
+ # Module that contains all gem version information. Follows semantic
6
+ # versioning. Read: https://semver.org/
7
+ module Version
8
+
9
+ ##
10
+ # Major version.
11
+ MAJOR = 0
12
+
13
+ ##
14
+ # Minor version.
15
+ MINOR = 3
16
+
17
+ ##
18
+ # Patch version.
19
+ PATCH = 8
20
+
21
+ ##
22
+ # Version as +MAJOR.MINOR.PATCH+
23
+ def self.to_s
24
+ "#{MAJOR}.#{MINOR}.#{PATCH}"
25
+ end
26
+ end
9
27
  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
5
+ spec.version = StandupMD::Version.to_s
6
6
  spec.authors = ['Evan Gray']
7
7
  spec.email = 'evanthegrayt@vivaldi.net'
8
8
  spec.license = 'MIT'
@@ -12,25 +12,21 @@ Gem::Specification.new do |spec|
12
12
  spec.description = %q{Generate and edit standups in markdown format}
13
13
  spec.homepage = 'https://evanthegrayt.github.io/standup_md/'
14
14
 
15
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
- # to allow pushing to a single host or delete this section to allow pushing to any host.
17
- if spec.respond_to?(:metadata)
18
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
-
20
- spec.metadata['homepage_uri'] = spec.homepage
21
- spec.metadata['source_code_uri'] = 'https://github.com/evanthegrayt/standup_md'
22
- spec.metadata['documentation_uri'] = 'https://evanthegrayt.github.io/standup_md/doc/index.html'
23
- else
15
+ unless spec.respond_to?(:metadata)
24
16
  raise 'RubyGems 2.0 or newer is required to protect against ' \
25
17
  'public gem pushes.'
26
18
  end
27
19
 
28
- # Specify which files should be added to the gem when it is released.
29
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
30
- # spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
31
- # `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
32
- # end
33
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
21
+ spec.metadata['homepage_uri'] = spec.homepage
22
+ spec.metadata['source_code_uri'] =
23
+ 'https://github.com/evanthegrayt/standup_md'
24
+ spec.metadata['documentation_uri'] =
25
+ 'https://evanthegrayt.github.io/standup_md/doc/index.html'
26
+
27
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
+ f.match(%r{^(test|spec|features)/})
29
+ end
34
30
  spec.bindir = 'bin'
35
31
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
36
32
  spec.require_paths = ['lib']
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.3
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Gray
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2021-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -92,6 +92,7 @@ files:
92
92
  - doc/StandupMD/Entry.html
93
93
  - doc/StandupMD/EntryList.html
94
94
  - doc/StandupMD/File.html
95
+ - doc/StandupMD/Version.html
95
96
  - doc/created.rid
96
97
  - doc/css/fonts.css
97
98
  - doc/css/rdoc.css
@@ -158,7 +159,7 @@ metadata:
158
159
  homepage_uri: https://evanthegrayt.github.io/standup_md/
159
160
  source_code_uri: https://github.com/evanthegrayt/standup_md
160
161
  documentation_uri: https://evanthegrayt.github.io/standup_md/doc/index.html
161
- post_install_message:
162
+ post_install_message:
162
163
  rdoc_options: []
163
164
  require_paths:
164
165
  - lib
@@ -173,8 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
174
  - !ruby/object:Gem::Version
174
175
  version: '0'
175
176
  requirements: []
176
- rubygems_version: 3.1.2
177
- signing_key:
177
+ rubygems_version: 3.2.3
178
+ signing_key:
178
179
  specification_version: 4
179
180
  summary: The cure for all your standup woes
180
181
  test_files: []