learn_writer 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f34cf65cf7e885083e29e3836b34d9a0b6f34207
4
+ data.tar.gz: ae12e069956a8c1c3e353bbbe326c3d8d2935900
5
+ SHA512:
6
+ metadata.gz: 4d4cbf5431ab6fcdd32d1344755b8020b309178e6a7045ec588a0f1cda914b3fb441595f7dd8d8a384d85c9f0686ab60bc7bf534ec07d729cda42c4d3238dbcc
7
+ data.tar.gz: 7a62e3084d77887bde2457ed96e593dd849612236dcc102e0338db859e5056ce9747f4d26f0c3c6047d6f4716f28e27b0f1a15d797257c8e0fbd55328f951b79
data/bin/learn-write ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/learn_writer.rb'
3
+
4
+
5
+ dir = Dir.pwd
6
+ LearnWriter.new(dir).write_metadata
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
+
@@ -0,0 +1,37 @@
1
+ # Contributing to Learn.co Curriculum
2
+
3
+ We're really exited that you're about to contribute to the [open curriculum](https://learn.co/content-license) on [Learn.co](https://learn.co). If this is your first time contributing, please continue reading to learn how to make the most meaningful and useful impact possible.
4
+
5
+ ## Raising an Issue to Encourage a Contribution
6
+
7
+ If you notice a problem with the curriculum that you believe needs improvement
8
+ but you're unable to make the change yourself, you should raise a Github issue
9
+ containing a clear description of the problem. Include relevant snippets of
10
+ the content and/or screenshots if applicable. Curriculum owners regularly review
11
+ issue lists and your issue will be prioritized and addressed as appropriate.
12
+
13
+ ## Submitting a Pull Request to Suggest an Improvement
14
+
15
+ If you see an opportunity for improvement and can make the change yourself go
16
+ ahead and use a typical git workflow to make it happen:
17
+
18
+ * Fork this curriculum repository
19
+ * Make the change on your fork, with descriptive commits in the standard format
20
+ * Open a Pull Request against this repo
21
+
22
+ A curriculum owner will review your change and approve or comment on it in due
23
+ course.
24
+
25
+ # Why Contribute?
26
+
27
+ Curriculum on Learn is publicly and freely available under Learn's
28
+ [Educational Content License](https://learn.co/content-license). By
29
+ embracing an open-source contribution model, our goal is for the curriculum
30
+ on Learn to become, in time, the best educational content the world has
31
+ ever seen.
32
+
33
+ We need help from the community of Learners to maintain and improve the
34
+ educational content. Everything from fixing typos, to correcting
35
+ out-dated information, to improving exposition, to adding better examples,
36
+ to fixing tests—all contributions to making the curriculum more effective are
37
+ welcome.
@@ -0,0 +1,7 @@
1
+ #Learn.co Educational Content License
2
+
3
+ Copyright (c) 2015 Flatiron School, Inc
4
+
5
+ The Flatiron School, Inc. owns this Educational Content. However, the Flatiron School supports the development and availability of educational materials in the public domain. Therefore, the Flatiron School grants Users of the Flatiron Educational Content set forth in this repository certain rights to reuse, build upon and share such Educational Content subject to the terms of the Educational Content License set forth [here](http://learn.co/content-license) (http://learn.co/content-license). You must read carefully the terms and conditions contained in the Educational Content License as such terms govern access to and use of the Educational Content.
6
+
7
+ Flatiron School is willing to allow you access to and use of the Educational Content only on the condition that you accept all of the terms and conditions contained in the Educational Content License set forth [here](http://learn.co/content-license) (http://learn.co/content-license). By accessing and/or using the Educational Content, you are agreeing to all of the terms and conditions contained in the Educational Content License. If you do not agree to any or all of the terms of the Educational Content License, you are prohibited from accessing, reviewing or using in any way the Educational Content.
@@ -0,0 +1,3 @@
1
+ class LearnWriter
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,39 @@
1
+ require 'fileutils'
2
+
3
+ class LearnWriter
4
+
5
+ VALID_CONTRIBUTING = File.open(File.expand_path(File.dirname(__FILE__)) + '/learn_writer/valid_contributing.md')
6
+ VALID_LICENSE = File.open(File.expand_path(File.dirname(__FILE__)) + '/learn_writer/valid_license.md')
7
+
8
+ attr_accessor :filepath
9
+
10
+ def initialize(filepath)
11
+ @filepath = filepath
12
+ end
13
+
14
+ def write_metadata
15
+ write_dot_learn
16
+ write_contributing
17
+ write_license
18
+ end
19
+
20
+ def write_dot_learn
21
+ dot_learn = "#{filepath}/.learn"
22
+ FileUtils.touch(dot_learn)
23
+ end
24
+
25
+ def write_contributing
26
+ contributing = "#{filepath}/CONTRIBUTING.md"
27
+ contributing_content = File.read(VALID_CONTRIBUTING)
28
+ file = FileUtils.touch(contributing)[0]
29
+ File.open(file, 'w') { |file| file.write(contributing_content) }
30
+ end
31
+
32
+ def write_license
33
+ license = "#{filepath}/LICENSE.md"
34
+ license_content = File.read(VALID_LICENSE)
35
+ file = FileUtils.touch(license)[0]
36
+ File.open(file, 'w') { |file| file.write(license_content) }
37
+
38
+ end
39
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: learn_writer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Sophie DeBenedetto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
56
+ email:
57
+ - sophie.debenedetto@gmail.com
58
+ executables:
59
+ - learn-write
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - bin/learn-write
64
+ - lib/learn_writer.rb
65
+ - lib/learn_writer/valid_contributing.md
66
+ - lib/learn_writer/valid_license.md
67
+ - lib/learn_writer/version.rb
68
+ homepage: ''
69
+ licenses:
70
+ - MIT
71
+ metadata:
72
+ allowed_push_host: https://rubygems.org
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubyforge_project:
89
+ rubygems_version: 2.4.8
90
+ signing_key:
91
+ specification_version: 4
92
+ summary: can write a .learn, license, contributing file
93
+ test_files: []