use_tinymce 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -26,15 +26,17 @@ task :gem do
26
26
  system "gem build #{gem_name}.gemspec"
27
27
  end
28
28
 
29
- desc "commit changes"
29
+ desc "commit changes - use Env Var MSG to add comment"
30
30
  task :commit do
31
31
  system 'git add .'
32
- system "git commit -m \"checkin version #{gem_version}\""
32
+ system "git commit -m \"checkin version #{gem_version}: ${MSG}\""
33
33
  end
34
34
 
35
- desc "commit changes and tag as #{gem_version}"
35
+ desc "commit changes and tag as #{gem_version} - add Env Var MSG to add tag message"
36
36
  task :tag => :commit do
37
- system "git tag #{gem_version}"
37
+ tag_message = "version #{gem_version}"
38
+ tag_message += ENV['MSG'] if ENV.keys.include? 'MSG'
39
+ system "git tag #{gem_version} -m '#{tag_message}'"
38
40
  end
39
41
 
40
42
  desc "push to github"
@@ -4,8 +4,8 @@ module UseTinymce
4
4
  @use_tinymce = self.class.instance_variable_get("@use_tinymce")
5
5
  return false unless @use_tinymce
6
6
  return true if @use_tinymce.include? :all
7
- return @use_tinymce.include?(action) unless action.nil?
8
- return @use_tinymce.include?(params[:action]) if defined? params
7
+ return @use_tinymce.include?(action.to_sym) unless action.nil?
8
+ return @use_tinymce.include?(params[:action].to_sym) if defined? params
9
9
  false
10
10
  end
11
11
 
@@ -61,6 +61,9 @@ class UseTinymceTest < Test::Unit::TestCase
61
61
  assert use_tinymce?(:edit), "use_tinymce? true when action => :edit"
62
62
  assert use_tinymce?(:new), "use_tinymce? true when action => :new"
63
63
  refute use_tinymce?(:index), "use_tinymce? false when action => :index"
64
+ assert use_tinymce?('edit'), "use_tinymce? true when action => 'edit'"
65
+ assert use_tinymce?('new'), "use_tinymce? true when action => 'new'"
66
+ refute use_tinymce?('index'), "use_tinymce? false when action => 'index'"
64
67
  end
65
68
 
66
69
  # test 'helper method called'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: use_tinymce
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mike Howard
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-30 00:00:00 Z
13
+ date: 2011-05-01 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: |-