learn-open 1.2.3 → 1.2.5
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 +12 -3
- 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: f8eefb801c37c1a63235d568a07042a6991a276b
|
4
|
+
data.tar.gz: a71612e54d72db7c25ec6f71d99d37e5432dac73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 806ca91e2f01aa4240d1dc42374705e78a7caa00ed9c95ff0b905debd0db7e427e3959bb4ed68290279c35903eaf794ede8592bdb807cc629c69a5bf65f06860
|
7
|
+
data.tar.gz: 39ad9ac85c6257441b7821236fc1f78e547f75b70f6fb64ac6bdcac0e815fa67cfd8309e7cd5d1eabfcdfcbea249f0fd81f5b3711b4b0ae1f1e27ce712a62f24
|
data/lib/learn_open/opener.rb
CHANGED
@@ -349,8 +349,13 @@ module LearnOpen
|
|
349
349
|
|
350
350
|
def npm_install
|
351
351
|
if !ios_lesson? && File.exists?("#{lessons_dir}/#{repo_dir}/package.json")
|
352
|
-
puts
|
353
|
-
|
352
|
+
puts 'Installing dependencies...'
|
353
|
+
|
354
|
+
if ide_environment?
|
355
|
+
system("cd #{lessons_dir}/#{repo_dir} && yarn install --no-lockfile")
|
356
|
+
else
|
357
|
+
system("cd #{lessons_dir}/#{repo_dir} && npm install")
|
358
|
+
end
|
354
359
|
end
|
355
360
|
end
|
356
361
|
|
@@ -363,7 +368,7 @@ module LearnOpen
|
|
363
368
|
puts "Opening readme..."
|
364
369
|
launch_browser
|
365
370
|
else
|
366
|
-
puts "It looks like this lesson is a Readme.
|
371
|
+
puts "It looks like this lesson is a Readme. Please open it in your browser."
|
367
372
|
exit
|
368
373
|
end
|
369
374
|
end
|
@@ -395,5 +400,9 @@ module LearnOpen
|
|
395
400
|
def on_mac?
|
396
401
|
!!RUBY_PLATFORM.match(/darwin/)
|
397
402
|
end
|
403
|
+
|
404
|
+
def ide_environment?
|
405
|
+
ENV['IDE_CONTAINER'] == "true"
|
406
|
+
end
|
398
407
|
end
|
399
408
|
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.5
|
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: 2017-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.8
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Open Learn lessons locally
|