simple_workflow 0.0.3 → 0.0.4

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.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.0.4 2012-01-05
2
+
3
+ === Fixes
4
+
5
+ * Added missing gem activation code
6
+
7
+
1
8
  == 0.0.3 2012-01-05
2
9
 
3
10
  === Fixes
data/Rakefile CHANGED
@@ -16,3 +16,12 @@ file GEM_FILE => GEM_SPEC_FILE do
16
16
  puts "Generating #{GEM_FILE}"
17
17
  `gem build #{GEM_SPEC_FILE}`
18
18
  end
19
+
20
+ desc "Push the gem to RubyGems"
21
+ task :release => :gem do
22
+ output = `git status --porcelain`
23
+ raise "Workspace not clean!\n#{output}" unless output.empty?
24
+ sh "git tag #{SimpleWorkflow::VERSION}"
25
+ sh "git push --tags"
26
+ sh "gem push #{GEM_FILE}"
27
+ end
@@ -10,15 +10,20 @@ module SimpleWorkflow::Helper
10
10
  end
11
11
 
12
12
  def with_detour(options)
13
- detour_options = {:detour => params.reject { |k, v| [:detour, :return_from_detour].include? k.to_sym }}.update(options)
14
- if options[:layout]== false
15
- if params[:action] !~ /_no_layout$/
16
- detour_options[:detour].update({:action => params[:action] + '_no_layout'})
13
+ detour_options = {:detour => params.reject { |k, v| [:detour, :return_from_detour].include? k.to_sym }}
14
+ if options.is_a? String
15
+ return options + (options =~ /\?/ ? '&' : '?') + detour_options[:detour].map{|k,v| "detour[#{k}]=#{v}"}.join('&')
16
+ else
17
+ detour_options.merge(options)
18
+ if options[:layout] == false
19
+ if params[:action] !~ /_no_layout$/
20
+ detour_options[:detour].update({:action => params[:action] + '_no_layout'})
21
+ end
22
+ elsif params[:action] =~ /_no_layout$/
23
+ detour_options[:detour].update({:action => params[:action][0..-11]})
17
24
  end
18
- elsif params[:action] =~ /_no_layout$/
19
- detour_options[:detour].update({:action => params[:action][0..-11]})
25
+ detour_options
20
26
  end
21
- detour_options
22
27
  end
23
28
 
24
29
  def image_detour_to(image_source, title, url_options, image_options = nil, post = false)
@@ -1,3 +1,3 @@
1
1
  module SimpleWorkflow
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -4,12 +4,13 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'simple_workflow/version'
5
5
  require 'simple_workflow/helper'
6
6
  require 'simple_workflow/controller'
7
+ require 'action_controller/base'
7
8
 
8
9
  module ApplicationHelper
9
10
  include SimpleWorkflow::Helper
10
11
  end
11
12
 
12
- class ApplicationController
13
+ class ActionController::Base
13
14
  include SimpleWorkflow::Helper
14
15
  include SimpleWorkflow::Controller
15
16
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_workflow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Uwe Kubosch