specs 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZWRhMzIxODY1MTg5ODdjZWVmOGIwYmYzMTg5MThiMjJjYTY4OTFiZg==
5
- data.tar.gz: !binary |-
6
- ZDVmNWZlMjJjOGEzODlmY2UyNGI2OGJiNjI4ODZmNTU5ODI5NDdhNA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZjljM2M3NjkwYzA4ZDkxYzZmMzJkMTljMjRkNmI4ZTQwNWQ1YzlkN2RiOGY0
10
- NzJmOGY5MjY2ODc4ZDViNmE2MTcwMGVmOTllZDFkNmI5MDBiMWNkMjdlZGY2
11
- ZDRlOGZjYzQ3YjQxNWIwYTA1ZDMzNzFiZDc5MzkwNWMxZGNmODI=
12
- data.tar.gz: !binary |-
13
- Mjc2MzkxNzY3MDk1NzgzNGI0NjRmN2Q0NDRkYTE1M2VkMDA3MDE3MjdmMTll
14
- MjAzN2U1OTUwMTcxNDYxMTJiZGY0OTNmMDk1ODdhOGM0MTg1ZGFkNjY2NjYw
15
- OTZjODUxZjkyMDU0NTk3MDQ3ZjgyODFkZWQwYWQzOWJmZDE1M2Q=
2
+ SHA1:
3
+ metadata.gz: 537747d8504718798530797d4673ead8c28b2413
4
+ data.tar.gz: 6825070fdcf6c542cd755220b205b483f025eafc
5
+ SHA512:
6
+ metadata.gz: 4cc1a861615cd9d41ab9736f4057f644385a250b8382fbe2556460b620e6d691185872283295e069233c0533528733375b9f0a6ba8437d0fa9f66fd2016979c8
7
+ data.tar.gz: 258f4623e2c0e6bb1ec13e8df1516b577614b56e90f4c32903857d50dad231418770362d9159efc094ddcf3f92a6380de046b5fde09c17191054264fd63beeb2
data/LICENSE.md CHANGED
@@ -1,23 +1,23 @@
1
- # FreeBSD License
2
-
3
- # Copyright 2012 Andrew Pennebaker. All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
- 2. Redistributions in binary form must reproduce the above copyright notice,
11
- this list of conditions and the following disclaimer in the documentation and/or
12
- other materials provided with the distribution.
13
-
14
- THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED
15
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
17
- SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1
+ # FreeBSD License
2
+
3
+ # Copyright 2012 Andrew Pennebaker. All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+ 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation and/or
12
+ other materials provided with the distribution.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS" AND ANY EXPRESS OR IMPLIED
15
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
17
+ SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
19
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
21
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23
23
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/bin/specs CHANGED
File without changes
@@ -0,0 +1,7 @@
1
+ module Recipe
2
+ module Package
3
+ def self.brew(package)
4
+ "brew list #{package}"
5
+ end
6
+ end
7
+ end
@@ -4,7 +4,7 @@ module Recipe
4
4
  end
5
5
 
6
6
  def self.clj
7
- "lein exec '(println \"Clojure \" (clojure-version))'"
7
+ "lein exec -e '(println \"Clojure \" (clojure-version))'"
8
8
  end
9
9
 
10
10
  def self.clojure
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.dmake
3
+ "dmake -V"
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ module Recipe
2
+ def self.rebar
3
+ "rebar -V"
4
+ end
5
+
6
+ def self.erl
7
+ "erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell"
8
+ end
9
+
10
+ def self.erlang
11
+ [rebar, erl]
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.fabric
3
+ "fab --version"
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.go
3
+ "go version"
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ module Recipe
2
+ def self.hadoophome
3
+ if Os.windows? and not Os.mingw?
4
+ "echo %HADOOP_PREFIX%"
5
+ else
6
+ "echo $HADOOP_PREFIX"
7
+ end
8
+ end
9
+
10
+ def self.hadoopversion
11
+ if Os.windows? and not Os.mingw?
12
+ "echo %HADOOP_VERSION%"
13
+ else
14
+ "echo $HADOOP_VERSION"
15
+ end
16
+ end
17
+
18
+ def self.hadoopcommand
19
+ "hadoop version"
20
+ end
21
+
22
+ def self.hadoop
23
+ [hadoophome, hadoopversion, hadoopcommand]
24
+ end
25
+ end
@@ -1,4 +1,10 @@
1
1
  module Recipe
2
+ module Package
3
+ def self.cabal(package)
4
+ "ghc-pkg list #{package}"
5
+ end
6
+ end
7
+
2
8
  def self.cabal
3
9
  "cabal --version"
4
10
  end
@@ -0,0 +1,9 @@
1
+ module Recipe
2
+ def self.hd
3
+ if Os.windows?
4
+ "fsutil fsinfo drives"
5
+ else
6
+ "df -h"
7
+ end
8
+ end
9
+ end
@@ -1,19 +1,16 @@
1
1
  module Recipe
2
2
  def self.inkscape
3
- # Assumes Inkscape is installed in default directory.
4
- if Os.windows?
3
+ case Os.os_name
4
+ when :windows
5
5
  if Os.x86_64?
6
6
  "C:\\Program Files (x86)\\Inkscape\\inkscape --version"
7
- elsif Os.x86?
7
+ else
8
8
  "\"C:\\Program Files\\Inkscape\\inkscape\" --version"
9
9
  end
10
- elsif Os.mac?
10
+ when :mac
11
11
  "/Applications/Inkscape.app/Contents/Resources/bin/inkscape --version"
12
- # Assumes:
13
- # * OS is a Unix variant.
14
- # * inkscape is in PATH.
15
12
  else
16
- "inkscape --version"
13
+ "inkscape --version"
17
14
  end
18
15
  end
19
16
  end
@@ -1,5 +1,29 @@
1
1
  module Recipe
2
- def self.java
2
+ def self.mvn
3
+ "mvn --version"
4
+ end
5
+
6
+ def self.classpath
7
+ if Os.windows? and not Os.mingw?
8
+ "echo %CLASSPATH"
9
+ else
10
+ "echo $CLASSPATH"
11
+ end
12
+ end
13
+
14
+ def self.javahome
15
+ if Os.windows? and not Os.mingw?
16
+ "echo %JAVA_HOME%"
17
+ else
18
+ "echo $JAVA_HOME"
19
+ end
20
+ end
21
+
22
+ def self.oak
3
23
  "java -version"
4
24
  end
25
+
26
+ def self.java
27
+ [mvn, classpath, javahome, oak]
28
+ end
5
29
  end
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.links
3
+ "links -version"
4
+ end
5
+ end
@@ -1,5 +1,11 @@
1
1
  module Recipe
2
- def self.npm
2
+ module Package
3
+ def self.npm(package)
4
+ "npm list #{package}"
5
+ end
6
+ end
7
+
8
+ def self.npm_tool
3
9
  "npm --version"
4
10
  end
5
11
 
@@ -8,6 +14,6 @@ module Recipe
8
14
  end
9
15
 
10
16
  def self.node
11
- [npm, js]
17
+ [npm_tool, js]
12
18
  end
13
19
  end
@@ -1,17 +1,13 @@
1
- module Recipe
2
- def self.ppm
3
- "ppm --version"
4
- end
5
-
6
- def self.cpan
7
- "cpan --version"
8
- end
9
-
10
- def self.pl
11
- "perl --version"
12
- end
13
-
14
- def self.perl
15
- [ppm, cpan, pl]
16
- end
17
- end
1
+ module Recipe
2
+ def self.cpan
3
+ "cpan --version"
4
+ end
5
+
6
+ def self.pl
7
+ "perl --version"
8
+ end
9
+
10
+ def self.perl
11
+ [cpan, pl]
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Recipe
2
+ def self.pip
3
+ "pip --version"
4
+ end
5
+
6
+ def self.py
7
+ "python --version"
8
+ end
9
+
10
+ def self.python
11
+ [pip, py]
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ module Recipe
2
+ def self.redis_cli
3
+ "redis-cli --version"
4
+ end
5
+
6
+ def self.redis_server
7
+ "redis-server --version"
8
+ end
9
+
10
+ def self.redis
11
+ [redis_cli, redis_server]
12
+ end
13
+ end
@@ -5,6 +5,10 @@ module Recipe
5
5
  end
6
6
  end
7
7
 
8
+ def self.bundler
9
+ "bundle --version"
10
+ end
11
+
8
12
  def self.rubygems
9
13
  "gem --version"
10
14
  end
@@ -14,6 +18,6 @@ module Recipe
14
18
  end
15
19
 
16
20
  def self.ruby
17
- [rubygems, rb]
21
+ [bundler, rubygems, rb]
18
22
  end
19
23
  end
@@ -1,5 +1,13 @@
1
1
  module Recipe
2
- def self.scala
2
+ def self.scalac
3
3
  "scalac -version"
4
4
  end
5
+
6
+ def self.sbt
7
+ "sbt sbt-version"
8
+ end
9
+
10
+ def self.scala
11
+ [sbt, scalac, java]
12
+ end
5
13
  end
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.tap
3
+ "tap --version"
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Recipe
2
+ def self.thrift
3
+ "thrift -version"
4
+ end
5
+ end
@@ -1,17 +1,16 @@
1
1
  module Recipe
2
2
  def self.virtualbox
3
- # Assumes Firefox is installed in the default directory.
4
- if Os.windows?
3
+ case Os.os_name
4
+ when :windows
5
5
  if Os.x86?
6
6
  "\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage\" --version"
7
- elsif Os.x86_64?
7
+ else
8
8
  "C:\\Program Files (x86)\\Oracle\\VirtualBox\\VBoxManage --version"
9
9
  end
10
- elsif Os.mac?
10
+ when :mac
11
11
  "/Applications/Firefox.app/Contents/MacOS/firefox --version"
12
- # Assumes firefox in PATH.
13
12
  else
14
- "firefox --version"
13
+ "firefox --version"
15
14
  end
16
15
  end
17
16
  end
@@ -29,8 +29,8 @@
29
29
  require "getoptlong"
30
30
  require "pathname"
31
31
 
32
- SPECS_VERSION = "0.4"
33
- SPECS_VERSION_STRING = "specs #{SPECS_VERSION}"
32
+ SPECS_VERSION_STRING = "specs #{Specs::VERSION}"
33
+
34
34
  SPECS_HOME_PAGE = "https://github.com/mcandre/specs#readme"
35
35
 
36
36
  SPECS_DIR = Pathname.new(File.dirname(__FILE__))
@@ -72,7 +72,7 @@ module Os
72
72
  end
73
73
 
74
74
  def self.linux?
75
- self.unix? and not self.mac? and not self.haiku?
75
+ self.unix? and not (self.mac? or self.haiku?)
76
76
  end
77
77
 
78
78
  def self.x86_64?
@@ -82,6 +82,20 @@ module Os
82
82
  def self.x86?
83
83
  !self.x86_64?
84
84
  end
85
+
86
+ def self.os_name
87
+ if self.windows?
88
+ :windows
89
+ elsif self.mac?
90
+ :mac
91
+ elsif self.linux?
92
+ :linux
93
+ elsif self.haiku?
94
+ :haiku
95
+ else
96
+ :unix
97
+ end
98
+ end
85
99
  end
86
100
 
87
101
  module Recipe
@@ -99,14 +113,14 @@ module Recipe
99
113
  end
100
114
 
101
115
  def self.os
102
- if Os.windows?
116
+ case Os.os_name
117
+ when :windows
103
118
  "systeminfo | findstr /B /C:\"OS Name\" /C:\"OS Version\""
104
- elsif Os.mac?
105
- "system_profiler SPSoftwareDataType | grep 'System Version'"
106
- elsif Os.linux?
119
+ when :mac
120
+ "system_profiler SPSoftwareDataType | grep 'System Version'"
121
+ when :linux
107
122
  "lsb_release -a"
108
- # Unix
109
- else
123
+ when :unix
110
124
  "uname -a"
111
125
  end
112
126
  end
@@ -127,10 +141,14 @@ module Recipe
127
141
  RUBY_VERSION =~ /^1\.8/
128
142
  end
129
143
 
130
- def self.ruby1_9?
144
+ def self.ruby1_9?
131
145
  RUBY_VERSION =~ /^1\.9/
132
146
  end
133
147
 
148
+ def self.ruby2?
149
+ RUBY_VERSION =~ /^2/
150
+ end
151
+
134
152
  def self.rubygems
135
153
  "gem --version"
136
154
  end
@@ -206,22 +224,26 @@ def run(cmd, aspect)
206
224
  end
207
225
 
208
226
  def check_ruby_version
209
- if RUBY_VERSION =~ /^1\.8/
210
- puts "Requires Ruby 1.9+"
227
+ if Recipe.ruby1_8?
228
+ puts "Requires Ruby 1.9 or higher."
211
229
  puts "http://www.ruby-lang.org/"
212
230
  exit
213
231
  end
214
232
  end
215
233
 
216
- def main
217
- check_ruby_version
218
-
234
+ def usage
219
235
  puts "Specs:\n\n#{SPECS_VERSION_STRING}\n#{SPECS_HOME_PAGE}"
220
236
 
221
237
  exit if ARGV.include?("--version")
238
+ end
239
+
240
+ def main
241
+ check_ruby_version
242
+
243
+ usage
222
244
 
223
245
  # Default aspects
224
- aspects = ["specs", "os", "hardware"]
246
+ aspects = ["os", "hardware"]
225
247
  if !ARGV.empty?
226
248
  aspects = ARGV
227
249
  end
@@ -0,0 +1,3 @@
1
+ module Specs
2
+ VERSION = "0.5"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specs
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Pennebaker
@@ -9,7 +9,77 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2013-03-23 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: reek
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: flay
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-shell
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
13
83
  description: See README.md for example usage
14
84
  email: andrew.pennebaker@gmail.com
15
85
  executables:
@@ -18,21 +88,30 @@ extensions: []
18
88
  extra_rdoc_files: []
19
89
  files:
20
90
  - lib/specs.rb
91
+ - lib/version.rb
21
92
  - lib/aspects/as.rb
22
93
  - lib/aspects/bios.rb
94
+ - lib/aspects/brew.rb
23
95
  - lib/aspects/chicken.rb
24
96
  - lib/aspects/chocolatey.rb
25
97
  - lib/aspects/chrome.rb
26
98
  - lib/aspects/clojure.rb
27
99
  - lib/aspects/cpu.rb
100
+ - lib/aspects/dmake.rb
101
+ - lib/aspects/erlang.rb
102
+ - lib/aspects/fabric.rb
28
103
  - lib/aspects/firefox.rb
104
+ - lib/aspects/go.rb
105
+ - lib/aspects/hadoop.rb
29
106
  - lib/aspects/hardware.rb
30
107
  - lib/aspects/haskell.rb
108
+ - lib/aspects/hd.rb
31
109
  - lib/aspects/ie.rb
32
110
  - lib/aspects/inkscape.rb
33
111
  - lib/aspects/java.rb
34
112
  - lib/aspects/latex.rb
35
113
  - lib/aspects/ld.rb
114
+ - lib/aspects/links.rb
36
115
  - lib/aspects/lua.rb
37
116
  - lib/aspects/net.rb
38
117
  - lib/aspects/node.rb
@@ -41,17 +120,22 @@ files:
41
120
  - lib/aspects/oz.rb
42
121
  - lib/aspects/perl.rb
43
122
  - lib/aspects/powershell.rb
123
+ - lib/aspects/python.rb
44
124
  - lib/aspects/ram.rb
125
+ - lib/aspects/redis.rb
45
126
  - lib/aspects/ruby.rb
46
127
  - lib/aspects/scala.rb
47
128
  - lib/aspects/shell.rb
48
129
  - lib/aspects/ssh.rb
130
+ - lib/aspects/tap.rb
131
+ - lib/aspects/thrift.rb
49
132
  - lib/aspects/virtualbox.rb
50
133
  - lib/aspects/xcode.rb
51
134
  - LICENSE.md
52
135
  - bin/specs
53
136
  homepage: https://github.com/mcandre/specs
54
- licenses: []
137
+ licenses:
138
+ - FreeBSD
55
139
  metadata: {}
56
140
  post_install_message:
57
141
  rdoc_options: []
@@ -59,17 +143,17 @@ require_paths:
59
143
  - lib
60
144
  required_ruby_version: !ruby/object:Gem::Requirement
61
145
  requirements:
62
- - - ! '>='
146
+ - - '>='
63
147
  - !ruby/object:Gem::Version
64
148
  version: '0'
65
149
  required_rubygems_version: !ruby/object:Gem::Requirement
66
150
  requirements:
67
- - - ! '>='
151
+ - - '>='
68
152
  - !ruby/object:Gem::Version
69
153
  version: '0'
70
154
  requirements: []
71
155
  rubyforge_project:
72
- rubygems_version: 2.0.3
156
+ rubygems_version: 2.0.6
73
157
  signing_key:
74
158
  specification_version: 4
75
159
  summary: Software version information at your fingertips