mailbot 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9359f348fbe935c4fe446d9da7130ba9554a2a34
4
- data.tar.gz: 37e498478b89c2e999c6f64c352ea7aa3ae53fdd
3
+ metadata.gz: 0f4d24f529776193f5a69492e1bf7168a6dc8c19
4
+ data.tar.gz: b12bfb405e21dd0d3331c2716079d8bcecd0daaf
5
5
  SHA512:
6
- metadata.gz: a9a6bf3127c8fd89ca0380092bc3c87f0f0e603d61aeb5c080d3c25c9fe40b1ee56e7c396b9afc6798226ab6d7b80689a19bc0e08859f8f4f1f04c8c58ceab9e
7
- data.tar.gz: b9a9f653a8da0b924c3ad045e47b46671f3f5694438e6a0b126408a7d28adc03620f53527dd7aaf1eb4638f1ad04d6fcf42c3edc3f1f3f527fbe93c5acff58be
6
+ metadata.gz: c48005df6b2eb41f5a88a3e13f5b5f548dd04b9f08f211290c4c624418a76cda74b8bef450b519c73f4980614bb2e5fe3ec6692b284529e69ab79e13a7e4752a
7
+ data.tar.gz: 9d1546b7fa3fb80ba215f3ab7dcb222251b0a91cfe855a72f535f24eda8b1560e18c07f8c34db004cee26fe467ccef33fb84d03e9361f4c26d327382282a3b1c
data/README.md CHANGED
@@ -7,3 +7,8 @@ Learn with [Mailbox](http://www.mailboxapp.com/)
7
7
  ```
8
8
  $ mailbot sync --file study.md
9
9
  ```
10
+
11
+ ## Options
12
+
13
+ - file : The path to the markdown file to sync
14
+ - env : The path to the env file to sync
@@ -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::CommandNotFoundError
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::CommandNotFoundError
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
- option = options[:file]
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] || ".env"
30
+ options[:env] || DEFAULT_ENV_FILE
30
31
  end
31
32
 
32
33
  def options
@@ -4,10 +4,7 @@ module Mailbot
4
4
  class Base < StandardError
5
5
  end
6
6
 
7
- class CommandNotFoundError < Base
8
- end
9
-
10
- class CommandPreconditionError < Base
7
+ class CommandNotFound < Base
11
8
  end
12
9
 
13
10
  end
@@ -1,3 +1,3 @@
1
1
  module Mailbot
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-29 00:00:00.000000000 Z
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.2.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: