mm-versionable 0.2.3 → 0.2.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/Rakefile CHANGED
@@ -26,10 +26,10 @@ desc 'Builds the gem'
26
26
  task :build do
27
27
  sh 'gem build mm-versionable.gemspec'
28
28
  Dir.mkdir('pkg') unless File.directory?('pkg')
29
- sh "mv mm-versionable-#{Versionable::Version}.gem pkg/mm-versionable-#{Versionable::Version}.gem"
29
+ sh "mv mm-versionable-#{Versionable::VERSION}.gem pkg/mm-versionable-#{Versionable::VERSION}.gem"
30
30
  end
31
31
 
32
32
  desc 'Builds and Installs the gem'
33
33
  task :install => :build do
34
- sh "gem install pkg/mm-versionable-#{Versionable::Version}.gem"
34
+ sh "gem install pkg/mm-versionable-#{Versionable::VERSION}.gem"
35
35
  end
@@ -106,7 +106,7 @@ module Versionable
106
106
  when :first
107
107
  index = self.versions.index {|v| v.pos == 0}
108
108
  version = self.versions[index] if index
109
- version ||= Version.first(:user_id => self._id.to_s, :pos => 0)
109
+ version ||= Version.first(:doc_id => self._id.to_s, :pos => 0)
110
110
  version
111
111
  when :last
112
112
  #The last version is always same as the current version, so -2 instead of -1
@@ -116,7 +116,7 @@ module Versionable
116
116
  else
117
117
  index = self.versions.index {|v| v.pos == pos}
118
118
  version = self.versions[index] if index
119
- version ||= Version.first(:user_id => self._id.to_s, :pos => pos)
119
+ version ||= Version.first(:doc_id => self._id.to_s, :pos => pos)
120
120
  version
121
121
  end
122
122
  end
@@ -1,3 +1,3 @@
1
1
  module Versionable
2
- Version = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mm-versionable
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.3
5
+ version: 0.2.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dhruva Sagar
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-04 00:00:00 +05:30
13
+ date: 2011-06-16 00:00:00 +05:30
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency