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 +4 -4
- data/lib/learn_open/opener.rb +17 -5
- data/lib/learn_open/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: c20f9f0402fc03b98cc39ed469aa864b20c9098c
|
4
|
+
data.tar.gz: 23ed5adc70881d58fde061ae191fcc56a2196986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2a7bbe1e2093931f30cdab647ff11a9c3dba9a58c5f25906508135b3b4158c0a3df2834d8c1c682e964b88ccbb17b2698dacce6831747f121d4234486902d5f
|
7
|
+
data.tar.gz: 8dfc2d6c79bd96de8945093d9db5e89edb8de4108b28bd93d1a203995fc3e5f7c3ccd00330101bad23c5146a53eb73fdce23d2c5eeee1e6e9587545af4c4c2ef
|
data/lib/learn_open/opener.rb
CHANGED
@@ -37,15 +37,23 @@ module LearnOpen
|
|
37
37
|
puts "Looking for lesson..."
|
38
38
|
warn_if_necessary
|
39
39
|
|
40
|
-
if
|
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
|
data/lib/learn_open/version.rb
CHANGED
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.
|
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:
|
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.
|
126
|
+
rubygems_version: 2.6.14
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Open Learn lessons locally
|