learn-co 3.8.1 → 3.8.2
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.
- checksums.yaml +4 -4
- data/bin/learn +1 -1
- data/lib/learn/cli.rb +16 -16
- data/lib/learn/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 37d40fad0e44c8b4809b48c8c389fe74c2c363ac
         | 
| 4 | 
            +
              data.tar.gz: 3116127b48d9e92f0045ac3295936b6dd17e8161
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2c8a063a19e9212c31c8b53a4f7959e82c5a05d2962c5dde80e7afe647933400acbf171247ad33b7ee26ac85e157576b10a85dd7925622b9c53502d6f8624655
         | 
| 7 | 
            +
              data.tar.gz: 2ffc5630583aa1981ab8abeb47bffbce709e57ac68684ce520cf36460c37f6bd3b585764b5356c12ccd4569cea07258fc08e88251f7918d11aa8f85e09e6283e
         | 
    
        data/bin/learn
    CHANGED
    
    | @@ -30,7 +30,7 @@ netrc.read | |
| 30 30 | 
             
            token = netrc.password
         | 
| 31 31 |  | 
| 32 32 | 
             
            if !LEARN_CONFIG_COMMANDS.include?(ARGV[0]) && (token.nil? || token == 'machine' || !File.exist?(File.expand_path('~/.learn-config')))
         | 
| 33 | 
            -
               | 
| 33 | 
            +
              exec('learn-config') unless Learn::InternetConnection.no_internet_connection?
         | 
| 34 34 | 
             
            end
         | 
| 35 35 |  | 
| 36 36 | 
             
            if INTERNET_REQUIRED_COMMANDS.include?(ARGV[0])
         | 
    
        data/lib/learn/cli.rb
    CHANGED
    
    | @@ -17,7 +17,7 @@ module Learn | |
| 17 17 | 
             
                  --fail-fast           # Stop running rspec test suite on first failed test
         | 
| 18 18 | 
             
                LONGDESC
         | 
| 19 19 | 
             
                def test(*opts)
         | 
| 20 | 
            -
                   | 
| 20 | 
            +
                  exec("learn-test #{opts.join(' ')}")
         | 
| 21 21 | 
             
                end
         | 
| 22 22 |  | 
| 23 23 | 
             
                desc 'version, -v, --version', 'Display the current version of the Learn gem'
         | 
| @@ -42,7 +42,7 @@ module Learn | |
| 42 42 | 
             
                    options['message']
         | 
| 43 43 | 
             
                  end
         | 
| 44 44 |  | 
| 45 | 
            -
                   | 
| 45 | 
            +
                  exec("learn-submit #{commit_message}")
         | 
| 46 46 | 
             
                end
         | 
| 47 47 |  | 
| 48 48 | 
             
                desc "open [lesson-name] [--editor=editor-binary]", "Open your current lesson [or the given lesson] [with your editor]"
         | 
| @@ -60,7 +60,7 @@ module Learn | |
| 60 60 | 
             
                  lab_name = Learn::Lab::Parser.new(lab_name.join(' ')).parse!
         | 
| 61 61 | 
             
                  editor = options[:editor]
         | 
| 62 62 |  | 
| 63 | 
            -
                   | 
| 63 | 
            +
                  exec("learn-open #{lab_name} --editor=#{editor}")
         | 
| 64 64 | 
             
                end
         | 
| 65 65 |  | 
| 66 66 | 
             
                desc "next [--editor=editor-binary]", "Open your next lesson [with your editor]"
         | 
| @@ -68,27 +68,27 @@ module Learn | |
| 68 68 | 
             
                def next
         | 
| 69 69 | 
             
                  editor = options[:editor]
         | 
| 70 70 |  | 
| 71 | 
            -
                   | 
| 71 | 
            +
                  exec("learn-open --next --editor=#{editor}")
         | 
| 72 72 | 
             
                end
         | 
| 73 73 |  | 
| 74 74 | 
             
                desc 'whoami', 'Display your Learn gem configuration information'
         | 
| 75 75 | 
             
                def whoami
         | 
| 76 | 
            -
                   | 
| 76 | 
            +
                  exec('learn-config --whoami')
         | 
| 77 77 | 
             
                end
         | 
| 78 78 |  | 
| 79 79 | 
             
                desc 'reset', 'Reset your Learn gem configuration'
         | 
| 80 80 | 
             
                def reset
         | 
| 81 | 
            -
                   | 
| 81 | 
            +
                  exec('learn-config --reset')
         | 
| 82 82 | 
             
                end
         | 
| 83 83 |  | 
| 84 84 | 
             
                desc 'directory', 'Set your local Learn directory. Defaults to ~/Development/code'
         | 
| 85 85 | 
             
                def directory
         | 
| 86 | 
            -
                   | 
| 86 | 
            +
                  exec('learn-config --set-directory')
         | 
| 87 87 | 
             
                end
         | 
| 88 88 |  | 
| 89 89 | 
             
                desc 'doctor', 'Check your local environment setup'
         | 
| 90 90 | 
             
                def doctor
         | 
| 91 | 
            -
                   | 
| 91 | 
            +
                  exec('learn-doctor')
         | 
| 92 92 | 
             
                end
         | 
| 93 93 |  | 
| 94 94 | 
             
                desc 'new lab-name -t|--template template-name', 'Generate a new lesson repo using a Learn.co template', hide: true
         | 
| @@ -100,10 +100,10 @@ module Learn | |
| 100 100 | 
             
                  list = options[:list]
         | 
| 101 101 |  | 
| 102 102 | 
             
                  if list
         | 
| 103 | 
            -
                     | 
| 103 | 
            +
                    exec("learn-generate --list #{has_internet ? '--internet' : ''}")
         | 
| 104 104 | 
             
                  else
         | 
| 105 105 | 
             
                    if template && template != 'template'
         | 
| 106 | 
            -
                       | 
| 106 | 
            +
                      exec("learn-generate #{template} #{lab_name.join} #{has_internet ? '--internet' : ''}")
         | 
| 107 107 | 
             
                    else
         | 
| 108 108 | 
             
                      puts "You must specify a template with -t or --template"
         | 
| 109 109 | 
             
                      exit
         | 
| @@ -113,25 +113,25 @@ module Learn | |
| 113 113 |  | 
| 114 114 | 
             
                desc 'status', 'Get the status of your current lesson'
         | 
| 115 115 | 
             
                def status
         | 
| 116 | 
            -
                   | 
| 116 | 
            +
                  exec('learn-status')
         | 
| 117 117 | 
             
                end
         | 
| 118 118 |  | 
| 119 119 | 
             
                desc 'hello', 'Verify your connection to Learn.co'
         | 
| 120 120 | 
             
                def hello
         | 
| 121 | 
            -
                   | 
| 121 | 
            +
                  exec('learn-hello')
         | 
| 122 122 | 
             
                end
         | 
| 123 123 |  | 
| 124 124 | 
             
                desc 'lint', 'Lint a directory for correct content', hide: true
         | 
| 125 125 | 
             
                def lint(dir=nil, quiet=nil)
         | 
| 126 126 | 
             
                  if dir && !quiet
         | 
| 127 | 
            -
                     | 
| 127 | 
            +
                    exec("learn-lint #{dir}")
         | 
| 128 128 | 
             
                  elsif dir && quiet
         | 
| 129 | 
            -
                     | 
| 129 | 
            +
                    exec("learn-lint #{dir} #{quiet}")
         | 
| 130 130 | 
             
                  elsif !dir && quiet
         | 
| 131 | 
            -
                     | 
| 131 | 
            +
                    exec("learn-lint #{quiet}")
         | 
| 132 132 | 
             
                  else
         | 
| 133 133 | 
             
                    current_dir = Dir.pwd
         | 
| 134 | 
            -
                     | 
| 134 | 
            +
                    exec("learn-lint #{current_dir}")
         | 
| 135 135 | 
             
                  end
         | 
| 136 136 | 
             
                end
         | 
| 137 137 |  | 
    
        data/lib/learn/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: learn-co
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3.8. | 
| 4 | 
            +
              version: 3.8.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Flatiron School
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017-09- | 
| 11 | 
            +
            date: 2017-09-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 250 250 | 
             
                  version: '0'
         | 
| 251 251 | 
             
            requirements: []
         | 
| 252 252 | 
             
            rubyforge_project: 
         | 
| 253 | 
            -
            rubygems_version: 2.6. | 
| 253 | 
            +
            rubygems_version: 2.6.13
         | 
| 254 254 | 
             
            signing_key: 
         | 
| 255 255 | 
             
            specification_version: 4
         | 
| 256 256 | 
             
            summary: The command line interface to Learn.co.
         |