visual_studio 0.0.0.3 → 0.0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +65 -7
- data/lib/visual_studio/gem.rb +58 -0
- data/lib/visual_studio/helpers/pretty_string.rb +11 -0
- data/lib/visual_studio/install.rb +63 -48
- data/lib/visual_studio/product.rb +122 -0
- data/lib/visual_studio.rb +47 -20
- data/visual_studio.gemspec +11 -12
- data/visual_studio.sublime-project +2 -1
- metadata +6 -19
- data/lib/visual_studio/name.rb +0 -9
- data/lib/visual_studio/version.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 170f4bf5dfff415c14da637f32121dca1ae2774e
|
4
|
+
data.tar.gz: 0b57db076db928c11688e9cbcc382c1fdbf6abbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a656e2a6472ec03ff48536a522b8f6bf0441004ba6d05e390d44ec3b5de56870d2d0cf5d3e263f1ea9b3de60cac6ecca141af8280c60ca91d868b49627d4057
|
7
|
+
data.tar.gz: 521e8988157ef6c3165cbfc35a533d3a77186fc04ea553eda259af0cedf4f48dfe9d333acb4c6cfd38734be964c17244ad888c848ee0b050d93055806f2140b7
|
data/README.md
CHANGED
@@ -9,11 +9,69 @@ This will (hopefully) become the de-facto gem for inspecting Visual Studio insta
|
|
9
9
|
|
10
10
|
Documentation is on the back-burner, so for now:
|
11
11
|
|
12
|
-
```
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
```Ruby
|
13
|
+
|
14
|
+
VisualStudio.available?
|
15
|
+
VisualStudio.installed?
|
16
|
+
=> true
|
17
|
+
|
18
|
+
VisualStudio.available? 'vs2015'
|
19
|
+
VisualStudio.installed? 'vs2015'
|
20
|
+
=> true
|
21
|
+
|
22
|
+
VisualStudio.latest
|
23
|
+
VisualStudio.install
|
24
|
+
=> #<VisualStudio::Install @name=#<VisualStudio::Helpers::Name "vs2015" @pretty=""Visual Studio 2015"> ...>
|
25
|
+
|
26
|
+
VisualStudio.install 'vs2015'
|
27
|
+
VisualStudio.find 'vs2015'
|
28
|
+
VisualStudio.find_by(name: 'vs2015')
|
29
|
+
VisualStudio.find_by_name 'vs2015'
|
30
|
+
VisualStudio.find_by(version: 'vs2015')
|
31
|
+
VisualStudio.find_by_version '14.0'
|
32
|
+
=> #<VisualStudio::Install @name=#<VisualStudio::Helpers::Name "vs2015" @pretty="Visual Studio 2015"> ...>
|
33
|
+
|
34
|
+
vs = VisualStudio.latest
|
35
|
+
vs.name
|
36
|
+
=> "vs2015"
|
37
|
+
vs.name.pretty
|
38
|
+
=> "vs2015"
|
39
|
+
vs.version
|
40
|
+
=> "14.0"
|
41
|
+
vs.root
|
42
|
+
=> "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
|
43
|
+
vs.suite[:c_and_cpp]
|
44
|
+
vs.products[:c_and_cpp]
|
45
|
+
=> #<VisualStudio::Product @name=#<VisualStudio::Helpers::Name "VC" @pretty="Microsoft Visual C/C++"> ...>
|
46
|
+
vs.suite[:csharp]
|
47
|
+
vs.products[:csharp]
|
48
|
+
=> #<VisualStudio::Product @name=#<VisualStudio::Helpers::Name "VC" @pretty="Microsoft Visual C#"> ...>
|
49
|
+
|
50
|
+
vc = vs.products[:c_and_cpp]
|
51
|
+
vc.name
|
52
|
+
=> "VC"
|
53
|
+
vc.name.pretty
|
54
|
+
=> "Microsoft Visual C/C++"
|
55
|
+
vc.version
|
56
|
+
=> "14.0"
|
57
|
+
vc.root
|
58
|
+
=> "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC"
|
59
|
+
vc.paths.includes
|
60
|
+
=> {:x86 => ..., :x86_64 => ...}
|
61
|
+
vc.paths.libraries
|
62
|
+
=> {:x86 => ..., :x86_64 => ...}
|
63
|
+
vc.sdks
|
64
|
+
=> {:windows => ...}
|
65
|
+
vc.platforms
|
66
|
+
=> [:windows]
|
67
|
+
vc.architectures
|
68
|
+
=> [:x86, :x86_64]
|
69
|
+
vc.supports? :windows
|
70
|
+
=> true
|
71
|
+
vc.supports? :arm
|
72
|
+
=> false
|
73
|
+
env = vc.environment target: {platform: :windows,
|
74
|
+
arch: :x86_64},
|
75
|
+
base: ENV
|
76
|
+
=> {"PATH" => "...", ...}
|
19
77
|
```
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
|
3
|
+
module VisualStudio
|
4
|
+
module Gem
|
5
|
+
# The name of this Gem.
|
6
|
+
def self.name
|
7
|
+
"visual_studio"
|
8
|
+
end
|
9
|
+
|
10
|
+
# The name and email address of the primary author.
|
11
|
+
def self.author
|
12
|
+
self.authors.first
|
13
|
+
end
|
14
|
+
|
15
|
+
# The name and email addresses of all authors.
|
16
|
+
def self.authors
|
17
|
+
[["Michael Williams", "m.t.williams@live.com"]].map do |author|
|
18
|
+
name, email = author
|
19
|
+
OpenStruct.new(name: name, email: email)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# This Gem's homepage URL.
|
24
|
+
def self.homepage
|
25
|
+
"https://github.com/mtwilliams/visual_studio"
|
26
|
+
end
|
27
|
+
|
28
|
+
# This Gem's URL.
|
29
|
+
def self.url
|
30
|
+
"https://rubygems.org/gems/#{self.name}"
|
31
|
+
end
|
32
|
+
|
33
|
+
# A short summary of this Gem.
|
34
|
+
def self.summary
|
35
|
+
"Inspect Visual Studio installs and generate Visual Studio project files."
|
36
|
+
end
|
37
|
+
|
38
|
+
# A full description of this Gem.
|
39
|
+
def self.description
|
40
|
+
"This will (hopefully) become the de-facto gem for inspecting Visual Studio installs and generating Visual Studio project files."
|
41
|
+
end
|
42
|
+
|
43
|
+
module VERSION #:nodoc:
|
44
|
+
MAJOR, MINOR, PATCH, PRE = [0, 0, 0, 4]
|
45
|
+
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
46
|
+
end
|
47
|
+
|
48
|
+
# The semantic version of the this Gem.
|
49
|
+
def self.version
|
50
|
+
Gem::VERSION::STRING
|
51
|
+
end
|
52
|
+
|
53
|
+
# The license covering this Gem.
|
54
|
+
def self.license
|
55
|
+
"Public Domain"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -1,69 +1,84 @@
|
|
1
1
|
module VisualStudio
|
2
2
|
class Install
|
3
|
-
attr_reader :name
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
attr_reader :sdks
|
3
|
+
attr_reader :name,
|
4
|
+
:version,
|
5
|
+
:root,
|
6
|
+
:products
|
8
7
|
|
9
|
-
def initialize(
|
10
|
-
@name
|
11
|
-
@version
|
12
|
-
@root
|
13
|
-
@
|
14
|
-
@sdks = opts[:sdks]
|
8
|
+
def initialize(desc={})
|
9
|
+
@name = desc[:name]
|
10
|
+
@version = desc[:version]
|
11
|
+
@root = desc[:root]
|
12
|
+
@products = desc[:products]
|
15
13
|
end
|
16
14
|
|
17
|
-
def self.
|
18
|
-
!!(find(name_or_version))
|
15
|
+
def self.available?(name_or_version)
|
16
|
+
!!(self.find(name_or_version))
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.latest
|
20
|
+
VisualStudio::VERSIONS.map{|version| self.find_by_version(version)}.compact.first
|
19
21
|
end
|
20
22
|
|
21
23
|
def self.find(name_or_version)
|
22
|
-
|
23
|
-
|
24
|
+
if VisualStudio::NAMES.include?(name_or_version)
|
25
|
+
self.find_by_name(name_or_version)
|
26
|
+
elsif VisualStudio::VERSIONS.include?(name_or_version)
|
27
|
+
self.find_by_version(name_or_version)
|
28
|
+
else
|
29
|
+
# TODO(mtwilliams): Raise an exception.
|
30
|
+
# raise VisualStudio::InvalidCriteria.new("Expected a name or version")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.find_by(criteria)
|
35
|
+
if criteria.include?(:name)
|
36
|
+
self.find_by_name(criteria[:name])
|
37
|
+
elsif criteria.include?(:version)
|
38
|
+
self.find_by_version(criteria[:version])
|
39
|
+
else
|
40
|
+
# TODO(mtwilliams): Raise an exception.
|
41
|
+
# raise VisualStudio::InvalidCriteria.new("Expected 'name' or 'version' to be specified")
|
42
|
+
end
|
24
43
|
end
|
25
44
|
|
26
45
|
def self.find_by_name(name)
|
27
|
-
|
46
|
+
if VisualStudio::NAMES.include?(name)
|
47
|
+
self.find_by_version(VisualStudio::NAME_TO_VERSION[name])
|
48
|
+
else
|
49
|
+
# TODO(mtwilliams): Raise an exception.
|
50
|
+
# raise VisualStudio::InvalidName.new(...)
|
51
|
+
end
|
28
52
|
end
|
29
53
|
|
30
54
|
def self.find_by_version(version)
|
31
|
-
|
32
|
-
|
55
|
+
if VisualStudio::VERSIONS.include?(version)
|
56
|
+
# Try to find any products (that we care about) for this version.
|
57
|
+
c_and_cpp = VisualStudio::Product.find('VC', version)
|
58
|
+
csharp = VisualStudio::Product.find('VC#', version)
|
33
59
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
60
|
+
# If no products (that we care about) for this version are installed,
|
61
|
+
# then for all intents and purposes this version of Visual Studio
|
62
|
+
# is "not installed". This might not be the truth, but who gives a fuck
|
63
|
+
# about Visual Basic anymore?!
|
64
|
+
return nil if [c_and_cpp, csharp].all?{|product| product.nil?}
|
38
65
|
|
39
|
-
|
40
|
-
|
66
|
+
name = Helpers::PrettyString.new VisualStudio::VERSION_TO_NAME[version],
|
67
|
+
pretty: VisualStudio::VERSION_TO_PRETTY_NAME[version]
|
41
68
|
|
42
|
-
|
43
|
-
VisualStudio::Install.new(name: VERSION_TO_NAME[version],
|
44
|
-
version: version,
|
45
|
-
root: install,
|
46
|
-
toolsets: Hashie::Mash.new({
|
47
|
-
c: c_and_cpp,
|
48
|
-
cpp: c_and_cpp,
|
49
|
-
csharp: csharp }),
|
50
|
-
sdks: Hashie::Mash.new({
|
51
|
-
windows: nil }))
|
52
|
-
end
|
69
|
+
root = File.expand_path(File.join([c_and_cpp, csharp].compact.first.root, '..'))
|
53
70
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
return nil
|
65
|
-
end
|
66
|
-
end
|
71
|
+
products = {c_and_cpp: c_and_cpp, csharp: csharp}
|
72
|
+
products = products.reject{|_, v| v.nil?}
|
73
|
+
|
74
|
+
VisualStudio::Install.new(name: name,
|
75
|
+
version: version,
|
76
|
+
root: root,
|
77
|
+
products: products)
|
78
|
+
else
|
79
|
+
# TODO(mtwilliams): Raise an exception.
|
80
|
+
# raise VisualStudio::InvalidVersion.new(...)
|
67
81
|
end
|
82
|
+
end
|
68
83
|
end
|
69
84
|
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
module VisualStudio
|
2
|
+
class Product
|
3
|
+
NAMES = ['VC', 'VC#']
|
4
|
+
PRETTY_NAMES = ['Visual C/C++', 'Visual C#']
|
5
|
+
NAME_TO_PRETTY_NAME = Hash[NAMES.zip(PRETTY_NAMES)]
|
6
|
+
|
7
|
+
attr_reader :name,
|
8
|
+
:version,
|
9
|
+
:root,
|
10
|
+
:includes,
|
11
|
+
:libraries,
|
12
|
+
:binaries,
|
13
|
+
:sdks,
|
14
|
+
:supports
|
15
|
+
|
16
|
+
def initialize(desc)
|
17
|
+
@name = desc[:name]
|
18
|
+
@version = desc[:version]
|
19
|
+
@root = desc[:root]
|
20
|
+
@includes = desc[:includes]
|
21
|
+
@libraries = desc[:libraries]
|
22
|
+
@binaries = desc[:binaries]
|
23
|
+
@sdks = desc[:sdks]
|
24
|
+
@supports = desc[:supports]
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.find(product, version)
|
28
|
+
if VisualStudio::Product::NAMES.include?(product)
|
29
|
+
name = Helpers::PrettyString.new VisualStudio::VERSION_TO_NAME[version],
|
30
|
+
pretty: VisualStudio::VERSION_TO_PRETTY_NAME[version]
|
31
|
+
|
32
|
+
root = self._find_via_registry(product, version)
|
33
|
+
return nil if root.nil?
|
34
|
+
|
35
|
+
includes, libraries, binaries =
|
36
|
+
case product
|
37
|
+
when 'VC'
|
38
|
+
case version.to_f
|
39
|
+
when 8.0..11.0
|
40
|
+
# TODO(mtwilliams): Check if x86_64 support exists.
|
41
|
+
includes = [File.join(root, 'VC', 'include')]
|
42
|
+
libraries = {:x86 => [File.join(root, 'VC', 'lib')],
|
43
|
+
:x86_64 => []}
|
44
|
+
binaries = {:x86 => [File.join(root, 'VC', 'bin')],
|
45
|
+
:x86_64 => []}
|
46
|
+
[includes, libraries, binaries]
|
47
|
+
when 12.0..14.0
|
48
|
+
# TODO(mtwilliams): Select the 64-bit and ARM host variants
|
49
|
+
# when applicable, i.e. when running on 64-bit or ARM.
|
50
|
+
includes = [File.join(root, 'VC', 'include')]
|
51
|
+
libraries = {:x86 => [File.join(root, 'VC', 'lib')],
|
52
|
+
:x86_64 => [File.join(root, 'VC', 'lib', 'amd64')],
|
53
|
+
:arm => [File.join(root, 'VC', 'lib', 'arm')]}
|
54
|
+
binaries = {:x86 => [File.join(root, 'VC', 'bin')],
|
55
|
+
:x86_64 => [File.join(root, 'VC', 'bin', 'x86_amd64')],
|
56
|
+
:arm => [File.join(root, 'VC', 'bin', 'x86_arm')]}
|
57
|
+
[includes, libraries, binaries]
|
58
|
+
else
|
59
|
+
# TODO(mtwilliams): Raise a proper extension.
|
60
|
+
# raise VisualStudio::Unsupported(...)
|
61
|
+
raise "Wha-?"
|
62
|
+
end
|
63
|
+
when 'VC#'
|
64
|
+
# TODO(mtwilliams): Determine search paths.
|
65
|
+
[[], {}, {}]
|
66
|
+
end
|
67
|
+
|
68
|
+
# TODO(mtwilliams): Handle the Xbox One and PS4.
|
69
|
+
# TODO(mtwilliams): Actually search for the SDKs.
|
70
|
+
sdks = VisualStudio::VERSION_TO_SDKS[version][:windows]
|
71
|
+
|
72
|
+
platforms = [:windows]
|
73
|
+
architectures = case product
|
74
|
+
when 'VC'
|
75
|
+
case version.to_f
|
76
|
+
when 8.0..11.0
|
77
|
+
# TODO(mtwilliams): Check if x86_64 support exists.
|
78
|
+
[:x86]
|
79
|
+
when 12.0..14.0
|
80
|
+
[:x86, :x86_64, :arm]
|
81
|
+
end
|
82
|
+
when 'VC#'
|
83
|
+
# TODO(mtwilliams): Determine 64-bit support?
|
84
|
+
[:x86, :x86_64, :arm]
|
85
|
+
end
|
86
|
+
|
87
|
+
VisualStudio::Product.new(name: name,
|
88
|
+
version: version,
|
89
|
+
root: root,
|
90
|
+
includes: includes,
|
91
|
+
libraries: libraries,
|
92
|
+
binaries: binaries,
|
93
|
+
sdks: ({windows: sdks}),
|
94
|
+
supports: ({platforms: platforms,
|
95
|
+
architectures: architectures}))
|
96
|
+
else
|
97
|
+
# TODO(mtwilliams): Raise an exception.
|
98
|
+
# raise VisualStudio::InvalidVersion.new(...)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
private
|
103
|
+
def self._find_via_registry(product, version)
|
104
|
+
# We try to find a full version of Visual Studio. If we can't, then
|
105
|
+
# we look for standalone verions, i.e. Express Editions. This is only
|
106
|
+
# required for 2005-2010 so this logic can be removed when we drop
|
107
|
+
# support for them.
|
108
|
+
keys = ["SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\#{version}\\Setup\\#{product}",
|
109
|
+
"SOFTWARE\\Microsoft\\VisualStudio\\#{version}\\Setup\\#{product}",
|
110
|
+
"SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\#{version}\\Setup\\#{product}",
|
111
|
+
"SOFTWARE\\Microsoft\\VCExpress\\#{version}\\Setup\\#{product}"]
|
112
|
+
installs = keys.map do |key|
|
113
|
+
begin
|
114
|
+
require 'win32/registry'
|
115
|
+
return File.expand_path(::Win32::Registry::HKEY_LOCAL_MACHINE.open(key, ::Win32::Registry::KEY_READ)['ProductDir']).to_s
|
116
|
+
rescue
|
117
|
+
end
|
118
|
+
end
|
119
|
+
installs.compact.first
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/lib/visual_studio.rb
CHANGED
@@ -1,43 +1,70 @@
|
|
1
|
-
require 'hashie'
|
2
|
-
|
3
1
|
module VisualStudio
|
4
|
-
|
2
|
+
NAMES = ['vs2015', 'vs2013', 'vs2012', 'vs2010', 'vs2008', 'vs2005']
|
5
3
|
|
6
|
-
|
7
|
-
|
4
|
+
PRETTY_NAMES = ['Visual Studio 2015', 'Visual Studio 2013',
|
5
|
+
'Visual Studio 2012', 'Visual Studio 2010',
|
6
|
+
'Visual Studio 2008', 'Visual Studio 2005']
|
8
7
|
|
9
|
-
|
10
|
-
VisualStudio::Name.new('vs2013', pretty: 'Visual Studio 2013'),
|
11
|
-
VisualStudio::Name.new('vs2012', pretty: 'Visual Studio 2012'),
|
12
|
-
VisualStudio::Name.new('vs2010', pretty: 'Visual Studio 2010'),
|
13
|
-
VisualStudio::Name.new('vs2008', pretty: 'Visual Studio 2008'),
|
14
|
-
VisualStudio::Name.new('vs2005', pretty: 'Visual Studio 2005'),
|
15
|
-
VisualStudio::Name.new('vs2003', pretty: 'Visual Studio .NET 2003'),
|
16
|
-
VisualStudio::Name.new('vs2003', pretty: 'Visual Studio .NET 2002'),
|
17
|
-
VisualStudio::Name.new('vs6', pretty: 'Visual Studio 6.0')]
|
8
|
+
VERSIONS = [14.0, 12.0, 11.0, 10.0, 9.0, 8.0].map(&:to_s)
|
18
9
|
|
19
|
-
|
10
|
+
SDKS = [{windows: %w{10.0 8.1 8.0 7.1}},
|
11
|
+
{windows: %w{8.1 8.0 7.1}},
|
12
|
+
{windows: %w{8.1 8.0 7.1}},
|
13
|
+
{windows: %w{8.1 8.0 7.1}},
|
14
|
+
{windows: %w{7.1 7.0}},
|
15
|
+
{windows: %w{7.1 7.0}}]
|
20
16
|
|
21
17
|
NAME_TO_VERSION = Hash[NAMES.zip(VERSIONS)]
|
22
18
|
VERSION_TO_NAME = Hash[VERSIONS.zip(NAMES)]
|
23
19
|
|
24
|
-
|
25
|
-
|
20
|
+
NAME_TO_PRETTY_NAME = Hash[NAMES.zip(PRETTY_NAMES)]
|
21
|
+
VERSION_TO_PRETTY_NAME = Hash[VERSIONS.zip(PRETTY_NAMES)]
|
22
|
+
|
23
|
+
NAME_TO_SDKS = Hash[NAMES.zip(SDKS)]
|
24
|
+
VERSION_TO_SDKS = Hash[VERSIONS.zip(SDKS)]
|
25
|
+
|
26
|
+
require 'visual_studio/helpers/pretty_string'
|
27
|
+
|
28
|
+
require 'visual_studio/install'
|
29
|
+
require 'visual_studio/product'
|
30
|
+
|
31
|
+
def self.available?(name_or_version=nil)
|
32
|
+
self.installed?(name_or_version)
|
26
33
|
end
|
27
34
|
|
28
|
-
def self.installed?(name_or_version)
|
29
|
-
|
35
|
+
def self.installed?(name_or_version=nil)
|
36
|
+
if name_or_version
|
37
|
+
VisualStudio::Install.available?(name_or_version)
|
38
|
+
else
|
39
|
+
VisualStudio::VERSIONS.any?{|version| VisualStudio.installed?(version)}
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.install(name_or_version=nil)
|
44
|
+
if name_or_version
|
45
|
+
self.find(name_or_version)
|
46
|
+
else
|
47
|
+
self.latest
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.latest
|
52
|
+
VisualStudio::Install.latest
|
30
53
|
end
|
31
54
|
|
32
55
|
def self.find(name_or_version)
|
33
56
|
VisualStudio::Install.find(name_or_version)
|
34
57
|
end
|
35
58
|
|
59
|
+
def self.find_by(criteria)
|
60
|
+
VisualStudio::Install.find_by(criteria)
|
61
|
+
end
|
62
|
+
|
36
63
|
def self.find_by_name(name)
|
37
64
|
VisualStudio::Install.find_by_name(name)
|
38
65
|
end
|
39
66
|
|
40
67
|
def self.find_by_version(version)
|
41
|
-
VisualStudio::Install.find_by_version(
|
68
|
+
VisualStudio::Install.find_by_version(name)
|
42
69
|
end
|
43
70
|
end
|
data/visual_studio.gemspec
CHANGED
@@ -1,26 +1,25 @@
|
|
1
1
|
$:.push File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
|
2
|
-
require 'visual_studio/
|
2
|
+
require 'visual_studio/gem'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
|
6
|
-
s.
|
5
|
+
# This information has been refactored into `lib/visual_studio/gem.lib`.
|
6
|
+
s.name = VisualStudio::Gem.name
|
7
|
+
s.version = VisualStudio::Gem.version
|
7
8
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.author =
|
9
|
-
s.email =
|
10
|
-
s.homepage =
|
11
|
-
s.summary =
|
12
|
-
s.description =
|
13
|
-
s.license =
|
9
|
+
s.author = VisualStudio::Gem.author.name
|
10
|
+
s.email = VisualStudio::Gem.author.email
|
11
|
+
s.homepage = VisualStudio::Gem.homepage
|
12
|
+
s.summary = VisualStudio::Gem.summary
|
13
|
+
s.description = VisualStudio::Gem.description
|
14
|
+
s.license = VisualStudio::Gem.license
|
14
15
|
|
15
|
-
s.required_ruby_version = '>=
|
16
|
+
s.required_ruby_version = '>= 2.0.0'
|
16
17
|
|
17
18
|
s.files = `git ls-files`.split("\n")
|
18
19
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
21
|
s.require_paths = %w(lib)
|
21
22
|
|
22
|
-
s.add_dependency 'hashie'
|
23
|
-
|
24
23
|
s.add_development_dependency 'rspec'
|
25
24
|
s.add_development_dependency 'cucumber'
|
26
25
|
s.add_development_dependency 'aruba'
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
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.4
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: hashie
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rspec
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,9 +65,10 @@ files:
|
|
79
65
|
- README.md
|
80
66
|
- Rakefile
|
81
67
|
- lib/visual_studio.rb
|
68
|
+
- lib/visual_studio/gem.rb
|
69
|
+
- lib/visual_studio/helpers/pretty_string.rb
|
82
70
|
- lib/visual_studio/install.rb
|
83
|
-
- lib/visual_studio/
|
84
|
-
- lib/visual_studio/version.rb
|
71
|
+
- lib/visual_studio/product.rb
|
85
72
|
- visual_studio.gemspec
|
86
73
|
- visual_studio.sublime-project
|
87
74
|
homepage: https://github.com/mtwilliams/visual_studio
|
@@ -96,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
83
|
requirements:
|
97
84
|
- - ">="
|
98
85
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
86
|
+
version: 2.0.0
|
100
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
88
|
requirements:
|
102
89
|
- - ">="
|
data/lib/visual_studio/name.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
class VisualStudio
|
2
|
-
module VERSION #:nodoc:
|
3
|
-
MAJOR, MINOR, PATCH, PRE = [0, 0, 0, 3]
|
4
|
-
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
|
5
|
-
end
|
6
|
-
|
7
|
-
# Returns the semantic version of `visual_studio`.
|
8
|
-
def self.version
|
9
|
-
VisualStudio::VERSION::STRING
|
10
|
-
end
|
11
|
-
end
|