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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e6f7e841df92408a973c1a0e32df3d5a917bf3a
4
- data.tar.gz: b4debcea8c896f2bdb98d83034c0f9f410751856
3
+ metadata.gz: 10874368716c9d616d2e224d0a4ee8da54896342
4
+ data.tar.gz: 4ec6a383fea739903da133305153758e4ca88db7
5
5
  SHA512:
6
- metadata.gz: 07f73790b2ffb4b909d93cc1b7a72eeab6a50b94338e4158cf297598faee488e66bdfe624d419c26382793e030d3dfb98d06d8cd59e8f33829fa430e06defe6b
7
- data.tar.gz: b75daeca6017ce3a16d29b2de744ad965206734ba3a2a98817b4c78868054f721eb31571856b7435f64d4bebc225c2ad1630b52b470dd4fc52813a0e08b5a924
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
@@ -1,3 +1,3 @@
1
1
  module Personal
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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, limit = 31)
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 limit ?) order by created_at ASC", year, month, limit)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: personal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jone Samra