learn_writer 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/learn-write +0 -15
- data/lib/learn_writer.rb +5 -1
- data/lib/learn_writer/valid_dot_learn.yml +6 -0
- data/lib/learn_writer/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c470604d5c0f391505898ea0b027db4d992ac19
|
4
|
+
data.tar.gz: bc2cc3876c650ebbaffd92d2f9dcbeb5791e4c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5677e095f8959bd68bb985d99dca2049c2e640cc8a16b5a091a488e4298bb8f27c63f0e96674dac6696d688a982b54b14cccec929436c0775d5058fc5e97d68a
|
7
|
+
data.tar.gz: 7cb3eabb258de78895699b0897a9fe4eee56aa82a2872b0573def559cbaca33fb5d1a977c596498892bea92c71c71f967fd8bf1bfe8fc7fd4a1924422385ebcf
|
data/bin/learn-write
CHANGED
@@ -5,18 +5,3 @@ require_relative '../lib/learn_writer.rb'
|
|
5
5
|
dir = Dir.pwd
|
6
6
|
LearnWriter.new(dir).write_metadata
|
7
7
|
|
8
|
-
# if ARGV.length == 0
|
9
|
-
# dir = Dir.pwd
|
10
|
-
# lint = LearnLinter.new(dir).lint_directory
|
11
|
-
# elsif ARGV.length == 1 && ARGV[0] == "quiet"
|
12
|
-
# dir = File.expand_path(File.dirname(File.dirname(__FILE__)))
|
13
|
-
# lint = LearnLinter.new(dir, "quiet")
|
14
|
-
# elsif ARGV.length > 1 && ARGV[1] == "quiet"
|
15
|
-
# lint = LearnLinter.new(ARGV[0], "quiet").lint_directory
|
16
|
-
# elsif ARGV.length > 1 && ARGV[1] != "quiet"
|
17
|
-
# puts "please use 'learn-lint directory_name quiet' or 'learn-lint directory_name"
|
18
|
-
# elsif ARGV.length == 1
|
19
|
-
# lint = LearnLinter.new(ARGV[0]).lint_directory
|
20
|
-
# end
|
21
|
-
|
22
|
-
|
data/lib/learn_writer.rb
CHANGED
@@ -2,8 +2,10 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
class LearnWriter
|
4
4
|
|
5
|
+
VALID_DOT_LEARN = File.open(File.expand_path(File.dirname(__FILE__)) + '/learn_writer/valid_dot_learn.yml')
|
5
6
|
VALID_CONTRIBUTING = File.open(File.expand_path(File.dirname(__FILE__)) + '/learn_writer/valid_contributing.md')
|
6
7
|
VALID_LICENSE = File.open(File.expand_path(File.dirname(__FILE__)) + '/learn_writer/valid_license.md')
|
8
|
+
|
7
9
|
|
8
10
|
attr_accessor :filepath
|
9
11
|
|
@@ -19,7 +21,9 @@ class LearnWriter
|
|
19
21
|
|
20
22
|
def write_dot_learn
|
21
23
|
dot_learn = "#{filepath}/.learn"
|
22
|
-
|
24
|
+
dot_learn_content = File.read(VALID_DOT_LEARN)
|
25
|
+
file = FileUtils.touch(dot_learn)[0]
|
26
|
+
File.open(file, 'w') { |file| file.write(dot_learn_content) }
|
23
27
|
end
|
24
28
|
|
25
29
|
def write_contributing
|
data/lib/learn_writer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: learn_writer
|
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
|
- Sophie DeBenedetto
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- bin/learn-write
|
64
64
|
- lib/learn_writer.rb
|
65
65
|
- lib/learn_writer/valid_contributing.md
|
66
|
+
- lib/learn_writer/valid_dot_learn.yml
|
66
67
|
- lib/learn_writer/valid_license.md
|
67
68
|
- lib/learn_writer/version.rb
|
68
69
|
homepage: ''
|