hat-trick 0.1.4 → 0.1.5

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/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  .tags*
6
+ tags
data/Changelog CHANGED
@@ -1,3 +1,5 @@
1
+ * 0.1.5 - Allow hide_button DSL method inside before / after blocks
2
+
1
3
  * 0.1.4 - Make the rails env available in JS as window.hatTrick.railsEnv
2
4
  - Only output console log messages in development env
3
5
 
data/lib/hat_trick/dsl.rb CHANGED
@@ -40,6 +40,10 @@ module HatTrick
40
40
  hat_trick_wizard.current_step.add_button button
41
41
  end
42
42
 
43
+ def hide_button(button_type)
44
+ hat_trick_wizard.current_step.delete_button button_type
45
+ end
46
+
43
47
  def remaining_step_count
44
48
  hat_trick_wizard.steps_after_current
45
49
  end
@@ -6,8 +6,8 @@ module HatTrick
6
6
  attr_accessor :next_step, :redirect_from
7
7
  attr_writer :skipped
8
8
 
9
- delegate :name, :fieldset, :add_button, :buttons, :to_sym, :to_s,
10
- :run_after_callback, :run_before_callback, :include_data,
9
+ delegate :name, :fieldset, :add_button, :delete_button, :buttons, :to_sym,
10
+ :to_s, :run_after_callback, :run_before_callback, :include_data,
11
11
  :run_include_data_callback, :run_step_contents_callback,
12
12
  :include_data_key, :config, :step_contents, :last?, :first?,
13
13
  :to => :step_def
@@ -1,3 +1,3 @@
1
1
  module HatTrick
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hat-trick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
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: 2012-11-09 00:00:00.000000000 Z
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec