cocoapods-trunk 1.0.0.beta.1 → 1.0.0.beta.2
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/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/lib/cocoapods_trunk.rb +1 -1
- data/lib/pod/command/trunk.rb +6 -1
- data/lib/pod/command/trunk/deprecate.rb +4 -1
- data/spec/command/trunk/deprecate_spec.rb +25 -3
- data/spec/spec_helper.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c41415e0fb060d2aeeab80a8d5feacaca2597c6
|
4
|
+
data.tar.gz: f98ea9c2582d5420292044aa1fc4f6630cd4e3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac7dd609a4f0534c96fd7a0bdf4e8d7976b7347c7e7ca6c2c111e3188df3b42fba7b2fbd2d2948ffd3398df0d94f3b3381ceba4d97f46eef155f5ccf49452644
|
7
|
+
data.tar.gz: 57d32e37e9217cc7275fd1af902b5a74c6bf1ca1b123270ebe8ab16d2bf263fb2d6555cb571e363162410e553c020245dff4234601194f6b072c28358286aa6f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 1.0.0.beta.2 (2016-02-03)
|
2
|
+
|
3
|
+
##### Bug Fixes
|
4
|
+
|
5
|
+
* Send a body with the `PATCH` request to deprecate a pod.
|
6
|
+
[Samuel Giddins](https://github.com/segiddins)
|
7
|
+
[#52](https://github.com/CocoaPods/cocoapods-trunk/issues/52)
|
8
|
+
|
9
|
+
|
1
10
|
## 1.0.0.beta.1 (2015-12-30)
|
2
11
|
|
3
12
|
##### Enhancements
|
data/Gemfile.lock
CHANGED
data/lib/cocoapods_trunk.rb
CHANGED
data/lib/pod/command/trunk.rb
CHANGED
@@ -109,7 +109,7 @@ module Pod
|
|
109
109
|
|
110
110
|
def formatted_time(time_string)
|
111
111
|
require 'active_support/time'
|
112
|
-
@tz_offset ||= Time.zone_offset(
|
112
|
+
@tz_offset ||= Time.zone_offset(time_zone)
|
113
113
|
@current_year ||= Date.today.year
|
114
114
|
|
115
115
|
time = Time.parse(time_string) + @tz_offset
|
@@ -120,6 +120,11 @@ module Pod
|
|
120
120
|
end
|
121
121
|
formatted
|
122
122
|
end
|
123
|
+
|
124
|
+
def time_zone
|
125
|
+
out, = Executable.execute_command('/bin/date', %w(+%Z), :capture => :out)
|
126
|
+
out.strip
|
127
|
+
end
|
123
128
|
end
|
124
129
|
end
|
125
130
|
end
|
@@ -30,7 +30,10 @@ module Pod
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def deprecate
|
33
|
-
|
33
|
+
body = {
|
34
|
+
:in_favor_of => @in_favor_of,
|
35
|
+
}.to_json
|
36
|
+
response = request_path(:patch, "pods/#{@name}/deprecated", body, auth_headers)
|
34
37
|
url = response.headers['location'].first
|
35
38
|
json(request_url(:get, url, default_headers))
|
36
39
|
rescue REST::Error => e
|
@@ -14,8 +14,8 @@ module Pod
|
|
14
14
|
lambda { command.validate! }.should.raise CLAide::Help
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
before do
|
18
|
+
@push_response = {
|
19
19
|
'messages' => [
|
20
20
|
{
|
21
21
|
'2015-12-05 02:00:25 UTC' => 'Push for `Stencil 0.96.3` initiated.',
|
@@ -26,11 +26,33 @@ module Pod
|
|
26
26
|
],
|
27
27
|
'data_url' => 'https://raw.githubusercontent.com/CocoaPods/Specs/ce4efe9f986d297008e8c61010a4b0d5881c50d0/Specs/Stencil/0.96.3/Stencil.podspec.json',
|
28
28
|
}
|
29
|
-
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should show information for a pod' do
|
32
|
+
Command::Trunk::Deprecate.any_instance.expects(:deprecate).returns(@push_response)
|
30
33
|
Command::Trunk::Deprecate.invoke(%w(Stencil))
|
31
34
|
|
32
35
|
UI.output.should.include 'Data URL: https://raw.githubusercontent'
|
33
36
|
UI.output.should.include 'Push for `Stencil 0.96.3` initiated'
|
34
37
|
end
|
38
|
+
|
39
|
+
it 'should send the proper network request' do
|
40
|
+
redirect = 'http://redirected.com'
|
41
|
+
WebMock::API.stub_request(:patch, 'https://trunk.cocoapods.org/api/v1/pods/Stencil/deprecated').
|
42
|
+
with(:body => WebMock::API.hash_including('in_favor_of' => 'Stamp')).
|
43
|
+
to_return(:status => 201, :headers => { :location => redirect })
|
44
|
+
|
45
|
+
WebMock::API.stub_request(:get, redirect).
|
46
|
+
to_return(:status => 200, :body => @push_response.to_json)
|
47
|
+
|
48
|
+
Command::Trunk::Deprecate.invoke(%w(Stencil --in-favor-of=Stamp))
|
49
|
+
|
50
|
+
UI.output.should == <<-EOS
|
51
|
+
- Data URL: https://raw.githubusercontent.com/CocoaPods/Specs/ce4efe9f986d297008e8c61010a4b0d5881c50d0/Specs/Stencil/0.96.3/Stencil.podspec.json
|
52
|
+
- Log messages:
|
53
|
+
- December 5th, 2015 02:00: Push for `Stencil 0.96.3` initiated.
|
54
|
+
- December 5th, 2015 02:00: Push for `Stencil 0.96.3` has been pushed (1.02409270 s).
|
55
|
+
EOS
|
56
|
+
end
|
35
57
|
end
|
36
58
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-trunk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Durán
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nap
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: 1.3.1
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.5.
|
137
|
+
rubygems_version: 2.5.2
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Interact with trunk.cocoapods.org
|