Commit fb637f2f authored by Will Pragnell's avatar Will Pragnell

Changed all single quotes to double quotes (OCD?)

parent b72322f3
...@@ -2,7 +2,7 @@ module Pod ...@@ -2,7 +2,7 @@ module Pod
module Generator module Generator
class Acknowledgements class Acknowledgements
require 'xcodeproj/xcodeproj_ext' require "xcodeproj/xcodeproj_ext"
def initialize(target_definition, pods) def initialize(target_definition, pods)
@target_definition, @pods = target_definition, pods @target_definition, @pods = target_definition, pods
...@@ -14,8 +14,8 @@ module Pod ...@@ -14,8 +14,8 @@ module Pod
def plist def plist
{ {
:Title => 'Acknowledgements', :Title => "Acknowledgements",
:StringsTable => 'Acknowledgements', :StringsTable => "Acknowledgements",
:PreferenceSpecifiers => licenses :PreferenceSpecifiers => licenses
} }
end end
...@@ -29,18 +29,18 @@ module Pod ...@@ -29,18 +29,18 @@ module Pod
def hash_for_pod(pod) def hash_for_pod(pod)
if (license = pod.license) if (license = pod.license)
license_hash = { license_hash = {
:Type => 'PSGroupSpecifier', :Type => "PSGroupSpecifier",
:Title => pod.name, :Title => pod.name,
:FooterText => license[:text] :FooterText => license[:text]
} }
else else
puts '[!] No licence for #{pod.name}' puts "[!] No licence for #{pod.name}"
end end
end end
def header def header
{ {
:Type => 'PSGroupSpecifier', :Type => "PSGroupSpecifier",
:Title => header_title, :Title => header_title,
:FooterText => header_text :FooterText => header_text
} }
...@@ -48,26 +48,26 @@ module Pod ...@@ -48,26 +48,26 @@ module Pod
def footnote def footnote
{ {
:Type => 'PSGroupSpecifier', :Type => "PSGroupSpecifier",
:Title => footnote_title, :Title => footnote_title,
:FooterText => footnote_text :FooterText => footnote_text
} }
end end
def header_title def header_title
'Acknowledgements' "Acknowledgements"
end end
def header_text def header_text
'This application uses the following third party software:' "This application uses the following third party software:"
end end
def footnote_title def footnote_title
'' ""
end end
def footnote_text def footnote_text
'Generated by CocoaPods' "Generated by CocoaPods"
end end
end end
end end
......
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path("../../../spec_helper", __FILE__)
describe Pod::Generator::Acknowledgements do describe Pod::Generator::Acknowledgements do
before do before do
@podfile = Pod::Podfile.new do @podfile = Pod::Podfile.new do
platform :ios platform :ios
xcodeproj 'dummy' xcodeproj "dummy"
end end
@target_definition = @podfile.target_definitions[:default] @target_definition = @podfile.target_definitions[:default]
@sandbox = temporary_sandbox @sandbox = temporary_sandbox
@pods = [Pod::LocalPod.new(fixture_spec('banana-lib/BananaLib.podspec'), @sandbox, Pod::Platform.ios)] @pods = [Pod::LocalPod.new(fixture_spec("banana-lib/BananaLib.podspec"), @sandbox, Pod::Platform.ios)]
copy_fixture_to_pod('banana-lib', @pods[0]) copy_fixture_to_pod("banana-lib", @pods[0])
@acknowledgements = Pod::Generator::Acknowledgements.new(@target_definition, @pods) @acknowledgements = Pod::Generator::Acknowledgements.new(@target_definition, @pods)
end end
it 'returns the corrent number of licenses (including headera and footnote)' do it "returns the corrent number of licenses (including headera and footnote)" do
@acknowledgements.licenses.count.should == 3 @acknowledgements.licenses.count.should == 3
end end
it 'returns a correctly formed license hash for each pod' do it "returns a correctly formed license hash for each pod" do
@acknowledgements.hash_for_pod(@pods[0]).should == { @acknowledgements.hash_for_pod(@pods[0]).should == {
:Type => 'PSGroupSpecifier', :Type => "PSGroupSpecifier",
:Title => 'BananaLib', :Title => "BananaLib",
:FooterText => 'Permission is hereby granted ...' :FooterText => "Permission is hereby granted ..."
} }
end end
it 'returns a plist containg the licenses' do it "returns a plist containg the licenses" do
@acknowledgements.plist.should == { @acknowledgements.plist.should == {
:Title => 'Acknowledgements', :Title => "Acknowledgements",
:StringsTable => 'Acknowledgements', :StringsTable => "Acknowledgements",
:PreferenceSpecifiers => @acknowledgements.licenses :PreferenceSpecifiers => @acknowledgements.licenses
} }
end end
it 'writes a plist to disk' do it "writes a plist to disk" do
@acknowledgements.save_as(@sandbox.root + 'test.plist').should.be.true @acknowledgements.save_as(@sandbox.root + 'test.plist').should.be.true
end end
end end
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