orientea 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +2 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +93 -0
- data/LICENSE.txt +20 -0
- data/README.md +4 -0
- data/README.rdoc +27 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/lib/.DS_Store +0 -0
- data/lib/orientea/.DS_Store +0 -0
- data/lib/orientea/changing_command.rb +47 -0
- data/lib/orientea/command.rb +14 -0
- data/lib/orientea/creating_command.rb +38 -0
- data/lib/orientea/generators/command_generator.rb +6 -0
- data/lib/orientea/templates/create_command.rb +0 -0
- data/lib/orientea.rb +6 -0
- data/spec/changing_command_spec.rb +29 -0
- data/spec/creating_command_spec.rb +31 -0
- data/spec/shared_setup.rb +38 -0
- data/spec/spec_helper.rb +20 -0
- data/test/helper.rb +18 -0
- data/test/test_orientea.rb +7 -0
- metadata +195 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7484f4d726dde987d88c0a184178b1a7930bc20a
|
4
|
+
data.tar.gz: 002bfccb56b3144f14067f18db59277bc79dc38b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 14c837bda49e91409d2ed3243467da198cca945e334ffdc4b8c8308c63fbc4e8c23f50a623ed71e87a35252d6dd03139c2234d9fdb961a3e1ea928a406e99bde
|
7
|
+
data.tar.gz: 4be3d9c0664aa805348b0de0432ff7e127ac472b418172aaa2858bdc7a9ce45f4338b117ee545d729421dd4f8defb3dabc2ce1569b455a3dffab8b416b901c6d
|
data/.document
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
gem "activerecord"
|
5
|
+
gem "pg"
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem 'awesome_print'
|
10
|
+
gem "shoulda", ">= 0"
|
11
|
+
gem "rdoc", "~> 3.12"
|
12
|
+
gem "bundler", ">= 1.3.5"
|
13
|
+
gem "jeweler", "~> 1.8.4"
|
14
|
+
gem "simplecov"
|
15
|
+
gem 'rspec'
|
16
|
+
# gem "rcov", ">= 0"
|
17
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activerecord (1.6.0)
|
5
|
+
activesupport (4.0.0)
|
6
|
+
i18n (~> 0.6, >= 0.6.4)
|
7
|
+
minitest (~> 4.2)
|
8
|
+
multi_json (~> 1.3)
|
9
|
+
thread_safe (~> 0.1)
|
10
|
+
tzinfo (~> 0.3.37)
|
11
|
+
addressable (2.3.5)
|
12
|
+
atomic (1.1.10)
|
13
|
+
awesome_print (1.1.0)
|
14
|
+
builder (3.2.2)
|
15
|
+
diff-lcs (1.2.4)
|
16
|
+
faraday (0.8.8)
|
17
|
+
multipart-post (~> 1.2.0)
|
18
|
+
git (1.2.5)
|
19
|
+
github_api (0.10.1)
|
20
|
+
addressable
|
21
|
+
faraday (~> 0.8.1)
|
22
|
+
hashie (>= 1.2)
|
23
|
+
multi_json (~> 1.4)
|
24
|
+
nokogiri (~> 1.5.2)
|
25
|
+
oauth2
|
26
|
+
hashie (2.0.5)
|
27
|
+
highline (1.6.19)
|
28
|
+
httpauth (0.2.0)
|
29
|
+
i18n (0.6.4)
|
30
|
+
jeweler (1.8.6)
|
31
|
+
builder
|
32
|
+
bundler (~> 1.0)
|
33
|
+
git (>= 1.2.5)
|
34
|
+
github_api (= 0.10.1)
|
35
|
+
highline (>= 1.6.15)
|
36
|
+
nokogiri (= 1.5.10)
|
37
|
+
rake
|
38
|
+
rdoc
|
39
|
+
json (1.8.0)
|
40
|
+
jwt (0.1.8)
|
41
|
+
multi_json (>= 1.5)
|
42
|
+
minitest (4.7.5)
|
43
|
+
multi_json (1.7.7)
|
44
|
+
multi_xml (0.5.4)
|
45
|
+
multipart-post (1.2.0)
|
46
|
+
nokogiri (1.5.10)
|
47
|
+
oauth2 (0.9.2)
|
48
|
+
faraday (~> 0.8)
|
49
|
+
httpauth (~> 0.2)
|
50
|
+
jwt (~> 0.1.4)
|
51
|
+
multi_json (~> 1.0)
|
52
|
+
multi_xml (~> 0.5)
|
53
|
+
rack (~> 1.2)
|
54
|
+
pg (0.15.1)
|
55
|
+
rack (1.5.2)
|
56
|
+
rake (10.1.0)
|
57
|
+
rdoc (3.12.2)
|
58
|
+
json (~> 1.4)
|
59
|
+
rspec (2.14.1)
|
60
|
+
rspec-core (~> 2.14.0)
|
61
|
+
rspec-expectations (~> 2.14.0)
|
62
|
+
rspec-mocks (~> 2.14.0)
|
63
|
+
rspec-core (2.14.3)
|
64
|
+
rspec-expectations (2.14.0)
|
65
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
66
|
+
rspec-mocks (2.14.1)
|
67
|
+
shoulda (3.5.0)
|
68
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
69
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
70
|
+
shoulda-context (1.1.4)
|
71
|
+
shoulda-matchers (2.2.0)
|
72
|
+
activesupport (>= 3.0.0)
|
73
|
+
simplecov (0.7.1)
|
74
|
+
multi_json (~> 1.0)
|
75
|
+
simplecov-html (~> 0.7.1)
|
76
|
+
simplecov-html (0.7.1)
|
77
|
+
thread_safe (0.1.2)
|
78
|
+
atomic
|
79
|
+
tzinfo (0.3.37)
|
80
|
+
|
81
|
+
PLATFORMS
|
82
|
+
ruby
|
83
|
+
|
84
|
+
DEPENDENCIES
|
85
|
+
activerecord
|
86
|
+
awesome_print
|
87
|
+
bundler (>= 1.3.5)
|
88
|
+
jeweler (~> 1.8.4)
|
89
|
+
pg
|
90
|
+
rdoc (~> 3.12)
|
91
|
+
rspec
|
92
|
+
shoulda
|
93
|
+
simplecov
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Vincent Zhu
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
= Orientea, one command pattern for active record.
|
2
|
+
|
3
|
+
This is one command pattern implementation for ruby. Designed to use with rails (ActiveRecord).
|
4
|
+
You can store the command object , perform it by action method , or undo it by undo method.
|
5
|
+
Note: this gem use postgresql with hstore extension.
|
6
|
+
|
7
|
+
@record = Record.new
|
8
|
+
create_command = Orientea::CreatingCommand.build(@record) // would build and save the command
|
9
|
+
@record.name = "changed name"
|
10
|
+
change_command = Orientea::ChangingCommand.build(@record)
|
11
|
+
change_command.action // would apply the changes
|
12
|
+
change_command.undo // would discard the changes
|
13
|
+
== Contributing to orientea
|
14
|
+
|
15
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
16
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
17
|
+
* Fork the project.
|
18
|
+
* Start a feature/bugfix branch.
|
19
|
+
* Commit and push until you are happy with your contribution.
|
20
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
21
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
22
|
+
|
23
|
+
== Copyright
|
24
|
+
|
25
|
+
Copyright (c) 2013 Vincent Zhu. See LICENSE.txt for
|
26
|
+
further details.
|
27
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "orientea"
|
18
|
+
gem.homepage = "http://github.com/vincent/orientea"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Command Pattern Implementation for easy use with rails}
|
21
|
+
gem.description = %Q{Command Pattern Implementation for easy use with rails}
|
22
|
+
gem.email = "zhu1230@gmail.com"
|
23
|
+
gem.authors = ["Vincent Zhu"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
# require 'rcov/rcovtask'
|
36
|
+
# Rcov::RcovTask.new do |test|
|
37
|
+
# test.libs << 'test'
|
38
|
+
# test.pattern = 'test/**/test_*.rb'
|
39
|
+
# test.verbose = true
|
40
|
+
# test.rcov_opts << '--exclude "gems/*"'
|
41
|
+
# end
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rdoc/task'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "orientea #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'orientea/command.rb'
|
2
|
+
module Orientea
|
3
|
+
class ChangingCommand < Orientea::Command
|
4
|
+
|
5
|
+
def self.build(record)
|
6
|
+
command = self.new
|
7
|
+
command.data = Hash.new
|
8
|
+
command.data['cls_str'] = record.class.to_s
|
9
|
+
command.data['cls_id'] = record.id
|
10
|
+
command.data['changes'] = record.changes.to_json
|
11
|
+
command.save!
|
12
|
+
command
|
13
|
+
end
|
14
|
+
|
15
|
+
action do
|
16
|
+
cls = self.data['cls_str'].constantize
|
17
|
+
id = self.data['cls_id']
|
18
|
+
object = cls.find(id)
|
19
|
+
JSON.load(self.data['changes']).each do |key, value|
|
20
|
+
object.send("#{key}=", value.last)
|
21
|
+
end
|
22
|
+
if object.save
|
23
|
+
self.done = true
|
24
|
+
self.save
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
undo do
|
29
|
+
cls = self.data['cls_str'].constantize
|
30
|
+
id = self.data['cls_id']
|
31
|
+
object = cls.find(id)
|
32
|
+
JSON.load(self.data['changes']).each do |key, value|
|
33
|
+
object.send("#{key}=", value.first)
|
34
|
+
end
|
35
|
+
if object.save
|
36
|
+
self.done = false
|
37
|
+
self.save
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# persist do
|
42
|
+
# self.data = @record.attributes
|
43
|
+
# self.data['changes'] = @record.class.to_s
|
44
|
+
# end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Orientea
|
2
|
+
class Command < ActiveRecord::Base
|
3
|
+
self.table_name = :orientea_commands
|
4
|
+
attr_accessor :done, :data
|
5
|
+
|
6
|
+
def self.action(&block)
|
7
|
+
define_method(:action, &block)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.undo(&block)
|
11
|
+
define_method(:undo, &block)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'orientea/command.rb'
|
2
|
+
module Orientea
|
3
|
+
class CreatingCommand < Orientea::Command
|
4
|
+
|
5
|
+
def self.build(record)
|
6
|
+
command = self.new
|
7
|
+
command.data = Hash.new
|
8
|
+
command.data['changes'] = record.attributes.to_json
|
9
|
+
command.data['cls_str'] = record.class.to_s
|
10
|
+
command.save!
|
11
|
+
command
|
12
|
+
end
|
13
|
+
|
14
|
+
action do
|
15
|
+
cls = self.data['cls_str'].constantize
|
16
|
+
new_object = cls.new(JSON.load(self.data['changes']))
|
17
|
+
if new_object.save
|
18
|
+
self.data['cls_id'] = new_object.id
|
19
|
+
self.data_will_change!
|
20
|
+
self.done = true
|
21
|
+
self.save
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
undo do
|
26
|
+
cls = self.data['cls_str'].constantize
|
27
|
+
cls.find(self.data['cls_id']).destroy
|
28
|
+
self.done = false
|
29
|
+
self.save
|
30
|
+
end
|
31
|
+
|
32
|
+
# persist do
|
33
|
+
# self.data = @record.attributes
|
34
|
+
# self.data['cls_str'] = @record.class.to_s
|
35
|
+
# end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
File without changes
|
data/lib/orientea.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Orientea::ChangingCommand do
|
4
|
+
include_context 'shared setup and clean'
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@customer = Customer.create(attr_name: 'vincent', attr_gender: 'male', attr_address: 'Nanjing')
|
8
|
+
end
|
9
|
+
it "should work correctly with action" do
|
10
|
+
@customer.attr_name = 'Derek'
|
11
|
+
command = Orientea::ChangingCommand.build(@customer)
|
12
|
+
expect(command.done).to be_false
|
13
|
+
expect{
|
14
|
+
command.action
|
15
|
+
}.to change{Customer.first.attr_name}.from('vincent').to('Derek')
|
16
|
+
expect(command.done).to be_true
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should save the command object" do
|
20
|
+
expect{Orientea::ChangingCommand.build(@customer)}.to change{Orientea::ChangingCommand.count}.by(1)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should work correctly with undo" do
|
24
|
+
@customer.attr_name = 'Derek'
|
25
|
+
command = Orientea::ChangingCommand.build(@customer)
|
26
|
+
command.action
|
27
|
+
expect{command.undo}.to change{Customer.first.attr_name}.from('Derek').to('vincent')
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Orientea::CreatingCommand do
|
4
|
+
include_context 'shared setup and clean'
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@customer = Customer.new
|
8
|
+
@customer.attr_name = 'my name'
|
9
|
+
@customer.attr_gender = 'male'
|
10
|
+
@customer.attr_address = 'Nanjing'
|
11
|
+
end
|
12
|
+
it "action should work correctly with CreatingCommand" do
|
13
|
+
expect{
|
14
|
+
command = Orientea::CreatingCommand.build(@customer)
|
15
|
+
command.save
|
16
|
+
command.action
|
17
|
+
}.to change{Customer.count}.from(0).to(1)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should save the command object" do
|
21
|
+
expect{Orientea::CreatingCommand.build(@customer)}.to change{Orientea::CreatingCommand.count}.by(1)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "undo should work correctly" do
|
25
|
+
command = Orientea::CreatingCommand.build(@customer)
|
26
|
+
command.save
|
27
|
+
command.action
|
28
|
+
expect{command.undo}.to change{Customer.count}.from(1).to(0)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
shared_context 'shared setup and clean' do
|
2
|
+
before(:each) do
|
3
|
+
ActiveRecord::Base.establish_connection(
|
4
|
+
adapter: 'postgresql',
|
5
|
+
host: 'localhost',
|
6
|
+
port: 5432,
|
7
|
+
encoding: 'unicode',
|
8
|
+
username: 'postgres',
|
9
|
+
password: ''
|
10
|
+
)
|
11
|
+
ActiveRecord::Migration.class_eval do
|
12
|
+
execute "CREATE EXTENSION IF NOT EXISTS hstore"
|
13
|
+
unless ActiveRecord::Base.connection.table_exists?(:customers)
|
14
|
+
create_table :customers do |t|
|
15
|
+
t.string :attr_name
|
16
|
+
t.string :attr_address
|
17
|
+
t.string :attr_gender
|
18
|
+
end
|
19
|
+
end
|
20
|
+
unless ActiveRecord::Base.connection.table_exists?(:orientea_commands)
|
21
|
+
create_table :orientea_commands do |t|
|
22
|
+
t.hstore :data
|
23
|
+
t.boolean :done
|
24
|
+
t.string :type
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Customer = Class.new(ActiveRecord::Base) unless defined? Customer
|
30
|
+
end
|
31
|
+
|
32
|
+
after(:each) do
|
33
|
+
ActiveRecord::Migration.class_eval do
|
34
|
+
drop_table :customers
|
35
|
+
drop_table :orientea_commands
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
RSpec.configure do |config|
|
8
|
+
require 'orientea'
|
9
|
+
require 'awesome_print'
|
10
|
+
require "shared_setup"
|
11
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
12
|
+
config.run_all_when_everything_filtered = true
|
13
|
+
config.filter_run :focus
|
14
|
+
|
15
|
+
# Run specs in random order to surface order dependencies. If you find an
|
16
|
+
# order dependency and want to debug it, you can fix the order by providing
|
17
|
+
# the seed, which is printed after each run.
|
18
|
+
# --seed 1234
|
19
|
+
config.order = 'random'
|
20
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'orientea'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,195 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: orientea
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vincent Zhu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: awesome_print
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: shoulda
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rdoc
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.3.5
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.3.5
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.8.4
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.8.4
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: Command Pattern Implementation for easy use with rails
|
140
|
+
email: zhu1230@gmail.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files:
|
144
|
+
- LICENSE.txt
|
145
|
+
- README.md
|
146
|
+
- README.rdoc
|
147
|
+
files:
|
148
|
+
- .document
|
149
|
+
- .rspec
|
150
|
+
- Gemfile
|
151
|
+
- Gemfile.lock
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- README.rdoc
|
155
|
+
- Rakefile
|
156
|
+
- VERSION
|
157
|
+
- lib/.DS_Store
|
158
|
+
- lib/orientea.rb
|
159
|
+
- lib/orientea/.DS_Store
|
160
|
+
- lib/orientea/changing_command.rb
|
161
|
+
- lib/orientea/command.rb
|
162
|
+
- lib/orientea/creating_command.rb
|
163
|
+
- lib/orientea/generators/command_generator.rb
|
164
|
+
- lib/orientea/templates/create_command.rb
|
165
|
+
- spec/changing_command_spec.rb
|
166
|
+
- spec/creating_command_spec.rb
|
167
|
+
- spec/shared_setup.rb
|
168
|
+
- spec/spec_helper.rb
|
169
|
+
- test/helper.rb
|
170
|
+
- test/test_orientea.rb
|
171
|
+
homepage: http://github.com/vincent/orientea
|
172
|
+
licenses:
|
173
|
+
- MIT
|
174
|
+
metadata: {}
|
175
|
+
post_install_message:
|
176
|
+
rdoc_options: []
|
177
|
+
require_paths:
|
178
|
+
- lib
|
179
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
180
|
+
requirements:
|
181
|
+
- - '>='
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '0'
|
184
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
requirements: []
|
190
|
+
rubyforge_project:
|
191
|
+
rubygems_version: 2.0.3
|
192
|
+
signing_key:
|
193
|
+
specification_version: 4
|
194
|
+
summary: Command Pattern Implementation for easy use with rails
|
195
|
+
test_files: []
|