Code Monkey home page Code Monkey logo

Comments (8)

siong1987 avatar siong1987 commented on June 24, 2024

Do you mind point to the part that the code is derived from your code? To be honest, I don't remember copying your whole branch and making changes based on your code.

4e0d109

And, the above commit looks like I was using some kind of gem generator for it.

Btw, I might refer to your code at some point to get some ideas from. But, I am sure that I didn't change the code based on your branch.

from mongoid_shortener.

jpmcgrath avatar jpmcgrath commented on June 24, 2024

Mate, don't be dishonest and do the right thing. It's pretty unrealistic that you would forget doing something like this. You only have to compare the controllers, helpers and models to see that the code was derived from Shortener and pretending otherwise is silly.

I'm not asking for much, I'm sure you'd want others to do the same for you.

from mongoid_shortener.

siong1987 avatar siong1987 commented on June 24, 2024

Let me say this again. I am not saying that I won't attribute this to you. But, if you could point out the part that I am copying from you, then, I will.

And, I want to say this again. I definitely didn't rewrite this gem from your gem. So, I don't think that changing the license back to you is the thing I would want to do.

from mongoid_shortener.

jpmcgrath avatar jpmcgrath commented on June 24, 2024

Ok, how about we look at the shortened_urls_controller.rb:

Mine:
https://github.com/jpmcgrath/shortener/blob/17296a2522b3be4f2b029d2e6efa22594563bd44/app/controllers/shortener/shortened_urls_controller.rb

Yours:
https://github.com/siong1987/mongoid_shortener/blob/4e0d109d8c835175e9f9b86d55826caafe983bf7/app/controllers/mongoid_shortener/shortened_urls_controller.rb

How similar are they? Are the function names the same? Yes. Are the variables the same? Yes. Are the comments the same? YES!

We can now look at the shortened_url.rb model:
Mine:
https://github.com/jpmcgrath/shortener/blob/aad8923184401481af41aff5a3ed7e64e289d8db/app/models/shortener/shortened_url.rb

Yours:
https://github.com/siong1987/mongoid_shortener/blob/4e0d109d8c835175e9f9b86d55826caafe983bf7/app/models/mongoid_shortener/shortened_url.rb

The REGEX constants are the same name and structure, the validations are the same and the functions are largely the same and once again the comments are the same.

There are obvious similarities between both of our shortener_helper.rb files:

https://github.com/jpmcgrath/shortener/blob/17296a2522b3be4f2b029d2e6efa22594563bd44/app/helpers/shortener/shortener_helper.rb

https://github.com/siong1987/mongoid_shortener/blob/4e0d109d8c835175e9f9b86d55826caafe983bf7/app/helpers/mongoid_shortener/shortened_urls_helper.rb

You have changed this file the most, but left the following comment in there: "generate a url from either a url string, or a shortened url object"

Not only is this comment the same comment as I wrote in my file BUT it also doesn't make sense to have it in your method because you raise an exception if the url argument is anything other than a string. The comment says "url string or a shortened url object", but you can't pass a shortened url object to your helper method.

The guts of the Gem are in these three files. The rest of the files are to wrap the whole thing into a rack application.

So, could you please explain how these files contain the same constants, variables, constants and the same comments if you didn't copy and paste those files into your project?

from mongoid_shortener.

siong1987 avatar siong1987 commented on June 24, 2024

See. That's exactly what I wanted. I already told you that I forgot where I referred the code from. I will update the files accordingly.

from mongoid_shortener.

siong1987 avatar siong1987 commented on June 24, 2024

1232168

from mongoid_shortener.

siong1987 avatar siong1987 commented on June 24, 2024

50bfd5c

from mongoid_shortener.

jpmcgrath avatar jpmcgrath commented on June 24, 2024

Thanks @siong1987, much appreciated.

from mongoid_shortener.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.