defoker 0.0.1 → 0.0.2
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/README.md +5 -3
- data/bin/defoker +3 -3
- data/lib/defoker/version.rb +1 -1
- data/lib/defoker_core.rb +3 -3
- data/spec/defoker_core_spec.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: fb2b7961c1e61463048cfb58e75e1aed086ddc04
|
4
|
+
data.tar.gz: 8af9acf457c8468ab0a31f4b546e1858ec42a0a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 170da57763f50b9bd714b3c1ffbb2f3f8448fc54e75eb2f8e2503b282f3e6a0b1f83310efb75baec9be83d0a8fe3e18db9df23f5361c65b7f90695d725980064
|
7
|
+
data.tar.gz: 43b090bc37769642db531a209b22d6cf48391ff33738a242cbdf1b925e341d6df61e6b602349853193ed8840679177e6a2218821f8e7845c6ea60396cdf62b60
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Defoker
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/defoker)
|
3
4
|
[](https://travis-ci.org/tbpgr/defoker)
|
4
5
|
[](https://coveralls.io/r/tbpgr/defoker)
|
5
6
|
|
@@ -54,12 +55,12 @@ $ ls -F | grep /
|
|
54
55
|
20141001_hoge/
|
55
56
|
~~~
|
56
57
|
|
57
|
-
###
|
58
|
+
### tomorrow
|
58
59
|
* no additional text
|
59
60
|
|
60
61
|
~~~bash
|
61
62
|
# execute at 2014/10/01
|
62
|
-
$ defoker
|
63
|
+
$ defoker tomorrow
|
63
64
|
$ ls -F | grep /
|
64
65
|
20141002/
|
65
66
|
~~~
|
@@ -68,7 +69,7 @@ $ ls -F | grep /
|
|
68
69
|
|
69
70
|
~~~bash
|
70
71
|
# execute at 2014/10/01
|
71
|
-
$ defoker
|
72
|
+
$ defoker tomorrow -a hoge
|
72
73
|
$ ls -F | grep /
|
73
74
|
20141002_hoge/
|
74
75
|
~~~
|
@@ -273,6 +274,7 @@ $ ls -F | grep /
|
|
273
274
|
~~~
|
274
275
|
|
275
276
|
## History
|
277
|
+
* version 0.0.2 : Fix typo and change public interface tommorow to tomorrow.
|
276
278
|
* version 0.0.1 : First release.
|
277
279
|
|
278
280
|
## Contributing
|
data/bin/defoker
CHANGED
@@ -19,9 +19,9 @@ module Defoker
|
|
19
19
|
end
|
20
20
|
|
21
21
|
option :additional, aliases: 'a'
|
22
|
-
desc '
|
23
|
-
def
|
24
|
-
defoker_core_single_caller(:
|
22
|
+
desc 'tomorrow', 'create tomorrow folder. ex) 20140913, 20140913_hoge'
|
23
|
+
def tomorrow
|
24
|
+
defoker_core_single_caller(:tomorrow)
|
25
25
|
end
|
26
26
|
|
27
27
|
option :additional, aliases: 'a'
|
data/lib/defoker/version.rb
CHANGED
data/lib/defoker_core.rb
CHANGED
@@ -15,11 +15,11 @@ module Defoker
|
|
15
15
|
DateBaseName.new.to_yyyymmdd(Date.today, additional: additional)
|
16
16
|
end
|
17
17
|
|
18
|
-
# Get
|
18
|
+
# Get tomorrow folder name
|
19
19
|
#
|
20
20
|
# @param [String] additional additional name
|
21
|
-
# @return [String]
|
22
|
-
def
|
21
|
+
# @return [String] tomorrow folder name
|
22
|
+
def tomorrow(additional: '')
|
23
23
|
DateBaseName.new.to_yyyymmdd(Date.today + 1, additional: additional)
|
24
24
|
end
|
25
25
|
|
data/spec/defoker_core_spec.rb
CHANGED
@@ -55,7 +55,7 @@ describe Defoker::Core do
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
context :
|
58
|
+
context :tomorrow do
|
59
59
|
cases = [
|
60
60
|
{
|
61
61
|
case_no: 1,
|
@@ -87,7 +87,7 @@ describe Defoker::Core do
|
|
87
87
|
Timecop.travel(Time.local(c[:dummy_year], c[:dummy_month], c[:dummy_day]))
|
88
88
|
|
89
89
|
# -- when --
|
90
|
-
actual = defoker_core.
|
90
|
+
actual = defoker_core.tomorrow(additional: c[:additional])
|
91
91
|
|
92
92
|
# -- then --
|
93
93
|
expect(actual).to eq(c[:expected])
|