orientea 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 380f2565869719a1615933847f1e1c630c941258
4
- data.tar.gz: b53edd275ef9a0d3c22576f711122a1fbda72209
3
+ metadata.gz: ebfa6e9d83cc3f86323ba7d105fec434c4c9ca3a
4
+ data.tar.gz: 9757468a3b3161cf95535ac5b9d3697e67893bc2
5
5
  SHA512:
6
- metadata.gz: d04a15324a7169b7fb2db41e2b6f7efecf256945ada436e4b546d901a04d650977f3a6ecf636a7ca9b78fa49374adeefe0d1b37ce60c255979ad09ca4c5314dc
7
- data.tar.gz: 56dfb052fae91da122366aca559832b75b03bdf39eab78520db0ccd514eca19b44535fb5d4cbee6d7e3c591de99567efa212202d1b8735e4f53ffba5fc79303a
6
+ metadata.gz: 458b9a90fb17483313f7d55d3b667959d44df49385a1a756701fc6d30c6386693073685f6a61a0a6829d26dc6dda9d9fa24cf498246e5327eaf9b6eb0c9d383f
7
+ data.tar.gz: 8098bc5720398fb17b29240fa480e75dfbc83a856eb8a009bf8808821f75bc951288a17432740206094e23d670e19fa2464e0cfce90348717c1678659a39ac1a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -8,7 +8,7 @@ module Orientea
8
8
  command.data['cls_str'] = record.class.to_s
9
9
  command.data['cls_id'] = record.id
10
10
  command.data['changes'] = record.changes.to_json
11
- command.save!
11
+ # command.save!
12
12
  command
13
13
  end
14
14
 
@@ -1,7 +1,7 @@
1
1
  module Orientea
2
2
  class Command < ActiveRecord::Base
3
3
  self.table_name = :orientea_commands
4
- attr_accessor :done, :data
4
+ attr_accessible :done, :data
5
5
 
6
6
  def self.action(&block)
7
7
  define_method(:action, &block)
@@ -7,13 +7,13 @@ module Orientea
7
7
  command.data = Hash.new
8
8
  command.data['changes'] = record.attributes.to_json
9
9
  command.data['cls_str'] = record.class.to_s
10
- command.save!
10
+ # command.save!
11
11
  command
12
12
  end
13
13
 
14
14
  action do
15
15
  cls = self.data['cls_str'].constantize
16
- new_object = cls.new(JSON.load(self.data['changes']))
16
+ new_object = cls.new(JSON.load(self.data['changes']), without_protection: true)
17
17
  if new_object.save
18
18
  self.data['cls_id'] = new_object.id
19
19
  self.data_will_change!
data/orientea.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "orientea"
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Vincent Zhu"]
12
- s.date = "2013-08-15"
12
+ s.date = "2013-09-20"
13
13
  s.description = "Command Pattern Implementation for easy use with rails"
14
14
  s.email = "zhu1230@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orientea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Zhu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-15 00:00:00.000000000 Z
11
+ date: 2013-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord