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

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne commented May 18, 2015

Old:

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

New:

  • identifier_type"full" / "legacy"
  • string_pattern_type"glob" / "legacy"
@@ -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"`.
Copy link
Member

@bobthecow bobthecow May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed identifier_type to identifier_type

:P

Loading

Copy link
Member Author

@ddfreyne ddfreyne May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne 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.

Loading

@@ -16,10 +16,10 @@ def self.from(obj)
end

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

@bobthecow bobthecow May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this variable be renamed as well?

Loading

Copy link
Member Author

@ddfreyne ddfreyne May 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Loading

@bobthecow
Copy link
Member

@bobthecow bobthecow commented May 18, 2015

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne 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?

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 18, 2015

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 18, 2015

Renamed.

Loading

@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 issue May 19, 2015
@ddfreyne ddfreyne merged commit 2d4a54e into master May 19, 2015
@ddfreyne ddfreyne deleted the rename-identifier-and-pattern-options branch May 19, 2015
@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented May 19, 2015

Merged. Hope it’s good :)

Loading

@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
@ddfreyne ddfreyne added this to the 4.0.0 milestone Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants