Commit f70d430d authored by Fabio Pelosin's avatar Fabio Pelosin

Added ActiveSupport as dependency.

parent c832f39b
......@@ -9,6 +9,7 @@ PATH
remote: .
specs:
cocoapods (0.6.1)
activesupport (~> 3.2.6)
colored (~> 1.2)
escape (~> 0.0.4)
faraday (~> 0.8.1)
......@@ -21,6 +22,9 @@ PATH
GEM
remote: http://rubygems.org/
specs:
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
awesome_print (1.0.2)
bacon (1.1.0)
......@@ -35,6 +39,7 @@ GEM
ffi (1.0.11)
github-markup (0.7.2)
hashie (1.2.0)
i18n (0.6.0)
json (1.7.3)
kicker (2.6.0)
listen
......
......@@ -25,15 +25,16 @@ Gem::Specification.new do |s|
s.executables = %w{ pod }
s.require_paths = %w{ lib }
s.add_runtime_dependency 'faraday', '~> 0.8.1'
s.add_runtime_dependency 'octokit', '~> 1.7.0'
s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json', '~> 1.7.3'
s.add_runtime_dependency 'open4', '~> 1.3.0'
s.add_runtime_dependency 'rake', '~> 0.9.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.2.1'
s.add_runtime_dependency 'faraday', '~> 0.8.1'
s.add_runtime_dependency 'octokit', '~> 1.7.0'
s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json', '~> 1.7.3'
s.add_runtime_dependency 'open4', '~> 1.3.0'
s.add_runtime_dependency 'rake', '~> 0.9.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.2.1'
s.add_runtime_dependency 'activesupport', '~> 3.2.6'
s.add_development_dependency 'bacon', '~> 1.1'
......
require 'xcodeproj/config'
require 'active_support/core_ext/string/strip.rb'
module Pod
extend Config::Mixin
......@@ -190,29 +191,27 @@ module Pod
top_attr_accessor :documentation
top_attr_accessor :requires_arc
top_attr_accessor :version, lambda { |v| Version.new(v) }
top_attr_accessor :license, lambda { |l| parse_license(l) }
top_attr_accessor :authors, lambda { |a| parse_authors(a) }
top_attr_reader :description, lambda { |instance, ivar| ivar || instance.summary }
top_attr_writer :description, lambda { |d| strip_heredoc(d) }
top_attr_writer :description, lambda { |d| d.strip_heredoc }
alias_method :author=, :authors=
# Strips indentation in heredocs.
# @!method license
#
# @note Adapted from Ruby on Rails.
# @abstract
# The license of the pod.
#
def self.strip_heredoc(string)
min_indent = string.scan(/^[ \t]*(?=\S)/).min
indent = min_indent ? min_indent.size : 0
string.gsub(/^[ \t]{#{indent}}/, '')
end
def self.parse_license(license)
# @example
# s.license = 'MIT'
# s.license = { :type => 'MIT', :file => 'license.txt', :text => 'Permission is granted to...' }
#
top_attr_accessor :license, lambda { |license|
license = ( license.kind_of? String ) ? { :type => license } : license
license[:text] = strip_heredoc(license[:text]) if license[:text]
license[:text] = license[:text].strip_heredoc if license[:text]
license
end
}
def self.parse_authors(*names_and_email_addresses)
list = names_and_email_addresses.flatten
......
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