mailbot 0.0.2 → 0.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/README.md +5 -0
- data/lib/mailbot/command_factory.rb +2 -2
- data/lib/mailbot/commands/sync.rb +5 -4
- data/lib/mailbot/errors.rb +1 -4
- data/lib/mailbot/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f4d24f529776193f5a69492e1bf7168a6dc8c19
|
|
4
|
+
data.tar.gz: b12bfb405e21dd0d3331c2716079d8bcecd0daaf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c48005df6b2eb41f5a88a3e13f5b5f548dd04b9f08f211290c4c624418a76cda74b8bef450b519c73f4980614bb2e5fe3ec6692b284529e69ab79e13a7e4752a
|
|
7
|
+
data.tar.gz: 9d1546b7fa3fb80ba215f3ab7dcb222251b0a91cfe855a72f535f24eda8b1560e18c07f8c34db004cee26fe467ccef33fb84d03e9361f4c26d327382282a3b1c
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ module Mailbot
|
|
|
15
15
|
# @return [Mailbot::Commands::Base]
|
|
16
16
|
def create
|
|
17
17
|
command_class.new @argv
|
|
18
|
-
rescue Errors::
|
|
18
|
+
rescue Errors::CommandNotFound
|
|
19
19
|
terminate
|
|
20
20
|
end
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ module Mailbot
|
|
|
26
26
|
when "sync"
|
|
27
27
|
Commands::Sync
|
|
28
28
|
else
|
|
29
|
-
raise Errors::
|
|
29
|
+
raise Errors::CommandNotFound
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -2,6 +2,9 @@ module Mailbot
|
|
|
2
2
|
module Commands
|
|
3
3
|
class Sync < Base
|
|
4
4
|
|
|
5
|
+
DEFAULT_MARKDOWN_FILE = "index.md"
|
|
6
|
+
DEFAULT_ENV_FILE = ".env"
|
|
7
|
+
|
|
5
8
|
# @param argv [Array] ARGV
|
|
6
9
|
def initialize(argv)
|
|
7
10
|
@argv = argv
|
|
@@ -20,13 +23,11 @@ module Mailbot
|
|
|
20
23
|
end
|
|
21
24
|
|
|
22
25
|
def file
|
|
23
|
-
|
|
24
|
-
raise Errors::CommandPreconditionError.new "option `file` must be specified" unless option
|
|
25
|
-
option
|
|
26
|
+
options[:file] || DEFAULT_MARKDOWN_FILE
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
def env
|
|
29
|
-
options[:env] ||
|
|
30
|
+
options[:env] || DEFAULT_ENV_FILE
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
def options
|
data/lib/mailbot/errors.rb
CHANGED
data/lib/mailbot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mailbot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- monzou
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dotenv
|
|
@@ -157,11 +157,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
157
157
|
version: '0'
|
|
158
158
|
requirements: []
|
|
159
159
|
rubyforge_project:
|
|
160
|
-
rubygems_version: 2.
|
|
160
|
+
rubygems_version: 2.4.1
|
|
161
161
|
signing_key:
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Learn with Mailbox
|
|
164
164
|
test_files:
|
|
165
165
|
- test/entry_test.rb
|
|
166
166
|
- test/test_helper.rb
|
|
167
|
-
has_rdoc:
|