Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure ruby 1.8.7 compatibility.

  • Loading branch information...
commit 0382715b6b6cdf2c206cd387def236737a12a38d 1 parent 829257a
@troessner troessner authored
View
4 CHANGELOG.md
@@ -1,3 +1,7 @@
+# 0.0.15 (2012-04-17):
+
+* (troessner) Ensure ruby 1.8.7 compatibility.
+
# 0.0.14 (2012-04-16):
* (troessner) Improve error messages for invalid transitions.
View
17 Gemfile.lock
@@ -2,6 +2,7 @@ PATH
remote: .
specs:
transitions (0.0.14)
+ backports
GEM
remote: http://rubygems.org/
@@ -16,27 +17,14 @@ GEM
arel (~> 1.0.0)
tzinfo (~> 0.3.23)
activesupport (3.0.0)
- archive-tar-minitar (0.5.2)
arel (1.0.1)
activesupport (~> 3.0.0)
+ backports (2.5.1)
builder (2.1.2)
- columnize (0.3.4)
i18n (0.4.1)
- linecache19 (0.5.12)
- ruby_core_source (>= 0.1.4)
mocha (0.9.8)
rake
rake (0.8.7)
- ruby-debug-base19 (0.11.25)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby_core_source (>= 0.1.4)
- ruby-debug19 (0.11.6)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby-debug-base19 (>= 0.11.19)
- ruby_core_source (0.1.5)
- archive-tar-minitar (>= 0.5.2)
sqlite3-ruby (1.3.1)
test-unit (2.4.1)
tzinfo (0.3.23)
@@ -48,7 +36,6 @@ DEPENDENCIES
activerecord (~> 3)
bundler (~> 1)
mocha
- ruby-debug19
sqlite3-ruby
test-unit (~> 2.2)
transitions!
View
1  lib/transitions.rb
@@ -20,6 +20,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+require 'backports'
require "transitions/event"
require "transitions/machine"
require "transitions/state"
View
4 test/db/create_db.rb
@@ -1,12 +1,12 @@
# Use this schema to create all required tables
class CreateDb < ActiveRecord::Migration
def self.up
- create_table(:traffic_lights, force: true) do |t|
+ create_table(:traffic_lights, :force => true) do |t|
t.string :state
t.string :name
end
- create_table(:orders, force: true) do |t|
+ create_table(:orders, :force => true) do |t|
t.string :state
t.string :order_number
t.datetime :paid_at
View
1  test/helper.rb
@@ -4,7 +4,6 @@
require "active_record"
require "mocha"
require "db/create_db"
-require "ruby-debug"
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
$LOAD_PATH.unshift(File.dirname(__FILE__))
View
4 test/test_active_record_timestamps.rb
@@ -57,7 +57,7 @@ def setup
end
def create_order(state = nil)
- Order.create! order_number: SecureRandom.hex(4), state: state
+ Order.create! :order_number => SecureRandom.hex(4), :state => state
end
# control case, no timestamp has been set so we should expect default behaviour
@@ -106,7 +106,7 @@ def create_order(state = nil)
class Order < ActiveRecord::Base
include ActiveModel::Transitions
state_machine do
- event :replace, timestamp: 1 do
+ event :replace, :timestamp => 1 do
transitions :from => :prepared, :to => :placed
end
end
View
2  transitions.gemspec
@@ -14,12 +14,12 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"
s.rubyforge_project = "transitions"
+ s.add_dependency "backports"
s.add_development_dependency "bundler", "~> 1"
s.add_development_dependency "test-unit", "~> 2.2"
s.add_development_dependency "mocha"
s.add_development_dependency "sqlite3-ruby"
s.add_development_dependency "activerecord", "~> 3"
- s.add_development_dependency "ruby-debug19"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
Please sign in to comment.
Something went wrong with that request. Please try again.