learn-co 1.0.3 → 1.0.4
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/lib/learn/jasmine/phantom_checker.rb +28 -6
- data/lib/learn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc8b9c2023ac3e8a100f64fe06afaefc9f76c993
|
|
4
|
+
data.tar.gz: 22e8f9e293483fae528242e0b959ef2738e31ebc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67ac18038bfb615cf0a7984684d0570c4eff0f76b63ce4a2c0fa4ba7dae098269699740bb55f934396aa1aa8616c946eadd9e8c2aefc75166ff0bd1ed6f8f909
|
|
7
|
+
data.tar.gz: 8eb3e6460c650ce66ee5cfbc50a84507329236bb7c1d4a20edbc4eb52de6fa1cc06388b011087ca24763755a7dc0f243214ee4966140e802420eb96d3f1103b1
|
|
@@ -6,12 +6,18 @@ module Learn
|
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def check_installation
|
|
9
|
-
if
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
if running_on_mac?
|
|
10
|
+
if !brew_installed?
|
|
11
|
+
puts "You must have Homebrew installed."
|
|
12
|
+
exit
|
|
13
|
+
else
|
|
14
|
+
if !phantom_installed_on_mac?
|
|
15
|
+
install_phantomjs
|
|
16
|
+
end
|
|
17
|
+
end
|
|
12
18
|
else
|
|
13
|
-
if !
|
|
14
|
-
|
|
19
|
+
if !phantom_installed_on_linux?
|
|
20
|
+
puts "You must have PhantomJS installed: http://phantomjs.org/download.html"
|
|
15
21
|
end
|
|
16
22
|
end
|
|
17
23
|
end
|
|
@@ -20,13 +26,29 @@ module Learn
|
|
|
20
26
|
!`which brew`.empty?
|
|
21
27
|
end
|
|
22
28
|
|
|
23
|
-
def
|
|
29
|
+
def phantom_installed_on_mac?
|
|
30
|
+
phantom_installed_by_brew? || phantom_installed?
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def phantom_installed_on_linux?
|
|
34
|
+
phantom_installed?
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def phantom_installed_by_brew?
|
|
24
38
|
!`brew ls --versions phantomjs`.empty?
|
|
25
39
|
end
|
|
26
40
|
|
|
41
|
+
def phantom_installed?
|
|
42
|
+
!`which phantomjs`.empty?
|
|
43
|
+
end
|
|
44
|
+
|
|
27
45
|
def install_phantomjs
|
|
28
46
|
`brew install phantomjs`
|
|
29
47
|
end
|
|
48
|
+
|
|
49
|
+
def running_on_mac?
|
|
50
|
+
!!RUBY_PLATFORM.match(/darwin/)
|
|
51
|
+
end
|
|
30
52
|
end
|
|
31
53
|
end
|
|
32
54
|
end
|
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: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Flatiron School
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|