theobroma 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/Rakefile +6 -0
- data/bin/console +50 -0
- data/bin/setup +8 -0
- data/exe/theobroma +9 -0
- data/lib/theobroma/environment.rb +15 -0
- data/lib/theobroma/installer.rb +17 -0
- data/lib/theobroma/parser.rb +16 -0
- data/lib/theobroma/setup.rb +12 -0
- data/lib/theobroma/version.rb +3 -0
- data/lib/theobroma.rb +15 -0
- data/theobroma.gemspec +24 -0
- metadata +105 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cb9a486856c15bc7060f4bc1aca7640cbbf977f7
|
4
|
+
data.tar.gz: 08da0152ee728b34164e252ad8bf1c32bd33916c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7c913f157ce08b10353535ca3de46e8915363d734f5f855e6e23b34513971312162b895165a6e4290269fe76448bda82eb797a9446de352a1ddfc019a7d466e6
|
7
|
+
data.tar.gz: a24f942e85517b5eec6c71f0e44e7c0b4830fa936b1a1edc0c4a71c535c6c2c16d8840c5c004f34c7ed30360045fc358fb5ba8124681d3e5c6c5d707e454feb7
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at dan@tomlinson.io. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Danielle Tomlinson
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Theobroma
|
2
|
+
|
3
|
+
<!-- [![Build Status](https://travis-ci.org/{{RepoSlug}}.svg?branch=master)](https://travis-ci.org/{{RepoSlug}}) -->
|
4
|
+
[![Latest Release](https://img.shields.io/github/release/dantoml/theobroma.svg)](https://github.com/dantoml/theobroma/releases/latest)
|
5
|
+
|
6
|
+
> Theobroma cacao is the taxonomic classification for the plant also called the cacao tree and the cocoa tree.
|
7
|
+
|
8
|
+
# :question: Why?
|
9
|
+
|
10
|
+
To reduce issues when building projects that don't use Bundler.
|
11
|
+
|
12
|
+
# Installation
|
13
|
+
|
14
|
+
```
|
15
|
+
$ [sudo] gem install theobroma
|
16
|
+
```
|
17
|
+
|
18
|
+
# Usage
|
19
|
+
|
20
|
+
Replace your usage of `pod` with `theobroma` i.e:
|
21
|
+
|
22
|
+
```
|
23
|
+
$ pod install
|
24
|
+
```
|
25
|
+
|
26
|
+
becomes:
|
27
|
+
|
28
|
+
```
|
29
|
+
$ theobroma install
|
30
|
+
```
|
31
|
+
|
32
|
+
:purple_heart: Code of Conduct
|
33
|
+
------------
|
34
|
+
Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
35
|
+
|
36
|
+
:gift_heart: Contributing
|
37
|
+
------------
|
38
|
+
Please create an issue with a description of your problem or open a pull request with a fix.
|
39
|
+
|
40
|
+
:v: License
|
41
|
+
-------
|
42
|
+
MIT
|
43
|
+
|
44
|
+
:alien: Author
|
45
|
+
------
|
46
|
+
Danielle Tomlinson - https://dantoml.com, [@dantoml](http://twitter.com/dantoml)
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'theobroma'
|
5
|
+
|
6
|
+
def rubygems_18_or_better?
|
7
|
+
defined?(Gem.post_reset_hooks)
|
8
|
+
end
|
9
|
+
|
10
|
+
def rubygems_20_or_better?
|
11
|
+
Gem::VERSION.to_i >= 2
|
12
|
+
end
|
13
|
+
|
14
|
+
# Ugh, this stuff is quite vile.
|
15
|
+
def remove_bundler_monkeypatches
|
16
|
+
if rubygems_20_or_better?
|
17
|
+
load 'rubygems/core_ext/kernel_require.rb'
|
18
|
+
else
|
19
|
+
load 'rubygems/custom_require.rb'
|
20
|
+
end
|
21
|
+
|
22
|
+
if rubygems_18_or_better?
|
23
|
+
Kernel.module_eval do
|
24
|
+
def gem(gem_name, *requirements) # :doc:
|
25
|
+
skip_list = (ENV['GEM_SKIP'] || '').split(/:/)
|
26
|
+
raise Gem::LoadError, "skipping #{gem_name}" if skip_list.include? gem_name
|
27
|
+
spec = Gem::Dependency.new(gem_name, *requirements).to_spec
|
28
|
+
spec.activate if spec
|
29
|
+
end
|
30
|
+
end
|
31
|
+
else
|
32
|
+
Kernel.module_eval do
|
33
|
+
def gem(gem_name, *requirements) # :doc:
|
34
|
+
skip_list = (ENV['GEM_SKIP'] || '').split(/:/)
|
35
|
+
raise Gem::LoadError, "skipping #{gem_name}" if skip_list.include? gem_name
|
36
|
+
Gem.activate(gem_name, *requirements)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
if Gem.post_reset_hooks.reject! { |hook| hook.source_location.first =~ %r{/bundler/} }
|
43
|
+
Gem.clear_paths
|
44
|
+
Gem::Specification.reset
|
45
|
+
remove_bundler_monkeypatches
|
46
|
+
loaded = true
|
47
|
+
end
|
48
|
+
|
49
|
+
require 'irb'
|
50
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/theobroma
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Theobroma
|
2
|
+
class Environment
|
3
|
+
def lockfile
|
4
|
+
File.expand_path './Podfile.lock'
|
5
|
+
end
|
6
|
+
|
7
|
+
def lockfile_version
|
8
|
+
Theobroma::Parser.new(lockfile).pods_version
|
9
|
+
end
|
10
|
+
|
11
|
+
def cocoapods_version
|
12
|
+
@cocoapods_version ||= lockfile_version || "#{Gem::Requirement.default}.a"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
module Theobroma
|
4
|
+
class Installer
|
5
|
+
def initialize(version)
|
6
|
+
@version = version
|
7
|
+
end
|
8
|
+
|
9
|
+
def install!
|
10
|
+
require 'bundler/inline'
|
11
|
+
gemfile(true) do
|
12
|
+
source 'https://rubygems.org'
|
13
|
+
gem 'cocoapods', @version
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'theobroma/environment'
|
2
|
+
require 'theobroma/parser'
|
3
|
+
require 'theobroma/installer'
|
4
|
+
|
5
|
+
environment = Theobroma::Environment.new
|
6
|
+
version = environment.cocoapods_version
|
7
|
+
|
8
|
+
puts "Detected CocoaPods version: #{version}"
|
9
|
+
installer = Theobroma::Installer.new(version)
|
10
|
+
installer.install!
|
11
|
+
|
12
|
+
puts "Using CocoaPods Version: #{Pod::VERSION}"
|
data/lib/theobroma.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'theobroma/version'
|
2
|
+
|
3
|
+
module Theobroma
|
4
|
+
require 'theobroma/environment'
|
5
|
+
require 'theobroma/installer'
|
6
|
+
require 'theobroma/parser'
|
7
|
+
|
8
|
+
def self.setup
|
9
|
+
load File.expand_path('../theobroma/setup.rb', __FILE__)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.cocoapods_version
|
13
|
+
defined?(Pod::VERSION) && Pod::VERSION
|
14
|
+
end
|
15
|
+
end
|
data/theobroma.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'theobroma/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'theobroma'
|
8
|
+
spec.version = Theobroma::VERSION
|
9
|
+
spec.authors = ['Danielle Tomlinson']
|
10
|
+
spec.email = ['dan@tomlinson.io']
|
11
|
+
|
12
|
+
spec.summary = 'Automatically use the correct CocoaPods version for your project.'
|
13
|
+
spec.homepage = 'https://github.com/dantoml/theobroma'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = 'exe'
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: theobroma
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Danielle Tomlinson
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- dan@tomlinson.io
|
58
|
+
executables:
|
59
|
+
- theobroma
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- CODE_OF_CONDUCT.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- exe/theobroma
|
73
|
+
- lib/theobroma.rb
|
74
|
+
- lib/theobroma/environment.rb
|
75
|
+
- lib/theobroma/installer.rb
|
76
|
+
- lib/theobroma/parser.rb
|
77
|
+
- lib/theobroma/setup.rb
|
78
|
+
- lib/theobroma/version.rb
|
79
|
+
- theobroma.gemspec
|
80
|
+
homepage: https://github.com/dantoml/theobroma
|
81
|
+
licenses:
|
82
|
+
- MIT
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.4.5.1
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: Automatically use the correct CocoaPods version for your project.
|
104
|
+
test_files: []
|
105
|
+
has_rdoc:
|