deka 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deka/cli.rb +8 -1
- data/lib/deka/version.rb +1 -1
- data/spec/cli_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c173d10f74c99df0bcf63dce853ad58a285bcab
|
4
|
+
data.tar.gz: 7179e40b8bafa541572d92068f1e0856f150fbd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da5e55d82b80892ac8242c3e7eae133cef823b21890753f7cc88851dceae1d57e66a84d3d0ea6dfa5b9f8141c2a143ee3b8da93e7893468003eb6f8b69577949
|
7
|
+
data.tar.gz: 1ffc02b4c65174051194dd8856accaeea30866310db678cba83c459974de19ec895ba279eaf72e28ded7bee125e37689520f073c0478225619ed467fbf442dad
|
data/lib/deka/cli.rb
CHANGED
@@ -12,7 +12,7 @@ class Deka::Cli
|
|
12
12
|
def initialize(options = {})
|
13
13
|
@config = options[:config] || './deka.yml'
|
14
14
|
@save_file = options[:save] || './.tracked_hash'
|
15
|
-
@base_hash = File.read(save_file).chomp
|
15
|
+
@base_hash = File.exists?(save_file) && File.read(save_file).chomp
|
16
16
|
@dry_run = options[:'dry-run']
|
17
17
|
end
|
18
18
|
|
@@ -38,6 +38,13 @@ class Deka::Cli
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def yaml
|
41
|
+
return @yaml if @yaml
|
42
|
+
|
43
|
+
unless File.exists?(config)
|
44
|
+
puts "You don't have config file(default './deka.yml')"
|
45
|
+
exit 1
|
46
|
+
end
|
47
|
+
|
41
48
|
@yaml = YAML.load(File.read(config))
|
42
49
|
end
|
43
50
|
|
data/lib/deka/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -3,8 +3,8 @@ require 'spec_helper'
|
|
3
3
|
describe Deka::Cli do
|
4
4
|
describe '#run' do
|
5
5
|
context 'when pass config and save_file as argument' do
|
6
|
-
let(:config) {
|
7
|
-
let(:save_file) {
|
6
|
+
let(:config) { './spec/support/sample.yml' }
|
7
|
+
let(:save_file) { './spec/support/.tracked_hash' }
|
8
8
|
let!(:old_hash_txt) { File.read(save_file) }
|
9
9
|
|
10
10
|
after do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- willnet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|