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

#26: implementing JSON validation in AbstractBeanstalkMojo #30

Merged
merged 4 commits into from
Oct 20, 2015

Conversation

prondzyn
Copy link
Contributor

Issue #26. I updated the validation in AbstractBeanstalkMojo adding JSON files validation.

I also prepared puzzle in WarFile to consider that file removal.

@dmarkov
Copy link

dmarkov commented Oct 16, 2015

@prondzyn Thanks, let me find someone who can review this pull request

@dmarkov
Copy link

dmarkov commented Oct 16, 2015

@pinaf please review, thanks

@@ -51,6 +51,8 @@
* @version $Id$
* @since 1.0
* @checkstyle DesignForExtensionCheck
* @todo #26 Check and remove this class as all the functionality is in
Copy link

Choose a reason for hiding this comment

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

@prondzyn why not remove the methods for JSON validation already?

@pinaf
Copy link

pinaf commented Oct 16, 2015

@prondzyn please see 9 comments above

@pinaf
Copy link

pinaf commented Oct 16, 2015

@prondzyn I don't understand why you didn't remove the JSON methods already and instead added that puzzle.

@prondzyn
Copy link
Contributor Author

@pinaf I added the puzzle because the issue #26 was only about moving theJSON validation to AbstractBeanstalkMojo but I noticed that the entire WarFile is probably no longer needed. I thought it would be better to separately review the WarFile and it's usage to check if it can be removed but this exceeded time of #26 so I decided to create a puzzle. Correct me if I'm wrong - I'm still PDD newbie :)

@pinaf
Copy link

pinaf commented Oct 16, 2015

@prondzyn I don't know about removing the entire file. Let's focus on moving the methods for JSON and YAML validation - right now you just copied them.

@prondzyn
Copy link
Contributor Author

@pinaf please take a look now

@pinaf
Copy link

pinaf commented Oct 16, 2015

@prondzyn I see your point now. Let's see what the architect thinks about removing WarFile. @yegor256 we need your architect opinion here - since the YAML and JSON validation methods have been moved, should we get rid of WarFile entirely?

@yegor256
Copy link
Member

@prondzyn @pinaf looks like we don't need WarFile class any more... let's just remove it, I'm not against it at all

@pinaf
Copy link

pinaf commented Oct 16, 2015

@yegor256 thanks

@prondzyn
Copy link
Contributor Author

@pinaf so the puzzle can remain?

@pinaf
Copy link

pinaf commented Oct 17, 2015

@prondzyn sure

@pinaf
Copy link

pinaf commented Oct 17, 2015

@rultor merge

@rultor
Copy link
Contributor

rultor commented Oct 17, 2015

@rultor merge

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

@yegor256
Copy link
Member

@rultor try to merge

@rultor
Copy link
Contributor

rultor commented Oct 20, 2015

@rultor try to merge

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

@rultor
Copy link
Contributor

rultor commented Oct 20, 2015

@rultor try to merge

@prondzyn @yegor256 Oops, I failed. You can see the full log here (spent 4min)

[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building jcabi-beanstalk-maven-plugin 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jcabi-beanstalk-maven-plugin ---
[INFO] Deleting /home/r/repo/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.939 s
[INFO] Finished at: 2015-10-20T16:44:34+00:00
[INFO] Final Memory: 7M/219M
[INFO] ------------------------------------------------------------------------
++ pwd
+ pdd --source=/home/r/repo --verbose --file=/dev/null
INFO: "my version is 0.15"
INFO: "Ruby version is 1.9.3 at x86_64-linux"
INFO: "reading /home/r/repo"
INFO: "72 file(s) found"
INFO: "reading LICENSE.txt..."
INFO: "reading README.md..."
INFO: "reading appveyor.yml..."
INFO: "reading pom.xml..."
INFO: "reading src/changes/changes.xml..."
INFO: "reading src/it/settings.xml..."
INFO: "reading src/it/skipped-deployment/invoker.properties..."
INFO: "reading src/it/skipped-deployment/pom.xml..."
INFO: "reading src/it/skipped-deployment/src/main/webapp/WEB-INF/web.xml..."
INFO: "reading src/it/skipped-deployment/verify.groovy..."
INFO: "reading src/main/aspect/README.txt..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/AbstractBeanstalkMojo.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/Application.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/Bundle.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/DeployMojo.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/DeploymentException.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/Environment.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/OverridingBundle.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/OverridingVersion.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/ServerCredentials.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/UpdateMojo.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/Version.java..."
INFO: "reading src/main/java/com/jcabi/beanstalk/maven/plugin/WarFile.java..."
/var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd/source.rb:144:in `rescue in puzzles': ["in /home/r/repo/src/main/java/com/jcabi/beanstalk/maven/plugin/WarFile.java", #<PDD::Error: Too many spaces>] (PDD::Error)
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd/source.rb:142:in `puzzles'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:97:in `block (3 levels) in xml'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:96:in `each'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:96:in `block (2 levels) in xml'
    from /var/lib/gems/1.9.1/gems/nokogiri-1.6.5/lib/nokogiri/xml/builder.rb:391:in `call'
    from /var/lib/gems/1.9.1/gems/nokogiri-1.6.5/lib/nokogiri/xml/builder.rb:391:in `insert'
    from /var/lib/gems/1.9.1/gems/nokogiri-1.6.5/lib/nokogiri/xml/builder.rb:375:in `method_missing'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:95:in `block in xml'
    from /var/lib/gems/1.9.1/gems/nokogiri-1.6.5/lib/nokogiri/xml/builder.rb:293:in `initialize'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:93:in `new'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/lib/pdd.rb:93:in `xml'
    from /var/lib/gems/1.9.1/gems/pdd-0.15/bin/pdd:90:in `<top (required)>'
    from /usr/local/bin/pdd:23:in `load'
    from /usr/local/bin/pdd:23:in `<main>'

@pinaf
Copy link

pinaf commented Oct 20, 2015

@prondzyn looks like there is a problem with the puzzle format

@prondzyn
Copy link
Contributor Author

@pinaf puzzle fixed

@pinaf
Copy link

pinaf commented Oct 20, 2015

@rultor merge

@rultor
Copy link
Contributor

rultor commented Oct 20, 2015

@rultor merge

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

@yegor256
Copy link
Member

@rultor try to merge again

@rultor
Copy link
Contributor

rultor commented Oct 20, 2015

@rultor try to merge again

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

@rultor rultor merged commit 13b851d into jcabi:master Oct 20, 2015
@rultor
Copy link
Contributor

rultor commented Oct 20, 2015

@rultor try to merge again

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

@dmarkov
Copy link

dmarkov commented Oct 22, 2015

@pinaf thanks, I just added 33 mins to your account, payment AP-12V16145NM578114H, 121 hours and 22 mins spent; review comments (c=18) added as a bonus; +33 to your rating, your total score is +4215

@dmarkov
Copy link

dmarkov commented Oct 22, 2015

@rultor please deploy

@rultor
Copy link
Contributor

rultor commented Oct 22, 2015

@rultor please deploy

@dmarkov OK, I'll try to deploy now. You can check the progress here

@rultor
Copy link
Contributor

rultor commented Oct 22, 2015

@rultor please deploy

@dmarkov Done! FYI, the full log is here (took me 5min)

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