learn_duplicate 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +40 -0
  3. data/Gemfile +13 -0
  4. data/LICENSE.md +23 -0
  5. data/README.md +53 -0
  6. data/Rakefile +6 -0
  7. data/bin/learn_duplicate +4 -0
  8. data/lib/learn_duplicate.rb +152 -0
  9. data/lib/templates/javascript_lab_template/CONTRIBUTING.md +40 -0
  10. data/lib/templates/javascript_lab_template/LICENSE.md +23 -0
  11. data/lib/templates/javascript_lab_template/README.md +16 -0
  12. data/lib/templates/javascript_lab_template/index.html +12 -0
  13. data/lib/templates/javascript_lab_template/index.js +5 -0
  14. data/lib/templates/javascript_lab_template/package-lock.json +1854 -0
  15. data/lib/templates/javascript_lab_template/package.json +21 -0
  16. data/lib/templates/javascript_lab_template/test/helpers.js +20 -0
  17. data/lib/templates/javascript_lab_template/test/indexTest.js +23 -0
  18. data/lib/templates/react-lab-template/README.md +16 -0
  19. data/lib/templates/react-lab-template/package-lock.json +12333 -0
  20. data/lib/templates/react-lab-template/package.json +38 -0
  21. data/lib/templates/react-lab-template/public/index.html +41 -0
  22. data/lib/templates/react-lab-template/public/manifest.json +13 -0
  23. data/lib/templates/react-lab-template/src/App.css +5 -0
  24. data/lib/templates/react-lab-template/src/App.js +18 -0
  25. data/lib/templates/react-lab-template/src/components/Button.js +19 -0
  26. data/lib/templates/react-lab-template/src/components/ExampleComponent.js +15 -0
  27. data/lib/templates/react-lab-template/src/components/Greeting.js +15 -0
  28. data/lib/templates/react-lab-template/src/index.js +8 -0
  29. data/lib/templates/react-lab-template/test/index.test.js +64 -0
  30. data/lib/templates/react-lab-template/test/mocha.opts +4 -0
  31. data/lib/templates/readme_template/CONTRIBUTING.md +40 -0
  32. data/lib/templates/readme_template/LICENSE.md +23 -0
  33. data/lib/templates/readme_template/README.md +16 -0
  34. data/lib/templates/ruby_lab_template/CONTRIBUTING.md +40 -0
  35. data/lib/templates/ruby_lab_template/Gemfile +4 -0
  36. data/lib/templates/ruby_lab_template/Gemfile.lock +32 -0
  37. data/lib/templates/ruby_lab_template/LICENSE.md +23 -0
  38. data/lib/templates/ruby_lab_template/README.md +16 -0
  39. data/lib/templates/ruby_lab_template/lib/example.rb +13 -0
  40. data/lib/templates/ruby_lab_template/spec/example_spec.rb +37 -0
  41. data/lib/templates/ruby_lab_template/spec/spec_helper.rb +65 -0
  42. metadata +97 -0
@@ -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,65 @@
1
+ require 'bundler'
2
+ Bundler.require
3
+ require 'yaml'
4
+ CREATED_FILES = Dir.glob(File.join(File.dirname(__FILE__), '..', 'lib', '*.rb'))
5
+ CREATED_FILES.each{ |f| require f }
6
+
7
+ # This file was generated by the `rspec --init` command. Conventionally, all
8
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
9
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
10
+ # this file to always be loaded, without a need to explicitly require it in any
11
+ # files.
12
+ #
13
+ # Given that it is always loaded, you are encouraged to keep this file as
14
+ # light-weight as possible. Requiring heavyweight dependencies from this file
15
+ # will add to the boot time of your test suite on EVERY test run, even for an
16
+ # individual file that may not need all of that loaded. Instead, consider making
17
+ # a separate helper file that requires the additional dependencies and performs
18
+ # the additional setup, and require it from the spec files that actually need
19
+ # it.
20
+ #
21
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
22
+ RSpec.configure do |config|
23
+ # rspec-expectations config goes here. You can use an alternate
24
+ # assertion/expectation library such as wrong or the stdlib/minitest
25
+ # assertions if you prefer.
26
+ config.expect_with :rspec do |expectations|
27
+ # This option will default to `true` in RSpec 4. It makes the `description`
28
+ # and `failure_message` of custom matchers include text for helper methods
29
+ # defined using `chain`, e.g.:
30
+ # be_bigger_than(2).and_smaller_than(4).description
31
+ # # => "be bigger than 2 and smaller than 4"
32
+ # ...rather than:
33
+ # # => "be bigger than 2"
34
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
35
+ end
36
+
37
+ # rspec-mocks config goes here. You can use an alternate test double
38
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
39
+ config.mock_with :rspec do |mocks|
40
+ # Prevents you from mocking or stubbing a method that does not exist on
41
+ # a real object. This is generally recommended, and will default to
42
+ # `true` in RSpec 4.
43
+ mocks.verify_partial_doubles = true
44
+ end
45
+
46
+ config.shared_context_metadata_behavior = :apply_to_host_groups
47
+ end
48
+
49
+ # To parse and test an HTML file, add 'nokogiri' to Gemfile and uncomment these methods
50
+ # def html_file_contents
51
+ # File.read('./index.html')
52
+ # end
53
+ #
54
+ # def parsed_html
55
+ # Nokogiri::HTML(html_file_contents) do |config|
56
+ # config.strict.dtdload.dtdvalid.noblanks
57
+ # end
58
+ # end
59
+
60
+ # To parse and test a CSS file, add 'css_parser' to Gemfile and uncomment this method
61
+ # def parsed_css
62
+ # parser = CssParser::Parser.new
63
+ # parser.load_uri!('./style.css')
64
+ # parser
65
+ # end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: learn_duplicate
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
+ platform: ruby
6
+ authors:
7
+ - flatironschool
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-04-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.15'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.15'
27
+ description:
28
+ email: maxwell@flatironschool.com
29
+ executables:
30
+ - learn_duplicate
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - CONTRIBUTING.md
35
+ - Gemfile
36
+ - LICENSE.md
37
+ - README.md
38
+ - Rakefile
39
+ - bin/learn_duplicate
40
+ - lib/learn_duplicate.rb
41
+ - lib/templates/javascript_lab_template/CONTRIBUTING.md
42
+ - lib/templates/javascript_lab_template/LICENSE.md
43
+ - lib/templates/javascript_lab_template/README.md
44
+ - lib/templates/javascript_lab_template/index.html
45
+ - lib/templates/javascript_lab_template/index.js
46
+ - lib/templates/javascript_lab_template/package-lock.json
47
+ - lib/templates/javascript_lab_template/package.json
48
+ - lib/templates/javascript_lab_template/test/helpers.js
49
+ - lib/templates/javascript_lab_template/test/indexTest.js
50
+ - lib/templates/react-lab-template/README.md
51
+ - lib/templates/react-lab-template/package-lock.json
52
+ - lib/templates/react-lab-template/package.json
53
+ - lib/templates/react-lab-template/public/index.html
54
+ - lib/templates/react-lab-template/public/manifest.json
55
+ - lib/templates/react-lab-template/src/App.css
56
+ - lib/templates/react-lab-template/src/App.js
57
+ - lib/templates/react-lab-template/src/components/Button.js
58
+ - lib/templates/react-lab-template/src/components/ExampleComponent.js
59
+ - lib/templates/react-lab-template/src/components/Greeting.js
60
+ - lib/templates/react-lab-template/src/index.js
61
+ - lib/templates/react-lab-template/test/index.test.js
62
+ - lib/templates/react-lab-template/test/mocha.opts
63
+ - lib/templates/readme_template/CONTRIBUTING.md
64
+ - lib/templates/readme_template/LICENSE.md
65
+ - lib/templates/readme_template/README.md
66
+ - lib/templates/ruby_lab_template/CONTRIBUTING.md
67
+ - lib/templates/ruby_lab_template/Gemfile
68
+ - lib/templates/ruby_lab_template/Gemfile.lock
69
+ - lib/templates/ruby_lab_template/LICENSE.md
70
+ - lib/templates/ruby_lab_template/README.md
71
+ - lib/templates/ruby_lab_template/lib/example.rb
72
+ - lib/templates/ruby_lab_template/spec/example_spec.rb
73
+ - lib/templates/ruby_lab_template/spec/spec_helper.rb
74
+ homepage: https://github.com/learn-co-curriculum/learn_duplicate
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubygems_version: 3.0.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: learn_duplicate is a tool for duplicating learn.co lessons on github
97
+ test_files: []