beta-pod 1.0.0 → 1.1.0

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: ac134f881d0406f2c70e38d6493a6bd72107515f
4
- data.tar.gz: 8ad548cc06eb9fb3740a482f1dbb94c6f76fe1c3
3
+ metadata.gz: 6ba0530b7dd72601776986f50a4efd8331cbb466
4
+ data.tar.gz: e053fb913b3b548c032c59e85b2f1f49239e5f46
5
5
  SHA512:
6
- metadata.gz: ae6bccd5d98745baad01d9e07d40a70a156844115086d0bfd7c734d341a621f14605daa7c816afd2400a74ea48d700b93d8fe2767f24dd66e76af943abde4c31
7
- data.tar.gz: 2ab5bcc12d4ebc03e91b6c0b0b04c77ad1aef03c19711e0644728ce156a4f5d27daf9c1a5b972edc0b1cf9428aa75498a2ccdf3daf3680852b214afd7f8be1b6
6
+ metadata.gz: 4a48b472955e1ed24954f09414a484bda38f7f100cd4d2cc584a8595bf6825d95bd6839fab9aef32c3906e01f29bdb1fbb99a8ef6eccad21559dd3e802b46447
7
+ data.tar.gz: 992ae99b2e48eb6c46cb8d83ce4adce172afcbb5e1baffc07a1ff48f6fdca34561d6e4c7d1f11119396941d0fd4b7dedf357628f2207f291774667b00cd45eac
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ beta-pod (1.1.0)
5
+ bundler (~> 1.10)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ rake (10.4.2)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ beta-pod!
17
+ rake (~> 10.4)
18
+
19
+ BUNDLED WITH
20
+ 1.10.6
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/CocoaPods/commits/#{ref}"
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/CocoaPods/#{ref}/Gemfile"
17
- open(url).string << "\n\n gem 'cocoapods', git: 'https://github.com/CocoaPods/CocoaPods', ref: '#{ref}'\n"
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/CocoaPods/#{ref}/Gemfile.lock"
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
- ref = sha_for_ref(ref)
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
@@ -1,3 +1,3 @@
1
1
  module BetaPod
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
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.0.0
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