brewdler 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 106ab55ce4b0e92b47fe011bb840813cbb0f1fd3
4
- data.tar.gz: 47833bd685835fb9a30be438b704a6734ef09bf7
3
+ metadata.gz: fc65174a20e9f2951000cbf2fc73fac467a26840
4
+ data.tar.gz: 0d8278ff5ae1a25c819e909184bef026cd64400d
5
5
  SHA512:
6
- metadata.gz: b95d60ec0147ed1dddf577f5c02a702c20d87e0c79cb63d379a52631dc6361e6fe37edd40a0d01f1b276acdfb045d065f2cc408a2a3370e05fe67fd2c87b2615
7
- data.tar.gz: 5e7dcb94eef69decd88af31966daad7efb9efe67eb2add6af9c41f0fdceba62b06c5e5f814c9113d143ffb3163ce3c82a189b85722157141f4f39189adda6782
6
+ metadata.gz: 3426f8ae5d24db0950ac6cce22441102d1ec3169d9234a6c614d4bb8d2237e74bb6049745b45da2782a1834886b46344b65bca5d9eab42911a9dd9a77974abcf
7
+ data.tar.gz: 02529193f6279dc7e79f63a4327c09a20dec2241a96716b54d43f72c6d028e6713e365dc765d3a63d4af4c41bbfa47f4b35cff6185009dd3a6e86a5f961bf3ec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Andrew Nesbitt
1
+ Copyright (c) 2015 Andrew Nesbitt
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -0,0 +1,86 @@
1
+ # Brewdler
2
+
3
+ Bundler for non-Ruby dependencies from Homebrew
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/brewdler.svg)](http://badge.fury.io/rb/homebrew-brewdler)
6
+ [![Dependency Status](https://gemnasium.com/Homebrew/homebrew-brewdler.svg)](https://gemnasium.com/Homebrew/homebrew-brewdler)
7
+ [![Code Climate](https://codeclimate.com/github/Homebrew/homebrew-brewdler/badges/gpa.svg)](https://codeclimate.com/github/Homebrew/homebrew-brewdler)
8
+ [![Coverage Status](https://coveralls.io/repos/Homebrew/homebrew-brewdler/badge.svg)](https://coveralls.io/r/Homebrew/homebrew-brewdler)
9
+ [![Build Status](https://travis-ci.org/Homebrew/homebrew-brewdler.svg)](https://travis-ci.org/Homebrew/homebrew-brewdler)
10
+
11
+ ## Requirements
12
+
13
+ [Homebrew](http://github.com/Homebrew/homebrew) is used for installing the dependencies, it only works on OS X and so does this gem.
14
+
15
+ [brew tap](https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/brew-tap.md) is new feature in Homebrew 0.9, adds more GitHub repos to the list of available formulae.
16
+
17
+ [Homebrew-cask](http://github.com/caskroom/homebrew-cask) is optional and used for installing Mac applications.
18
+
19
+ ## Install
20
+
21
+ You can install as a Homebrew tap:
22
+
23
+ $ brew tap Homebrew/brewdler
24
+
25
+ ## Usage
26
+
27
+ Create a `Brewfile` in the root of your project:
28
+
29
+ $ touch Brewfile
30
+
31
+ Then list your Homebrew based dependencies in your `Brewfile`:
32
+
33
+ tap 'caskroom/cask'
34
+ brew 'emacs', args: ['cocoa', 'srgb', 'with-gnutls']
35
+ brew 'redis'
36
+ brew 'mongodb'
37
+ brew 'sphinx'
38
+ brew 'imagemagick'
39
+ brew 'mysql'
40
+ cask 'google-chrome'
41
+
42
+ You can then easily install all of the dependencies with one of the following commands:
43
+
44
+ $ brew brewdle
45
+
46
+ ### Install via rubygems
47
+
48
+ The recommended way to use brewdler is via Homebrew tap but you can install it via RubyGems:
49
+
50
+ $ gem install brewdler
51
+
52
+ Then use it with the following command:
53
+
54
+ $ brewdle install
55
+
56
+ ## Note
57
+
58
+ Homebrew does not support installing specific versions of a library, only the most recent one so there is no good mechanism for storing installed versions in a .lock file.
59
+
60
+ If your software needs specific versions then perhaps you'll want to look at using [Vagrant](http://vagrantup.com/) to better match your development and production environments.
61
+
62
+ (Or there is always MacPorts...)
63
+
64
+ ## Contributors
65
+
66
+ Over 10 different people have contributed to the project, you can see them all here: https://github.com/Homebrew/homebrew-brewdler/graphs/contributors
67
+
68
+ ## Development
69
+
70
+ Source hosted at [GitHub](http://github.com/Homebrew/homebrew-brewdler).
71
+ Report Issues/Feature requests on [GitHub Issues](http://github.com/Homebrew/homebrew-brewdler/issues).
72
+
73
+ Tests can be ran with `rake spec`
74
+
75
+ ### Note on Patches/Pull Requests
76
+
77
+ * Fork the project.
78
+ * Make your feature addition or bug fix.
79
+ * Add tests for it. This is important so I don't break it in a future version unintentionally.
80
+ * Add documentation if necessary.
81
+ * Commit, do not mess with Rakefile, version, or history.
82
+ * Send a pull request. Bonus points for topic branches.
83
+
84
+ ## Copyright
85
+
86
+ Copyright (c) 2015 Andrew Nesbitt. See [LICENSE](https://github.com/Homebrew/homebrew-brewdler/blob/master/LICENSE) for details.
@@ -1,7 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ puts "Installing brewdler from rubygems has been deprecated, instead install with:"
4
+ puts "\n brew tap Homebrew/brewdler"
5
+ puts "\nFor more info see: https://github.com/Homebrew/homebrew-brewdler"
6
+
3
7
  require 'brewdler'
4
- require 'commander/import'
8
+
9
+ begin
10
+ require 'commander/import'
11
+ rescue LoadError
12
+ Brewdler::Commands::Install.run
13
+ exit
14
+ end
5
15
 
6
16
  program :version, Brewdler::VERSION
7
17
  program :description, 'CLI helper for brewdler'
@@ -9,7 +19,7 @@ program :description, 'CLI helper for brewdler'
9
19
  default_command :install
10
20
 
11
21
  command :install do |c|
12
- c.description = 'Install all homebrew based dependecies'
22
+ c.description = 'Install all Homebrew based dependecies'
13
23
  c.action do |args, options|
14
24
  Brewdler::Commands::Install.run
15
25
  end
@@ -4,7 +4,7 @@ require File.expand_path('../lib/brewdler/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Andrew Nesbitt", "James A. Anderson", "Amos King"]
6
6
  gem.email = ["andrewnez@gmail.com", "me@jamesaanderson.com", "amos.l.king@gmail.com"]
7
- gem.summary = %q{Bundler for non-ruby dependencies from homebrew}
7
+ gem.summary = %q{Bundler for non-Ruby dependencies from Homebrew}
8
8
  gem.licenses = ['MIT']
9
9
 
10
10
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -16,8 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.required_ruby_version = '>= 1.9.2'
17
17
 
18
18
  gem.add_dependency 'commander'
19
- gem.add_dependency 'mime-types', '1.25'
20
- gem.add_development_dependency 'rspec', '~> 2.99.0'
19
+ gem.add_development_dependency 'rspec'
21
20
  gem.add_development_dependency 'rake'
22
21
  gem.add_development_dependency 'simplecov'
23
22
  gem.add_development_dependency 'coveralls'
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ BREWDLER_ROOT = File.expand_path "#{File.dirname(__FILE__)}/.."
4
+ ENV["RUBYLIB"] = "#{BREWDLER_ROOT}/lib:#{ENV["RUBYLIB"]}"
5
+ exec "#{BREWDLER_ROOT}/bin/brewdle"
@@ -1,7 +1,7 @@
1
1
  module Brewdler
2
2
  class BrewInstaller
3
3
  def self.install(name, options = {})
4
- if system 'brew info'
4
+ if `which brew`; $?.success?
5
5
  command = "brew install #{name}"
6
6
  unless options[:args].nil?
7
7
  options[:args].each do |arg|
@@ -1,7 +1,7 @@
1
1
  module Brewdler
2
2
  class CaskInstaller
3
3
  def self.install(name)
4
- if system "brew cask info #{name}"
4
+ if `which brew-cask`; $?.success?
5
5
  `brew cask install #{name}`
6
6
  else
7
7
  raise "Unable to install #{name}. Homebrew-cask is not currently installed on your system"
@@ -16,7 +16,7 @@ module Brewdler::Commands
16
16
  private
17
17
 
18
18
  def self.brewfile
19
- File.read(Dir['{*,.*}{B,b}rewfile'].first)
19
+ File.read(Dir['{*,.*}{B,b}rewfile'].first.to_s)
20
20
  end
21
21
  end
22
22
  end
@@ -5,7 +5,7 @@ module Brewdler
5
5
  end
6
6
 
7
7
  def process
8
- eval(@input)
8
+ instance_eval(@input)
9
9
  end
10
10
 
11
11
  def brew(name, options={})
@@ -1,7 +1,7 @@
1
1
  module Brewdler
2
2
  class RepoInstaller
3
3
  def self.install(name)
4
- if system 'brew tap'
4
+ if `which brew`; $?.success?
5
5
  `brew tap #{name}`
6
6
  else
7
7
  raise "Unable to tap #{name}. Homebrew is not currently installed on your system"
@@ -1,3 +1,3 @@
1
1
  module Brewdler
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -4,9 +4,9 @@ describe Brewdler::Dsl do
4
4
  let(:dsl) { Brewdler::Dsl.new("tap 'phinze/cask'\nbrew 'git'\ncask 'google-chrome'\nbrew 'emacs', args: ['cocoa', 'srgb', 'with-gnutls']") }
5
5
 
6
6
  it "processes input" do
7
- dsl.should_receive(:tap).with('phinze/cask')
8
- dsl.should_receive(:brew).twice
9
- dsl.should_receive(:cask).with('google-chrome')
7
+ expect(dsl).to receive(:tap).with('phinze/cask')
8
+ expect(dsl).to receive(:brew).twice
9
+ expect(dsl).to receive(:cask).with('google-chrome')
10
10
  dsl.process
11
11
  end
12
12
  end
@@ -9,14 +9,16 @@ describe Brewdler::Commands::Install do
9
9
 
10
10
  context "when a Brewfile is found" do
11
11
  it "does not raise an error" do
12
- Brewdler::BrewInstaller.stub(:install).and_return(true)
13
- Brewdler::CaskInstaller.stub(:install).and_return(true)
14
- Brewdler::RepoInstaller.stub(:install).and_return(true)
12
+ allow(Brewdler::BrewInstaller).to receive(:install).and_return(true)
13
+ allow(Brewdler::CaskInstaller).to receive(:install).and_return(true)
14
+ allow(Brewdler::RepoInstaller).to receive(:install).and_return(true)
15
15
 
16
- File.stub(:read).and_return("tap 'phinze/cask'\nbrew 'git'\ncask 'google-chrome'")
16
+ allow(File).to receive(:read).
17
+ and_return("tap 'phinze/cask'\nbrew 'git'\ncask 'google-chrome'")
17
18
  expect { Brewdler::Commands::Install.run }.to_not raise_error
18
19
 
19
- File.stub(:read => 'git', :open => ['git'])
20
+ allow(File).to receive(:read).and_return('git')
21
+ allow(File).to receive(:open).and_return('git')
20
22
  expect { Brewdler::Commands::Install.run }.to_not raise_error
21
23
  end
22
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brewdler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
@@ -10,90 +10,76 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-30 00:00:00.000000000 Z
13
+ date: 2015-02-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: commander
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
- - !ruby/object:Gem::Dependency
30
- name: mime-types
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - '='
34
- - !ruby/object:Gem::Version
35
- version: '1.25'
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - '='
41
- - !ruby/object:Gem::Version
42
- version: '1.25'
43
29
  - !ruby/object:Gem::Dependency
44
30
  name: rspec
45
31
  requirement: !ruby/object:Gem::Requirement
46
32
  requirements:
47
- - - ~>
33
+ - - ">="
48
34
  - !ruby/object:Gem::Version
49
- version: 2.99.0
35
+ version: '0'
50
36
  type: :development
51
37
  prerelease: false
52
38
  version_requirements: !ruby/object:Gem::Requirement
53
39
  requirements:
54
- - - ~>
40
+ - - ">="
55
41
  - !ruby/object:Gem::Version
56
- version: 2.99.0
42
+ version: '0'
57
43
  - !ruby/object:Gem::Dependency
58
44
  name: rake
59
45
  requirement: !ruby/object:Gem::Requirement
60
46
  requirements:
61
- - - '>='
47
+ - - ">="
62
48
  - !ruby/object:Gem::Version
63
49
  version: '0'
64
50
  type: :development
65
51
  prerelease: false
66
52
  version_requirements: !ruby/object:Gem::Requirement
67
53
  requirements:
68
- - - '>='
54
+ - - ">="
69
55
  - !ruby/object:Gem::Version
70
56
  version: '0'
71
57
  - !ruby/object:Gem::Dependency
72
58
  name: simplecov
73
59
  requirement: !ruby/object:Gem::Requirement
74
60
  requirements:
75
- - - '>='
61
+ - - ">="
76
62
  - !ruby/object:Gem::Version
77
63
  version: '0'
78
64
  type: :development
79
65
  prerelease: false
80
66
  version_requirements: !ruby/object:Gem::Requirement
81
67
  requirements:
82
- - - '>='
68
+ - - ">="
83
69
  - !ruby/object:Gem::Version
84
70
  version: '0'
85
71
  - !ruby/object:Gem::Dependency
86
72
  name: coveralls
87
73
  requirement: !ruby/object:Gem::Requirement
88
74
  requirements:
89
- - - '>='
75
+ - - ">="
90
76
  - !ruby/object:Gem::Version
91
77
  version: '0'
92
78
  type: :development
93
79
  prerelease: false
94
80
  version_requirements: !ruby/object:Gem::Requirement
95
81
  requirements:
96
- - - '>='
82
+ - - ">="
97
83
  - !ruby/object:Gem::Version
98
84
  version: '0'
99
85
  description:
@@ -106,16 +92,17 @@ executables:
106
92
  extensions: []
107
93
  extra_rdoc_files: []
108
94
  files:
109
- - .gitignore
110
- - .rspec
111
- - .travis.yml
95
+ - ".gitignore"
96
+ - ".rspec"
97
+ - ".travis.yml"
112
98
  - CONTRIBUTING.md
113
99
  - Gemfile
114
100
  - LICENSE
115
101
  - Rakefile
116
- - Readme.mdown
102
+ - Readme.md
117
103
  - bin/brewdle
118
104
  - brewdler.gemspec
105
+ - cmd/brew-brewdle.rb
119
106
  - lib/brewdler.rb
120
107
  - lib/brewdler/brew_installer.rb
121
108
  - lib/brewdler/cask_installer.rb
@@ -136,20 +123,20 @@ require_paths:
136
123
  - lib
137
124
  required_ruby_version: !ruby/object:Gem::Requirement
138
125
  requirements:
139
- - - '>='
126
+ - - ">="
140
127
  - !ruby/object:Gem::Version
141
128
  version: 1.9.2
142
129
  required_rubygems_version: !ruby/object:Gem::Requirement
143
130
  requirements:
144
- - - '>='
131
+ - - ">="
145
132
  - !ruby/object:Gem::Version
146
133
  version: '0'
147
134
  requirements: []
148
135
  rubyforge_project:
149
- rubygems_version: 2.0.14
136
+ rubygems_version: 2.4.5
150
137
  signing_key:
151
138
  specification_version: 4
152
- summary: Bundler for non-ruby dependencies from homebrew
139
+ summary: Bundler for non-Ruby dependencies from Homebrew
153
140
  test_files:
154
141
  - spec/dsl_spec.rb
155
142
  - spec/install_command_spec.rb
@@ -1,69 +0,0 @@
1
- # Brewdler
2
-
3
- Bundler for non-ruby dependencies from homebrew
4
-
5
- [![Gem Version](https://badge.fury.io/rb/brewdler.png)](http://badge.fury.io/rb/brewdler)
6
- [![Dependency Status](https://gemnasium.com/andrew/brewdler.png)](https://gemnasium.com/andrew/brewdler)
7
- [![Code Climate](https://codeclimate.com/github/andrew/brewdler.png)](https://codeclimate.com/github/andrew/brewdler)
8
- [![Coverage Status](https://coveralls.io/repos/andrew/brewdler/badge.png)](https://coveralls.io/r/andrew/brewdler)
9
- [![Build Status](https://travis-ci.org/andrew/brewdler.png)](https://travis-ci.org/andrew/brewdler)
10
-
11
- ## Requirements
12
-
13
- [Homebrew](http://github.com/Homebrew/homebrew) is used for installing the dependencies, it only works on a mac and so does this gem.
14
-
15
- [Homebrew brew-tap](https://github.com/Homebrew/homebrew/wiki/brew-tap) is new feature in Homebrew-0.9, add more Github repos to the list of formulae.
16
-
17
- [Homebrew-cask](http://github.com/caskroom/homebrew-cask) is optional and used for installing Mac applications.
18
-
19
- ## Usage
20
-
21
- Install using rubygems:
22
-
23
- $ gem install brewdler
24
-
25
- then create a `Brewfile` in the root of your project:
26
-
27
- $ touch Brewfile
28
-
29
- Then list your homebrew based dependencies in your `Brewfile`:
30
-
31
- tap 'phinze/cask'
32
- brew 'emacs', args: ['cocoa', 'srgb', 'with-gnutls']
33
- brew 'redis'
34
- brew 'mongodb'
35
- brew 'sphinx'
36
- brew 'imagemagick'
37
- brew 'mysql'
38
- cask 'google-chrome'
39
-
40
- You can then easily install all of the dependencies on a new mac like so:
41
-
42
- $ brewdle install
43
-
44
- ## Note
45
-
46
- Homebrew does not support installing specific versions of a library, only the most recent one so there is no good mechanism for storing installed versions in a .lock file.
47
-
48
- If your software needs specific versions then perhaps you'll want to look at using [Vagrant](http://vagrantup.com/) to better match your development and production environments.
49
-
50
- (Or there is always Macports...)
51
-
52
- ## Development
53
-
54
- Source hosted at [GitHub](http://github.com/andrew/brewdler).
55
- Report Issues/Feature requests on [GitHub Issues](http://github.com/andrew/brewdler/issues).
56
-
57
- ### Note on Patches/Pull Requests
58
-
59
- * Fork the project.
60
- * Make your feature addition or bug fix.
61
- * Add tests for it. This is important so I don't break it in a
62
- future version unintentionally.
63
- * Commit, do not mess with rakefile, version, or history.
64
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
65
- * Send me a pull request. Bonus points for topic branches.
66
-
67
- ## Copyright
68
-
69
- Copyright (c) 2013 Andrew Nesbitt. See LICENSE for details.