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 +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +32 -0
- data/lib/fonts/rails.rb +0 -1
- data/lib/fonts/rails/action_view/base.rb +2 -2
- data/lib/fonts/rails/version.rb +3 -3
- data/test/dummy/config/environments/production.rb +5 -1
- data/test/dummy/config/environments/test.rb +9 -1
- data/test/dummy/log/test.log +40 -0
- data/test/link_tag_test.rb +2 -2
- metadata +10 -10
- data/README.rdoc +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 599431cc48825ac6b3bcd5ad07a0a7efa0389c68
|
4
|
+
data.tar.gz: 406fef72c6bc093be9f5f3fb2ff4f554a045ab5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20fc02457a9d01d8eb1195f34cd3dcea0114e77c6fb2e42a02bf4f68f546062ecb61d0595aa0d42298f2411658577e4695c4ff2a19badb3f43a2ada54ac35adf
|
7
|
+
data.tar.gz: 2fc3b676aa8179e2c21a44df30c9703b478ed971390edcc17bd4d4268338fdb754d1b3e54bdd2361c71a452b49449a1e69de8df63d1ff187e3527526443397f2
|
data/MIT-LICENSE
CHANGED
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
[](http://badge.fury.io/rb/fonts-rails) [](https://codeclimate.com/github/museways/fonts-rails) [](https://travis-ci.org/museways/fonts-rails) [](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.
|
data/lib/fonts/rails.rb
CHANGED
data/lib/fonts/rails/version.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
data/test/dummy/log/test.log
CHANGED
@@ -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
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
68
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
69
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
70
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
71
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
72
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
73
|
+
[1m[35m (0.1ms)[0m begin transaction
|
74
|
+
---------------------------------------------
|
75
|
+
LinkTagTest: test_return_include_tag_with_url
|
76
|
+
---------------------------------------------
|
77
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
78
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
79
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
80
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
81
|
+
[1m[35m (0.0ms)[0m SELECT version FROM "schema_migrations"
|
82
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
83
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
84
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
85
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
86
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
87
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
88
|
+
[1m[35m (0.1ms)[0m begin transaction
|
89
|
+
-----------------------------
|
90
|
+
LinkTagTest: test_include_tag
|
91
|
+
-----------------------------
|
92
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
93
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
94
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
95
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
96
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
97
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
98
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
99
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
100
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
101
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
102
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
103
|
+
[1m[35m (0.1ms)[0m begin transaction
|
104
|
+
-----------------------------
|
105
|
+
LinkTagTest: test_include_tag
|
106
|
+
-----------------------------
|
107
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
data/test/link_tag_test.rb
CHANGED
@@ -2,9 +2,9 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
class LinkTagTest < ActionView::TestCase
|
4
4
|
|
5
|
-
test
|
5
|
+
test 'include tag' do
|
6
6
|
self.request = OpenStruct.new(protocol: 'http://')
|
7
|
-
|
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.
|
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:
|
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:
|
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:
|
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.
|
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.
|
125
|
+
rubygems_version: 2.4.5
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
|
-
summary: Google
|
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
|
data/README.rdoc
DELETED
@@ -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' %>
|