hanreki 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: 3ce2183461786fb22b00f52b7717e8c378b3ee42
4
- data.tar.gz: e8989a1d2a10e6b4c54bdcfdd22751c558fb84af
3
+ metadata.gz: 395972bffaf10e75dfad3d22b2268c6a060849eb
4
+ data.tar.gz: 3314444194feac005d0a3b60b32ca32461dcf023
5
5
  SHA512:
6
- metadata.gz: 56ab148a883d11a01bb45a789555aea9e22334638954d709af39b49ed459a626fdc5fd4c58a7ad0d1b31b0d969a35c255dc0b001e07cf1be30fd8d5e09cfacde
7
- data.tar.gz: 957ee0ac1079a57dc19f1b25bcda5d04988726d54ce003ba5439c98c48e6da44bc9c7b45d378949fb55d8cbef8373d3586269040028e10d8d1d57a9d1e2c51fa
6
+ metadata.gz: 485511b7aa245431a830cdfe2e668510867eb4e2e769aafeef90aea791e70d263a26a55506a98aee4b52038656396f3aceb582525ccdc25d357be87cada8c0b5
7
+ data.tar.gz: 76b42cba54bee5721c51781c367df5711279deecbf50b4982952bb989790be47a8be9856b1241db43e169914e3fb3da968d5a1befabd088076729121f5ad0ced
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 CAMPHOR-
3
+ Copyright (c) 2015-2016 CAMPHOR-
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Hanreki
2
2
 
3
3
  [![Build Status](https://travis-ci.org/camphor-/hanreki.svg?branch=master)](https://travis-ci.org/camphor-/hanreki)
4
+ [![Gem Version](https://badge.fury.io/rb/hanreki.svg)](https://badge.fury.io/rb/hanreki)
4
5
 
5
6
  Simple schedule manager for [CAMPHOR-](https://camph.net/)
6
7
 
data/lib/hanreki/cli.rb CHANGED
@@ -2,6 +2,7 @@ require 'date'
2
2
  require 'thor'
3
3
  require 'hanreki/schedule'
4
4
  require 'hanreki/time_util'
5
+ require 'hanreki/version'
5
6
 
6
7
  module Hanreki
7
8
  class CLI < Thor
@@ -47,6 +48,12 @@ module Hanreki
47
48
  end
48
49
  end
49
50
 
51
+ desc 'version', 'Show the version information'
52
+ def version
53
+ puts "hanreki v#{VERSION}"
54
+ end
55
+ map '--version' => :version
56
+
50
57
  private
51
58
 
52
59
  # Parse a string (YYYYMM) in options[:date] and returns [YYYY, MM]
data/lib/hanreki/event.rb CHANGED
@@ -85,6 +85,12 @@ class Event
85
85
  raise ArgumentError, 'both summaries are not set'
86
86
  end
87
87
 
88
+ if @public_summary == 'Open'
89
+ if @start == @end
90
+ raise ArgumentError, '"open" event should have duration'
91
+ end
92
+ end
93
+
88
94
  if @private_summary == 'Closed'
89
95
  if not @public_summary.nil?
90
96
  raise ArgumentError, 'invalid public summary for a closed event'
@@ -1,3 +1,3 @@
1
1
  module Hanreki
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanreki
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
  - CAMPHOR-
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor