personal 0.1.0 → 0.2.0
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/bin/personal +3 -3
- data/lib/personal/version.rb +1 -1
- data/lib/personal.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10874368716c9d616d2e224d0a4ee8da54896342
|
4
|
+
data.tar.gz: 4ec6a383fea739903da133305153758e4ca88db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d225e38034a48cf481febbd7b335ed5906453a937332292de34b1f1bc42d66d2352fa73fd01d7c5336452aac4c00032cc3b2ce2a3fa3d53182a34beacbbb004c
|
7
|
+
data.tar.gz: ba0fb5686ed92e44bd35a3bfb8c56c4d441ef2e3cbb08bb3132b81f694dcc3fbbd35bb95b15fa87a234a1606d4a9b7004773413e684b7832547b4897ae784b8e
|
data/bin/personal
CHANGED
@@ -22,7 +22,7 @@ class PersonalCommand < Thor
|
|
22
22
|
@db_persistence.close_db
|
23
23
|
end
|
24
24
|
|
25
|
-
desc "latest", "List the latest entries that have been saved
|
25
|
+
desc "latest", "List the latest entries that have been saved"
|
26
26
|
method_option :number, :type => :numeric, :required => false, :default => 10, :aliases => "-n", :desc => "The number of entries to list."
|
27
27
|
def latest
|
28
28
|
init
|
@@ -30,7 +30,7 @@ class PersonalCommand < Thor
|
|
30
30
|
@db_persistence.close_db
|
31
31
|
end
|
32
32
|
|
33
|
-
desc "add", "Add a new entry to the personal diary
|
33
|
+
desc "add", "Add a new entry to the personal diary"
|
34
34
|
method_option :text, :type => :string, :required => true, :aliases => "-t", :desc => "The text to save."
|
35
35
|
def add
|
36
36
|
init
|
@@ -44,7 +44,7 @@ class PersonalCommand < Thor
|
|
44
44
|
@db_persistence.close_db
|
45
45
|
end
|
46
46
|
|
47
|
-
desc "delete", "Delete an entry by a given id
|
47
|
+
desc "delete", "Delete an entry by a given id"
|
48
48
|
method_option :id, :type => :numeric, :required => true, :aliases => "-i", :desc => "The id number of entry to delete."
|
49
49
|
def delete
|
50
50
|
init
|
data/lib/personal/version.rb
CHANGED
data/lib/personal.rb
CHANGED
@@ -60,8 +60,8 @@ module Personal
|
|
60
60
|
@db.execute("select * from (select * from personal order by created_at desc limit ?) order by created_at ASC", limit)
|
61
61
|
end
|
62
62
|
|
63
|
-
def entries_by_year_and_month(year, month
|
64
|
-
@db.execute("select * from (select * from personal where cast(strftime('%Y', created_at) as integer) = ? and cast(strftime('%m', created_at) as integer) = ? order by created_at DESC
|
63
|
+
def entries_by_year_and_month(year, month)
|
64
|
+
@db.execute("select * from (select * from personal where cast(strftime('%Y', created_at) as integer) = ? and cast(strftime('%m', created_at) as integer) = ? order by created_at DESC) order by created_at ASC", year, month)
|
65
65
|
end
|
66
66
|
|
67
67
|
def entries_by_year_month_day(year, month, day)
|