dayrb 2.0.2 → 2.0.3
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/bin/day.rb +1 -1
- data/changelog.md +20 -0
- data/dayrb.gemspec +1 -1
- data/readme.md +4 -7
- data/spec/spec_helper.rb +2 -2
- metadata +1 -2
- data/Rakefile +0 -118
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c7ac0153612ed3373be609657a8bf1f728a02e3
|
4
|
+
data.tar.gz: b784f73c240adb63a1f1a09f4f029aa62f6c969e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1ab3833bda41a260a3f0981b147ccf08656cdc1db02f72e75107c4496af79f782c24257d902b53a33d7188a8ab0e2c0cd96603c050e11c48ed82dd4a1816ab8
|
7
|
+
data.tar.gz: 28a9b4dab170b478d43014df35b058df3e549c21ae02405a18513228d19cc9705812388d8099ac22e0cbc5eae6421672ab4f04d8dfb3992b15db5c69029b1828
|
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.3
|
data/bin/day.rb
CHANGED
data/changelog.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
2.0.3 -- 08/17/14
|
2
|
+
------------------
|
3
|
+
|
4
|
+
* Added gem files to gitignore
|
5
|
+
* Pointed spec helper at the correct lib directory (after moving)
|
6
|
+
* Removed Rakefile (unused now with gem distribution)
|
7
|
+
|
8
|
+
2.0.2 -- 08/17/14
|
9
|
+
------------------
|
10
|
+
|
11
|
+
### Gem Distribution:
|
12
|
+
|
13
|
+
* Now available as a gem! 'gem install dayrb'
|
14
|
+
* Reorganized directory structure for gem generation
|
15
|
+
|
16
|
+
### Bug Fixes:
|
17
|
+
|
18
|
+
* Changed shebang to user /usr/bin/env ruby instead of /usr/bin/ruby.
|
19
|
+
* Fixed some spec regressions.
|
20
|
+
|
1
21
|
2.0.1 -- 08/12/14
|
2
22
|
------------------
|
3
23
|
|
data/dayrb.gemspec
CHANGED
data/readme.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
day.rb
|
2
2
|
======
|
3
|
-
(Version 2.0.
|
3
|
+
(Version 2.0.3 -- August 2014)
|
4
4
|
|
5
5
|
A command-line to-do & time-tracking application.
|
6
6
|
|
@@ -14,17 +14,14 @@ Requirements:
|
|
14
14
|
Installation:
|
15
15
|
-------------
|
16
16
|
|
17
|
-
### Method 1:
|
17
|
+
### Method 1 (Recommended): Install as a Gem
|
18
18
|
|
19
|
-
*
|
20
|
-
* Download the latest "one-file distributable" version of day.rb
|
21
|
-
* Stick it in your favorite bin folder. (~/bin)
|
22
|
-
* Chmod it to be executable (chmod +x ~/bin/day.rb)
|
19
|
+
* Simply run 'gem install dayrb' and invoke the executable, 'day.rb'
|
23
20
|
|
24
21
|
### Method 2: Clone the Repository (Entire Folder)
|
25
22
|
|
26
23
|
* Clone the repository to your favorite apps folder. (git clone https://github.com/sanarothe/day.git ~/apps)
|
27
|
-
* Symlink day.rb into your favorite bin folder. (ln -s ~/apps/day/day.rb ~/bin/day)
|
24
|
+
* Symlink day.rb into your favorite bin folder. (ln -s ~/apps/day/bin/day.rb ~/bin/day)
|
28
25
|
* Chmod it to be executable (chmod +x ~/bin/day)
|
29
26
|
|
30
27
|
Usage Overview:
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dayrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Carroll
|
@@ -19,7 +19,6 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- LICENSE
|
22
|
-
- Rakefile
|
23
22
|
- VERSION
|
24
23
|
- bin/day.rb
|
25
24
|
- changelog.md
|
data/Rakefile
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
# Rakefile for day.rb
|
2
|
-
# Author: Cameron Carroll; December 2013
|
3
|
-
# Purpose: Compiles a single-file version of the program for easy distribution and installation.
|
4
|
-
# Also increments version numbers based on VERSION file.
|
5
|
-
|
6
|
-
puts "Day.rb Build Tool"
|
7
|
-
puts "-----------------"
|
8
|
-
|
9
|
-
task :default => [:update_version, :compile]
|
10
|
-
|
11
|
-
task :update_version do
|
12
|
-
current_version = nil
|
13
|
-
open('VERSION', 'r') do |file|
|
14
|
-
current_version = file.gets
|
15
|
-
end
|
16
|
-
|
17
|
-
puts "Current Version: #{current_version}"
|
18
|
-
|
19
|
-
split_version = current_version.split('.')
|
20
|
-
|
21
|
-
next_patch_version = update_patch(split_version, 1)
|
22
|
-
previous_patch_version = update_patch(split_version, -1)
|
23
|
-
|
24
|
-
next_minor_version = update_minor(split_version, 1)
|
25
|
-
previous_minor_version = update_minor(split_version, -1)
|
26
|
-
|
27
|
-
next_major_version = update_major(split_version, 1)
|
28
|
-
previous_major_version = update_major(split_version, -1)
|
29
|
-
|
30
|
-
previous_versions = [previous_patch_version, previous_minor_version, previous_major_version]
|
31
|
-
next_versions = [next_patch_version, next_minor_version, next_major_version]
|
32
|
-
|
33
|
-
# Unlikely to happen, but if the source files get ahead of VERSION file we should warn and break.
|
34
|
-
next_versions.each do |version|
|
35
|
-
next_version_in_dayrb = `grep #{version} day.rb`.length > 0
|
36
|
-
next_version_in_readme = `grep #{version} readme.md`.length > 0
|
37
|
-
|
38
|
-
if next_version_in_dayrb || next_version_in_readme
|
39
|
-
puts "VERSION file is behind source files! Breaking; Please fix manually."
|
40
|
-
abort
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
old_version_in_readme, old_version_in_dayrb, old_version = nil, nil, nil
|
46
|
-
|
47
|
-
# Check authoritative version source (VERSION file) against source files.
|
48
|
-
# If source files have an older version, update it.
|
49
|
-
previous_versions.each do |version|
|
50
|
-
unless old_version_in_dayrb && old_version_in_readme
|
51
|
-
old_version_in_dayrb = `grep #{version} day.rb`.length > 0
|
52
|
-
old_version_in_readme = `grep #{version} readme.md`.length > 0
|
53
|
-
old_version = version if old_version_in_readme || old_version_in_dayrb
|
54
|
-
puts "Version in question: " + version if old_version
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
|
59
|
-
if old_version_in_dayrb
|
60
|
-
puts "Replacing version #{old_version} with #{current_version} in day.rb"
|
61
|
-
`sed -i 's/#{old_version}/#{current_version}/g' day.rb`
|
62
|
-
end
|
63
|
-
|
64
|
-
if old_version_in_readme
|
65
|
-
today_date = Time.new.strftime("%m/%d/%y")
|
66
|
-
puts "Replacing version #{old_version} with #{current_version} in readme.md"
|
67
|
-
puts "Replacing old date with #{today_date} in day.rb"
|
68
|
-
`sed -i 's/#{old_version}/#{current_version}/g' readme.md`
|
69
|
-
`sed -i 's%[0-9][0-9]/[0-9][0-9]/[0-9][0-9])%#{today_date})%' readme.md`
|
70
|
-
end
|
71
|
-
|
72
|
-
if !old_version_in_dayrb && !old_version_in_readme
|
73
|
-
puts "Didn't find any version errors."
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
task :compile do
|
78
|
-
`mkdir -p "build"`
|
79
|
-
target = "build/day.rb"
|
80
|
-
|
81
|
-
`cat /dev/null > #{target}`
|
82
|
-
|
83
|
-
# First we need to find out where to cut day.rb...
|
84
|
-
cut_line = `grep -n "CUT HERE" day.rb`.split(':').first
|
85
|
-
|
86
|
-
# Then we need to get the first chunk of day.rb, which includes intro comments
|
87
|
-
# and user configuration.
|
88
|
-
# But we want to strip off the require statements and the whitespace leftover.
|
89
|
-
`awk 'NR >= 1 && NR <= #{cut_line}' day.rb | sed 's/require_relative.*//g' | uniq >> #{target}`
|
90
|
-
|
91
|
-
# Add all library files:
|
92
|
-
FileList['lib/*.rb'].each do |source|
|
93
|
-
`cat #{source} >> #{target}`
|
94
|
-
`echo "\n" >> #{target}`
|
95
|
-
end
|
96
|
-
|
97
|
-
# Now finally we want to add the remaining body of day.rb
|
98
|
-
lines_in_dayrb = `wc -l day.rb`.to_i
|
99
|
-
`awk 'NR >= #{cut_line} && NR <= #{lines_in_dayrb+1}' day.rb >> #{target}`
|
100
|
-
end
|
101
|
-
|
102
|
-
def update_patch(split_version, increment)
|
103
|
-
different_patch = split_version[2].to_i + increment
|
104
|
-
different_patch_version = split_version[0..1].push(different_patch)
|
105
|
-
different_patch_version.join('.')
|
106
|
-
end
|
107
|
-
|
108
|
-
def update_minor(split_version, increment)
|
109
|
-
different_minor = split_version[1].to_i + increment
|
110
|
-
different_minor_version = [split_version[0],different_minor,split_version[2]]
|
111
|
-
different_minor_version.join('.')
|
112
|
-
end
|
113
|
-
|
114
|
-
def update_major(split_version, increment)
|
115
|
-
different_major = split_version[0].to_i + increment
|
116
|
-
different_major_version = split_version[1,2].unshift(different_major)
|
117
|
-
different_major_version.join('.')
|
118
|
-
end
|