ads-rails 0.2.0 → 0.2.1

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: aefcb9222a068807926d5be7ea94fa88e1596bff
4
- data.tar.gz: 3065730fd22ae0b307a5beead62ee424ada2f4a5
3
+ metadata.gz: fab0b538bb88f6c4c7087fa45d68f5b39477c285
4
+ data.tar.gz: 21134b574ff195bfc033940e699f205a908f8426
5
5
  SHA512:
6
- metadata.gz: 2425f7fb9a04661cc7d28747d81a06df1cd3a307b17b272c414c1b039b14a535a62c8cf39e76428ab2f736bd341d50240436ff4826bbab3b5fa479f402fac093
7
- data.tar.gz: 20e75a062c5a62c8bd03720de792ac520766d0dfdc5bf2889d8a4c6785d7bfd88d4f2cc4352ca0b0d9629dc7d5a7c9ae2fec2b7f318f119ed1a7b09bdf971cb2
6
+ metadata.gz: 2df225270c44fbb8e72af367a5150d12eb532024970e61390d2db4fbad1984858f54880b70fc70b90e9836416bdff5478dbab495d60391801cc4ee5a619f6ab4
7
+ data.tar.gz: 423b2d9a4b64c7cec2165d21b299f4d883648749bdc49f5f5ab2166d4807f585bef9eafbca9b94007c53b5ebe901fe0548226389b2464acb18b00747e75b0b2b
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2014 Museways
1
+ Copyright 2015 Museways
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Gem Version](https://badge.fury.io/rb/ads-rails.svg)](http://badge.fury.io/rb/ads-rails) [![Code Climate](https://codeclimate.com/github/museways/ads-rails/badges/gpa.svg)](https://codeclimate.com/github/museways/ads-rails) [![Build Status](https://travis-ci.org/museways/ads-rails.svg?branch=0.1.1)](https://travis-ci.org/museways/ads-rails)
1
+ [![Gem Version](https://badge.fury.io/rb/ads-rails.svg)](http://badge.fury.io/rb/ads-rails) [![Code Climate](https://codeclimate.com/github/museways/ads-rails/badges/gpa.svg)](https://codeclimate.com/github/museways/ads-rails) [![Build Status](https://travis-ci.org/museways/ads-rails.svg?branch=0.1.1)](https://travis-ci.org/museways/ads-rails) [![Dependency Status](https://gemnasium.com/museways/ads-rails.svg)](https://gemnasium.com/museways/ads-rails)
2
2
 
3
3
  # Ads Rails
4
4
 
@@ -1,7 +1,7 @@
1
1
  module Ads
2
2
  module Rails
3
3
 
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
 
6
6
  end
7
7
  end
@@ -20,7 +20,11 @@ Dummy::Application.configure do
20
20
  # config.action_dispatch.rack_cache = true
21
21
 
22
22
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
23
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
24
+ config.serve_static_files = false
25
+ else
26
+ config.serve_static_assets = false
27
+ end
24
28
 
25
29
  # Compress JavaScripts and CSS.
26
30
  config.assets.js_compressor = :uglifier
@@ -13,7 +13,11 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
17
+ config.serve_static_files = false
18
+ else
19
+ config.serve_static_assets = false
20
+ end
17
21
  config.static_cache_control = "public, max-age=3600"
18
22
 
19
23
  # Show full error reports and disable caching.
@@ -33,4 +37,8 @@ Dummy::Application.configure do
33
37
 
34
38
  # Print deprecation notices to the stderr.
35
39
  config.active_support.deprecation = :stderr
40
+
41
+ if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
42
+ config.active_support.test_order = :random
43
+ end
36
44
  end
@@ -1435,3 +1435,93 @@ IncludeTagTest: test_gray_div
1435
1435
  IncludeTagTest: test_renderer
1436
1436
  -----------------------------
1437
1437
   (0.0ms) rollback transaction
1438
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1439
+  (0.1ms) select sqlite_version(*)
1440
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1441
+  (0.0ms) SELECT version FROM "schema_migrations"
1442
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1443
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1444
+  (0.1ms) select sqlite_version(*)
1445
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1446
+  (0.1ms) SELECT version FROM "schema_migrations"
1447
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1448
+  (0.1ms) begin transaction
1449
+ ------------------------------------------
1450
+ GeneratorsTest: test_initializer_generator
1451
+ ------------------------------------------
1452
+  (0.2ms) rollback transaction
1453
+  (0.1ms) begin transaction
1454
+ ---------------------------------
1455
+ IncludeTagTest: test_adsense_code
1456
+ ---------------------------------
1457
+  (0.1ms) rollback transaction
1458
+  (0.1ms) begin transaction
1459
+ -----------------------------
1460
+ IncludeTagTest: test_gray_div
1461
+ -----------------------------
1462
+  (0.0ms) rollback transaction
1463
+  (0.0ms) begin transaction
1464
+ -----------------------------
1465
+ IncludeTagTest: test_renderer
1466
+ -----------------------------
1467
+  (0.0ms) rollback transaction
1468
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1469
+  (0.1ms) select sqlite_version(*)
1470
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1471
+  (0.0ms) SELECT version FROM "schema_migrations"
1472
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1473
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1474
+  (0.1ms) select sqlite_version(*)
1475
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1476
+  (0.1ms) SELECT version FROM "schema_migrations"
1477
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1478
+  (0.1ms) begin transaction
1479
+ ------------------------------------------
1480
+ GeneratorsTest: test_initializer_generator
1481
+ ------------------------------------------
1482
+  (0.1ms) rollback transaction
1483
+  (0.1ms) begin transaction
1484
+ ---------------------------------
1485
+ IncludeTagTest: test_adsense_code
1486
+ ---------------------------------
1487
+  (0.1ms) rollback transaction
1488
+  (0.1ms) begin transaction
1489
+ -----------------------------
1490
+ IncludeTagTest: test_gray_div
1491
+ -----------------------------
1492
+  (0.0ms) rollback transaction
1493
+  (0.0ms) begin transaction
1494
+ -----------------------------
1495
+ IncludeTagTest: test_renderer
1496
+ -----------------------------
1497
+  (0.0ms) rollback transaction
1498
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1499
+  (0.1ms) select sqlite_version(*)
1500
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1501
+  (0.0ms) SELECT version FROM "schema_migrations"
1502
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1503
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
1504
+  (0.1ms) select sqlite_version(*)
1505
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1506
+  (0.1ms) SELECT version FROM "schema_migrations"
1507
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
1508
+  (0.1ms) begin transaction
1509
+ ------------------------------------------
1510
+ GeneratorsTest: test_initializer_generator
1511
+ ------------------------------------------
1512
+  (0.1ms) rollback transaction
1513
+  (0.1ms) begin transaction
1514
+ -----------------------------
1515
+ IncludeTagTest: test_renderer
1516
+ -----------------------------
1517
+  (0.1ms) rollback transaction
1518
+  (0.1ms) begin transaction
1519
+ -----------------------------
1520
+ IncludeTagTest: test_gray_div
1521
+ -----------------------------
1522
+  (0.1ms) rollback transaction
1523
+  (0.1ms) begin transaction
1524
+ ---------------------------------
1525
+ IncludeTagTest: test_adsense_code
1526
+ ---------------------------------
1527
+  (0.1ms) rollback transaction
@@ -9,11 +9,8 @@ class IncludeTagTest < ActionView::TestCase
9
9
  test 'adsense code' do
10
10
  Ads.config.renderer = nil
11
11
  with_env 'production' do
12
- assert_equal(
13
- %Q(<script type="text/javascript">google_ad_client = 'pub-1234';\ngoogle_ad_width = 728;\n</script>) +
14
- %Q(<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>),
15
- google_adsense_include_tag(client: 'pub-1234', width: 728)
16
- )
12
+ tag = google_adsense_include_tag(client: 'pub-1234', width: 728)
13
+ assert tag.include?("google_ad_client = 'pub-1234';\ngoogle_ad_width = 728;\n")
17
14
  end
18
15
  end
19
16
 
@@ -25,20 +22,16 @@ class IncludeTagTest < ActionView::TestCase
25
22
  )
26
23
  }
27
24
  with_env 'development' do
28
- assert_equal(
29
- '<img src="http://placehold.it/728x90&amp;text=Adsense" />',
30
- google_adsense_include_tag(width: 728, height:90)
31
- )
25
+ tag = google_adsense_include_tag(width: 728, height:90)
26
+ assert tag.include?('src="http://placehold.it/728x90&amp;text=Adsense"')
32
27
  end
33
28
  end
34
29
 
35
30
  test 'gray div' do
36
31
  Ads.config.renderer = nil
37
32
  with_env 'development' do
38
- assert_equal(
39
- '<div style="width:728px;height:90px;background:#c8c8c8;"></div>',
40
- google_adsense_include_tag(width: 728, height:90)
41
- )
33
+ tag = google_adsense_include_tag(width: 728, height:90)
34
+ assert tag.include?('style="width:728px;height:90px;background:#c8c8c8;"')
42
35
  end
43
36
  end
44
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ads-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2015-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,8 +16,8 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.0
20
- - - "<"
19
+ version: 4.0.0
20
+ - - "<="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 4.2.0
23
23
  type: :runtime
@@ -26,8 +26,8 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 3.1.0
30
- - - "<"
29
+ version: 4.0.0
30
+ - - "<="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 4.2.0
33
33
  - !ruby/object:Gem::Dependency
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.2.2
136
+ rubygems_version: 2.4.5
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Google adsense for rails.