fonts-rails 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32b275296a537b2edd11463172b264c60a6b0b35
4
- data.tar.gz: 6f2553fcc9fdbf9c8535630df93e207c48cc3642
3
+ metadata.gz: 599431cc48825ac6b3bcd5ad07a0a7efa0389c68
4
+ data.tar.gz: 406fef72c6bc093be9f5f3fb2ff4f554a045ab5f
5
5
  SHA512:
6
- metadata.gz: c06c1b626abc51038be68fed09fae1a0ca68b7ddc702f61e57087b677e0153efe35fccf221f4a160ae74b117afe498022480cb291bb0d37a3c262a4a5f427fb9
7
- data.tar.gz: fc4662a13a849409c4eed30b0b69443524118bcffded143026d887ce35522bfd0662da10ff0e80b37a89280edb37d0f8036c88d93332d0d5c90dc27826479b0e
6
+ metadata.gz: 20fc02457a9d01d8eb1195f34cd3dcea0114e77c6fb2e42a02bf4f68f546062ecb61d0595aa0d42298f2411658577e4695c4ff2a19badb3f43a2ada54ac35adf
7
+ data.tar.gz: 2fc3b676aa8179e2c21a44df30c9703b478ed971390edcc17bd4d4268338fdb754d1b3e54bdd2361c71a452b49449a1e69de8df63d1ff187e3527526443397f2
@@ -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
@@ -0,0 +1,32 @@
1
+ [![Gem Version](https://badge.fury.io/rb/fonts-rails.svg)](http://badge.fury.io/rb/fonts-rails) [![Code Climate](https://codeclimate.com/github/museways/fonts-rails/badges/gpa.svg)](https://codeclimate.com/github/museways/fonts-rails) [![Build Status](https://travis-ci.org/museways/fonts-rails.svg?branch=master)](https://travis-ci.org/museways/fonts-rails) [![Dependency Status](https://gemnasium.com/museways/fonts-rails.svg)](https://gemnasium.com/museways/fonts-rails)
2
+
3
+ # Fonts Rails
4
+
5
+ Adds a simple helper to create the google fonts link tag in rails.
6
+
7
+ ## Install
8
+
9
+ Put this line in your Gemfile:
10
+ ```ruby
11
+ gem 'fonts-rails'
12
+ ```
13
+
14
+ Then bundle:
15
+ ```
16
+ $ bundle
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ In your layout call the helper like this:
22
+ ```erb
23
+ <%= google_fonts_link_tag 'Open+Sans:300' %>
24
+ ```
25
+
26
+ ## Credits
27
+
28
+ This gem is maintained and funded by [museways](http://museways.com).
29
+
30
+ ## License
31
+
32
+ It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
@@ -1,6 +1,5 @@
1
1
  require 'fonts/rails/action_view/base'
2
2
  require 'fonts/rails/railtie'
3
- require 'fonts/rails/version'
4
3
 
5
4
  module Fonts
6
5
  module Rails
@@ -5,13 +5,13 @@ module Fonts
5
5
 
6
6
  def google_fonts_link_tag(family)
7
7
  tag(
8
- :link,
8
+ :link,
9
9
  {
10
10
  rel: :stylesheet,
11
11
  type: Mime::CSS,
12
12
  href: "#{request.protocol}fonts.googleapis.com/css?family=#{family}"
13
13
  },
14
- false,
14
+ false,
15
15
  false
16
16
  )
17
17
  end
@@ -1,7 +1,7 @@
1
1
  module Fonts
2
2
  module Rails
3
-
4
- VERSION = '0.1.0'
5
-
3
+
4
+ VERSION = '0.1.3'
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
@@ -65,3 +65,43 @@ LinkTagTest: test_should_return_include_tag_with_url
65
65
  LinkTagTest: test_should_return_include_tag_with_url
66
66
  ----------------------------------------------------
67
67
   (0.1ms) rollback transaction
68
+  (0.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
69
+  (0.1ms) select sqlite_version(*)
70
+  (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
71
+  (0.1ms) SELECT version FROM "schema_migrations"
72
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
73
+  (0.1ms) begin transaction
74
+ ---------------------------------------------
75
+ LinkTagTest: test_return_include_tag_with_url
76
+ ---------------------------------------------
77
+  (0.0ms) rollback transaction
78
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
79
+  (0.1ms) select sqlite_version(*)
80
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
81
+  (0.0ms) SELECT version FROM "schema_migrations"
82
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
83
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
84
+  (0.1ms) select sqlite_version(*)
85
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
86
+  (0.1ms) SELECT version FROM "schema_migrations"
87
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
88
+  (0.1ms) begin transaction
89
+ -----------------------------
90
+ LinkTagTest: test_include_tag
91
+ -----------------------------
92
+  (0.1ms) rollback transaction
93
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
94
+  (0.1ms) select sqlite_version(*)
95
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
96
+  (0.1ms) SELECT version FROM "schema_migrations"
97
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
98
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
99
+  (0.1ms) select sqlite_version(*)
100
+  (0.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
101
+  (0.1ms) SELECT version FROM "schema_migrations"
102
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
103
+  (0.1ms) begin transaction
104
+ -----------------------------
105
+ LinkTagTest: test_include_tag
106
+ -----------------------------
107
+  (0.0ms) rollback transaction
@@ -2,9 +2,9 @@ require 'test_helper'
2
2
 
3
3
  class LinkTagTest < ActionView::TestCase
4
4
 
5
- test "should return include tag with url" do
5
+ test 'include tag' do
6
6
  self.request = OpenStruct.new(protocol: 'http://')
7
- assert_equal '<link href="http://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css" />', google_fonts_link_tag('Open+Sans:300')
7
+ assert google_fonts_link_tag('Open+Sans:300').include?('href="http://fonts.googleapis.com/css?family=Open+Sans:300"')
8
8
  end
9
9
 
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fonts-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Museways
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-09 00:00:00.000000000 Z
11
+ date: 2015-02-20 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
@@ -44,7 +44,7 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1.3'
47
- description: Adds a simple view helper to create the google fonts link tag.
47
+ description: Adds a simple view helper to create the google fonts link tag in rails.
48
48
  email:
49
49
  - hello@museways.com
50
50
  executables: []
@@ -52,7 +52,7 @@ extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
54
  - MIT-LICENSE
55
- - README.rdoc
55
+ - README.md
56
56
  - Rakefile
57
57
  - lib/fonts-rails.rb
58
58
  - lib/fonts/rails.rb
@@ -122,10 +122,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 2.2.2
125
+ rubygems_version: 2.4.5
126
126
  signing_key:
127
127
  specification_version: 4
128
- summary: Google Fonts for Rails.
128
+ summary: Google fonts for rails.
129
129
  test_files:
130
130
  - test/dummy/app/assets/javascripts/application.js
131
131
  - test/dummy/app/assets/stylesheets/application.css
@@ -1,18 +0,0 @@
1
- {<img src="https://badge.fury.io/rb/fonts-rails.png" alt="Gem Version" />}[http://badge.fury.io/rb/fonts-rails] {<img src="https://codeclimate.com/github/museways/fonts-rails.png" />}[https://codeclimate.com/github/museways/fonts-rails] {<img src="https://travis-ci.org/museways/fonts-rails.png?branch=master" alt="Build Status" />}[https://travis-ci.org/museways/fonts-rails] {<img src="https://gemnasium.com/museways/fonts-rails.png" alt="Dependency Status" />}[https://gemnasium.com/museways/fonts-rails]
2
-
3
- = Fonts Rails
4
-
5
- Adds a simple helper to create the google fonts link tag.
6
-
7
- = Install
8
-
9
- Put this line in your Gemfile:
10
- gem 'fonts-rails'
11
-
12
- Then bundle:
13
- $ bundle
14
-
15
- = Usage
16
-
17
- In your layout add a line like this in your head:
18
- <%= google_fonts_link_tag 'Open+Sans:300' %>