learn-open 1.2.15 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b04c2629427f775f2021dea073bab466e558bea
4
- data.tar.gz: a9ab94b1a192d9dfd6afa7130dc1bbe84b8f4e16
3
+ metadata.gz: c20f9f0402fc03b98cc39ed469aa864b20c9098c
4
+ data.tar.gz: 23ed5adc70881d58fde061ae191fcc56a2196986
5
5
  SHA512:
6
- metadata.gz: 1afef7cf166546a12772c1763a2380f00829d2a5d59212118ee8ef66fe0c7e0625db3726320d184308f1bfd71ab31449ce6064396871b8767c73a7d57f6d3aad
7
- data.tar.gz: c6f7b9b40fdeeb7df45ff269de71ee1ce8a3735ba547528d077a27bb7b2f5d664b83f1b3d107a71d1476b8a48167109eb4a35997fcd5108e30538f8ab69d91a5
6
+ metadata.gz: b2a7bbe1e2093931f30cdab647ff11a9c3dba9a58c5f25906508135b3b4158c0a3df2834d8c1c682e964b88ccbb17b2698dacce6831747f121d4234486902d5f
7
+ data.tar.gz: 8dfc2d6c79bd96de8945093d9db5e89edb8de4108b28bd93d1a203995fc3e5f7c3ccd00330101bad23c5146a53eb73fdce23d2c5eeee1e6e9587545af4c4c2ef
@@ -37,15 +37,23 @@ module LearnOpen
37
37
  puts "Looking for lesson..."
38
38
  warn_if_necessary
39
39
 
40
- if lesson_is_readme?
41
- open_readme
42
- else
40
+ if jupyter_notebook_environment?
43
41
  git_tasks
44
42
  file_tasks
45
43
  setup_backup_if_needed
46
- dependency_tasks
47
44
  completion_tasks
45
+ else
46
+ if lesson_is_readme?
47
+ open_readme
48
+ else
49
+ git_tasks
50
+ file_tasks
51
+ setup_backup_if_needed
52
+ dependency_tasks
53
+ completion_tasks
54
+ end
48
55
  end
56
+
49
57
  end
50
58
 
51
59
  def repo_exists?
@@ -55,7 +63,7 @@ module LearnOpen
55
63
  private
56
64
 
57
65
  def setup_backup_if_needed
58
- if ide_environment? && ide_git_wip_enabled?
66
+ if ide_environment? && ide_git_wip_enabled? || jupyter_notebook_environment?
59
67
  restore_files
60
68
  watch_for_changes
61
69
  end
@@ -422,6 +430,10 @@ module LearnOpen
422
430
  ENV['IDE_VERSION'] == "3"
423
431
  end
424
432
 
433
+ def jupyter_notebook_environment?
434
+ ENV['JUPYTER_CONTAINER'] == "true"
435
+ end
436
+
425
437
  def git_tasks
426
438
  fork_repo
427
439
  clone_repo
@@ -1,3 +1,3 @@
1
1
  module LearnOpen
2
- VERSION = '1.2.15'
2
+ VERSION = '1.2.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learn-open
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.15
4
+ version: 1.2.16
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-08-08 00:00:00.000000000 Z
11
+ date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.4.8
126
+ rubygems_version: 2.6.14
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Open Learn lessons locally