Spec create #208

Merged
merged 5 commits into from Apr 16, 2012

3 participants

@fabiopelosin
CocoaPods member

Changes:

  • added semanting versioning notice
  • warning if a spec description or summary does not ends with a dot
  • requires octokit gem
  • added awesome-print development gem
  • removed appledoc options from spec template
  • removed range attribute for license from the spec template
  • added warning for summary and descriptions not ending with a dot.
  • changed default podspec version to 0.0.1
  • divided template in required and optional sections

It creates stuff like JBDeviceOwner.podspec.

If is not able to find a suitable tag it presents:

img

fabiopelosin added some commits Apr 13, 2012
@fabiopelosin fabiopelosin Draft for spec create from GitHub 368b708
@fabiopelosin fabiopelosin Merge branch 'master' into spec-create
* master: (24 commits)
  [fix] small typo
  [list] spec update
  [presenter] present output to per set so it doesn't wait for all the sets to be ready on lenghty operations
  [presenter] fix for spec
  [pod-list] added pod authors
  [statistics] Switch to GitHub v3 api
  [pod-list] removed accidentally commited file
  [pod-list] Presenter now just renders and doesn't puts text directly + related minor changes
  [pod-list] Possibility to use statistics without cache file
  [fixed] specs
  [pod-list] tweaks and clean up
  [pod-spec] Warning for github repos not starting with https [#204]
  [pod-list] introduced Pod::Command::Presenter::CocoaPod class that encapsulates pod presentation logic
  Added --update option to pod list command
  [pod-list] increased github cache validity to 24h
  [pod-list] caching for statistics & refactoring
  [pod-list] small fixes
  [pod-list] new class Pod::Specification::Statistics
  [cleanup] Pod::Command::Presenter
  [refactor] moved spec_present module to presenter class
  ...

Conflicts:
	lib/cocoapods/command/spec.rb
0ea0f7e
@fabiopelosin fabiopelosin GitHub support for pod spec create
- added semanting versioning notice
- warning if a spec description or summary does not ends with a dot
- requires octokit gem
- added awesome-print development gem
- removed appledoc options from spec template
- removed range attribute for license from the spec template
20613c1
@fabiopelosin fabiopelosin Fixed spec and other minor fixes for pod spec create 1997d9b
@fabiopelosin fabiopelosin Added magic comment for utf-8 encoding to spec.rb 6c304ff
@alloy
CocoaPods member

Awesome stuff!

@fabiopelosin fabiopelosin merged commit 2a21c65 into master Apr 16, 2012
@alloy alloy commented on the diff Apr 16, 2012
lib/cocoapods/command/spec.rb
unless warnings.empty?
puts "\n[!] The #{spec.name} specification raised the following warnings".yellow
warnings.each { |warn| puts ' - '+ warn }
end
puts
end
+
+ def suggest_tag_and_version(tags)
+ versions_tags = {}
+ tags.each do |tag|
+ clean_tag = tag.gsub(/^v(er)? ?/,'')
+ versions_tags[Gem::Version.new(clean_tag)] = tag if Gem::Version.correct?(clean_tag)
+ end
+ version = versions_tags.keys.sort.last || '0.0.1'
+ tag = version == '0.0.1' ? 'HEAD' : versions_tags[version]
@alloy
CocoaPods member
alloy added a line comment Apr 16, 2012

Can we default to the last commit hash here instead of ‘HEAD’?

@fabiopelosin
CocoaPods member
fabiopelosin added a line comment Apr 16, 2012

It should not be a problem.

@fabiopelosin
CocoaPods member
fabiopelosin added a line comment Apr 16, 2012

Ok, it should be done... not sure what happend in Travis though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@yas375

@irrationalfab some tests failed with ruby 1.9.3 after this merge(( https://secure.travis-ci.org/#!/CocoaPods/CocoaPods/builds/1104106

@fabiopelosin
CocoaPods member

ohh... thanks @yas375... It looks like I forgot some debug strings. I'll take a look at it.

@fabiopelosin
CocoaPods member

Actually this is the rss branch that I updated to show some code and discuss it, I was aware that it was broken. Master is passing after the merge. Thanks for telling anyway... I keep breaking things for the sake of speed :-)

@yas375

yes, I didn't notice that it's not in master branch) sorry)

@jzapater jzapater pushed a commit to jzapater/CocoaPods that referenced this pull request Sep 17, 2013
@markrickert markrickert Added DCRoundSwitch. Addresses issue #208 f989e7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment