attrtastic 0.3.0 → 0.3.1

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.
@@ -0,0 +1,10 @@
1
+ require 'attrtastic'
2
+ require 'rails'
3
+
4
+ module Attrtastic
5
+ class Railtie < Rails::Railtie
6
+ initializer 'attrtastic.initialize', :after => :after_initialize do
7
+ ActionView::Base.send :include, Attrtastic::SemanticAttributesHelper
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Attrtastic
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/attrtastic.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "attrtastic/semantic_attributes_helper"
2
3
  require "attrtastic/semantic_attributes_builder"
3
4
  ##
@@ -6,6 +7,9 @@ require "attrtastic/semantic_attributes_builder"
6
7
  # pages.
7
8
  #
8
9
  # @author Boruta Mirosław
10
+
11
+ require File.join(File.dirname(__FILE__), *%w[attrtastic railtie]) if defined?(::Rails::Railtie)
12
+
9
13
  module Attrtastic
10
14
  end
11
15
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Boruta Miros\xC5\x82aw"
@@ -129,10 +129,10 @@ files:
129
129
  - doc/top-level-namespace.html
130
130
  - init.rb
131
131
  - lib/attrtastic.rb
132
+ - lib/attrtastic/railtie.rb
132
133
  - lib/attrtastic/semantic_attributes_builder.rb
133
134
  - lib/attrtastic/semantic_attributes_helper.rb
134
135
  - lib/attrtastic/version.rb
135
- - rails/init.rb
136
136
  - test/helper.rb
137
137
  - test/test_attribute.rb
138
138
  - test/test_attributes.rb
data/rails/init.rb DELETED
@@ -1 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "init"))