daily_log 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f8d6b8f5bd384395377f8d0804b6b647b3167363bd3b730e150a1edbdbb1188
4
- data.tar.gz: 8910775604dd64a27e94637ca80678715da785f9ab2bda68ea1714a7a7fc5920
3
+ metadata.gz: 55b40ff4be4bbab74b754f403b289ee7160a57f0da3fdac1d0a4a194e4cbae4f
4
+ data.tar.gz: 73bb29930df2be588849df5f1cc872afadce5917a01ac14200333b9e83670f5d
5
5
  SHA512:
6
- metadata.gz: 0c6a936ec9927a5873199fabab264b646f81b10dcb0919cc463ca38e9c5faf107a0316735cdebbf64f29ba2ff9d4442fa5acefa4e84b8f467f09a645114db2f2
7
- data.tar.gz: 65164230b791472f09344cd241696c74208cb479fa518d413fd8e0095dc23f95e3ad03eac69cdcd9182e122f52fad346f3b2dc541427efbd2451e944a78fe89d
6
+ metadata.gz: ec72aa7b6b535f24503fe8e745b49fd1ccc3977a1e32eac72e7551aefa440727ae3ab6bc6bfff6d5b1e0ad9a6735ed2770b8097ac87c4acab74252d7dd540f62
7
+ data.tar.gz: 556d1c798b7bd3c5e0c82e54d37f95280efb311cfbd293c7f3f7d259a75714f6a72d090ae7371b4852e40aae69b5b7af94d9cfff97eb1edda5dc34daf97f9ba1
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ Gemfile.lock
data/Gemfile CHANGED
@@ -5,16 +5,3 @@ source "https://rubygems.org"
5
5
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  gemspec
8
-
9
- group :development do
10
-
11
- gem "yard-tomdoc"
12
-
13
- gem "rake"
14
-
15
- gem "irb", "~> 1.2"
16
-
17
- gem "rspec", "~> 3.9"
18
-
19
- gem "byebug"
20
- end
data/History.md CHANGED
@@ -1,17 +1,14 @@
1
1
 
2
- 2020-01-06 / 2020-01-07
3
- ==================
4
-
5
- * Allow public gem pushing
6
-
7
2
  n.n.n / 2020-01-07
8
3
  ==================
9
4
 
5
+ * Add missing documentation
6
+ * Replace docs rake task with Yard rake task
7
+ * Move gem dependencies to gemspec
8
+ * Allow public gem pushing
10
9
  * Bundle as Rubygem
11
10
  * Update README
12
11
  * Remove YARD files from git repo
13
- * Added documentation
12
+ * Add documentation
14
13
  * Remove .daily_logs from gitignore
15
14
  * Basic working version up and running
16
- * Basic text-file is opening
17
- * Initial commit
data/Rakefile CHANGED
@@ -1,7 +1,18 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- load "lib/tasks/doc.rake"
4
3
 
5
4
  RSpec::Core::RakeTask.new(:spec)
6
5
 
7
6
  task :default => :spec
7
+
8
+ # For docs
9
+ require 'yard'
10
+ require "yard-tomdoc"
11
+
12
+ YARD::Rake::YardocTask.new do |t|
13
+ t.files = ['lib/**/*.rb']
14
+ t.options = ['--plugin=tomdoc', '--hide-void-return', '--title="Daily Log"']
15
+ t.stats_options = ['--list-undoc']
16
+ end
17
+
18
+ task doc: :yard
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "bundler", "~> 1.17"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "rspec", "~> 3.0"
29
+ spec.add_development_dependency "yard-tomdoc"
29
30
  end
@@ -1,11 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DailyLog
4
+
5
+ # Parses options passed into the command-line and returns the desired values
4
6
  class Options
5
7
  require "optparse"
6
8
  require "optparse/date"
7
9
  require "date"
8
10
 
11
+ ##
12
+ # The options as a Hash
13
+ #
14
+ # Returns Hash
9
15
  attr_reader :hash
10
16
 
11
17
  alias to_hash hash
@@ -15,10 +21,14 @@ module DailyLog
15
21
  parse
16
22
  end
17
23
 
24
+ # The default options
25
+ #
26
+ # Returns Hash
18
27
  def defaults
19
28
  { date: Date.today }
20
29
  end
21
30
 
31
+ # Parse the input options and update the {hash} with desired values.
22
32
  def parse
23
33
  OptionParser.new do |opts|
24
34
  opts.banner = "Usage: dl [options]"
@@ -49,4 +59,5 @@ module DailyLog
49
59
  hash[:edit] = (hash[:date] == Date.today) unless hash.key?(:edit)
50
60
  end
51
61
  end
62
+
52
63
  end
@@ -1,3 +1,3 @@
1
1
  module DailyLog
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,5 +1,16 @@
1
1
  # Extends the Integer class with zero-padded numbers, so that months are days
2
- # all always shown as double-digit numbers
2
+ # all always shown as double-digit numbers.
3
+ #
4
+ # Examples
5
+ #
6
+ # class MyClass
7
+ #
8
+ # using ZeroPadded
9
+ #
10
+ # def print_number
11
+ # print 1.zero_pad # => "0.1"
12
+ # end
13
+ #
3
14
  module ZeroPadded
4
15
 
5
16
  refine Integer do
@@ -8,6 +19,6 @@ module ZeroPadded
8
19
  def zero_pad
9
20
  to_s.rjust(2, "0")
10
21
  end
11
-
22
+
12
23
  end
13
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daily_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodacious
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard-tomdoc
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Keep a short, daily log of the work you do within a project repo
56
70
  email:
57
71
  - bodacious@katanacode.com
@@ -67,7 +81,6 @@ files:
67
81
  - ".rspec"
68
82
  - ".travis.yml"
69
83
  - Gemfile
70
- - Gemfile.lock
71
84
  - History.md
72
85
  - LICENSE.txt
73
86
  - README.md
@@ -84,7 +97,6 @@ files:
84
97
  - lib/daily_log/pathname.rb
85
98
  - lib/daily_log/scm_check.rb
86
99
  - lib/daily_log/version.rb
87
- - lib/tasks/doc.rake
88
100
  - lib/templates/daily_log/entry.md.erb
89
101
  - lib/zero_padded.rb
90
102
  homepage: https://github.com/KatanaCode/daily_log
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- daily_log (0.1.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- byebug (11.0.1)
10
- diff-lcs (1.3)
11
- io-console (0.5.4)
12
- irb (1.2.1)
13
- reline (>= 0.0.1)
14
- rake (13.0.1)
15
- reline (0.1.2)
16
- io-console (~> 0.5)
17
- rspec (3.9.0)
18
- rspec-core (~> 3.9.0)
19
- rspec-expectations (~> 3.9.0)
20
- rspec-mocks (~> 3.9.0)
21
- rspec-core (3.9.1)
22
- rspec-support (~> 3.9.1)
23
- rspec-expectations (3.9.0)
24
- diff-lcs (>= 1.2.0, < 2.0)
25
- rspec-support (~> 3.9.0)
26
- rspec-mocks (3.9.1)
27
- diff-lcs (>= 1.2.0, < 2.0)
28
- rspec-support (~> 3.9.0)
29
- rspec-support (3.9.2)
30
- tomparse (0.4.2)
31
- yard (0.9.23)
32
- yard-tomdoc (0.7.1)
33
- tomparse (>= 0.4.0)
34
- yard
35
-
36
- PLATFORMS
37
- ruby
38
-
39
- DEPENDENCIES
40
- bundler (~> 1.17)
41
- byebug
42
- daily_log!
43
- irb (~> 1.2)
44
- rake
45
- rspec (~> 3.9)
46
- yard-tomdoc
47
-
48
- BUNDLED WITH
49
- 1.17.3
@@ -1,12 +0,0 @@
1
- namespace :doc do
2
-
3
- desc "Create the HTML docs for this project"
4
- task :create do
5
- load("lib/daily_log/version.rb")
6
- system("yard doc --plugin tomdoc\
7
- --hide-void-return\
8
- --title \"Daily Logs - #{DailyLog::VERSION}\"")
9
- end
10
- end
11
-
12
- task doc: ["doc:create"]