geminstaller-exec 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/README ADDED
@@ -0,0 +1,20 @@
1
+ == Install ==
2
+
3
+ gem install geminstaller-exec
4
+
5
+ == Usage ==
6
+
7
+ Assume file /var/www/apps/blog/config/geminstaller.yml exists and contains:
8
+
9
+ ...
10
+
11
+ - name: rack
12
+ version: 1.0.1
13
+ ...
14
+
15
+ $ cd /var/www/apps/blog && geminstaller-exec rackup
16
+ $ geminstaller-exec -c /var/www/apps/blog/config/geminstaller.yml rackup --server thin
17
+
18
+ It will run rackup command from proper gem:
19
+
20
+ rackup _1.0.1_ --server thin
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/ruby
2
+
3
+ require 'rubygems'
4
+ require 'geminstaller'
5
+
6
+ if %w(-c --config).include?(ARGV[0])
7
+ ARGV.shift
8
+ geminstaller_config = ARGV.shift
9
+ gem_bin = ARGV.shift
10
+ else
11
+ geminstaller_config = File.expand_path("config/geminstaller.yml")
12
+ gem_bin = ARGV.shift
13
+ end
14
+
15
+ raise ArgumentError, "Can't find geminstaller config #{geminstaller_config.inspect}" unless File.exists?(geminstaller_config)
16
+
17
+ GemInstaller.autogem("--exceptions --config #{geminstaller_config}")
18
+ name, spec = Gem.loaded_specs.detect { |name, spec| spec.executables.include?(gem_bin) }
19
+
20
+ raise ArgumentError, "Can't find gem specification for #{gem_bin.inspect} executable" unless spec
21
+
22
+ exec "#{gem_bin} _#{spec.version}_ #{ARGV.join(' ')}"
@@ -0,0 +1,23 @@
1
+ # encoding: utf-8
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'geminstaller-exec'
5
+
6
+ s.version = `git tag | tail -1`.strip
7
+ s.date = Time.now.strftime("%F")
8
+
9
+ s.summary = "Run gem executable with proper version from geminstaller config"
10
+ s.description = "Run gem executable using geminstaller similar to 'bundle exec'"
11
+
12
+ s.authors = ['Andriy Yanko']
13
+ s.email = 'andriy.yanko@gmail.com'
14
+ s.homepage = 'http://github.com/ayanko/geminstaller-exec'
15
+
16
+ s.has_rdoc = false
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.executables = %(geminstaller-exec)
20
+
21
+ s.add_dependency('geminstaller', '>=0.5.3')
22
+ end
23
+
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: geminstaller-exec
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Andriy Yanko
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-27 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: geminstaller
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 13
30
+ segments:
31
+ - 0
32
+ - 5
33
+ - 3
34
+ version: 0.5.3
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ description: Run gem executable using geminstaller similar to 'bundle exec'
38
+ email: andriy.yanko@gmail.com
39
+ executables:
40
+ - geminstaller-exec
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - README
47
+ - bin/geminstaller-exec
48
+ - geminstaller-exec.gemspec
49
+ has_rdoc: false
50
+ homepage: http://github.com/ayanko/geminstaller-exec
51
+ licenses: []
52
+
53
+ post_install_message:
54
+ rdoc_options: []
55
+
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 3
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
75
+ version: "0"
76
+ requirements: []
77
+
78
+ rubyforge_project:
79
+ rubygems_version: 1.3.7
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: Run gem executable with proper version from geminstaller config
83
+ test_files: []
84
+