railsversions 0.0.1
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.
- data/MIT-LICENSE +20 -0
- data/README.textile +13 -0
- data/bin/railsversions +52 -0
- data/lib/dummy +0 -0
- metadata +65 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 funkensturm.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.textile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
h3. Railsversions
|
2
|
+
|
3
|
+
This is a most simple gem to show you which Rails versions your apps are depending on (by looking into each @environment.rb@).
|
4
|
+
|
5
|
+
h3. Usage
|
6
|
+
|
7
|
+
Hit this into your console:
|
8
|
+
|
9
|
+
<pre>
|
10
|
+
railsversions
|
11
|
+
</pre>
|
12
|
+
|
13
|
+
And it will show you all versions of all apps located at @/u/apps@. Note that this supports capistrano's @current@ subdirectory as well to identify the version.
|
data/bin/railsversions
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
case ARGV.first
|
4
|
+
when 'help', 'h', '-h', '--h', '--help'
|
5
|
+
puts
|
6
|
+
puts 'Usage: railsversions [path]'
|
7
|
+
puts
|
8
|
+
puts 'Examples:'
|
9
|
+
puts ' railsversions (equals to "railsversions /u/apps")'
|
10
|
+
puts ' railsversions .'
|
11
|
+
puts ' railsversions /home/me/development/apps'
|
12
|
+
puts
|
13
|
+
exit 0
|
14
|
+
when String
|
15
|
+
APPS_DIR = ARGV.first
|
16
|
+
else
|
17
|
+
APPS_DIR = '/u/apps'
|
18
|
+
end
|
19
|
+
|
20
|
+
unless File.directory?(APPS_DIR)
|
21
|
+
puts
|
22
|
+
puts "Directory not found: #{APPS_DIR}"
|
23
|
+
puts
|
24
|
+
exit 1
|
25
|
+
end
|
26
|
+
puts
|
27
|
+
puts "Checking Rails versions of apps located in #{APPS_DIR}"
|
28
|
+
|
29
|
+
result = []
|
30
|
+
for app in Dir.glob(File.join(APPS_DIR, '*')) do
|
31
|
+
|
32
|
+
git = ''
|
33
|
+
if File.file?(withgit = File.join(app, 'config', 'environment.rb'))
|
34
|
+
environment = File.new(withgit).read
|
35
|
+
elsif File.file?(nogit = File.join(app, 'current', 'config', 'environment.rb'))
|
36
|
+
git = ' (capistrano)'
|
37
|
+
environment = File.new(nogit).read
|
38
|
+
else
|
39
|
+
next
|
40
|
+
end
|
41
|
+
|
42
|
+
result << environment.scan(/RAILS_GEM_VERSION = '(.*)'/).to_s + ' ' + app.gsub("#{APPS_DIR}/", '') + git
|
43
|
+
end
|
44
|
+
|
45
|
+
puts "I found #{result.size} applications."
|
46
|
+
puts
|
47
|
+
|
48
|
+
if result.size > 0
|
49
|
+
puts result.sort
|
50
|
+
puts
|
51
|
+
end
|
52
|
+
|
data/lib/dummy
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: railsversions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Captain Future
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-03-09 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: " Just type \"railsversions\" in your console to see which apps use which version of Rails. The apps have to be located at /u/apps and may be deployed via capistrano (i.e. having a \"current\" subdir).\n"
|
22
|
+
email:
|
23
|
+
executables:
|
24
|
+
- railsversions
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- README.textile
|
29
|
+
files:
|
30
|
+
- MIT-LICENSE
|
31
|
+
- README.textile
|
32
|
+
- lib/dummy
|
33
|
+
- bin/railsversions
|
34
|
+
has_rdoc: true
|
35
|
+
homepage: http://github.com/funkensturm/railsversions
|
36
|
+
licenses: []
|
37
|
+
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
|
41
|
+
require_paths:
|
42
|
+
- lib
|
43
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
version: "0"
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
requirements: []
|
58
|
+
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.3.6
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: Reveals the rails versions used by your apps in /u/apps
|
64
|
+
test_files: []
|
65
|
+
|