rweng / jquery-datatables-rails

jquery-datatables gem for rails
MIT License
564 stars 338 forks source link

Can we include code climate GPA score badge on this repo #142

Open trkrameshkumar opened 9 years ago

trkrameshkumar commented 9 years ago

If we include code climate GPA score badge on this repo, that will help us to keep track of the quality of the code.

trkrameshkumar commented 9 years ago

@ricardodovalle , @rweng what do you guys think?

ricardodovalle commented 9 years ago

@trkrameshkumar I like the idea, I think Travis CI more important than CodeClimate, because this gem only add the jQuery DataTables plugins to Rails assets path, but we need to implement unit tests before.

Could you help us?

trkrameshkumar commented 9 years ago

@ricardodovalle ok sure. are you tell me that we have to write test case as first thing?

ricardodovalle commented 9 years ago

yes, I think more important. thanks @trkrameshkumar

trkrameshkumar commented 9 years ago

ok @ricardodovalle , list down the things that you what to cover on testing

ricardodovalle commented 9 years ago

Thanks @trkrameshkumar , I would start creating a dummy app and check: If the jquery-datatables, plugins and images were added to assets paths, If some seed data was shown in html page

What do you think?

trkrameshkumar commented 9 years ago

@ricardodovalle I thing i can start with the above things and we can add other things on the way after done testing for the above points . is it ok?

ricardodovalle commented 9 years ago

Yes, sure. Thank you very much @trkrameshkumar :+1:

trkrameshkumar commented 9 years ago

@ricardodovalle what is the purpose of this code in Rakefile

require "bundler/gem_tasks"

desc "Fixes css image paths in scss files."
task :fix_css do
  Dir.glob(File.join("app/assets/stylesheets/dataTables", "*.css.scss")).each do |filename|
    content = File.read(filename)
    content.gsub!(/url\('\.\.\/images\/([A-Za-z0-9_]*\.png)'\)/) do
      "image-url('dataTables/#{$1}')"
    end
    File.open(filename, 'w') { |f| f << content }
  end
  print "Done.\n"
end
trkrameshkumar commented 9 years ago

@ricardodovalle travis ci, successfully integrated and it is build pass, here is the link, tell me what do you think

https://travis-ci.org/trkrameshkumar/jquery-datatables-rails.

trkrameshkumar commented 9 years ago

@ricardodovalle ?