beta-pod 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +20 -0
- data/exe/beta-pod +14 -13
- data/lib/beta-pod/gem_version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ba0530b7dd72601776986f50a4efd8331cbb466
|
4
|
+
data.tar.gz: e053fb913b3b548c032c59e85b2f1f49239e5f46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a48b472955e1ed24954f09414a484bda38f7f100cd4d2cc584a8595bf6825d95bd6839fab9aef32c3906e01f29bdb1fbb99a8ef6eccad21559dd3e802b46447
|
7
|
+
data.tar.gz: 992ae99b2e48eb6c46cb8d83ce4adce172afcbb5e1baffc07a1ff48f6fdca34561d6e4c7d1f11119396941d0fd4b7dedf357628f2207f291774667b00cd45eac
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
data/exe/beta-pod
CHANGED
@@ -5,24 +5,24 @@ require 'bundler/friendly_errors'
|
|
5
5
|
require 'open-uri'
|
6
6
|
require 'tempfile'
|
7
7
|
|
8
|
-
def sha_for_ref(ref)
|
9
|
-
url = "https://api.github.com/repos/CocoaPods/
|
8
|
+
def sha_for_ref(ref, owner)
|
9
|
+
url = "https://api.github.com/repos/#{owner}/CocoaPods/commits/#{ref}"
|
10
10
|
json = open(url).read
|
11
11
|
json =~ /{"sha": "([0-9a-f]{7,40})"/xi
|
12
12
|
$1
|
13
13
|
end
|
14
14
|
|
15
|
-
def gemfile_for_ref(ref)
|
16
|
-
url = "https://raw.githubusercontent.com/CocoaPods
|
17
|
-
open(url).string << "\n\n gem 'cocoapods', git: 'https://github.com/CocoaPods
|
15
|
+
def gemfile_for_ref(ref, owner)
|
16
|
+
url = "https://raw.githubusercontent.com/#{owner}/CocoaPods/#{ref}/Gemfile"
|
17
|
+
open(url).string << "\n\n gem 'cocoapods', git: 'https://github.com/#{owner}/CocoaPods', ref: '#{ref}'\n"
|
18
18
|
end
|
19
19
|
|
20
|
-
def lockfile_for_ref(ref)
|
21
|
-
url = "https://raw.githubusercontent.com/CocoaPods
|
20
|
+
def lockfile_for_ref(ref, owner)
|
21
|
+
url = "https://raw.githubusercontent.com/#{owner}/CocoaPods/#{ref}/Gemfile.lock"
|
22
22
|
open(url).string
|
23
23
|
end
|
24
24
|
|
25
|
-
def install(ref)
|
25
|
+
def install(ref, owner)
|
26
26
|
old_root = Bundler.method(:root)
|
27
27
|
def Bundler.root
|
28
28
|
Pathname(Bundler::SharedHelpers.pwd).expand_path
|
@@ -30,11 +30,11 @@ def install(ref)
|
|
30
30
|
ENV["BUNDLE_GEMFILE"] ||= "Gemfile"
|
31
31
|
|
32
32
|
builder = Bundler::Dsl.new
|
33
|
-
builder.instance_eval(gemfile_for_ref(ref))
|
33
|
+
builder.instance_eval(gemfile_for_ref(ref, owner))
|
34
34
|
|
35
35
|
definition = nil
|
36
36
|
Tempfile.open('Gemfile.lock') do |lockfile|
|
37
|
-
lockfile.write(lockfile_for_ref(ref))
|
37
|
+
lockfile.write(lockfile_for_ref(ref, owner))
|
38
38
|
lockfile.rewind
|
39
39
|
definition = builder.to_definition(lockfile, {})
|
40
40
|
end
|
@@ -52,11 +52,12 @@ def install(ref)
|
|
52
52
|
bundler_module.send(:define_method, :root, old_root)
|
53
53
|
end
|
54
54
|
|
55
|
-
ref = ARGV.shift
|
56
|
-
|
55
|
+
ref, owner = ARGV.shift.split(':', 2).reverse
|
56
|
+
owner ||= 'CocoaPods'
|
57
|
+
ref = sha_for_ref(ref, owner)
|
57
58
|
|
58
59
|
begin
|
59
|
-
install(ref)
|
60
|
+
install(ref, owner)
|
60
61
|
rescue => e
|
61
62
|
puts e.backtrace
|
62
63
|
Bundler.ui = Bundler::UI::Shell.new
|
data/lib/beta-pod/gem_version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beta-pod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giddins
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- ".gitignore"
|
50
50
|
- CODE_OF_CONDUCT.md
|
51
51
|
- Gemfile
|
52
|
+
- Gemfile.lock
|
52
53
|
- LICENSE.txt
|
53
54
|
- README.md
|
54
55
|
- Rakefile
|