Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

0.15.0 #512

Merged
merged 26 commits into from

2 participants

@fabiopelosin

@alloy What do you think of this experiments?

fabiopelosin added some commits
@fabiopelosin fabiopelosin [Specification] support for `header_mappings_dir` in subspecs. e926152
@fabiopelosin fabiopelosin [UserInterface] First attempt to extract UI Logic. 01bc772
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Gemspec] Depend on Octokit 1.x and bundle update.
  [Dependency] Always copy the podspec of external sources to `Local Podspecs`

Conflicts:
	CHANGELOG.md
1eb4ed9
@fabiopelosin fabiopelosin [UserInterface] Improvements to path presentation. 838376a
@fabiopelosin fabiopelosin [Installer] Added pre install hooks.
They are called after the pods have been downloaded but before the targets are
integrated in the Pods.xcodeproj.

closes #486
396effc
@fabiopelosin fabiopelosin [Specification] Check if a value is nil in `pltf_first_defined_attr_r…
…eader'.
6aaf5ed
@fabiopelosin fabiopelosin [Specification] Correctly report ARC compiler flag. 4256ae7
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  Release 0.14.0
  [Bundle] Update.
  [Rakefile] Allow to update the changelog during a release.
  [Gemspec] Bump dependency of Xcodeproj.
  [Changelog]
  Update AppleDoc install instructions
  [Rakefile] Fix Travis.
  [Rakefile] Fix Travis.
  [Rakefile] Fix Travis.
  [Specification] Don't include the name of the preferred dependency in to_s.
  [Lockfile] Make path if needed before writing.
f6c1349
@fabiopelosin fabiopelosin [Git] Use for the cache. a8ee5c1
@alloy
Owner

For changes such as these, a unit test is really a must so that we don’t introduce a regression later on and so others (read: I) can understand the change better :)

I actually left the specs broken, :-( I think that I was working on something else and just needed to fix it. Anyway, now it is fixed and should be covered.

Owner

Ah gotcha, never mind then :)

@alloy
Owner

Oh, do we already use barebones repos? I missed it and made #527 :(

@alloy
Owner

I think it’s a good idea!

However, I would suggest to change it from a singleton+mixin to just one module, because this does not need to be instantiated and makes the code stand out a bit more and nicer imo :)

A module with class methods is basically like a singleton:

module UI
  class << self

    def title(title)
    end

  end
end

Which would then be called like so: UI.title("OMG") do ... end.

@alloy
Owner

Do you have an idea on how much more work you will need for this and if it would make sense to cherry-pick the non perse UI related commits and do an earlier release without the UI stuff?

fabiopelosin added some commits
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Executable] Added environment variable to force STDOUT sync.
  [Command] Don't run setup if needed for `pod setup`.
  Specs for updating a cached repo if the specified branch is missing.
  Update a pod's cached git repo if the specified branch isn't found.

Conflicts:
	lib/cocoapods/downloader/git.rb
9616bc2
@fabiopelosin fabiopelosin [UI] Drop UserInterface::Mixin. 5e592de
@fabiopelosin fabiopelosin [Specs] Fix specification related specs. a2a108c
@fabiopelosin fabiopelosin [Git] Included local branches in the in 4bee32b
@fabiopelosin

I think it is ready!

@fabiopelosin

However, I would suggest to change it from a singleton+mixin to just one module, because this does not need to be instantiated and makes the code stand out a bit more and nicer imo :)

Much nieces, indeed! I wen with the previous approach because I was expecting to select the shared instance subclass according to an environment variable. The idea was to have a default class and specialized subclasses that could be used for instance for talking to the app. Anyway, I've changed my mind about it and I don't think it is needed anymore.

I used a class, instead of a module because I needed to keep track of the indentation levels.

@fabiopelosin

Oh, do we already use barebones repos? I missed it and made #527 :(

In the hope that they work better than the previous implementation :-)

fabiopelosin added some commits
@fabiopelosin fabiopelosin [Repo] Use raising bang variant for git operations. 616e3db
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Repo] Use raising bang variant for git operations.
  [Source] Allow the specify the master repo dir from an environment variable.
  [Linter] Improved checks for the summary and the git tag.
  [Repo] Fix banner.
  [Source] list the name of the repos.
  [Changelog]
  [Config] Added update_notification attribute.
  Support extracting .tar.bz2 files
8d29a37
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Repo] Use raising bang variant for git operations.
a98fd2e
@fabiopelosin fabiopelosin [UI] Refine previous implementation. 5de12d4
@fabiopelosin fabiopelosin [Specs] Fix repo specs. bb911dd
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Specs] Fix repo specs.
9aeeb74
@fabiopelosin fabiopelosin [UI] Adoption in Pod::Command classes. 76cb703
@fabiopelosin fabiopelosin Merge branch 'master' into b0.15.0
* master:
  [Specs] Minor fix for Command::Push.
  [Push] Use git! where possible.
  [Specs] fix for the fix that was supposed to fix Travis.
  [Specs] Fix for Travis issues.
  [Source] The name should be an attribute.
  [Specs] Fixed Travis errors related to Command::Repo.
  [Linter] Fixed minor bug.
  Update CHANGELOG.md
  Update lib/cocoapods/generator/acknowledgements/markdown.rb
  Update lib/cocoapods/generator/acknowledgements/markdown.rb
  [Linter] Promote long summary warning to an error.

Conflicts:
	lib/cocoapods/command/push.rb
cdecc32
@fabiopelosin fabiopelosin [Specs] minor fix. 7df2566
@fabiopelosin

@alloy I think that it is ready.

lib/cocoapods/command/list.rb
@@ -53,16 +56,18 @@ def list_new
days.reverse.each do |d|
sets = groups[d]
next unless sets
- puts "\nPods added in the last #{d == 1 ? 'day' : "#{d} days"}".yellow
- sets.sort_by {|s| creation_dates[s.name]}.each {|s| puts @presenter.describe(s)}
+ UI.section("\nPods added in the last #{d == 1 ? 'day' : "#{d} days"}".yellow) do
@alloy Owner
alloy added a note

Use ActiveSupport for this: "day".pluralize(d)

@fabiopelosin Owner

Thanks for heads up.

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

@irrationalfab Looks good!

I used a class, instead of a module because I needed to keep track of the indentation levels.

Why do you need a class for that?

@fabiopelosin

Why do you need a class for that?

Can you store ivars in modules?

@fabiopelosin

Ok, I'm mergin it.

@fabiopelosin fabiopelosin merged commit 3ec34b5 into from
@alloy
Owner

Can you store ivars in modules?

You can at the ‘instance’ level.

module Foo
  class << self
    # this is Foo, an ‘instance’ of the class Module
    def foo
      @foo ||= Time.now
    end
  end
end
irb(main):009:0> Foo.foo
=> 2012-09-21 16:56:24 +0200
irb(main):010:0> Foo.foo
=> 2012-09-21 16:56:24 +0200
irb(main):011:0> Foo.foo
=> 2012-09-21 16:56:24 +0200
irb(main):012:0> Foo.foo
=> 2012-09-21 16:56:24 +0200
irb(main):013:0> Foo.foo
=> 2012-09-21 16:56:24 +0200
@fabiopelosin

I see, thanks for teaching. Finally, in this case what are the reasons to prefer a module to a class?

@alloy
Owner

:)

I personally prefer to use a module as a singleton when no instantiation is ever required. Because A it doesn't need to be instantiated and a module can’t be instantiated and also because it eliminates the need to have an extra class method like Foo.instance.

The config singleton, for instance, is a class, so we can instantiate new ones in the specs.

@fabiopelosin

Thanks, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 30, 2012
  1. @fabiopelosin
Commits on Aug 31, 2012
  1. @fabiopelosin
  2. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Gemspec] Depend on Octokit 1.x and bundle update.
      [Dependency] Always copy the podspec of external sources to `Local Podspecs`
    
    Conflicts:
    	CHANGELOG.md
  3. @fabiopelosin
  4. @fabiopelosin

    [Installer] Added pre install hooks.

    fabiopelosin authored
    They are called after the pods have been downloaded but before the targets are
    integrated in the Pods.xcodeproj.
    
    closes #486
  5. @fabiopelosin
Commits on Sep 10, 2012
  1. @fabiopelosin
  2. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      Release 0.14.0
      [Bundle] Update.
      [Rakefile] Allow to update the changelog during a release.
      [Gemspec] Bump dependency of Xcodeproj.
      [Changelog]
      Update AppleDoc install instructions
      [Rakefile] Fix Travis.
      [Rakefile] Fix Travis.
      [Rakefile] Fix Travis.
      [Specification] Don't include the name of the preferred dependency in to_s.
      [Lockfile] Make path if needed before writing.
Commits on Sep 13, 2012
  1. @fabiopelosin
Commits on Sep 18, 2012
  1. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Executable] Added environment variable to force STDOUT sync.
      [Command] Don't run setup if needed for `pod setup`.
      Specs for updating a cached repo if the specified branch is missing.
      Update a pod's cached git repo if the specified branch isn't found.
    
    Conflicts:
    	lib/cocoapods/downloader/git.rb
  2. @fabiopelosin
  3. @fabiopelosin
  4. @fabiopelosin
  5. @fabiopelosin
  6. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Repo] Use raising bang variant for git operations.
      [Source] Allow the specify the master repo dir from an environment variable.
      [Linter] Improved checks for the summary and the git tag.
      [Repo] Fix banner.
      [Source] list the name of the repos.
      [Changelog]
      [Config] Added update_notification attribute.
      Support extracting .tar.bz2 files
  7. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Repo] Use raising bang variant for git operations.
Commits on Sep 19, 2012
  1. @fabiopelosin
  2. @fabiopelosin

    [Specs] Fix repo specs.

    fabiopelosin authored
  3. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Specs] Fix repo specs.
  4. @fabiopelosin
  5. @fabiopelosin

    Merge branch 'master' into b0.15.0

    fabiopelosin authored
    * master:
      [Specs] Minor fix for Command::Push.
      [Push] Use git! where possible.
      [Specs] fix for the fix that was supposed to fix Travis.
      [Specs] Fix for Travis issues.
      [Source] The name should be an attribute.
      [Specs] Fixed Travis errors related to Command::Repo.
      [Linter] Fixed minor bug.
      Update CHANGELOG.md
      Update lib/cocoapods/generator/acknowledgements/markdown.rb
      Update lib/cocoapods/generator/acknowledgements/markdown.rb
      [Linter] Promote long summary warning to an error.
    
    Conflicts:
    	lib/cocoapods/command/push.rb
  6. @fabiopelosin

    [Specs] minor fix.

    fabiopelosin authored
  7. @fabiopelosin
Commits on Sep 20, 2012
  1. @fabiopelosin
  2. @fabiopelosin

    [Specs] Robustness.

    fabiopelosin authored
Commits on Sep 21, 2012
  1. @fabiopelosin
Something went wrong with that request. Please try again.