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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f34cf65cf7e885083e29e3836b34d9a0b6f34207
4
- data.tar.gz: ae12e069956a8c1c3e353bbbe326c3d8d2935900
3
+ metadata.gz: 7c470604d5c0f391505898ea0b027db4d992ac19
4
+ data.tar.gz: bc2cc3876c650ebbaffd92d2f9dcbeb5791e4c7e
5
5
  SHA512:
6
- metadata.gz: 4d4cbf5431ab6fcdd32d1344755b8020b309178e6a7045ec588a0f1cda914b3fb441595f7dd8d8a384d85c9f0686ab60bc7bf534ec07d729cda42c4d3238dbcc
7
- data.tar.gz: 7a62e3084d77887bde2457ed96e593dd849612236dcc102e0338db859e5056ce9747f4d26f0c3c6047d6f4716f28e27b0f1a15d797257c8e0fbd55328f951b79
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
- FileUtils.touch(dot_learn)
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
@@ -0,0 +1,6 @@
1
+ tags:
2
+ - a tag
3
+ languages:
4
+ - a language
5
+ resources:
6
+ - 0
@@ -1,3 +1,3 @@
1
1
  class LearnWriter
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
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.1
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: ''