postit 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_cocoapods.yml +1 -0
- data/.travis.yml +63 -1
- data/CHANGELOG.md +13 -1
- data/bin/console +2 -0
- data/bin/rake +2 -0
- data/bin/rspec +2 -0
- data/bin/with_rubygems +40 -0
- data/lib/postit.rb +2 -1
- data/lib/postit/installer.rb +28 -0
- data/lib/postit/setup.rb +5 -9
- data/lib/postit/version.rb +1 -1
- data/postit.gemspec +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505113b5411183f85e338418dce37277817ada47
|
4
|
+
data.tar.gz: 20bf6f84c82093ae1237882c82d8332fdf0a18c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0c38a6db156f14af331c519385089c79e6594d6f1cbd37e8887afcb61b33dc69f894b99a7848148d0d8af4062c4022c8db61540bb496ae4a477e3f392b7e536
|
7
|
+
data.tar.gz: e6d39247851e8f6ae30a56ed5180898ab9f1ed9f3820a84decca966453b14fe49f820dcc2cb124bb76dccd72addf5496aedc5a6ab8f99a28a7df602f6b5aad49
|
data/.rubocop_cocoapods.yml
CHANGED
data/.travis.yml
CHANGED
@@ -10,5 +10,67 @@ rvm:
|
|
10
10
|
- 2.1.7
|
11
11
|
- 2.2.2
|
12
12
|
- 2.3.0
|
13
|
+
|
14
|
+
env:
|
15
|
+
- RGV=master
|
16
|
+
- RGV=v2.6.4
|
17
|
+
- RGV=v2.4.8
|
18
|
+
|
19
|
+
matrix:
|
20
|
+
include:
|
21
|
+
# Ruby 2.2, Rubygems 2.4.5 and up (included by RGV above)
|
22
|
+
# Ruby 2.1, Rubygems 2.2.2 and up
|
23
|
+
- rvm: 2.1
|
24
|
+
env: RGV=v2.2.5
|
25
|
+
# Ruby 2.0.0, Rubygems 2.0.0 and up
|
26
|
+
- rvm: 2.0.0
|
27
|
+
env: RGV=v2.2.5
|
28
|
+
- rvm: 2.0.0
|
29
|
+
env: RGV=v2.1.11
|
30
|
+
- rvm: 2.0.0
|
31
|
+
env: RGV=v2.0.14
|
32
|
+
# Ruby 1.9.3, Rubygems 1.5.3 and up
|
33
|
+
- rvm: 1.9.3
|
34
|
+
env: RGV=v2.2.5
|
35
|
+
- rvm: 1.9.3
|
36
|
+
env: RGV=v2.1.11
|
37
|
+
- rvm: 1.9.3
|
38
|
+
env: RGV=v2.0.14
|
39
|
+
- rvm: 1.9.3
|
40
|
+
env: RGV=v1.8.29
|
41
|
+
- rvm: 1.9.3
|
42
|
+
env: RGV=v1.7.2
|
43
|
+
- rvm: 1.9.3
|
44
|
+
env: RGV=v1.6.2
|
45
|
+
- rvm: 1.9.3
|
46
|
+
env: RGV=v1.5.3
|
47
|
+
# Ruby 1.8.7, Rubygems 1.3.6 and up
|
48
|
+
- rvm: 1.8.7
|
49
|
+
env: RGV=v2.2.5
|
50
|
+
- rvm: 1.8.7
|
51
|
+
env: RGV=v2.0.14
|
52
|
+
- rvm: 1.8.7
|
53
|
+
env: RGV=v1.8.29
|
54
|
+
- rvm: 1.8.7
|
55
|
+
env: RGV=v1.7.2
|
56
|
+
- rvm: 1.8.7
|
57
|
+
env: RGV=v1.6.2
|
58
|
+
- rvm: 1.8.7
|
59
|
+
env: RGV=v1.5.3
|
60
|
+
- rvm: 1.8.7
|
61
|
+
env: RGV=v1.4.2
|
62
|
+
- rvm: 1.8.7
|
63
|
+
env: RGV=v1.3.7
|
64
|
+
- rvm: 1.8.7
|
65
|
+
env: RGV=v1.3.6
|
66
|
+
|
67
|
+
# ALLOWED FAILURES
|
68
|
+
# For no apparent reason, this often goes over the Travis limit
|
69
|
+
- rvm: 1.8.7
|
70
|
+
env: RGV=v2.1.11
|
71
|
+
# Ruby-head (we want to know how we're doing, but not fail the build)
|
72
|
+
- rvm: ruby-head
|
73
|
+
env: RGV=master
|
74
|
+
|
13
75
|
before_install: ./bin/setup
|
14
|
-
script: rake
|
76
|
+
script: ./bin/rake
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## 0.2.0
|
2
|
+
|
3
|
+
##### Enhancements
|
4
|
+
|
5
|
+
* Support RubyGems back to 1.3.6.
|
6
|
+
[Samuel Giddins](https://github.com/segiddins)
|
7
|
+
|
8
|
+
* Refactor installation so the installer can be used separately from
|
9
|
+
`postit/setup`.
|
10
|
+
[Samuel Giddins](https://github.com/segiddins)
|
11
|
+
|
12
|
+
|
1
13
|
## 0.1.2 (2016-04-25)
|
2
14
|
|
3
15
|
##### Enhancements
|
@@ -6,7 +18,7 @@
|
|
6
18
|
[Samuel Giddins](https://github.com/segiddins)
|
7
19
|
[#2](https://github.com/bundler/postit/issues/2)
|
8
20
|
|
9
|
-
#####
|
21
|
+
##### Bug Fixes
|
10
22
|
|
11
23
|
* Invoke a pre-release bundler version if no particular requirement is needed,
|
12
24
|
in keeping with recent RubyGems versions.
|
data/bin/console
CHANGED
data/bin/rake
CHANGED
data/bin/rspec
CHANGED
data/bin/with_rubygems
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'pathname'
|
5
|
+
|
6
|
+
def run(*cmd)
|
7
|
+
return if system(*cmd)
|
8
|
+
raise "Running `#{cmd.join(' ')}` failed"
|
9
|
+
end
|
10
|
+
|
11
|
+
version = ENV.delete('RGV')
|
12
|
+
rubygems_path = Pathname.new(__FILE__).join('../../tmp/rubygems').expand_path
|
13
|
+
unless rubygems_path.directory?
|
14
|
+
rubygems_path.parent.mkpath unless rubygems_path.directory?
|
15
|
+
run('git', 'clone',
|
16
|
+
'https://github.com/rubygems/rubygems.git', rubygems_path.to_s)
|
17
|
+
end
|
18
|
+
Dir.chdir(rubygems_path) do
|
19
|
+
version = "v#{version}" if version =~ /\A\d/
|
20
|
+
run('git', 'checkout', version, '--quiet')
|
21
|
+
end if version
|
22
|
+
|
23
|
+
rubygems_lib = rubygems_path + 'lib'
|
24
|
+
ENV['RUBYOPT'] = %(-I#{rubygems_lib} #{ENV['RUBYOPT']})
|
25
|
+
|
26
|
+
if $0 != __FILE__
|
27
|
+
ARGV.unshift($0)
|
28
|
+
elsif cmd = ARGV.first
|
29
|
+
possible_dirs = [
|
30
|
+
Pathname.new(__FILE__) + '..',
|
31
|
+
Pathname.new(__FILE__) + '../../exe',
|
32
|
+
rubygems_path + 'bin',
|
33
|
+
]
|
34
|
+
cmd = possible_dirs.map do |dir|
|
35
|
+
dir.join(cmd).expand_path
|
36
|
+
end.find(&:file?)
|
37
|
+
ARGV[0] = cmd.to_s if cmd
|
38
|
+
end
|
39
|
+
|
40
|
+
exec(*ARGV)
|
data/lib/postit.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
module PostIt
|
2
|
+
class Installer
|
3
|
+
def initialize(bundler_version)
|
4
|
+
@bundler_version = bundler_version
|
5
|
+
end
|
6
|
+
|
7
|
+
def installed?
|
8
|
+
if Gem::Specification.respond_to?(:find_by_name)
|
9
|
+
!Gem::Specification.find_by_name('bundler', @bundler_version).nil?
|
10
|
+
else
|
11
|
+
requirement = Gem::Requirement.new(@bundler_version)
|
12
|
+
Gem.source_index.gems.values.any? do |s|
|
13
|
+
s.name == 'bundler' && requirement.satisfied_by?(s.version)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
false
|
18
|
+
end
|
19
|
+
|
20
|
+
def install!
|
21
|
+
return if installed?
|
22
|
+
require 'rubygems/dependency_installer'
|
23
|
+
installer = Gem::DependencyInstaller.new
|
24
|
+
installer.install('bundler', @bundler_version)
|
25
|
+
installer.installed_gems
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/postit/setup.rb
CHANGED
@@ -1,16 +1,12 @@
|
|
1
1
|
require 'postit/environment'
|
2
|
+
require 'postit/installer'
|
2
3
|
|
3
4
|
environment = PostIt::Environment.new(ARGV)
|
4
5
|
version = environment.bundler_version
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
rescue Gem::LoadError
|
11
|
-
nil
|
12
|
-
end
|
13
|
-
Gem.install('bundler', version)
|
14
|
-
end
|
7
|
+
installer = PostIt::Installer.new(version)
|
8
|
+
installer.install!
|
9
|
+
|
10
|
+
gem 'bundler', version
|
15
11
|
|
16
12
|
require 'bundler/version'
|
data/lib/postit/version.rb
CHANGED
data/postit.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,9 +87,11 @@ files:
|
|
87
87
|
- bin/rspec
|
88
88
|
- bin/rubocop
|
89
89
|
- bin/setup
|
90
|
+
- bin/with_rubygems
|
90
91
|
- exe/postit
|
91
92
|
- lib/postit.rb
|
92
93
|
- lib/postit/environment.rb
|
94
|
+
- lib/postit/installer.rb
|
93
95
|
- lib/postit/parser.rb
|
94
96
|
- lib/postit/setup.rb
|
95
97
|
- lib/postit/version.rb
|
@@ -113,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
115
|
version: '0'
|
114
116
|
requirements: []
|
115
117
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.6.
|
118
|
+
rubygems_version: 2.6.6
|
117
119
|
signing_key:
|
118
120
|
specification_version: 4
|
119
121
|
summary: The Bundler version manager
|