script_flow 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,11 +26,11 @@ View html.erb template/partial:
26
26
 
27
27
  # When current request format is Mime::HTML acts as `javascript_tag` helper. During Ajax request (Mime::JS) add script to the end of response body.
28
28
 
29
- <%= script_for :head do %>
30
- alert('Hello Script Flow');
31
- <% end %>
32
-
33
- # When current request format is Mime::HTML acts as `content_for :head` with `javascript_tag` helpers. During Ajax request (Mime::JS) add script to the end of response body.
29
+ <%= script_for :head do %>
30
+ alert('Hello Script Flow');
31
+ <% end %>
32
+
33
+ # When current request format is Mime::HTML acts as `content_for :head` with `javascript_tag` helpers. During Ajax request (Mime::JS) add script to the end of response body.
34
34
 
35
35
  ## Contributing
36
36
 
data/lib/script_flow.rb CHANGED
@@ -4,6 +4,14 @@ module ScriptFlow
4
4
  def self.load!
5
5
  require 'script_flow/engine'
6
6
  require 'script_flow/railtie'
7
+ warn <<-EOW
8
+
9
+ DEPRECATION WARNING: Gem 'script_flow' has been moved into 'active_tools' gem.
10
+ Further development of 'script_flow' will no longer continue.
11
+
12
+ Thank you!
13
+
14
+ EOW
7
15
  end
8
16
  end
9
17
 
@@ -2,11 +2,11 @@ require 'script_flow/model/map'
2
2
 
3
3
  module ScriptFlow
4
4
  module ControllerExtension
5
- extend ActiveSupport::Concern
5
+ extend ActiveSupport::Concern
6
6
 
7
- included do
8
- helper_method :script_flow
9
- end
7
+ included do
8
+ helper_method :script_flow
9
+ end
10
10
 
11
11
  def script_flow
12
12
  @script_flow ||= ScriptFlow::Map.new
@@ -14,7 +14,7 @@ module ScriptFlow
14
14
 
15
15
  def _render_template(options)
16
16
  if lookup_context.rendered_format == :js
17
- super + script_flow.render
17
+ super + script_flow.render
18
18
  else
19
19
  super
20
20
  end
@@ -8,7 +8,7 @@ module ScriptFlow
8
8
  end
9
9
  if content
10
10
  case request.format
11
- when Mime::JS then
11
+ when Mime::JS then
12
12
  script_flow.add_script(content)
13
13
  nil
14
14
  when Mime::HTML then
@@ -1,5 +1,5 @@
1
1
  module ScriptFlow
2
- class Map
2
+ class Map
3
3
  attr_reader :content
4
4
 
5
5
  delegate :any?, :empty?, :to => :content
@@ -1,3 +1,3 @@
1
1
  module ScriptFlow
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: script_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-01-05 00:00:00.000000000 Z
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: When you rendering the ERB templates/partials, utility remembers javascript
15
15
  syntax and add it to the end of Ajax response body
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 1.8.24
57
+ rubygems_version: 1.8.25
58
58
  signing_key:
59
59
  specification_version: 3
60
60
  summary: Auto load script from rendered ERB during Ajax request