popularity_contest 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5893d3a56c36a18ddf2070e6aa5863fa81d63ae0
4
- data.tar.gz: 92523699d751169b15e8856f57fe5a7d78abd8db
3
+ metadata.gz: 6f005c580d17c6df88fdcf665524a449ba45a5ab
4
+ data.tar.gz: 98ed7c8695f1635e28a9a4ab31c5dac6bbe3dd98
5
5
  SHA512:
6
- metadata.gz: de79366560dba8da393bd91cec4c7802681e3b7d633317a4c7c3d4fdd6627d811cb9746e8877a50f129d771da696732b81b799707a8cd755bdb13e37c144b69d
7
- data.tar.gz: f917debb434a69fbf0f5da4528c6cdc1763ef584dab6228adbb2de2ce17fa7f13f2f5d58af54bf856b4ecaa7e4d8abd2cdceffaea43bec8ae449da0046f5bb44
6
+ metadata.gz: 4a9862a07106d8b356a645799cbda95a99a21512679310015c3414067478270c891183149a484e7ad85a458248a8a2ae5c1e37d932cf73970769a4520c938df7
7
+ data.tar.gz: 85f503c1675502a92408c9f9cf74017dfef33a4c6bf7ec011500da1037bed34d45d3208cfc8655374dcdfac823c9783df68060cb219d9cb53d766c6df8f0773b
@@ -13,7 +13,7 @@ module PopularityContest
13
13
  url = build_path(content_type, content_id)
14
14
  <<-SJS
15
15
  <script>
16
- if (jQuery) {
16
+ if (typeof jQuery !== 'undefined') {
17
17
  (function(window, document, $, undefined) {
18
18
  $.ajax({
19
19
  url: '#{url}',
@@ -21,6 +21,8 @@ if (jQuery) {
21
21
  cache: false
22
22
  })
23
23
  }(window, document, jQuery));
24
+ } else {
25
+ console.warn("jQuery is not defined, the `popularity_contest` will not work");
24
26
  }
25
27
  </script>
26
28
  SJS
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "popularity_contest"
7
- spec.version = "0.0.8"
7
+ spec.version = "0.1.0"
8
8
  spec.authors = ["Kasper Grubbe"]
9
9
  spec.email = ["kawsper@gmail.com"]
10
10
  spec.description = "A Rack application to count and sort popular content on our websites"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popularity_contest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Grubbe