fonts-rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fonts/rails.rb CHANGED
@@ -1,5 +1,6 @@
1
- require 'fonts/rails/helpers'
1
+ require 'fonts/rails/action_view/base'
2
2
  require 'fonts/rails/railtie'
3
+ require 'fonts/rails/version'
3
4
 
4
5
  module Fonts
5
6
  module Rails
@@ -0,0 +1,22 @@
1
+ module Fonts
2
+ module Rails
3
+ module ActionView
4
+ module Base
5
+
6
+ def google_fonts_link_tag(family)
7
+ tag(
8
+ :link,
9
+ {
10
+ :rel => :stylesheet,
11
+ :type => Mime::CSS,
12
+ :href => "http://fonts.googleapis.com/css?family=#{family}"
13
+ },
14
+ false,
15
+ false
16
+ )
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+ end
@@ -2,8 +2,8 @@ module Fonts
2
2
  module Rails
3
3
  class Railtie < ::Rails::Railtie
4
4
 
5
- initializer 'fonts.helpers' do
6
- ActionView::Base.send :include, Fonts::Rails::Helpers
5
+ initializer 'fonts.rails' do
6
+ ::ActionView::Base.send :include, Fonts::Rails::ActionView::Base
7
7
  end
8
8
 
9
9
  end
@@ -1,7 +1,7 @@
1
1
  module Fonts
2
2
  module Rails
3
3
 
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
 
6
6
  end
7
7
  end
@@ -49,3 +49,48 @@ Processing by StaticsController#home as HTML
49
49
  Rendered statics/home.html.erb within layouts/application (3.3ms)
50
50
  Completed 200 OK in 28ms (Views: 27.2ms | ActiveRecord: 0.0ms)
51
51
   (0.1ms) rollback transaction
52
+ Connecting to database specified by database.yml
53
+  (0.2ms) begin transaction
54
+  (0.1ms) rollback transaction
55
+  (0.0ms) begin transaction
56
+ Started GET "/" for 127.0.0.1 at 2013-04-04 11:33:38 -0300
57
+ Processing by StaticsController#home as HTML
58
+ Rendered statics/home.html.erb within layouts/application (5.7ms)
59
+ Completed 200 OK in 54ms (Views: 54.0ms | ActiveRecord: 0.0ms)
60
+  (0.1ms) rollback transaction
61
+ Connecting to database specified by database.yml
62
+  (0.7ms) begin transaction
63
+  (0.2ms) rollback transaction
64
+  (0.2ms) begin transaction
65
+ Started GET "/" for 127.0.0.1 at 2013-04-05 14:47:27 -0300
66
+ Processing by StaticsController#home as HTML
67
+ Rendered statics/home.html.erb within layouts/application (12.2ms)
68
+ Completed 200 OK in 89ms (Views: 87.2ms | ActiveRecord: 0.0ms)
69
+  (0.2ms) rollback transaction
70
+ Connecting to database specified by database.yml
71
+  (0.2ms) begin transaction
72
+  (0.1ms) rollback transaction
73
+  (0.1ms) begin transaction
74
+ Started GET "/" for 127.0.0.1 at 2013-04-06 14:54:13 -0300
75
+ Processing by StaticsController#home as HTML
76
+ Rendered statics/home.html.erb within layouts/application (7.9ms)
77
+ Completed 200 OK in 77ms (Views: 76.3ms | ActiveRecord: 0.0ms)
78
+  (0.1ms) rollback transaction
79
+ Connecting to database specified by database.yml
80
+  (0.2ms) begin transaction
81
+  (0.0ms) rollback transaction
82
+  (0.0ms) begin transaction
83
+ Started GET "/" for 127.0.0.1 at 2013-04-06 15:26:31 -0300
84
+ Processing by StaticsController#home as HTML
85
+ Rendered statics/home.html.erb within layouts/application (3.2ms)
86
+ Completed 200 OK in 18ms (Views: 17.6ms | ActiveRecord: 0.0ms)
87
+  (0.1ms) rollback transaction
88
+ Connecting to database specified by database.yml
89
+  (0.2ms) begin transaction
90
+  (0.0ms) rollback transaction
91
+  (0.1ms) begin transaction
92
+ Started GET "/" for 127.0.0.1 at 2013-06-27 19:41:52 -0300
93
+ Processing by StaticsController#home as HTML
94
+ Rendered statics/home.html.erb within layouts/application (4.2ms)
95
+ Completed 200 OK in 104ms (Views: 103.1ms | ActiveRecord: 0.0ms)
96
+  (0.1ms) rollback transaction
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class FontsRailsTest < ActiveSupport::TestCase
4
4
 
5
- test 'truth' do
5
+ test "truth" do
6
6
  assert_kind_of Module, Fonts::Rails
7
7
  end
8
8
 
@@ -1,8 +1,8 @@
1
1
  require 'test_helper'
2
2
 
3
- class HelperTest < ActionDispatch::IntegrationTest
3
+ class HelpersTest < ActionDispatch::IntegrationTest
4
4
 
5
- test 'should add google fonts tag' do
5
+ test "should add google fonts tag" do
6
6
  get '/'
7
7
  assert_tag :tag => 'link', :attributes => { :href => 'http://fonts.googleapis.com/css?family=Open+Sans:300' }
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fonts-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-03 00:00:00.000000000 Z
12
+ date: 2013-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -50,7 +50,7 @@ executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
- - lib/fonts/rails/helpers.rb
53
+ - lib/fonts/rails/action_view/base.rb
54
54
  - lib/fonts/rails/railtie.rb
55
55
  - lib/fonts/rails/version.rb
56
56
  - lib/fonts/rails.rb
@@ -90,7 +90,7 @@ files:
90
90
  - test/dummy/README.rdoc
91
91
  - test/dummy/script/rails
92
92
  - test/fonts_rails_test.rb
93
- - test/helper_test.rb
93
+ - test/helpers_test.rb
94
94
  - test/test_helper.rb
95
95
  homepage: https://github.com/mattways/fonts-rails
96
96
  licenses: []
@@ -149,5 +149,5 @@ test_files:
149
149
  - test/dummy/README.rdoc
150
150
  - test/dummy/script/rails
151
151
  - test/fonts_rails_test.rb
152
- - test/helper_test.rb
152
+ - test/helpers_test.rb
153
153
  - test/test_helper.rb
@@ -1,20 +0,0 @@
1
- module Fonts
2
- module Rails
3
- module Helpers
4
-
5
- def google_fonts_link_tag(family)
6
- tag(
7
- :link,
8
- {
9
- :rel => :stylesheet,
10
- :type => Mime::CSS,
11
- :href => "http://fonts.googleapis.com/css?family=#{family}"
12
- },
13
- false,
14
- false
15
- )
16
- end
17
-
18
- end
19
- end
20
- end