yogo-project 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +27 -0
- data/Gemfile +34 -0
- data/Gemfile.lock +198 -0
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/features/step_definitions/yogo_project_steps.rb +0 -0
- data/features/support/env.rb +1 -0
- data/features/yogo_project.feature +9 -0
- data/lib/datamapper/adapters/postgres.rb +9 -0
- data/lib/datamapper/adapters/sqlite.rb +9 -0
- data/lib/yogo-project.rb +2 -0
- data/lib/yogo/collection.rb +12 -0
- data/lib/yogo/collection/asset.rb +12 -0
- data/lib/yogo/collection/asset/model.rb +11 -0
- data/lib/yogo/collection/asset/model_configuration.rb +21 -0
- data/lib/yogo/collection/asset/model_properties.rb +47 -0
- data/lib/yogo/collection/base.rb +69 -0
- data/lib/yogo/collection/base/collection_repository.rb +21 -0
- data/lib/yogo/collection/base/model.rb +20 -0
- data/lib/yogo/collection/base/model_collection_context.rb +25 -0
- data/lib/yogo/collection/base/model_configuration.rb +34 -0
- data/lib/yogo/collection/data.rb +61 -0
- data/lib/yogo/collection/data/model.rb +72 -0
- data/lib/yogo/collection/data/model_configuration.rb +42 -0
- data/lib/yogo/collection/data/model_properties.rb +15 -0
- data/lib/yogo/collection/field_view.rb +26 -0
- data/lib/yogo/collection/form.rb +22 -0
- data/lib/yogo/collection/property.rb +127 -0
- data/lib/yogo/collection/static.rb +13 -0
- data/lib/yogo/collection/static/model_configuration.rb +31 -0
- data/lib/yogo/configuration.rb +9 -0
- data/lib/yogo/datamapper/model/common/properties.rb +16 -0
- data/lib/yogo/datamapper/model/configuration.rb +31 -0
- data/lib/yogo/datamapper/model/operations/add.rb +34 -0
- data/lib/yogo/datamapper/model/operations/clear.rb +29 -0
- data/lib/yogo/datamapper/model/stored/configuration.rb +25 -0
- data/lib/yogo/datamapper/repository_manager.rb +30 -0
- data/lib/yogo/datamapper/repository_manager/model.rb +40 -0
- data/lib/yogo/datamapper/repository_manager/resource.rb +124 -0
- data/lib/yogo/example/dynamic/project_full.rb +48 -0
- data/lib/yogo/example/dynamic/project_remix.rb +16 -0
- data/lib/yogo/example/voeis/managed/data_stream.rb +39 -0
- data/lib/yogo/example/voeis/managed/site.rb +51 -0
- data/lib/yogo/example/voeis/project.rb +57 -0
- data/lib/yogo/operation.rb +49 -0
- data/lib/yogo/project.rb +32 -0
- data/lib/yogo/property_ext.rb +7 -0
- data/spec/resource/.gitdir +0 -0
- data/spec/resource/text_file_asset.txt +1 -0
- data/spec/spec_helper.rb +49 -0
- data/spec/yogo/all_collection_data_models_spec.rb +34 -0
- data/spec/yogo/all_collection_managers_spec.rb +18 -0
- data/spec/yogo/all_collections_spec.rb +54 -0
- data/spec/yogo/all_data_collections_spec.rb +51 -0
- data/spec/yogo/asset_collection_spec.rb +28 -0
- data/spec/yogo/data_collection_spec.rb +16 -0
- data/yogo-project.gemspec +128 -0
- metadata +222 -0
data/.document
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.swp
|
15
|
+
|
16
|
+
## PROJECT::GENERAL
|
17
|
+
coverage
|
18
|
+
rdoc
|
19
|
+
pkg
|
20
|
+
.bundle
|
21
|
+
.yardoc
|
22
|
+
|
23
|
+
## PROJECT::SPECIFIC
|
24
|
+
spec/tmp
|
25
|
+
asset_collection/**/*
|
26
|
+
uploads/*
|
27
|
+
log/datamapper.log
|
data/Gemfile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
source :rubygems
|
2
|
+
gemspec
|
3
|
+
|
4
|
+
gem "yogo-operation" , :git => "git://github.com/yogo/yogo-operation.git"
|
5
|
+
gem "yogo-datamapper", :git => "git://github.com/yogo/yogo-datamapper.git"
|
6
|
+
|
7
|
+
#
|
8
|
+
# Development and Test Dependencies
|
9
|
+
#
|
10
|
+
group :development, :test do
|
11
|
+
|
12
|
+
# Development gems
|
13
|
+
gem "rake"
|
14
|
+
gem "jeweler"
|
15
|
+
gem "yard"
|
16
|
+
gem "yardstick"
|
17
|
+
|
18
|
+
# Testing gems
|
19
|
+
gem "rspec"
|
20
|
+
gem "autotest"
|
21
|
+
gem "rack-test"
|
22
|
+
gem "cucumber"
|
23
|
+
|
24
|
+
# Platform specifics
|
25
|
+
platforms(:mri_19) do
|
26
|
+
gem "ruby-debug19", :require => "ruby-debug"
|
27
|
+
gem "rack-debug19", :require => "rack-debug"
|
28
|
+
end
|
29
|
+
|
30
|
+
platforms(:mri_18) do
|
31
|
+
gem "ruby-debug"
|
32
|
+
gem "rack-debug"
|
33
|
+
end
|
34
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,198 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/yogo/yogo-datamapper.git
|
3
|
+
revision: 11174aae88ee017b99cee489dcf469eccb0b1771
|
4
|
+
specs:
|
5
|
+
yogo-datamapper (0.2.0)
|
6
|
+
dm-aggregates (~> 1.0.2)
|
7
|
+
dm-core (~> 1.0.2)
|
8
|
+
dm-is-remixable
|
9
|
+
dm-migrations
|
10
|
+
dm-timestamps
|
11
|
+
dm-types (~> 1.0.2)
|
12
|
+
dm-validations
|
13
|
+
yogo-operation
|
14
|
+
yogo-support
|
15
|
+
|
16
|
+
GIT
|
17
|
+
remote: git://github.com/yogo/yogo-operation.git
|
18
|
+
revision: 8e96667a97964f7de1dedfba40b44a4fa9c3ccdc
|
19
|
+
specs:
|
20
|
+
yogo-operation (0.2.0)
|
21
|
+
dataflow
|
22
|
+
yogo-support (~> 0.1.0)
|
23
|
+
|
24
|
+
PATH
|
25
|
+
remote: .
|
26
|
+
specs:
|
27
|
+
yogo-project (0.3.2)
|
28
|
+
carrierwave
|
29
|
+
configatron
|
30
|
+
data_mapper
|
31
|
+
dm-is-remixable
|
32
|
+
dm-postgres-adapter
|
33
|
+
dm-sqlite-adapter
|
34
|
+
facets
|
35
|
+
|
36
|
+
GEM
|
37
|
+
remote: http://rubygems.org/
|
38
|
+
specs:
|
39
|
+
activesupport (3.0.1)
|
40
|
+
addressable (2.2.2)
|
41
|
+
archive-tar-minitar (0.5.2)
|
42
|
+
autotest (4.4.1)
|
43
|
+
builder (2.1.2)
|
44
|
+
carrierwave (0.5.0)
|
45
|
+
activesupport (~> 3.0.0)
|
46
|
+
columnize (0.3.1)
|
47
|
+
configatron (2.6.4)
|
48
|
+
yamler (>= 0.1.0)
|
49
|
+
cucumber (0.9.3)
|
50
|
+
builder (~> 2.1.2)
|
51
|
+
diff-lcs (~> 1.1.2)
|
52
|
+
gherkin (~> 2.2.9)
|
53
|
+
json (~> 1.4.6)
|
54
|
+
term-ansicolor (~> 1.0.5)
|
55
|
+
data_mapper (1.0.2)
|
56
|
+
dm-aggregates (= 1.0.2)
|
57
|
+
dm-constraints (= 1.0.2)
|
58
|
+
dm-core (= 1.0.2)
|
59
|
+
dm-migrations (= 1.0.2)
|
60
|
+
dm-serializer (= 1.0.2)
|
61
|
+
dm-timestamps (= 1.0.2)
|
62
|
+
dm-transactions (= 1.0.2)
|
63
|
+
dm-types (= 1.0.2)
|
64
|
+
dm-validations (= 1.0.2)
|
65
|
+
data_objects (0.10.2)
|
66
|
+
addressable (~> 2.1)
|
67
|
+
dataflow (0.3.1)
|
68
|
+
diff-lcs (1.1.2)
|
69
|
+
dm-aggregates (1.0.2)
|
70
|
+
dm-core (~> 1.0.2)
|
71
|
+
dm-constraints (1.0.2)
|
72
|
+
dm-core (~> 1.0.2)
|
73
|
+
dm-migrations (~> 1.0.2)
|
74
|
+
dm-core (1.0.2)
|
75
|
+
addressable (~> 2.2)
|
76
|
+
extlib (~> 0.9.15)
|
77
|
+
dm-do-adapter (1.0.2)
|
78
|
+
data_objects (~> 0.10.2)
|
79
|
+
dm-core (~> 1.0.2)
|
80
|
+
dm-is-remixable (1.0.2)
|
81
|
+
dm-core (~> 1.0.2)
|
82
|
+
dm-migrations (1.0.2)
|
83
|
+
dm-core (~> 1.0.2)
|
84
|
+
dm-postgres-adapter (1.0.2)
|
85
|
+
dm-do-adapter (~> 1.0.2)
|
86
|
+
do_postgres (~> 0.10.2)
|
87
|
+
dm-serializer (1.0.2)
|
88
|
+
dm-core (~> 1.0.2)
|
89
|
+
fastercsv (~> 1.5.3)
|
90
|
+
json_pure (~> 1.4)
|
91
|
+
dm-sqlite-adapter (1.0.2)
|
92
|
+
dm-do-adapter (~> 1.0.2)
|
93
|
+
do_sqlite3 (~> 0.10.2)
|
94
|
+
dm-timestamps (1.0.2)
|
95
|
+
dm-core (~> 1.0.2)
|
96
|
+
dm-transactions (1.0.2)
|
97
|
+
dm-core (~> 1.0.2)
|
98
|
+
dm-types (1.0.2)
|
99
|
+
dm-core (~> 1.0.2)
|
100
|
+
fastercsv (~> 1.5.3)
|
101
|
+
json_pure (~> 1.4)
|
102
|
+
stringex (~> 1.1.0)
|
103
|
+
uuidtools (~> 2.1.1)
|
104
|
+
dm-validations (1.0.2)
|
105
|
+
dm-core (~> 1.0.2)
|
106
|
+
do_postgres (0.10.2)
|
107
|
+
data_objects (= 0.10.2)
|
108
|
+
do_sqlite3 (0.10.2)
|
109
|
+
data_objects (= 0.10.2)
|
110
|
+
extlib (0.9.15)
|
111
|
+
facets (2.9.0)
|
112
|
+
fastercsv (1.5.3)
|
113
|
+
gemcutter (0.6.1)
|
114
|
+
gherkin (2.2.9)
|
115
|
+
json (~> 1.4.6)
|
116
|
+
term-ansicolor (~> 1.0.5)
|
117
|
+
git (1.2.5)
|
118
|
+
jeweler (1.4.0)
|
119
|
+
gemcutter (>= 0.1.0)
|
120
|
+
git (>= 1.2.5)
|
121
|
+
rubyforge (>= 2.0.0)
|
122
|
+
json (1.4.6)
|
123
|
+
json_pure (1.4.6)
|
124
|
+
linecache (0.43)
|
125
|
+
linecache19 (0.5.11)
|
126
|
+
ruby_core_source (>= 0.1.4)
|
127
|
+
rack (1.2.1)
|
128
|
+
rack-debug (1.4.2)
|
129
|
+
rack (>= 1.0)
|
130
|
+
ruby-debug (>= 0.10)
|
131
|
+
rack-debug19 (1.4.2)
|
132
|
+
rack (>= 1.0)
|
133
|
+
ruby-debug19 (>= 0.11.6)
|
134
|
+
rack-test (0.5.6)
|
135
|
+
rack (>= 1.0)
|
136
|
+
rake (0.8.7)
|
137
|
+
rspec (2.0.1)
|
138
|
+
rspec-core (~> 2.0.1)
|
139
|
+
rspec-expectations (~> 2.0.1)
|
140
|
+
rspec-mocks (~> 2.0.1)
|
141
|
+
rspec-core (2.0.1)
|
142
|
+
rspec-expectations (2.0.1)
|
143
|
+
diff-lcs (>= 1.1.2)
|
144
|
+
rspec-mocks (2.0.1)
|
145
|
+
rspec-core (~> 2.0.1)
|
146
|
+
rspec-expectations (~> 2.0.1)
|
147
|
+
ruby-debug (0.10.3)
|
148
|
+
columnize (>= 0.1)
|
149
|
+
ruby-debug-base (~> 0.10.3.0)
|
150
|
+
ruby-debug-base (0.10.3)
|
151
|
+
linecache (>= 0.3)
|
152
|
+
ruby-debug-base19 (0.11.24)
|
153
|
+
columnize (>= 0.3.1)
|
154
|
+
linecache19 (>= 0.5.11)
|
155
|
+
ruby_core_source (>= 0.1.4)
|
156
|
+
ruby-debug19 (0.11.6)
|
157
|
+
columnize (>= 0.3.1)
|
158
|
+
linecache19 (>= 0.5.11)
|
159
|
+
ruby-debug-base19 (>= 0.11.19)
|
160
|
+
ruby_core_source (0.1.4)
|
161
|
+
archive-tar-minitar (>= 0.5.2)
|
162
|
+
rubyforge (2.0.4)
|
163
|
+
json_pure (>= 1.1.7)
|
164
|
+
stringex (1.1.0)
|
165
|
+
term-ansicolor (1.0.5)
|
166
|
+
uuidtools (2.1.1)
|
167
|
+
yamler (0.1.0)
|
168
|
+
yard (0.6.1)
|
169
|
+
yardstick (0.1.0)
|
170
|
+
yard (~> 0.2)
|
171
|
+
yogo-support (0.1.1)
|
172
|
+
|
173
|
+
PLATFORMS
|
174
|
+
ruby
|
175
|
+
|
176
|
+
DEPENDENCIES
|
177
|
+
autotest
|
178
|
+
carrierwave
|
179
|
+
configatron
|
180
|
+
cucumber
|
181
|
+
data_mapper
|
182
|
+
dm-is-remixable
|
183
|
+
dm-postgres-adapter
|
184
|
+
dm-sqlite-adapter
|
185
|
+
facets
|
186
|
+
jeweler
|
187
|
+
rack-debug
|
188
|
+
rack-debug19
|
189
|
+
rack-test
|
190
|
+
rake
|
191
|
+
rspec
|
192
|
+
ruby-debug
|
193
|
+
ruby-debug19
|
194
|
+
yard
|
195
|
+
yardstick
|
196
|
+
yogo-datamapper!
|
197
|
+
yogo-operation!
|
198
|
+
yogo-project!
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Ryan
|
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.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= yogo_project
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
13
|
+
* Send me a pull request. Bonus points for topic branches.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2010 Ryan. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler'
|
3
|
+
Bundler.setup
|
4
|
+
rescue LoadError
|
5
|
+
puts "Bundler is not intalled. Install with: gem install bundler"
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'jeweler'
|
9
|
+
Jeweler::Tasks.new do |gem|
|
10
|
+
gem.name = %q{yogo-project}
|
11
|
+
gem.authors = ["Ryan Heimbuch"]
|
12
|
+
gem.description = %q{User configurable data layer for Yogo}
|
13
|
+
gem.email = %q{rheimbuch@gmail.com}
|
14
|
+
gem.homepage = %q{http://github.com/yogo/yogo_project}
|
15
|
+
gem.summary = %q{User configurable data layer for Yogo}
|
16
|
+
gem.add_dependency(%q<data_mapper> )
|
17
|
+
gem.add_dependency(%q<dm-is-remixable> )
|
18
|
+
gem.add_dependency(%q<dm-postgres-adapter>)
|
19
|
+
gem.add_dependency(%q<dm-sqlite-adapter> )
|
20
|
+
#gem.add_dependency(%q<yogo-operation> )
|
21
|
+
gem.add_dependency(%q<carrierwave> )
|
22
|
+
gem.add_dependency(%q<configatron> )
|
23
|
+
gem.add_dependency(%q<facets> )
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
require 'rspec/core/rake_task'
|
28
|
+
RSpec::Core::RakeTask.new(:spec)
|
29
|
+
|
30
|
+
desc 'Run all examples using rcov'
|
31
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
32
|
+
spec.rcov = true
|
33
|
+
spec.rcov_opts = %[-Ilib -Ispec --exclude "mocks,expectations,gems/*,spec/resources,spec/lib,spec/spec_helper.rb,db/*,/Library/Ruby/*,config/*"]
|
34
|
+
spec.rcov_opts << %[--no-html --aggregate coverage.data]
|
35
|
+
end
|
36
|
+
rescue LoadError
|
37
|
+
puts "RSpec not installed. Install with: bundle install"
|
38
|
+
end
|
39
|
+
|
40
|
+
begin
|
41
|
+
require 'cucumber/rake/task'
|
42
|
+
Cucumber::Rake::Task.new(:features)
|
43
|
+
rescue LoadError
|
44
|
+
task :features do
|
45
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
begin
|
50
|
+
require 'yard'
|
51
|
+
YARD::Rake::YardocTask.new
|
52
|
+
rescue LoadError
|
53
|
+
task :yardoc do
|
54
|
+
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
55
|
+
end
|
56
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.3.2
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
data/lib/yogo-project.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'yogo/collection/base'
|
2
|
+
require 'yogo/collection/data'
|
3
|
+
require 'yogo/collection/asset'
|
4
|
+
require 'yogo/collection/static'
|
5
|
+
|
6
|
+
module Yogo
|
7
|
+
module Collection
|
8
|
+
def self.context
|
9
|
+
Thread.current[:yogo_collection_contexts] ||= []
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'yogo/collection/data'
|
2
|
+
require 'carrierwave'
|
3
|
+
require 'carrierwave/orm/datamapper'
|
4
|
+
|
5
|
+
module Yogo
|
6
|
+
module Collection
|
7
|
+
class Asset < Data
|
8
|
+
require 'yogo/collection/asset/model_configuration'
|
9
|
+
include Asset::ModelConfiguration
|
10
|
+
end # Asset
|
11
|
+
end # Collection
|
12
|
+
end # Yogo
|