Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename identifier_style and pattern_syntax #593

Merged
merged 5 commits into from May 19, 2015

Conversation

Projects
None yet
2 participants
@ddfreyne
Copy link
Member

commented May 18, 2015

Old:

  • identifier_style"full" / "stripped"
  • pattern_syntax"glob" / nil

New:

  • identifier_type"full" / "legacy"
  • string_pattern_type"glob" / "legacy"
NEWS.md Outdated
@@ -6,6 +6,7 @@ Changes:

* Removed `ItemCollectionView#at`
* Removed support for calling `ItemCollectionView#[]` with an integer
* Renamed `identifier_type` to `identifier_type`, and made its values be `"full"` or `"legacy"`.

This comment has been minimized.

Copy link
@bobthecow

bobthecow May 18, 2015

Member

Renamed identifier_type to identifier_type

:P

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne May 18, 2015

Author Member

Yup. I’m on to that right now. :)

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Hm, two things:

  • The constructor of Nanoc::Identifier has an optional :style argument. It currently defaults to "legacy', but that’s not what we want. Maybe having it mandatory (as :type) makes sense, or we default to "full".
  • pattern_type might be better as string_pattern_type. Regexes are also patterns, but pattern_type doesn’t apply to that.

@ddfreyne ddfreyne referenced this pull request May 18, 2015

Merged

Make globs and indentifiers with extensions the default #592

2 of 2 tasks complete
@@ -16,10 +16,10 @@ def self.from(obj)
end

def initialize(string, params = {})
@style = params.fetch(:style, :stripped)
@style = params.fetch(:style, :legacy)

This comment has been minimized.

Copy link
@bobthecow

bobthecow May 18, 2015

Member

should this variable be renamed as well?

This comment has been minimized.

Copy link
@ddfreyne

ddfreyne May 18, 2015

Author Member

Good catch.

@bobthecow

This comment has been minimized.

Copy link
Member

commented May 18, 2015

I'd say name the argument (and instance variable) type and default it to full.

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Letting it default to :full seems like it belongs in a separate PR. I agree though.

Is this PR good to go?

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Oh yeah, hm, I would like to replace pattern_type with string_pattern_type.

@ddfreyne ddfreyne added to review and removed status:wip 🔧 labels May 18, 2015

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 18, 2015

Renamed.

@ddfreyne ddfreyne changed the title Rename identifier_style to identifier_type Rename identifier_style and pattern_syntax May 18, 2015

ddfreyne added a commit that referenced this pull request May 19, 2015

Merge pull request #593 from nanoc/rename-identifier-and-pattern-options
Rename identifier_style and pattern_syntax

@ddfreyne ddfreyne merged commit 2d4a54e into master May 19, 2015

@ddfreyne ddfreyne deleted the rename-identifier-and-pattern-options branch May 19, 2015

@ddfreyne

This comment has been minimized.

Copy link
Member Author

commented May 19, 2015

Merged. Hope it’s good :)

@ddfreyne ddfreyne removed the to review label May 19, 2015

@ddfreyne ddfreyne modified the milestone: 4.0.0 Jun 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.