charter 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/charter/doc.rb +14 -13
- data/lib/charter/version.rb +1 -1
- 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: 69983a0f6f77ea4820913ebe28822666098beb74
|
4
|
+
data.tar.gz: 313a90acdee29f9b211cbeacd289cda96533ba9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14d4783d07bf5f6f295dbf73c294083b87079c8d06819706d72af8995679eed58319b71eea71dfb5ad44ee3b4a403fbb9f611aadcff3bf9789e6986d698be03
|
7
|
+
data.tar.gz: d87eb899827736a1e4a2319469d0b8bb6e68a4660dd749c3424f669e48e6b2f94e739695bf5bdd7ef4b3cabaa7d93d2952100d83562e77675a19f8e7f3b7873b
|
data/lib/charter/doc.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
-
require
|
3
|
-
require_relative
|
2
|
+
require 'pstore'
|
3
|
+
require_relative 'ConfigStore'
|
4
4
|
|
5
5
|
class Doc
|
6
|
-
|
7
6
|
def initialize(input = nil)
|
8
7
|
@store = ConfigStore.new
|
9
8
|
@config = read_config
|
10
9
|
end
|
11
10
|
|
12
11
|
def create_charter(name)
|
13
|
-
write_template(name)
|
12
|
+
write_template(name)
|
14
13
|
@config['session_name'] = name
|
15
14
|
@config['current_session'] = "#{@config['session_folder']}/#{name}.md"
|
16
15
|
@config['start_time'] = Time.now.strftime('%l:%M %P')
|
@@ -79,17 +78,19 @@ class Doc
|
|
79
78
|
end
|
80
79
|
|
81
80
|
def find_files_with_tags(tag)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
81
|
+
found_files = false
|
82
|
+
Dir.glob("#{@config['session_folder']}/**/*.md") {|file|
|
83
|
+
if File.read(file).include?("@#{tag}")
|
84
|
+
found_files = true
|
85
|
+
puts file.split('/').last(2).join('/')
|
86
|
+
end
|
87
|
+
}
|
88
|
+
puts "No Charters with that tag" unless found_files
|
87
89
|
end
|
88
90
|
|
89
91
|
def show_all_charters
|
90
|
-
|
91
|
-
|
92
|
-
puts file.split('/')[-1]
|
92
|
+
Dir.glob("#{@config['session_folder']}/**/*.md") do|file|
|
93
|
+
puts file.split('/').last(2).join('/')
|
93
94
|
end
|
94
95
|
end
|
95
96
|
|
@@ -134,6 +135,6 @@ class Doc
|
|
134
135
|
end
|
135
136
|
|
136
137
|
def write_config
|
137
|
-
@store.write('config'
|
138
|
+
@store.write('config', @config)
|
138
139
|
end
|
139
140
|
end
|
data/lib/charter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Grossman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|