localized_gems 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.autotest ADDED
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
data/.gemtest ADDED
File without changes
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2011-10-03
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,9 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/localized_gems
7
+ lib/localized_gems.rb
8
+ lib/gem_helpers.rb
9
+ test/test_localized_gems.rb
data/README.txt ADDED
@@ -0,0 +1,40 @@
1
+ = localized_gems
2
+
3
+ * https://cyberconnect.biz/opensource/qa_robusta.html
4
+
5
+ == DESCRIPTION:
6
+
7
+ Cross platform utility for installing gems on a per project basis
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * There are great tools out there such as RVM or PIK. Each of these are
12
+ intended for a specific platform. When one just needs a cross platform means
13
+ to install gems to a given project, such that the system gem path isn't
14
+ interfeared with localized_gems can help.
15
+
16
+ == SYNOPSIS:
17
+
18
+ in your project's rake file:
19
+ require 'localized_gems'
20
+
21
+ Then define a task such as:
22
+
23
+ namespace :install do
24
+ desc "install gems to project"
25
+ task :gems do
26
+ reqs = [ 'some gem 1', 'some gem 2 -v 0.1.10' ]
27
+ reqs.each { |gem| GemHelpers.install(gem, "#{base_dir}/gems/installed") }
28
+ end
29
+ end
30
+
31
+
32
+ == INSTALL:
33
+
34
+ * gem install localized_gems
35
+
36
+ == LICENSE:
37
+ GPLv3: http://www.gnu.org/licenses/gpl.html
38
+
39
+ Copyright (c) 2011 Cliff Cyphers
40
+
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+
7
+ Hoe.spec 'localized_gems' do
8
+ developer('Cliff Cyphers', 'cliff.cyphers@gmail.com')
9
+ end
10
+
11
+ # vim: syntax=ruby
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+
@@ -0,0 +1,23 @@
1
+ require 'rubygems'
2
+ require 'find'
3
+ require 'fileutils'
4
+
5
+ module GemHelpers
6
+ def self.update_gem_path(path)
7
+ Gem.clear_paths
8
+ ENV['GEM_HOME'] = File.expand_path(path)
9
+ ENV['GEM_PATH'] = File.expand_path(path)
10
+ end
11
+
12
+ # TODO once the cross platform gem install is working as expected
13
+ # copy over to other projects
14
+ def self.install(gem, install_dir)
15
+ begin
16
+ `gem install #{gem} --no-rdoc --no-ri -i #{install_dir}`
17
+ rescue => e
18
+ end
19
+ #fork { exec("gem install #{gem} --no-rdoc --no-ri -i #{install_dir}") }
20
+ #Process.wait2
21
+ end
22
+
23
+ end
@@ -0,0 +1,3 @@
1
+ class LocalizedGems
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,8 @@
1
+ require "test/unit"
2
+ require "localized_gems"
3
+
4
+ class TestLocalizedGems < Test::Unit::TestCase
5
+ def test_sanity
6
+ flunk "write tests or I will kneecap you"
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: localized_gems
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Cliff Cyphers
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-10-04 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: "2.12"
24
+ type: :development
25
+ version_requirements: *id001
26
+ description: Cross platform utility for installing gems on a per project basis
27
+ email:
28
+ - cliff.cyphers@gmail.com
29
+ executables:
30
+ - localized_gems
31
+ extensions: []
32
+
33
+ extra_rdoc_files:
34
+ - History.txt
35
+ - Manifest.txt
36
+ - README.txt
37
+ files:
38
+ - .autotest
39
+ - History.txt
40
+ - Manifest.txt
41
+ - README.txt
42
+ - Rakefile
43
+ - bin/localized_gems
44
+ - lib/localized_gems.rb
45
+ - lib/gem_helpers.rb
46
+ - test/test_localized_gems.rb
47
+ - .gemtest
48
+ homepage: https://cyberconnect.biz/opensource/qa_robusta.html
49
+ licenses: []
50
+
51
+ post_install_message:
52
+ rdoc_options:
53
+ - --main
54
+ - README.txt
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ requirements: []
70
+
71
+ rubyforge_project: localized_gems
72
+ rubygems_version: 1.8.10
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: Cross platform utility for installing gems on a per project basis
76
+ test_files:
77
+ - test/test_localized_gems.rb