gem-wrappers 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/Changelog.md +5 -0
- data/lib/gem-wrappers.rb +1 -1
- data/lib/gem-wrappers/version.rb +1 -1
- data/test/gem-wrappers_test.rb +72 -22
- metadata +47 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e075b6b4f798f66c121e454eb80a4a7c278904f5
|
4
|
+
data.tar.gz: 94dd562158d23de72bf322901269f4ac223aa0de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 337eef95541cecfdcc6d97161f627fa8f75c7699027f59cfc04a9511dcd07725c6746c140c9aea50768f075486b2b06f103e6ed087e09e2cde610d8491bf4bfc
|
7
|
+
data.tar.gz: dfc5917c29b21b15d9f772f9c90af75459c1bdc219a1ebf1f09cb8a0dca3e68d4f61f002e49bffd1f31577dd4c7fcdfe5752120dd85587600fd519dcedf3525c
|
data/Changelog.md
CHANGED
data/lib/gem-wrappers.rb
CHANGED
data/lib/gem-wrappers/version.rb
CHANGED
data/test/gem-wrappers_test.rb
CHANGED
@@ -8,33 +8,83 @@ describe GemWrappers do
|
|
8
8
|
GemWrappers
|
9
9
|
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
describe "fake" do
|
12
|
+
before do
|
13
|
+
@fake_installer = GemWrappers::FakeInstaller.new
|
14
|
+
@fake_envvironment = GemWrappers::FakeEnvironment.new
|
15
|
+
subject.instance_variable_set(:@installer, @fake_installer)
|
16
|
+
subject.instance_variable_set(:@environment, @fake_envvironment)
|
17
|
+
end
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
it "reads configured file" do
|
20
|
+
subject.environment_file.must_equal("/path/to/environment")
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
it "reads configured file" do
|
24
|
+
subject.wrappers_path.must_equal("/path/to/wrappers")
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
it "does create environment and wrapper" do
|
28
|
+
subject.install(%w{rake test})
|
29
|
+
@fake_envvironment.ensure?.must_equal(true)
|
30
|
+
@fake_installer.ensure?.must_equal(true)
|
31
|
+
@fake_installer.executables.must_equal(%w{rake test ruby gem erb irb ri rdoc testrb})
|
32
|
+
end
|
33
|
+
|
34
|
+
it "does remove wrapper" do
|
35
|
+
subject.install(%w{rake})
|
36
|
+
@fake_installer.executables.must_equal(%w{rake ruby gem erb irb ri rdoc testrb})
|
37
|
+
subject.uninstall(%w{rake})
|
38
|
+
@fake_installer.executables.must_equal(%w{ruby gem erb irb ri rdoc testrb})
|
39
|
+
end
|
31
40
|
end
|
32
41
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
42
|
+
describe "real" do
|
43
|
+
before do
|
44
|
+
file = Tempfile.new('wrappers')
|
45
|
+
@test_path = file.path
|
46
|
+
file.close
|
47
|
+
file.unlink
|
48
|
+
Dir.mkdir(@test_path)
|
49
|
+
|
50
|
+
subject.instance_variable_set(:@installer, nil)
|
51
|
+
subject.instance_variable_set(:@environment, nil)
|
52
|
+
|
53
|
+
@wrappers_path = File.join(@test_path, "wrappers")
|
54
|
+
@environment_path = File.join(@test_path, "environment")
|
55
|
+
@rake_wrapper = File.join(@wrappers_path, "rake")
|
56
|
+
|
57
|
+
ENV['GEMRC'] = File.join(@test_path, ".gemrc")
|
58
|
+
File.open(ENV['GEMRC'], "w") do |file|
|
59
|
+
file.write <<-GEMRC
|
60
|
+
wrappers_path: #{@wrappers_path}
|
61
|
+
wrappers_environment_file: #{@environment_path}
|
62
|
+
GEMRC
|
63
|
+
end
|
64
|
+
Gem.instance_variable_set(:@configuration, Gem::ConfigFile.new([]))
|
65
|
+
end
|
66
|
+
|
67
|
+
after do
|
68
|
+
ENV['GEMRC'] = nil
|
69
|
+
Gem.instance_variable_set(:@configuration, Gem::ConfigFile.new([]))
|
70
|
+
FileUtils.rm_rf(@test_path)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "installas wrappers" do
|
74
|
+
File.exist?(@rake_wrapper).must_equal(false)
|
75
|
+
subject.install(%w{rake})
|
76
|
+
File.exist?(@rake_wrapper ).must_equal(true)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "removes wrappers" do
|
80
|
+
File.exist?(@rake_wrapper ).must_equal(false)
|
81
|
+
Dir.mkdir(@wrappers_path)
|
82
|
+
File.open(@rake_wrapper, "w") do |file|
|
83
|
+
file.puts "small wrapper"
|
84
|
+
end
|
85
|
+
subject.uninstall(%w{rake})
|
86
|
+
File.exist?(@rake_wrapper ).must_equal(false)
|
87
|
+
end
|
38
88
|
end
|
39
89
|
|
40
90
|
end
|
metadata
CHANGED
@@ -1,45 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-wrappers
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Michal Papis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
23
20
|
type: :development
|
24
|
-
version_requirements: *id001
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: minitest
|
27
21
|
prerelease: false
|
28
|
-
|
29
|
-
requirements:
|
30
|
-
-
|
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: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
31
34
|
type: :development
|
32
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
33
41
|
description:
|
34
|
-
email:
|
42
|
+
email:
|
35
43
|
- mpapis@gmail.com
|
36
44
|
executables: []
|
37
|
-
|
38
|
-
extensions:
|
45
|
+
extensions:
|
39
46
|
- ext/wrapper_generator/extconf.rb
|
40
47
|
extra_rdoc_files: []
|
41
|
-
|
42
|
-
files:
|
48
|
+
files:
|
43
49
|
- .gitignore
|
44
50
|
- .travis.yml
|
45
51
|
- Changelog.md
|
@@ -65,29 +71,30 @@ files:
|
|
65
71
|
- test/gem-wrappers_test.rb
|
66
72
|
- test/test_helper.rb
|
67
73
|
homepage: https://github.com/rvm/gem-wrappers
|
68
|
-
licenses:
|
74
|
+
licenses:
|
69
75
|
- Apache 2.0
|
70
76
|
metadata: {}
|
71
|
-
|
72
77
|
post_install_message:
|
73
78
|
rdoc_options: []
|
74
|
-
|
75
|
-
require_paths:
|
79
|
+
require_paths:
|
76
80
|
- lib
|
77
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
-
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - '>='
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
83
91
|
requirements: []
|
84
|
-
|
85
92
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.0
|
93
|
+
rubygems_version: 2.2.0
|
87
94
|
signing_key:
|
88
95
|
specification_version: 4
|
89
96
|
summary: Create gem wrappers for easy use of gems in cron and other system locations.
|
90
|
-
test_files:
|
97
|
+
test_files:
|
91
98
|
- test/gem-wrappers/command_test.rb
|
92
99
|
- test/gem-wrappers/environment_test.rb
|
93
100
|
- test/gem-wrappers/fakes.rb
|