learn-open 1.2.6 → 1.2.7
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 -0
- 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: e7608535672f1b7d5c1dbf7061f3022422ceb71c
|
4
|
+
data.tar.gz: 495d1145174ecd2c91ac6c4df420a983f9e57c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89f6d852f4680634354b24efce024a82d59aff8535c6cdc6f973235f41cd1ee685cc25e6c51400d12f8a59e29abdb226402c464e56ad9fbd2f836467db6aeee4
|
7
|
+
data.tar.gz: 9acba5c8b3ecfada0f2a1150efdee3166df9eb487456415bfa16336cd1cf98730b4d292a362e989855fefdd68ffe29bcacc277e884de4d5aeeaaa681c22ed451
|
data/lib/learn_open/opener.rb
CHANGED
@@ -387,6 +387,10 @@ module LearnOpen
|
|
387
387
|
ENV['IDE_CONTAINER'] == "true"
|
388
388
|
end
|
389
389
|
|
390
|
+
def ide_git_wip_enabled?
|
391
|
+
ENV['IDE_GIT_WIP'] == "true"
|
392
|
+
end
|
393
|
+
|
390
394
|
def git_tasks
|
391
395
|
fork_repo
|
392
396
|
clone_repo
|
@@ -402,9 +406,22 @@ module LearnOpen
|
|
402
406
|
npm_install
|
403
407
|
end
|
404
408
|
|
409
|
+
def restore_files
|
410
|
+
pid = Process.spawn("restore-lab", [:out, :err] => File::NULL)
|
411
|
+
Process.waitpid(pid)
|
412
|
+
end
|
413
|
+
|
414
|
+
def watch_for_changes
|
415
|
+
Process.spawn("while inotifywait -e close_write,create,moved_to -r #{lessons_dir}/#{repo_dir}; do backup-lab; done", [:out, :err] => File::NULL)
|
416
|
+
end
|
417
|
+
|
405
418
|
def completion_tasks
|
406
419
|
cleanup_tmp_file
|
407
420
|
puts "Done."
|
421
|
+
if ide_environment? && ide_git_wip_enabled?
|
422
|
+
restore_files
|
423
|
+
watch_for_changes
|
424
|
+
end
|
408
425
|
exec("#{ENV['SHELL']} -l")
|
409
426
|
end
|
410
427
|
end
|
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.7
|
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-07-
|
11
|
+
date: 2017-07-31 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.6.
|
126
|
+
rubygems_version: 2.6.11
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Open Learn lessons locally
|