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

Add Constant Scalar #637

Merged
merged 3 commits into from Feb 14, 2018
Merged

Add Constant Scalar #637

merged 3 commits into from Feb 14, 2018

Conversation

ghost
Copy link

@ghost ghost commented Feb 12, 2018

As per #609

@0crat 0crat added the scope label Feb 12, 2018
Copy link

@amihaiemil amihaiemil left a comment

Choose a reason for hiding this comment

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

@Aliceice Looks nice, just a few comments.

MatcherAssert.assertThat(
"Can't return given value",
new Constant<>("Hello World").value(),
Matchers.endsWith("World")

Choose a reason for hiding this comment

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

@Aliceice Why not Matchers.equalTo("Hello World") here? endsWith does not guarantee that Constant doesn't change the encapsulated String somehow.

Copy link
Author

Choose a reason for hiding this comment

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

The problem here is qulice. It does not allow to use the same String twice in a class. So either I define a variable beforehand and use this in both construction and assertion, or do it like this.

What do you suggest?

Choose a reason for hiding this comment

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

@Aliceice Right, I forgot how strict Qulice is... then I would say declare a variable beforehand :)

*
* <p>Example:
* <pre>
* final Scalar&lt;String&gt constant = new Constant("Pre-Computed Value");

Choose a reason for hiding this comment

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

@Aliceice If I'm not mistaken, here you should have new Constant<>("Pre-Computed Value") (missing the <>). Also, I think a ; is missing after &gt.

Copy link
Author

Choose a reason for hiding this comment

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

You are right, I'll fix this.

@amihaiemil
Copy link

@Aliceice I also saw that you opened a ticket in teamed/qulice regarding the @author regex. Trouble is, I don't think we can wait after that now (that ticket may take a long time to be resolved and PRs cannot have impediments). Some time will pass, then your PR there may get merged, then qulice has to be released etc.

I'm not sure what exactly is not supported by qulice; the dash (-), the dot (.)? Maybe just enter your github username for now?

@ghost
Copy link
Author

ghost commented Feb 13, 2018

@amihaiemil Qulice is not recognizing the dash - in my surname. I'll change it to my Github username for now.

@codecov-io
Copy link

Codecov Report

Merging #637 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master   #637      +/-   ##
==========================================
+ Coverage     69.96%    70%   +0.03%     
- Complexity     1001   1003       +2     
==========================================
  Files           213    214       +1     
  Lines          3300   3304       +4     
  Branches        192    192              
==========================================
+ Hits           2309   2313       +4     
  Misses          944    944              
  Partials         47     47
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/cactoos/scalar/Constant.java 100% <100%> (ø) 2 <2> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eff4166...563e63d. Read the comment docs.

@ghost
Copy link
Author

ghost commented Feb 13, 2018

@amihaiemil I updated the PR according to your suggestions. Could you please have a look again?

@amihaiemil
Copy link

@Aliceice looks good!

@amihaiemil
Copy link

@rultor good to merge

@rultor
Copy link
Collaborator

rultor commented Feb 13, 2018

@rultor good to merge

@amihaiemil Thanks for your request. @yegor256 Please confirm this.

@amihaiemil
Copy link

@yegor256 ping

@yegor256
Copy link
Owner

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Feb 14, 2018

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 563e63d into yegor256:master Feb 14, 2018
@rultor
Copy link
Collaborator

rultor commented Feb 14, 2018

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 10min)

@0crat
Copy link
Collaborator

0crat commented Feb 14, 2018

Order was successfully finished: +15 points just awarded to @amihaiemil/z, total is +615

@0crat
Copy link
Collaborator

0crat commented Feb 14, 2018

Payment to ARC for a closed pull request, as in §28: +15 points just awarded to @yegor256/z, total is +9724

@0crat
Copy link
Collaborator

0crat commented Feb 14, 2018

The job #637 is now out of scope

@amihaiemil
Copy link

@Aliceice PR is now merged. Don't forget to ask the initial ticket's reporter to close it.

@ghost ghost deleted the 609 branch February 14, 2018 15:38
@ghost ghost mentioned this pull request Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants