maxwell / rack-piwik Goto Github PK
View Code? Open in Web Editor NEWRack Middleware to help with adding piwik js in every request
License: MIT License
Rack Middleware to help with adding piwik js in every request
License: MIT License
http://rubygems.org/gems/rack-piwik points to https://github.com/leehambley/rack-google-analytics and not to https://github.com/maxwell/rack-piwik.
The listing of rack-piwik at https://www.ruby-toolbox.com/gems/rack-piwik could be also improved.
A nice simple solution! Nonetheless, perhaps you could add a note in the README about why you felt the need for a middleware instead of the piwik_analytics gem.
Can we include the tests as part of the gem itself (many gems include tests)? I'm packaging this library for debian and I have to take a github tarball instead of the gem.
Failure:
test: Asynchronous default should add tracker if body element is present. (TestRackPiwik)
/media/forge/debian/git/pkg-ruby-extras/ruby-rack-piwik/test/test_rack_piwik.rb:10:in block (3 levels) in <class:TestRackPiwik>' 7: setup { mock_app :async => true, :tracker => 'somebody', :piwik_url => 'piwik.example.org', :piwik_id => '123' } 8: should "add tracker if body element is present" do 9: get "/body_only" => 10: assert_match %r{https://piwik.example.org/}, last_response.body 11: assert_match %r{123\);}, last_response.body 12: assert_match %r{</noscript>\n<!-- End Piwik Code --></body>}, last_response.body 13: assert_equal "650", last_response.headers['Content-Length'] /usr/lib/ruby/vendor_ruby/shoulda/context/context.rb:394:in
call'
/usr/lib/ruby/vendor_ruby/shoulda/context/context.rb:394:in `block in create_test_from_should_hash'
<> expected but was
<>
diff:
....
Finished in 0.043060714 seconds.
5 tests, 7 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
80% passed
116.12 tests/s, 162.56 assertions/s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.