learn-co 1.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/LICENSE.txt +0 -1
  4. data/README.md +4 -5
  5. data/Rakefile +0 -1
  6. data/bin/learn +11 -69
  7. data/learn-co.gemspec +10 -11
  8. data/lib/learn.rb +4 -21
  9. data/lib/learn/cli.rb +78 -0
  10. data/lib/learn/lab/parser.rb +25 -0
  11. data/lib/learn/options_sanitizer.rb +164 -0
  12. data/lib/learn/version.rb +1 -1
  13. metadata +30 -97
  14. data/.rspec +0 -2
  15. data/lib/learn/file_finder.rb +0 -12
  16. data/lib/learn/github_interactor.rb +0 -23
  17. data/lib/learn/jasmine/boot.js +0 -184
  18. data/lib/learn/jasmine/console.js +0 -161
  19. data/lib/learn/jasmine/formatters/jasmine2-junit.js +0 -199
  20. data/lib/learn/jasmine/helpers/ConsoleHelper.js +0 -12
  21. data/lib/learn/jasmine/helpers/ConsoleHelperNoColor.js +0 -12
  22. data/lib/learn/jasmine/initializer.rb +0 -27
  23. data/lib/learn/jasmine/jasmine-html.js +0 -360
  24. data/lib/learn/jasmine/jasmine-jquery.js +0 -813
  25. data/lib/learn/jasmine/jasmine.css +0 -56
  26. data/lib/learn/jasmine/jasmine.js +0 -2403
  27. data/lib/learn/jasmine/jasmine_favicon.png +0 -0
  28. data/lib/learn/jasmine/jquery-1.8.0.min.js +0 -2
  29. data/lib/learn/jasmine/jquery-ui-1.8.23.custom.min.js +0 -125
  30. data/lib/learn/jasmine/phantom_checker.rb +0 -55
  31. data/lib/learn/jasmine/runner.rb +0 -129
  32. data/lib/learn/jasmine/runners/SpecRunner.html +0 -35
  33. data/lib/learn/jasmine/runners/run-jasmine.js +0 -228
  34. data/lib/learn/jasmine/templates/SpecRunnerTemplate.html.erb +0 -35
  35. data/lib/learn/jasmine/templates/SpecRunnerTemplateNoColor.html.erb +0 -35
  36. data/lib/learn/jasmine/templates/requires.yml.example +0 -7
  37. data/lib/learn/jasmine/vendor/require.js +0 -2077
  38. data/lib/learn/netrc_interactor.rb +0 -18
  39. data/lib/learn/python_unittest/nose_installer.rb +0 -35
  40. data/lib/learn/python_unittest/requirements_checker.rb +0 -57
  41. data/lib/learn/python_unittest/runner.rb +0 -89
  42. data/lib/learn/repo_parser.rb +0 -22
  43. data/lib/learn/rspec/runner.rb +0 -113
  44. data/lib/learn/spec_type_parser.rb +0 -26
  45. data/lib/learn/user_id_parser.rb +0 -9
  46. data/lib/learn/username_parser.rb +0 -19
  47. data/spec/features/jasmine_jquery_fixtures_spec.rb +0 -10
  48. data/spec/features/rspec_unit_spec.rb +0 -10
  49. data/spec/fixtures/jasmine-jquery-fixtures/index.html +0 -10
  50. data/spec/fixtures/jasmine-jquery-fixtures/requires.yml +0 -4
  51. data/spec/fixtures/jasmine-jquery-fixtures/spec/jasmine-jquery-fixtures-spec.js +0 -11
  52. data/spec/fixtures/rspec-unit-spec/.rspec +0 -2
  53. data/spec/fixtures/rspec-unit-spec/lib/dog.rb +0 -2
  54. data/spec/fixtures/rspec-unit-spec/spec/dog_spec.rb +0 -7
  55. data/spec/fixtures/rspec-unit-spec/spec/spec_helper.rb +0 -93
  56. data/spec/repo_parser_spec.rb +0 -25
  57. data/spec/spec_helper.rb +0 -10
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
@@ -1,2 +0,0 @@
1
- class Dog
2
- end
@@ -1,7 +0,0 @@
1
- require_relative '../lib/dog'
2
-
3
- describe Dog do
4
- it 'runs the spec spec correctly' do
5
- expect(subject).to be_an_instance_of(Dog)
6
- end
7
- end
@@ -1,93 +0,0 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause
4
- # this file to always be loaded, without a need to explicitly require it in any
5
- # files.
6
- #
7
- # Given that it is always loaded, you are encouraged to keep this file as
8
- # light-weight as possible. Requiring heavyweight dependencies from this file
9
- # will add to the boot time of your test suite on EVERY test run, even for an
10
- # individual file that may not need all of that loaded. Instead, consider making
11
- # a separate helper file that requires the additional dependencies and performs
12
- # the additional setup, and require it from the spec files that actually need
13
- # it.
14
- #
15
- # The `.rspec` file also contains a few flags that are not defaults but that
16
- # users commonly want.
17
- #
18
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
- require_relative '../lib/dog'
20
-
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
- # The settings below are suggested to provide a good initial experience
46
- # with RSpec, but feel free to customize to your heart's content.
47
- =begin
48
- # These two settings work together to allow you to limit a spec run
49
- # to individual examples or groups you care about by tagging them with
50
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
51
- # get run.
52
- config.filter_run :focus
53
- config.run_all_when_everything_filtered = true
54
-
55
- # Limits the available syntax to the non-monkey patched syntax that is
56
- # recommended. For more details, see:
57
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
58
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
59
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
60
- config.disable_monkey_patching!
61
-
62
- # This setting enables warnings. It's recommended, but in some cases may
63
- # be too noisy due to issues in dependencies.
64
- config.warnings = true
65
-
66
- # Many RSpec users commonly either run the entire suite or an individual
67
- # file, and it's useful to allow more verbose output when running an
68
- # individual spec file.
69
- if config.files_to_run.one?
70
- # Use the documentation formatter for detailed output,
71
- # unless a formatter has already been configured
72
- # (e.g. via a command-line flag).
73
- config.default_formatter = 'doc'
74
- end
75
-
76
- # Print the 10 slowest examples and example groups at the
77
- # end of the spec run, to help surface which specs are running
78
- # particularly slow.
79
- config.profile_examples = 10
80
-
81
- # Run specs in random order to surface order dependencies. If you find an
82
- # order dependency and want to debug it, you can fix the order by providing
83
- # the seed, which is printed after each run.
84
- # --seed 1234
85
- config.order = :random
86
-
87
- # Seed global randomization in this process using the `--seed` CLI option.
88
- # Setting this allows you to use `--seed` to deterministically reproduce
89
- # test failures related to randomization by passing the same `--seed` value
90
- # as the one that triggered the failure.
91
- Kernel.srand config.seed
92
- =end
93
- end
@@ -1,25 +0,0 @@
1
- require 'spec_helper'
2
- RSpec.describe Learn::RepoParser do
3
- context "URLs from github" do
4
- let!(:remote) { OpenStruct.new(:url => nil)}
5
- let!(:repo) { OpenStruct.new(:remote => remote)}
6
-
7
- it "supports ssh addresses" do
8
- expect(Git).to receive(:open).and_return(repo)
9
- remote.url = "git@github.com:flatiron-labs/learn-gem.git"
10
- expect(described_class.get_repo).to eq("learn-gem")
11
- end
12
-
13
- it "supports http addresses" do
14
- expect(Git).to receive(:open).and_return(repo)
15
- remote.url = "https://github.com/flatiron-labs/learn-gem.git"
16
- expect(described_class.get_repo).to eq("learn-gem")
17
- end
18
-
19
- it "supports http addresses without .git extension" do
20
- expect(Git).to receive(:open).and_return(repo)
21
- remote.url = "https://github.com/flatiron-labs/learn-gem"
22
- expect(described_class.get_repo).to eq("learn-gem")
23
- end
24
- end
25
- end
@@ -1,10 +0,0 @@
1
- require_relative '../lib/learn'
2
- RSpec.configure do |config|
3
- config.expect_with :rspec do |expectations|
4
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
5
- end
6
-
7
- config.mock_with :rspec do |mocks|
8
- mocks.verify_partial_doubles = true
9
- end
10
- end