engine-rea 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +40 -35
- data/VERSION +1 -1
- data/app/models/rea/categories_entity.rb +7 -0
- data/app/models/rea/category.rb +18 -7
- data/app/models/rea/classification.rb +7 -0
- data/app/models/rea/entities_group.rb +7 -0
- data/app/models/rea/group.rb +5 -17
- data/app/models/rea/rea.rb +7 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/zh-CN.yml +16 -17
- data/db/migrate/20121129100245_create_rea_groups.rb +18 -0
- data/db/migrate/20121129100748_create_rea_categories.rb +19 -0
- data/db/migrate/20121129101744_create_rea_classifications.rb +29 -0
- data/db/migrate/20121130051633_create_rea_entities_groups.rb +13 -0
- data/db/migrate/20121130100600_create_rea_categories_entities.rb +13 -0
- data/engine-rea.gemspec +27 -59
- data/lib/generators/rea/install/install_generator.rb +4 -4
- data/lib/rea/active_record_ext.rb +82 -0
- data/lib/rea/application.rb +55 -21
- data/lib/rea/engine.rb +8 -2
- data/lib/rea.rb +5 -10
- data/spec/dummy/db/schema.rb +61 -1
- data/spec/models/rea/categories_entity_spec.rb +7 -0
- data/spec/models/rea/category_spec.rb +10 -19
- data/spec/models/rea/classification_spec.rb +6 -0
- data/spec/models/rea/entities_group_spec.rb +7 -0
- data/spec/models/rea/group_spec.rb +3 -35
- data/spec/rea/active_record_ext_spec.rb +35 -0
- data/spec/rea/application_spec.rb +17 -0
- data/spec/spec_helper.rb +3 -0
- metadata +40 -59
- data/app/models/rea/category_member.rb +0 -8
- data/app/models/rea/category_type.rb +0 -7
- data/app/models/rea/group_type.rb +0 -7
- data/app/models/rea/identifier.rb +0 -51
- data/app/views/layouts/rea/application.html.erb +0 -14
- data/db/migrate/20120601074531_create_rea_category_types.rb +0 -11
- data/db/migrate/20120601074540_create_rea_categories.rb +0 -12
- data/db/migrate/20120605023205_create_rea_category_members.rb +0 -12
- data/db/migrate/20120605030658_create_rea_groups.rb +0 -20
- data/db/migrate/20120605082028_create_rea_identifiers.rb +0 -11
- data/db/migrate/20120717080004_create_rea_group_types.rb +0 -7
- data/lib/rea/aspect_type/base.rb +0 -10
- data/lib/rea/aspect_type/classification.rb +0 -142
- data/lib/rea/aspect_type/description.rb +0 -8
- data/lib/rea/aspect_type/due_date.rb +0 -34
- data/lib/rea/aspect_type/identification.rb +0 -38
- data/lib/rea/aspect_type.rb +0 -33
- data/lib/rea/meta_type/agent.rb +0 -10
- data/lib/rea/meta_type/commitment.rb +0 -26
- data/lib/rea/meta_type/contract.rb +0 -32
- data/lib/rea/meta_type/conversion.rb +0 -6
- data/lib/rea/meta_type/entity.rb +0 -91
- data/lib/rea/meta_type/event.rb +0 -39
- data/lib/rea/meta_type/exchange.rb +0 -6
- data/lib/rea/meta_type/group.rb +0 -25
- data/lib/rea/meta_type/process.rb +0 -28
- data/lib/rea/meta_type/resource.rb +0 -14
- data/lib/rea/meta_type/schedule.rb +0 -0
- data/lib/rea/meta_type/type.rb +0 -0
- data/lib/rea/meta_type.rb +0 -8
- data/lib/rea/model.rb +0 -65
- data/lib/rea/plugins/active_model.rb +0 -18
- data/spec/models/rea/category_member_spec.rb +0 -9
- data/spec/models/rea/category_type_spec.rb +0 -28
- data/spec/models/rea/group_type_spec.rb +0 -8
- data/spec/models/rea/identifier_spec.rb +0 -48
- data/spec/rea/aspect_type/classification_spec.rb +0 -107
- data/spec/rea/aspect_type/due_date_spec.rb +0 -75
- data/spec/rea/aspect_type/identification_spec.rb +0 -64
- data/spec/rea/aspect_type_spec.rb +0 -44
- data/spec/rea/meta_type/agent_spec.rb +0 -28
- data/spec/rea/meta_type/commitment_spec.rb +0 -45
- data/spec/rea/meta_type/contract_spec.rb +0 -42
- data/spec/rea/meta_type/entity_spec.rb +0 -58
- data/spec/rea/meta_type/event_spec.rb +0 -21
- data/spec/rea/meta_type/group_spec.rb +0 -55
- data/spec/rea/meta_type/process_spec.rb +0 -5
- data/spec/rea/meta_type/resource_spec.rb +0 -65
- data/spec/rea/meta_type_spec.rb +0 -11
- data/spec/rea/model_spec.rb +0 -79
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format documentation
|
data/Gemfile
CHANGED
@@ -3,8 +3,9 @@ source "http://ruby.taobao.org"
|
|
3
3
|
# Example:
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
5
5
|
|
6
|
-
gem "rails", "
|
6
|
+
gem "rails", "~>3.2.8"
|
7
7
|
gem "capybara", ">= 0.4.0"
|
8
|
+
gem 'globalize3'
|
8
9
|
|
9
10
|
group :development,:test do
|
10
11
|
gem "database_cleaner"
|
@@ -12,7 +13,7 @@ group :development,:test do
|
|
12
13
|
gem 'factory_girl_rails'
|
13
14
|
gem 'minitest'
|
14
15
|
gem "rspec-rails", ">= 2.8.0"
|
15
|
-
gem "sqlite3
|
16
|
+
gem "sqlite3"
|
16
17
|
gem "with_model", '>= 0.1.5'
|
17
18
|
gem "generator_spec"
|
18
19
|
gem "rdoc", "~> 3.12"
|
data/Gemfile.lock
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://ruby.taobao.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (3.2.
|
5
|
-
actionpack (= 3.2.
|
4
|
+
actionmailer (3.2.8)
|
5
|
+
actionpack (= 3.2.8)
|
6
6
|
mail (~> 2.4.4)
|
7
|
-
actionpack (3.2.
|
8
|
-
activemodel (= 3.2.
|
9
|
-
activesupport (= 3.2.
|
7
|
+
actionpack (3.2.8)
|
8
|
+
activemodel (= 3.2.8)
|
9
|
+
activesupport (= 3.2.8)
|
10
10
|
builder (~> 3.0.0)
|
11
11
|
erubis (~> 2.7.0)
|
12
|
-
journey (~> 1.0.
|
12
|
+
journey (~> 1.0.4)
|
13
13
|
rack (~> 1.4.0)
|
14
14
|
rack-cache (~> 1.2)
|
15
15
|
rack-test (~> 0.6.1)
|
16
|
-
sprockets (~> 2.1.
|
17
|
-
activemodel (3.2.
|
18
|
-
activesupport (= 3.2.
|
16
|
+
sprockets (~> 2.1.3)
|
17
|
+
activemodel (3.2.8)
|
18
|
+
activesupport (= 3.2.8)
|
19
19
|
builder (~> 3.0.0)
|
20
|
-
activerecord (3.2.
|
21
|
-
activemodel (= 3.2.
|
22
|
-
activesupport (= 3.2.
|
20
|
+
activerecord (3.2.8)
|
21
|
+
activemodel (= 3.2.8)
|
22
|
+
activesupport (= 3.2.8)
|
23
23
|
arel (~> 3.0.2)
|
24
24
|
tzinfo (~> 0.3.29)
|
25
|
-
activeresource (3.2.
|
26
|
-
activemodel (= 3.2.
|
27
|
-
activesupport (= 3.2.
|
28
|
-
activesupport (3.2.
|
25
|
+
activeresource (3.2.8)
|
26
|
+
activemodel (= 3.2.8)
|
27
|
+
activesupport (= 3.2.8)
|
28
|
+
activesupport (3.2.8)
|
29
29
|
i18n (~> 0.6)
|
30
30
|
multi_json (~> 1.0)
|
31
31
|
addressable (2.2.8)
|
@@ -53,6 +53,10 @@ GEM
|
|
53
53
|
rails (>= 3.0, < 4.0)
|
54
54
|
rspec-rails
|
55
55
|
git (1.2.5)
|
56
|
+
globalize3 (0.2.0)
|
57
|
+
activemodel (>= 3.0.0)
|
58
|
+
activerecord (>= 3.0.0)
|
59
|
+
paper_trail (~> 2)
|
56
60
|
hike (1.2.1)
|
57
61
|
i18n (0.6.0)
|
58
62
|
jeweler (1.8.3)
|
@@ -60,18 +64,21 @@ GEM
|
|
60
64
|
git (>= 1.2.5)
|
61
65
|
rake
|
62
66
|
rdoc
|
63
|
-
journey (1.0.
|
64
|
-
json (1.7.
|
67
|
+
journey (1.0.4)
|
68
|
+
json (1.7.5)
|
65
69
|
libwebsocket (0.1.3)
|
66
70
|
addressable
|
67
71
|
mail (2.4.4)
|
68
72
|
i18n (>= 0.4.0)
|
69
73
|
mime-types (~> 1.16)
|
70
74
|
treetop (~> 1.4.8)
|
71
|
-
mime-types (1.
|
75
|
+
mime-types (1.19)
|
72
76
|
minitest (3.0.0)
|
73
77
|
multi_json (1.3.6)
|
74
78
|
nokogiri (1.5.2)
|
79
|
+
paper_trail (2.6.4)
|
80
|
+
activerecord (~> 3.0)
|
81
|
+
railties (~> 3.0)
|
75
82
|
polyglot (0.3.3)
|
76
83
|
rack (1.4.1)
|
77
84
|
rack-cache (1.2)
|
@@ -80,21 +87,21 @@ GEM
|
|
80
87
|
rack
|
81
88
|
rack-test (0.6.1)
|
82
89
|
rack (>= 1.0)
|
83
|
-
rails (3.2.
|
84
|
-
actionmailer (= 3.2.
|
85
|
-
actionpack (= 3.2.
|
86
|
-
activerecord (= 3.2.
|
87
|
-
activeresource (= 3.2.
|
88
|
-
activesupport (= 3.2.
|
90
|
+
rails (3.2.8)
|
91
|
+
actionmailer (= 3.2.8)
|
92
|
+
actionpack (= 3.2.8)
|
93
|
+
activerecord (= 3.2.8)
|
94
|
+
activeresource (= 3.2.8)
|
95
|
+
activesupport (= 3.2.8)
|
89
96
|
bundler (~> 1.0)
|
90
|
-
railties (= 3.2.
|
91
|
-
railties (3.2.
|
92
|
-
actionpack (= 3.2.
|
93
|
-
activesupport (= 3.2.
|
97
|
+
railties (= 3.2.8)
|
98
|
+
railties (3.2.8)
|
99
|
+
actionpack (= 3.2.8)
|
100
|
+
activesupport (= 3.2.8)
|
94
101
|
rack-ssl (~> 1.3.2)
|
95
102
|
rake (>= 0.8.7)
|
96
103
|
rdoc (~> 3.4)
|
97
|
-
thor (
|
104
|
+
thor (>= 0.14.6, < 2.0)
|
98
105
|
rake (0.9.2.2)
|
99
106
|
rdoc (3.12)
|
100
107
|
json (~> 1.4)
|
@@ -128,9 +135,7 @@ GEM
|
|
128
135
|
rack (~> 1.0)
|
129
136
|
tilt (~> 1.1, != 1.3.0)
|
130
137
|
sqlite3 (1.3.6)
|
131
|
-
|
132
|
-
sqlite3 (>= 1.3.3)
|
133
|
-
thor (0.14.6)
|
138
|
+
thor (0.16.0)
|
134
139
|
tilt (1.3.3)
|
135
140
|
treetop (1.4.10)
|
136
141
|
polyglot
|
@@ -152,14 +157,14 @@ DEPENDENCIES
|
|
152
157
|
database_cleaner
|
153
158
|
factory_girl_rails
|
154
159
|
generator_spec
|
160
|
+
globalize3
|
155
161
|
jeweler (>= 1.8.3)
|
156
162
|
minitest
|
157
|
-
rails (
|
163
|
+
rails (~> 3.2.8)
|
158
164
|
rdoc (~> 3.12)
|
159
165
|
rspec-rails (>= 2.8.0)
|
160
166
|
simplecov
|
161
167
|
spork (~> 1.0rc)
|
162
168
|
sqlite3
|
163
|
-
sqlite3-ruby
|
164
169
|
watchr
|
165
170
|
with_model (>= 0.1.5)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/app/models/rea/category.rb
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
module Rea
|
2
2
|
class Category < ActiveRecord::Base
|
3
|
-
|
4
|
-
belongs_to :category_type
|
5
|
-
has_many :category_members, :class_name=>::Rea::CategoryMember.name
|
6
|
-
belongs_to :parent_category, :class_name=>self.name, :foreign_key=>:category_id
|
7
|
-
has_many :child_categories, :class_name=>self.name
|
3
|
+
#translates :name
|
8
4
|
has_and_belongs_to_many :groups
|
5
|
+
belongs_to :classification
|
6
|
+
belongs_to :parent, :foreign_key=>'parent_id', :class_name=>self.name
|
7
|
+
has_many :children, :foreign_key=>'parent_id', :class_name=>self.name
|
8
|
+
has_many :categories_entities
|
9
|
+
attr_accessible :name, :parent_id, :classification_id, :group_ids, :locale
|
9
10
|
|
10
|
-
|
11
|
-
|
11
|
+
def self.for entity_or_class, attribute
|
12
|
+
group_ids =
|
13
|
+
(entity_or_class.is_a? Class) ? [entity_or_class.default_group.id] : entity_or_class.group_ids
|
14
|
+
class_name =
|
15
|
+
(entity_or_class.is_a? Class) ? entity_or_class.name : entity_or_class.class.name
|
16
|
+
entity = entity_or_class
|
17
|
+
self.joins(:groups, :classification).where(
|
18
|
+
:"rea_groups.id"=>group_ids,
|
19
|
+
:"rea_classifications.name"=>attribute,
|
20
|
+
:"rea_classifications.type_name"=>class_name
|
21
|
+
)
|
22
|
+
end
|
12
23
|
end
|
13
24
|
end
|
data/app/models/rea/group.rb
CHANGED
@@ -1,22 +1,10 @@
|
|
1
1
|
module Rea
|
2
2
|
class Group < ActiveRecord::Base
|
3
|
-
|
4
|
-
attr_accessible :name, :group_type_id, :category_ids_csv
|
3
|
+
#translates :name
|
5
4
|
has_and_belongs_to_many :categories
|
6
|
-
belongs_to :
|
7
|
-
has_many :
|
8
|
-
|
9
|
-
|
10
|
-
logger.debug "before validation" + self.category_ids_csv
|
11
|
-
return unless self.category_ids_csv
|
12
|
-
ids = self.category_ids_csv.split(/,/)
|
13
|
-
ids = ids.delete_if { |id| id =~ /T/ }
|
14
|
-
self.category_ids = ids
|
15
|
-
end
|
16
|
-
|
17
|
-
def category_ids_csv
|
18
|
-
@category_ids_csv ||= category_ids.join ','
|
19
|
-
end
|
20
|
-
|
5
|
+
belongs_to :parent, :foreign_key=>'parent_id', :class_name=>self.name
|
6
|
+
has_many :children, :foreign_key=>'parent_id', :class_name=>self.name
|
7
|
+
has_many :entities_groups
|
8
|
+
attr_accessible :name, :type_name, :parent_id
|
21
9
|
end
|
22
10
|
end
|
data/config/locales/en.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
@@ -1,32 +1,31 @@
|
|
1
1
|
zh-CN:
|
2
2
|
activerecord:
|
3
3
|
models:
|
4
|
-
rea/
|
5
|
-
|
6
|
-
|
7
|
-
rea/category:
|
8
|
-
one: "分类"
|
9
|
-
other: "分类"
|
10
|
-
rea/identifier:
|
11
|
-
one: "标识码"
|
12
|
-
other: "标识码"
|
13
|
-
rea/group:
|
14
|
-
one: "分组"
|
15
|
-
other: "分组"
|
16
|
-
rea/group_type:
|
17
|
-
one: "分组类型"
|
18
|
-
other: "分组类型"
|
4
|
+
rea/category: "分类"
|
5
|
+
rea/identifier: "标识码"
|
6
|
+
rea/group: "分组"
|
19
7
|
|
20
8
|
attributes:
|
21
9
|
rea/category_type:
|
22
|
-
name: "
|
10
|
+
name: "标识"
|
11
|
+
display_name: "名称"
|
23
12
|
categories: "分类"
|
24
13
|
rea/category:
|
25
|
-
name: "
|
14
|
+
name: "标识"
|
15
|
+
display_name: "名称"
|
26
16
|
category_type: "分类类型"
|
27
17
|
parent_category: "上级分类"
|
18
|
+
rea/group_type:
|
19
|
+
name: "标识"
|
20
|
+
display_name: "名称"
|
21
|
+
groups: "分组"
|
22
|
+
rea/group:
|
23
|
+
name: "标识"
|
24
|
+
display_name: "名称"
|
25
|
+
group_type: "分组类型"
|
28
26
|
rea/identifier:
|
29
27
|
name: "名称"
|
28
|
+
display_name: "名称"
|
30
29
|
value_reset_rule: "值重置规则"
|
31
30
|
id_rule: "标识码规则"
|
32
31
|
last_value: "最新值"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateReaGroups < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table :rea_groups do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :type_name
|
6
|
+
t.references :parent
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :rea_groups, :parent_id
|
11
|
+
# Rea::Group.create_translation_table! :name=>:string
|
12
|
+
end
|
13
|
+
|
14
|
+
def down
|
15
|
+
drop_table :rea_groups
|
16
|
+
# Rea::Group.drop_translation_table!
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateReaCategories < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table :rea_categories do |t|
|
4
|
+
t.string :name
|
5
|
+
t.references :parent
|
6
|
+
t.references :classification
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :rea_categories, :parent_id
|
11
|
+
add_index :rea_categories, [:name, :classification_id], :unique=>true
|
12
|
+
# ::Rea::Category.create_translation_table! :name=>:string
|
13
|
+
end
|
14
|
+
|
15
|
+
def down
|
16
|
+
drop_table :rea_categories
|
17
|
+
# ::Rea::Category.drop_translation_table!
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class CreateReaClassifications < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
create_table :rea_classifications do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :type_name
|
6
|
+
t.boolean :auto
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :rea_classifications, [:name, :type_name]
|
12
|
+
|
13
|
+
create_table :categories_groups do |t|
|
14
|
+
t.references :category
|
15
|
+
t.references :group
|
16
|
+
end
|
17
|
+
|
18
|
+
add_index :categories_groups, [:category_id, :group_id], :name=>"idx_categories_groups"
|
19
|
+
|
20
|
+
# ::Rea::Classification.create_translation_table! :name=>:string
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
def down
|
25
|
+
drop_table :rea_classifications
|
26
|
+
drop_table :categories_groups
|
27
|
+
# ::Rea::Classification.drop_translation_table!
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateReaEntitiesGroups < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :rea_entities_groups do |t|
|
4
|
+
t.references :entity
|
5
|
+
t.string :entity_type
|
6
|
+
t.references :group
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :rea_entities_groups, :entity_id
|
11
|
+
add_index :rea_entities_groups, :group_id
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateReaCategoriesEntities < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :rea_categories_entities do |t|
|
4
|
+
t.references :entity
|
5
|
+
t.string :entity_type
|
6
|
+
t.references :category
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :rea_categories_entities, :entity_id
|
11
|
+
add_index :rea_categories_entities, :category_id
|
12
|
+
end
|
13
|
+
end
|
data/engine-rea.gemspec
CHANGED
@@ -5,17 +5,18 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "engine-rea"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Wong"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-12-14"
|
13
13
|
s.description = "\n follow REA model\n\t"
|
14
14
|
s.email = "lazing@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.md"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
+
".rspec",
|
19
20
|
".watchr",
|
20
21
|
"Gemfile",
|
21
22
|
"Gemfile.lock",
|
@@ -28,51 +29,29 @@ Gem::Specification.new do |s|
|
|
28
29
|
"app/assets/stylesheets/rea/application.css",
|
29
30
|
"app/controllers/rea/application_controller.rb",
|
30
31
|
"app/helpers/rea/application_helper.rb",
|
32
|
+
"app/models/rea/categories_entity.rb",
|
31
33
|
"app/models/rea/category.rb",
|
32
|
-
"app/models/rea/
|
33
|
-
"app/models/rea/
|
34
|
+
"app/models/rea/classification.rb",
|
35
|
+
"app/models/rea/entities_group.rb",
|
34
36
|
"app/models/rea/group.rb",
|
35
|
-
"app/models/rea/
|
36
|
-
"app/models/rea/identifier.rb",
|
37
|
-
"app/views/layouts/rea/application.html.erb",
|
37
|
+
"app/models/rea/rea.rb",
|
38
38
|
"config/locales/en.yml",
|
39
39
|
"config/locales/zh-CN.yml",
|
40
40
|
"config/routes.rb",
|
41
|
-
"db/migrate/
|
42
|
-
"db/migrate/
|
43
|
-
"db/migrate/
|
44
|
-
"db/migrate/
|
45
|
-
"db/migrate/
|
46
|
-
"db/migrate/20120717080004_create_rea_group_types.rb",
|
41
|
+
"db/migrate/20121129100245_create_rea_groups.rb",
|
42
|
+
"db/migrate/20121129100748_create_rea_categories.rb",
|
43
|
+
"db/migrate/20121129101744_create_rea_classifications.rb",
|
44
|
+
"db/migrate/20121130051633_create_rea_entities_groups.rb",
|
45
|
+
"db/migrate/20121130100600_create_rea_categories_entities.rb",
|
47
46
|
"engine-rea.gemspec",
|
48
47
|
"lib/engine-rea.rb",
|
49
48
|
"lib/generators/rea/install/USAGE",
|
50
49
|
"lib/generators/rea/install/install_generator.rb",
|
51
50
|
"lib/rails_patch.rb",
|
52
51
|
"lib/rea.rb",
|
52
|
+
"lib/rea/active_record_ext.rb",
|
53
53
|
"lib/rea/application.rb",
|
54
|
-
"lib/rea/aspect_type.rb",
|
55
|
-
"lib/rea/aspect_type/base.rb",
|
56
|
-
"lib/rea/aspect_type/classification.rb",
|
57
|
-
"lib/rea/aspect_type/description.rb",
|
58
|
-
"lib/rea/aspect_type/due_date.rb",
|
59
|
-
"lib/rea/aspect_type/identification.rb",
|
60
54
|
"lib/rea/engine.rb",
|
61
|
-
"lib/rea/meta_type.rb",
|
62
|
-
"lib/rea/meta_type/agent.rb",
|
63
|
-
"lib/rea/meta_type/commitment.rb",
|
64
|
-
"lib/rea/meta_type/contract.rb",
|
65
|
-
"lib/rea/meta_type/conversion.rb",
|
66
|
-
"lib/rea/meta_type/entity.rb",
|
67
|
-
"lib/rea/meta_type/event.rb",
|
68
|
-
"lib/rea/meta_type/exchange.rb",
|
69
|
-
"lib/rea/meta_type/group.rb",
|
70
|
-
"lib/rea/meta_type/process.rb",
|
71
|
-
"lib/rea/meta_type/resource.rb",
|
72
|
-
"lib/rea/meta_type/schedule.rb",
|
73
|
-
"lib/rea/meta_type/type.rb",
|
74
|
-
"lib/rea/model.rb",
|
75
|
-
"lib/rea/plugins/active_model.rb",
|
76
55
|
"lib/rea/settings.rb",
|
77
56
|
"lib/tasks/cucumber.rake",
|
78
57
|
"lib/tasks/rea_tasks.rake",
|
@@ -114,48 +93,35 @@ Gem::Specification.new do |s|
|
|
114
93
|
"spec/dummy/script/rails",
|
115
94
|
"spec/factories/rea_resources.rb",
|
116
95
|
"spec/generators/rea/install/install_generator_spec.rb",
|
117
|
-
"spec/models/rea/
|
96
|
+
"spec/models/rea/categories_entity_spec.rb",
|
118
97
|
"spec/models/rea/category_spec.rb",
|
119
|
-
"spec/models/rea/
|
98
|
+
"spec/models/rea/classification_spec.rb",
|
99
|
+
"spec/models/rea/entities_group_spec.rb",
|
120
100
|
"spec/models/rea/group_spec.rb",
|
121
|
-
"spec/
|
122
|
-
"spec/models/rea/identifier_spec.rb",
|
101
|
+
"spec/rea/active_record_ext_spec.rb",
|
123
102
|
"spec/rea/application_spec.rb",
|
124
|
-
"spec/rea/aspect_type/classification_spec.rb",
|
125
|
-
"spec/rea/aspect_type/due_date_spec.rb",
|
126
|
-
"spec/rea/aspect_type/identification_spec.rb",
|
127
|
-
"spec/rea/aspect_type_spec.rb",
|
128
103
|
"spec/rea/engine_spec.rb",
|
129
|
-
"spec/rea/meta_type/agent_spec.rb",
|
130
|
-
"spec/rea/meta_type/commitment_spec.rb",
|
131
|
-
"spec/rea/meta_type/contract_spec.rb",
|
132
|
-
"spec/rea/meta_type/entity_spec.rb",
|
133
|
-
"spec/rea/meta_type/event_spec.rb",
|
134
|
-
"spec/rea/meta_type/group_spec.rb",
|
135
|
-
"spec/rea/meta_type/process_spec.rb",
|
136
|
-
"spec/rea/meta_type/resource_spec.rb",
|
137
|
-
"spec/rea/meta_type_spec.rb",
|
138
|
-
"spec/rea/model_spec.rb",
|
139
104
|
"spec/spec_helper.rb"
|
140
105
|
]
|
141
106
|
s.homepage = "http://github.com/lazing/engine-rea"
|
142
107
|
s.licenses = ["MIT"]
|
143
108
|
s.require_paths = ["lib"]
|
144
|
-
s.rubygems_version = "1.8.
|
109
|
+
s.rubygems_version = "1.8.24"
|
145
110
|
s.summary = "Rails Engine for MDA pattern Resource Event Agent"
|
146
111
|
|
147
112
|
if s.respond_to? :specification_version then
|
148
113
|
s.specification_version = 3
|
149
114
|
|
150
115
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
151
|
-
s.add_runtime_dependency(%q<rails>, ["
|
116
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.2.8"])
|
152
117
|
s.add_runtime_dependency(%q<capybara>, [">= 0.4.0"])
|
118
|
+
s.add_runtime_dependency(%q<globalize3>, [">= 0"])
|
153
119
|
s.add_development_dependency(%q<database_cleaner>, [">= 0"])
|
154
120
|
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
155
121
|
s.add_development_dependency(%q<factory_girl_rails>, [">= 0"])
|
156
122
|
s.add_development_dependency(%q<minitest>, [">= 0"])
|
157
123
|
s.add_development_dependency(%q<rspec-rails>, [">= 2.8.0"])
|
158
|
-
s.add_development_dependency(%q<sqlite3
|
124
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
159
125
|
s.add_development_dependency(%q<with_model>, [">= 0.1.5"])
|
160
126
|
s.add_development_dependency(%q<generator_spec>, [">= 0"])
|
161
127
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
@@ -165,14 +131,15 @@ Gem::Specification.new do |s|
|
|
165
131
|
s.add_development_dependency(%q<spork>, ["~> 1.0rc"])
|
166
132
|
s.add_development_dependency(%q<watchr>, [">= 0"])
|
167
133
|
else
|
168
|
-
s.add_dependency(%q<rails>, ["
|
134
|
+
s.add_dependency(%q<rails>, ["~> 3.2.8"])
|
169
135
|
s.add_dependency(%q<capybara>, [">= 0.4.0"])
|
136
|
+
s.add_dependency(%q<globalize3>, [">= 0"])
|
170
137
|
s.add_dependency(%q<database_cleaner>, [">= 0"])
|
171
138
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
172
139
|
s.add_dependency(%q<factory_girl_rails>, [">= 0"])
|
173
140
|
s.add_dependency(%q<minitest>, [">= 0"])
|
174
141
|
s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
|
175
|
-
s.add_dependency(%q<sqlite3
|
142
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
176
143
|
s.add_dependency(%q<with_model>, [">= 0.1.5"])
|
177
144
|
s.add_dependency(%q<generator_spec>, [">= 0"])
|
178
145
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
@@ -183,14 +150,15 @@ Gem::Specification.new do |s|
|
|
183
150
|
s.add_dependency(%q<watchr>, [">= 0"])
|
184
151
|
end
|
185
152
|
else
|
186
|
-
s.add_dependency(%q<rails>, ["
|
153
|
+
s.add_dependency(%q<rails>, ["~> 3.2.8"])
|
187
154
|
s.add_dependency(%q<capybara>, [">= 0.4.0"])
|
155
|
+
s.add_dependency(%q<globalize3>, [">= 0"])
|
188
156
|
s.add_dependency(%q<database_cleaner>, [">= 0"])
|
189
157
|
s.add_dependency(%q<sqlite3>, [">= 0"])
|
190
158
|
s.add_dependency(%q<factory_girl_rails>, [">= 0"])
|
191
159
|
s.add_dependency(%q<minitest>, [">= 0"])
|
192
160
|
s.add_dependency(%q<rspec-rails>, [">= 2.8.0"])
|
193
|
-
s.add_dependency(%q<sqlite3
|
161
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
194
162
|
s.add_dependency(%q<with_model>, [">= 0.1.5"])
|
195
163
|
s.add_dependency(%q<generator_spec>, [">= 0"])
|
196
164
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
@@ -3,7 +3,7 @@ class Rea::InstallGenerator < Rails::Generators::Base
|
|
3
3
|
source_root File.expand_path('../../../../../db/migrate', __FILE__)
|
4
4
|
def self.next_migration_number(path)
|
5
5
|
unless @prev_migration_nr
|
6
|
-
@prev_migration_nr = Time.
|
6
|
+
@prev_migration_nr = Time.parse("2012-10-10").utc.strftime("%Y%m%d%H%M%S").to_i
|
7
7
|
else
|
8
8
|
@prev_migration_nr += 1
|
9
9
|
end
|
@@ -19,10 +19,10 @@ class Rea::InstallGenerator < Rails::Generators::Base
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def install_rea_initializer
|
22
|
-
initializer "rea.rb" do
|
23
|
-
data = ""
|
24
|
-
data << "Rea.setup do |application|\n"
|
22
|
+
initializer "rea.rb" do
|
23
|
+
data = "Rea.setup do |application|\n"
|
25
24
|
data << "end"
|
25
|
+
data
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|