galakei 0.14.4 → 0.15.0

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.
@@ -1,24 +1,28 @@
1
1
  module Galakei
2
+ module ClassMethods
3
+ def supports_galakei
4
+ include Galakei::HelperMethods
5
+ after_filter Galakei::Filter::ContentType, :if => lambda {|c| Galakei::Filter::ContentType.condition?(c) }
6
+ before_filter Galakei::Filter::Recode::Params, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
7
+ after_filter Galakei::Filter::Recode::Response, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
8
+ after_filter Galakei::Filter::NonStandardChar, :if => lambda {|c| Galakei::Filter::NonStandardChar.condition?(c) }
9
+ after_filter Galakei::Filter::Hankaku, :if => lambda {|c| Galakei::Filter::Hankaku.condition?(c) }
10
+ around_filter Galakei::Filter::Haml, :if => :galakei? if defined?(Haml)
11
+ after_filter Galakei::DocomoCss::InlineStylesheet
12
+ helper Galakei::InputMode
13
+ end
14
+ end
15
+
2
16
  class Railtie < ::Rails::Railtie
3
17
  config.galakei = ActiveSupport::OrderedOptions.new
4
18
  initializer "galakei.extend.action_controller" do |app|
5
19
  ActiveSupport.on_load :action_controller do
6
- include Galakei::HelperMethods
7
- after_filter Galakei::Filter::ContentType, :if => lambda {|c| Galakei::Filter::ContentType.condition?(c) }
8
- before_filter Galakei::Filter::Recode::Params, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
9
- after_filter Galakei::Filter::Recode::Response, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
10
- after_filter Galakei::Filter::NonStandardChar, :if => lambda {|c| Galakei::Filter::NonStandardChar.condition?(c) }
11
- after_filter Galakei::Filter::Hankaku, :if => lambda {|c| Galakei::Filter::Hankaku.condition?(c) }
12
- around_filter Galakei::Filter::Haml, :if => :galakei? if defined?(Haml)
13
- end
14
- ActiveSupport.on_load :action_view do
15
- include Galakei::InputMode
20
+ self.class.send :include, Galakei::ClassMethods
16
21
  end
17
22
  end
18
23
  end
19
24
  end
20
25
 
21
26
  require 'galakei/session_id_parameter/railtie'
22
- require 'galakei/docomo_css/railtie'
23
27
  require 'galakei/email/railtie'
24
28
  require 'galakei/lookup/railtie'
@@ -1,4 +1,4 @@
1
1
  module Galakei
2
2
  # The version of Galakei you are using
3
- VERSION = "0.14.4"
3
+ VERSION = "0.15.0"
4
4
  end
data/spec/app/fake.rb CHANGED
@@ -31,4 +31,6 @@ app.routes.draw do
31
31
  match 'galakei/spacer/:color' => 'galakei/spacer#create', :defaults => { :format => :gif } # should be directly using config/routes
32
32
  match ':controller(/:action(/:id))'
33
33
  end
34
- class ApplicationController < ActionController::Base; end
34
+ class ApplicationController < ActionController::Base
35
+ supports_galakei
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galakei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.4
4
+ version: 0.15.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-15 00:00:00.000000000 Z
14
+ date: 2012-11-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: actionpack
@@ -96,7 +96,6 @@ files:
96
96
  - lib/galakei.rb
97
97
  - lib/galakei/docomo_css.rb
98
98
  - lib/galakei/docomo_css/inline_stylesheet.rb
99
- - lib/galakei/docomo_css/railtie.rb
100
99
  - lib/galakei/docomo_css/stylesheet.rb
101
100
  - lib/galakei/email.rb
102
101
  - lib/galakei/email/au_mail_interceptor.rb
@@ -173,12 +172,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
172
  - - ! '>='
174
173
  - !ruby/object:Gem::Version
175
174
  version: '0'
175
+ segments:
176
+ - 0
177
+ hash: 3620872008365816983
176
178
  required_rubygems_version: !ruby/object:Gem::Requirement
177
179
  none: false
178
180
  requirements:
179
181
  - - ! '>='
180
182
  - !ruby/object:Gem::Version
181
183
  version: '0'
184
+ segments:
185
+ - 0
186
+ hash: 3620872008365816983
182
187
  requirements: []
183
188
  rubyforge_project: galakei
184
189
  rubygems_version: 1.8.24
@@ -1,11 +0,0 @@
1
- module Galakei # :nodoc: all
2
- module DocomoCss
3
- class Railtie < Rails::Railtie
4
- initializer "galakei.docomo_css" do |app|
5
- ActiveSupport.on_load :action_controller do
6
- after_filter Galakei::DocomoCss::InlineStylesheet
7
- end
8
- end
9
- end
10
- end
11
- end