brew-gem 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.soyuz.yml +13 -0
- data/CHANGELOG.markdown +15 -1
- data/lib/brew/gem/cli.rb +13 -6
- data/lib/brew/gem/formula.rb.erb +4 -3
- data/lib/brew/gem/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b51e0ed7462440fcd09a45ae0120112e88082ee
|
4
|
+
data.tar.gz: d4554cffc8bbe17b4089da5aaf802ea3124b5463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f87ccaf6353b0f84f8c43ef867b1505c8afe65e329f943cdc886dc8c052fca93cc26d25418c630c4b13e28a4207f461d0a4a1d8a4dda2304b0838e1c521cf90
|
7
|
+
data.tar.gz: 918856f384cba1e280ce4b5b0c66dc8cadb5b7be3b776b436cfe15554584fa1e931c4723b4775c3f6064d823169088fa61509f0c2b82f50499a9157c2e29a2cb
|
data/.soyuz.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
defaults:
|
2
|
+
deploy_cmd: gem push brew-gem*.gem
|
3
|
+
before_deploy_cmds:
|
4
|
+
- /usr/local/bin/op tag-release
|
5
|
+
- sed -i "" -e "s/\".*/\"$(git tag | grep '^v' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -1 | sed s/v//)\"/" lib/brew/gem/version.rb
|
6
|
+
- git add lib/brew/gem/version.rb
|
7
|
+
- git commit -m "Version Bump" && git push
|
8
|
+
- gem build brew-gem.gemspec
|
9
|
+
after_deploy_cmds:
|
10
|
+
- rm *.gem
|
11
|
+
environments:
|
12
|
+
-
|
13
|
+
rubygems: {}
|
data/CHANGELOG.markdown
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
|
1
|
+
#### v0.8.2
|
2
|
+
|
3
|
+
* Fix sandbox permissions with gem spec cache
|
4
|
+
|
5
|
+
> Nick Sieger: Unknown User: https://github.com/sportngin/brew-gem/pull/48
|
6
|
+
|
7
|
+
* Add `brew gem formula` command for debugging
|
8
|
+
|
9
|
+
> Nick Sieger: Unknown User: https://github.com/sportngin/brew-gem/pull/46
|
10
|
+
|
11
|
+
* Use homebrew prefix instead of /usr/local
|
12
|
+
|
13
|
+
> Nick Sieger: : https://github.com/sportngin/brew-gem/pull/34
|
14
|
+
|
15
|
+
#### v0.8.1
|
2
16
|
|
3
17
|
* brew-gem exits non-zero if gem failed to build/install
|
4
18
|
|
data/lib/brew/gem/cli.rb
CHANGED
@@ -10,6 +10,7 @@ module Brew::Gem::CLI
|
|
10
10
|
"upgrade" => "Upgrade to the latest version of a brew gem",
|
11
11
|
"uninstall" => "Uninstall a brew gem",
|
12
12
|
"info" => "Show information for an installed gem",
|
13
|
+
"formula" => "Print out the generated formula for a gem",
|
13
14
|
"help" => "This message"
|
14
15
|
}
|
15
16
|
|
@@ -42,10 +43,11 @@ module Brew::Gem::CLI
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def expand_formula(name, version, use_homebrew_ruby=false)
|
45
|
-
klass
|
46
|
-
user_gemrc
|
47
|
-
|
48
|
-
|
46
|
+
klass = 'Gem' + name.capitalize.gsub(/[-_.\s]([a-zA-Z0-9])/) { $1.upcase }.gsub('+', 'x')
|
47
|
+
user_gemrc = "#{ENV['HOME']}/.gemrc"
|
48
|
+
homebrew_prefix = ENV['HOMEBREW_PREFIX'] || `brew --prefix`.chomp
|
49
|
+
template_file = File.expand_path('../formula.rb.erb', __FILE__)
|
50
|
+
template = ERB.new(File.read(template_file))
|
49
51
|
template.result(binding)
|
50
52
|
end
|
51
53
|
|
@@ -74,8 +76,13 @@ module Brew::Gem::CLI
|
|
74
76
|
version = fetch_version(name, supplied_version)
|
75
77
|
|
76
78
|
with_temp_formula(name, version, use_homebrew_ruby) do |filename|
|
77
|
-
|
78
|
-
|
79
|
+
case command
|
80
|
+
when "formula"
|
81
|
+
$stdout.puts File.read(filename)
|
82
|
+
else
|
83
|
+
system "brew #{command} #{filename}"
|
84
|
+
exit $?.exitstatus unless $?.success?
|
85
|
+
end
|
79
86
|
end
|
80
87
|
end
|
81
88
|
end
|
data/lib/brew/gem/formula.rb.erb
CHANGED
@@ -7,6 +7,7 @@ class RubyGemsDownloadStrategy < AbstractDownloadStrategy
|
|
7
7
|
def fetch
|
8
8
|
ohai "Fetching <%= name %> from gem source"
|
9
9
|
HOMEBREW_CACHE.cd do
|
10
|
+
ENV['GEM_SPEC_CACHE'] = "#{HOMEBREW_CACHE}/gem_spec_cache"
|
10
11
|
system "gem", "fetch", "<%= name %>", "--version", resource.version
|
11
12
|
end
|
12
13
|
end
|
@@ -37,7 +38,7 @@ class <%= klass %> < Formula
|
|
37
38
|
ENV['GEM_HOME']="#{prefix}"
|
38
39
|
ENV['GEM_PATH']="#{prefix}"
|
39
40
|
|
40
|
-
rubybindir = '<%= use_homebrew_ruby ? "/
|
41
|
+
rubybindir = '<%= use_homebrew_ruby ? "#{homebrew_prefix}/bin" : "/usr/bin" %>'
|
41
42
|
gem_path = "#{rubybindir}/gem"
|
42
43
|
ruby_path = "#{rubybindir}/ruby"
|
43
44
|
system gem_path, "install", cached_download,
|
@@ -57,13 +58,13 @@ class <%= klass %> < Formula
|
|
57
58
|
|
58
59
|
completion_for_bash = Dir[
|
59
60
|
"#{brew_gem_prefix}/completion{s,}/<%= name %>.{bash,sh}",
|
60
|
-
"#{brew_gem_prefix}/**/<%= name %>
|
61
|
+
"#{brew_gem_prefix}/**/<%= name %>{_,-}completion{s,}.{bash,sh}"
|
61
62
|
].first
|
62
63
|
bash_completion.install completion_for_bash if completion_for_bash
|
63
64
|
|
64
65
|
completion_for_zsh = Dir[
|
65
66
|
"#{brew_gem_prefix}/completions/<%= name %>.zsh",
|
66
|
-
"#{brew_gem_prefix}/**/<%= name %>
|
67
|
+
"#{brew_gem_prefix}/**/<%= name %>{_,-}completion{s,}.zsh"
|
67
68
|
].first
|
68
69
|
zsh_completion.install completion_for_zsh if completion_for_zsh
|
69
70
|
|
data/lib/brew/gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brew-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sieger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- ".rspec"
|
81
81
|
- ".ruby-gemset"
|
82
82
|
- ".ruby-version"
|
83
|
+
- ".soyuz.yml"
|
83
84
|
- ".travis.yml"
|
84
85
|
- CHANGELOG.markdown
|
85
86
|
- Gemfile
|
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
113
|
version: '0'
|
113
114
|
requirements: []
|
114
115
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.6.
|
116
|
+
rubygems_version: 2.6.12
|
116
117
|
signing_key:
|
117
118
|
specification_version: 4
|
118
119
|
summary: Generate Homebrew formulas to install standalone ruby gems.
|