visual_studio 0.0.0.5 → 0.0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/visual_studio.rb +1 -0
- data/lib/visual_studio/environment.rb +34 -0
- data/lib/visual_studio/gem.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f26054ca552b0d0f0215323683f4fdbe850693
|
4
|
+
data.tar.gz: 980f9dff84fbbe766fee4692939d3fce7c3476f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6f49ec8e989dd15173293ee3c19ca242c454b29aba857c444c27c7ebf34c62054e7f9935f7b118c248bf14e39a4d41d9696b388a04108e0b8e4db5c5bdfc442
|
7
|
+
data.tar.gz: fec2c8dfd37b1f174a470d18c287cb164df32a785b51600ebaace30a217e70934927b94d0f4374019aa499c6ce0c114fa7778e02d7b103bb761bcdefcbf7e13f
|
data/lib/visual_studio.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module VisualStudio
|
2
|
+
module Environment
|
3
|
+
SEARCH_DIRECTORIES = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']
|
4
|
+
|
5
|
+
def self.merge(base, overlay)
|
6
|
+
# TODO(mtwilliams): Verify match-up between VCInstallDir and VisualStudioVersion?
|
7
|
+
# TODO(mtwilliams): Rederive environment variables based on VCInstallDir and/or WindowsSdkDir.
|
8
|
+
env = base.to_h.merge(overlay.to_h) do |variable, base, overlay|
|
9
|
+
if SEARCH_DIRECTORIES.include? variable
|
10
|
+
# TODO(mtwilliams): Detect new Visual Studio or Windows SDK related
|
11
|
+
# paths and replace the old ones based on that.
|
12
|
+
base = base.split(';')
|
13
|
+
overlay = overlay.split(';')
|
14
|
+
|
15
|
+
cwd = base.include?('.') || overlay.include?('.')
|
16
|
+
|
17
|
+
# HACK(mtwilliams): We're using File.expand_path here to "normalize"
|
18
|
+
# paths to prevent duplicates, but this could very likely have
|
19
|
+
# disastrous effects.
|
20
|
+
base = base.reject{|p| p=='.'}.map{|p| File.expand_path(p)}
|
21
|
+
overlay = overlay.reject{|p| p=='.'}.map{|p| File.expand_path(p)}
|
22
|
+
|
23
|
+
path = base | overlay
|
24
|
+
path = ['.'] + path if cwd
|
25
|
+
|
26
|
+
path.join(';')
|
27
|
+
else
|
28
|
+
# Default to the overlay, or right-hand side.
|
29
|
+
overlay
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/visual_studio/gem.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visual_studio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
67
|
- lib/visual_studio.rb
|
68
|
+
- lib/visual_studio/environment.rb
|
68
69
|
- lib/visual_studio/gem.rb
|
69
70
|
- lib/visual_studio/helpers/pretty_string.rb
|
70
71
|
- lib/visual_studio/install.rb
|