learn_create 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +40 -0
  3. data/Gemfile +2 -0
  4. data/LICENSE.md +23 -0
  5. data/README.md +30 -0
  6. data/bin/learn_create +4 -0
  7. data/lib/learn_create.rb +121 -58
  8. data/lib/templates/javascript_lab_template/CONTRIBUTING.md +40 -0
  9. data/lib/templates/javascript_lab_template/LICENSE.md +23 -0
  10. data/lib/templates/javascript_lab_template/README.md +15 -0
  11. data/lib/templates/javascript_lab_template/index.html +12 -0
  12. data/lib/templates/javascript_lab_template/index.js +5 -0
  13. data/lib/templates/javascript_lab_template/package-lock.json +1854 -0
  14. data/lib/templates/javascript_lab_template/package.json +21 -0
  15. data/lib/templates/javascript_lab_template/test/helpers.js +20 -0
  16. data/lib/templates/javascript_lab_template/test/indexTest.js +23 -0
  17. data/lib/templates/react-lab-template/README.md +13 -0
  18. data/lib/templates/react-lab-template/package-lock.json +12333 -0
  19. data/lib/templates/react-lab-template/package.json +38 -0
  20. data/lib/templates/react-lab-template/public/index.html +41 -0
  21. data/lib/templates/react-lab-template/public/manifest.json +13 -0
  22. data/lib/templates/react-lab-template/src/App.css +5 -0
  23. data/lib/templates/react-lab-template/src/App.js +18 -0
  24. data/lib/templates/react-lab-template/src/components/Button.js +19 -0
  25. data/lib/templates/react-lab-template/src/components/ExampleComponent.js +15 -0
  26. data/lib/templates/react-lab-template/src/components/Greeting.js +15 -0
  27. data/lib/templates/react-lab-template/src/index.js +8 -0
  28. data/lib/templates/react-lab-template/test/index.test.js +64 -0
  29. data/lib/templates/react-lab-template/test/mocha.opts +4 -0
  30. data/lib/templates/readme_template/CONTRIBUTING.md +40 -0
  31. data/lib/templates/readme_template/LICENSE.md +23 -0
  32. data/lib/templates/readme_template/README.md +16 -0
  33. data/lib/templates/ruby_lab_template/CONTRIBUTING.md +40 -0
  34. data/lib/templates/ruby_lab_template/Gemfile +4 -0
  35. data/lib/templates/ruby_lab_template/Gemfile.lock +32 -0
  36. data/lib/templates/ruby_lab_template/LICENSE.md +23 -0
  37. data/lib/templates/ruby_lab_template/README.md +16 -0
  38. data/lib/templates/ruby_lab_template/lib/example.rb +13 -0
  39. data/lib/templates/ruby_lab_template/spec/example_spec.rb +37 -0
  40. data/lib/templates/ruby_lab_template/spec/spec_helper.rb +64 -0
  41. metadata +43 -5
@@ -0,0 +1,16 @@
1
+ # Title
2
+
3
+ ## Learning Goals
4
+
5
+ -SWBAT 1
6
+ -SWBAT 2
7
+
8
+ ## Introduction
9
+
10
+ ### SWBAT 1
11
+
12
+ ### SWBAT 2
13
+
14
+ ## Conclusion
15
+
16
+ ## Resources
@@ -0,0 +1,13 @@
1
+ def test_method
2
+ 'bears'
3
+ end
4
+
5
+ class ExampleClass
6
+ def self.class_test
7
+ 'in my yard'
8
+ end
9
+
10
+ def instance_test
11
+ 'seriously'
12
+ end
13
+ end
@@ -0,0 +1,37 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'These examples' do
4
+ it 'can be used to confirm if a method is present in required relative' do
5
+ expect { test_method }.not_to raise_error
6
+ end
7
+
8
+ it 'can be used to confirm if a method is not present in required relative' do
9
+ expect { second_test_method }.to raise_error(NameError)
10
+ end
11
+
12
+ it 'can be used to confirm if a method returns expected results in required relative' do
13
+ expect(test_method).to eq('bears') # equal(): strict comparison, eq(): value comparison
14
+ end
15
+
16
+ it 'can be used to confirm if a class contains a specific method' do
17
+ expect(ExampleClass).to respond_to(:class_test)
18
+ end
19
+
20
+ it 'can be used to confirm if an instance method returns the expected results' do
21
+ example = ExampleClass.new
22
+ expect(example.instance_test).to eq('seriously')
23
+ end
24
+
25
+ it 'can be used to match strings' do
26
+ expect('There are two bears in a tree').to match(/bears in a tree/)
27
+ expect("They're both on the same limb").to include('limb')
28
+ end
29
+
30
+ it 'can check types' do
31
+ example = ExampleClass.new
32
+ expect(example).to be_instance_of(ExampleClass)
33
+
34
+ example_array = [1, 2, 3]
35
+ expect(example_array).to be_kind_of(Array)
36
+ end
37
+ end
@@ -0,0 +1,64 @@
1
+ require 'bundler'
2
+ Bundler.require
3
+ require 'yaml'
4
+ require_relative '../lib/example.rb'
5
+
6
+ # This file was generated by the `rspec --init` command. Conventionally, all
7
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
8
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
9
+ # this file to always be loaded, without a need to explicitly require it in any
10
+ # files.
11
+ #
12
+ # Given that it is always loaded, you are encouraged to keep this file as
13
+ # light-weight as possible. Requiring heavyweight dependencies from this file
14
+ # will add to the boot time of your test suite on EVERY test run, even for an
15
+ # individual file that may not need all of that loaded. Instead, consider making
16
+ # a separate helper file that requires the additional dependencies and performs
17
+ # the additional setup, and require it from the spec files that actually need
18
+ # it.
19
+ #
20
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
21
+ RSpec.configure do |config|
22
+ # rspec-expectations config goes here. You can use an alternate
23
+ # assertion/expectation library such as wrong or the stdlib/minitest
24
+ # assertions if you prefer.
25
+ config.expect_with :rspec do |expectations|
26
+ # This option will default to `true` in RSpec 4. It makes the `description`
27
+ # and `failure_message` of custom matchers include text for helper methods
28
+ # defined using `chain`, e.g.:
29
+ # be_bigger_than(2).and_smaller_than(4).description
30
+ # # => "be bigger than 2 and smaller than 4"
31
+ # ...rather than:
32
+ # # => "be bigger than 2"
33
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
34
+ end
35
+
36
+ # rspec-mocks config goes here. You can use an alternate test double
37
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
38
+ config.mock_with :rspec do |mocks|
39
+ # Prevents you from mocking or stubbing a method that does not exist on
40
+ # a real object. This is generally recommended, and will default to
41
+ # `true` in RSpec 4.
42
+ mocks.verify_partial_doubles = true
43
+ end
44
+
45
+ config.shared_context_metadata_behavior = :apply_to_host_groups
46
+ end
47
+
48
+ # To parse and test an HTML file, add 'nokogiri' to Gemfile and uncomment these methods
49
+ # def html_file_contents
50
+ # File.read('./index.html')
51
+ # end
52
+ #
53
+ # def parsed_html
54
+ # Nokogiri::HTML(html_file_contents) do |config|
55
+ # config.strict.dtdload.dtdvalid.noblanks
56
+ # end
57
+ # end
58
+
59
+ # To parse and test a CSS file, add 'css_parser' to Gemfile and uncomment this method
60
+ # def parsed_css
61
+ # parser = CssParser::Parser.new
62
+ # parser.load_uri!('./style.css')
63
+ # parser
64
+ # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn_create
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - flatironschool
@@ -11,15 +11,53 @@ cert_chain: []
11
11
  date: 2018-10-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
- email:
15
- executables: []
14
+ email: maxwell@flatironschool.com
15
+ executables:
16
+ - learn_create
16
17
  extensions: []
17
18
  extra_rdoc_files: []
18
19
  files:
20
+ - CONTRIBUTING.md
19
21
  - Gemfile
22
+ - LICENSE.md
23
+ - README.md
20
24
  - Rakefile
25
+ - bin/learn_create
21
26
  - lib/learn_create.rb
22
- homepage:
27
+ - lib/templates/javascript_lab_template/CONTRIBUTING.md
28
+ - lib/templates/javascript_lab_template/LICENSE.md
29
+ - lib/templates/javascript_lab_template/README.md
30
+ - lib/templates/javascript_lab_template/index.html
31
+ - lib/templates/javascript_lab_template/index.js
32
+ - lib/templates/javascript_lab_template/package-lock.json
33
+ - lib/templates/javascript_lab_template/package.json
34
+ - lib/templates/javascript_lab_template/test/helpers.js
35
+ - lib/templates/javascript_lab_template/test/indexTest.js
36
+ - lib/templates/react-lab-template/README.md
37
+ - lib/templates/react-lab-template/package-lock.json
38
+ - lib/templates/react-lab-template/package.json
39
+ - lib/templates/react-lab-template/public/index.html
40
+ - lib/templates/react-lab-template/public/manifest.json
41
+ - lib/templates/react-lab-template/src/App.css
42
+ - lib/templates/react-lab-template/src/App.js
43
+ - lib/templates/react-lab-template/src/components/Button.js
44
+ - lib/templates/react-lab-template/src/components/ExampleComponent.js
45
+ - lib/templates/react-lab-template/src/components/Greeting.js
46
+ - lib/templates/react-lab-template/src/index.js
47
+ - lib/templates/react-lab-template/test/index.test.js
48
+ - lib/templates/react-lab-template/test/mocha.opts
49
+ - lib/templates/readme_template/CONTRIBUTING.md
50
+ - lib/templates/readme_template/LICENSE.md
51
+ - lib/templates/readme_template/README.md
52
+ - lib/templates/ruby_lab_template/CONTRIBUTING.md
53
+ - lib/templates/ruby_lab_template/Gemfile
54
+ - lib/templates/ruby_lab_template/Gemfile.lock
55
+ - lib/templates/ruby_lab_template/LICENSE.md
56
+ - lib/templates/ruby_lab_template/README.md
57
+ - lib/templates/ruby_lab_template/lib/example.rb
58
+ - lib/templates/ruby_lab_template/spec/example_spec.rb
59
+ - lib/templates/ruby_lab_template/spec/spec_helper.rb
60
+ homepage: https://github.com/learn-co-curriculum/learn_create
23
61
  licenses:
24
62
  - MIT
25
63
  metadata: {}
@@ -39,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
77
  version: '0'
40
78
  requirements: []
41
79
  rubyforge_project:
42
- rubygems_version: 2.7.6
80
+ rubygems_version: 2.7.7
43
81
  signing_key:
44
82
  specification_version: 4
45
83
  summary: learn_create is a tool for creating learn.co lessons on github