act_as_releasable 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,10 +11,10 @@ module Proposal
11
11
 
12
12
  module InstanceMethods
13
13
  def candidate_attributes
14
- ActiveSupport::JSON.decode Marshal.load(Base64.decode64(candidate_data))
14
+ Marshal.load(Base64.decode64(candidate_data))
15
15
  end
16
16
  def candidate_attributes=(candidate_attributes)
17
- self.candidate_data = Base64.encode64(Marshal.dump(candidate_attributes.to_json))
17
+ self.candidate_data = Base64.encode64(Marshal.dump(candidate_attributes))
18
18
  end
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module ActAsReleasable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -67,6 +67,9 @@ module ActAsReleasable
67
67
  end
68
68
  end
69
69
 
70
+ def has_changes_to_be_approved?
71
+ releasable_candidate.present? || !releasable_candidate_items.empty?
72
+ end
70
73
  end
71
74
 
72
75
  def self.included(receiver)
@@ -84,4 +84,9 @@ describe "the creation of a release candidate" do
84
84
 
85
85
  end
86
86
 
87
+ describe "after creating a release candidate" do
88
+ before { phantoms.tap{|p| p.name = "bla"}.generate_new_candidate }
89
+ it { phantoms.should have_changes_to_be_approved }
90
+ end
91
+
87
92
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: act_as_releasable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: