Commit 142570b5 authored by Kyle Fuller's avatar Kyle Fuller

[pod repo push] Find JSON podspecs

Closes #3494
parent 76892430
...@@ -13,6 +13,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -13,6 +13,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[cocoapods-try#31](https://github.com/CocoaPods/cocoapods-try/issues/31) [cocoapods-try#31](https://github.com/CocoaPods/cocoapods-try/issues/31)
##### Bug Fixes
* `pod repo push` will now find and push JSON podspecs.
[#3494](https://github.com/CocoaPods/CocoaPods/issues/3494)
[Kyle Fuller](https://github.com/kylef)
## 0.37.1 ## 0.37.1
......
...@@ -195,8 +195,8 @@ module Pod ...@@ -195,8 +195,8 @@ module Pod
raise Informative, "Couldn't find #{@podspec}" unless path.exist? raise Informative, "Couldn't find #{@podspec}" unless path.exist?
[path] [path]
else else
files = Pathname.glob('*.podspec') files = Pathname.glob('*.podspec{,.json}')
raise Informative, "Couldn't find any .podspec files in current directory" if files.empty? raise Informative, "Couldn't find any podspec files in current directory" if files.empty?
files files
end end
end end
......
...@@ -22,7 +22,7 @@ module Pod ...@@ -22,7 +22,7 @@ module Pod
it "complains if it can't find a spec" do it "complains if it can't find a spec" do
repo_make('test_repo') repo_make('test_repo')
e = lambda { run_command('repo', 'push', 'test_repo') }.should.raise Pod::Informative e = lambda { run_command('repo', 'push', 'test_repo') }.should.raise Pod::Informative
e.message.should.match(/Couldn't find any .podspec/) e.message.should.match(/Couldn't find any podspec/)
end end
it "complains if it can't find the given podspec" do it "complains if it can't find the given podspec" do
...@@ -44,6 +44,16 @@ module Pod ...@@ -44,6 +44,16 @@ module Pod
end end
end end
it 'finds JSON podspecs' do
repo_make('test_repo')
Dir.chdir(temporary_directory) do
File.open('JSON.podspec.json', 'w') { |f| f.write('{}') }
cmd = command('repo', 'push', 'test_repo')
cmd.send(:podspec_files).should == [Pathname('JSON.podspec.json')]
end
end
#--------------------------------------# #--------------------------------------#
before do before do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment