mariusz-dm-is-configurable 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown ADDED
@@ -0,0 +1,41 @@
1
+ # INTRODUCTION
2
+
3
+ utype project aims to be the best blogging platform ever (or I should say a CMS system with blogging capabilities for a good start...).
4
+ we've just started, so don't expect a production ready application, current sources are experimental :)
5
+
6
+ if you're interested in helping us out, just let us know.
7
+
8
+ contact information:
9
+
10
+ - [Mariusz Ciesla (Design / UI)](http://github.com/mariusz)
11
+ - [Jakub Oboza (Ruby)](http://github.com/JakubOboza)
12
+ - [Piotr Solnica (Ruby / UI / JavaScript)](http://github.com/solnic)
13
+
14
+
15
+ # UTYPE
16
+
17
+ ## Required gems:
18
+
19
+ 1. merb-core
20
+ 2. merb-parts
21
+ 3. merb-assets
22
+ 4. merb_helpers
23
+ 5. dm-core
24
+ 6. dm-validations
25
+ 7. dm-timestamps
26
+ 8. dm-is-list
27
+ 9. dm-is-tree
28
+
29
+ ## Running specs:
30
+
31
+ 1. create your test database (doooh :)
32
+ 2. run: `rake dm:db:automigrate MERB_ENV=test`
33
+ 3. run: `rake spec`
34
+
35
+
36
+ ## Installation:
37
+
38
+ 1. Create `config/database.yml` and setup your databases
39
+ 2. Install utype by running: `rake utype:install`
40
+ 3. Run the specs: `rake spec`
41
+ 4. To run the server just type `merb` in the app root
data/Rakefile ADDED
@@ -0,0 +1,64 @@
1
+ require 'rake'
2
+ require 'rake/rdoctask'
3
+ require 'rake/testtask'
4
+ require 'spec/rake/spectask'
5
+ require 'fileutils'
6
+ require 'merb-core'
7
+ require 'rubigen'
8
+ require 'merb-core/tasks/merb'
9
+ require 'merb-core/test/tasks/spectasks'
10
+ include FileUtils
11
+
12
+ #begin
13
+ # require 'vlad'
14
+ # Vlad.load :scm => "git"
15
+ #rescue LoadError
16
+ # # do nothing
17
+ #end
18
+
19
+ # Load the basic runtime dependencies; this will include
20
+ # any plugins and therefore plugin rake tasks.
21
+ init_env = ENV['MERB_ENV'] || 'rake'
22
+ Merb.load_dependencies(:environment => init_env)
23
+
24
+ # Get Merb plugins and dependencies
25
+ Merb::Plugins.rakefiles.each { |r| require r }
26
+
27
+ # Load any app level custom rakefile extensions from lib/tasks
28
+ tasks_path = File.join(File.dirname(__FILE__), "lib", "tasks")
29
+ rake_files = Dir["#{tasks_path}/*.rb"]
30
+ rake_files.each{|rake_file| load rake_file }
31
+
32
+
33
+ desc "start runner environment"
34
+ task :merb_env do
35
+ Merb.start_environment(:environment => init_env, :adapter => 'runner')
36
+ end
37
+
38
+ ##############################################################################
39
+ # ADD YOUR CUSTOM TASKS IN /lib/tasks
40
+ # NAME YOUR RAKE FILES file_name.rake
41
+ ##############################################################################
42
+
43
+ namespace :utype do
44
+
45
+ desc 'install utype'
46
+ task :install => :merb_env do
47
+ puts 'Installing utype...'
48
+ Utype::App.install
49
+ end
50
+
51
+ namespace :components do
52
+ desc 'install a component'
53
+ task :install => :merb_env do
54
+ name = ENV['NAME']
55
+ if name.blank?
56
+ puts 'Please run with a component name, like: rake utype:components:install NAME=your_component'
57
+ return
58
+ end
59
+ puts %( Installing component "#{name}"... )
60
+ ComponentInstallation.install(name)
61
+ end
62
+ end
63
+
64
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,146 @@
1
+ require 'rubygems'
2
+
3
+ # Add the local gems dir if found within the app root; any dependencies loaded
4
+ # hereafter will try to load from the local gems before loading system gems.
5
+ if (local_gem_dir = File.join(File.dirname(__FILE__), '..', 'gems')) && $BUNDLE.nil?
6
+ $BUNDLE = true; Gem.clear_paths; Gem.path.unshift(local_gem_dir)
7
+ end
8
+
9
+ require 'merb-core'
10
+ require 'spec' # Satisfies Autotest and anyone else not using the Rake tasks
11
+
12
+ Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test')
13
+
14
+ Spec::Runner.configure do |config|
15
+ config.include(Merb::Test::ViewHelper)
16
+ config.include(Merb::Test::RouteHelper)
17
+ config.include(Merb::Test::ControllerHelper)
18
+ end
19
+
20
+ DataMapper.auto_migrate!
21
+ Role.install_base_roles
22
+ PageType.install_core_page_types
23
+
24
+ @@users = {
25
+ :admin => User.create(
26
+ :login => 'admin',
27
+ :password => 'admin123',
28
+ :password_confirmation => 'admin123',
29
+ :email => 'admin@utype.com',
30
+ :role_id => Role.roles[:admin],
31
+ :admin_theme => 'test'
32
+ ),
33
+ :author => User.create(
34
+ :login => 'jane',
35
+ :password => 'abcd123',
36
+ :password_confirmation => 'abcd123',
37
+ :email => 'jane.doe@utype.com',
38
+ :role_id => Role.roles[:author]
39
+ ),
40
+ :editor => User.create(
41
+ :login => 'john',
42
+ :password => 'abcd123',
43
+ :password_confirmation => 'abcd123',
44
+ :email => 'john.doe@utype.com',
45
+ :role_id => Role.roles[:editor]
46
+ ),
47
+ :subscriber => User.create(
48
+ :login => 'jan',
49
+ :password => 'abcd123',
50
+ :password_confirmation => 'abcd123',
51
+ :email => 'jan.kowalski@utype.com',
52
+ :role_id => Role.roles[:subscriber]
53
+ )
54
+ }
55
+
56
+ Admin::Site.current = Admin::Site.new(@@users[:admin])
57
+ Admin::Site.install_core_pages
58
+ Admin::Site.install_core_components
59
+
60
+ Site.create(
61
+ :name => 'UType',
62
+ :url => 'www.utype.org',
63
+ :theme_name => 'test',
64
+ :user_id => 1,
65
+ :is_default => true
66
+ )
67
+ Site.create(
68
+ :name => 'Home',
69
+ :url => 'www.home.org',
70
+ :user_id => 1
71
+ )
72
+
73
+ Category.create(
74
+ :site_id => 1,
75
+ :name => 'News',
76
+ :is_default => true
77
+ )
78
+ Category.create(
79
+ :site_id => 1,
80
+ :name => 'Documentation'
81
+ )
82
+
83
+ class HeadlinesView < Component; end
84
+ ComponentInstallation.create(
85
+ :name => 'Headlines',
86
+ :component_class => 'HeadlinesView',
87
+ :template_token => 'headlines'
88
+ )
89
+ class Blog < Component; end
90
+ ComponentInstallation.create(
91
+ :name => 'Blog',
92
+ :component_class => 'Blog',
93
+ :template_token => 'blog'
94
+ )
95
+
96
+ class Funky < Component; end
97
+ ComponentInstallation.create(
98
+ :name => 'Funky Stuf',
99
+ :component_class => 'Funky',
100
+ :template_token => 'funky'
101
+ )
102
+
103
+ PageType.create(
104
+ :component_installation_id => ComponentInstallation.first(:component_class => 'HeadlinesView').id,
105
+ :name => 'Headlines',
106
+ :description => 'Displays a list of headlines of your latest articles'
107
+ )
108
+ PageType.create(
109
+ :component_installation_id => ComponentInstallation.first(:component_class => 'Funky').id,
110
+ :name => 'Funky',
111
+ :description => 'Displays a list of funky things'
112
+ )
113
+ Page.create(
114
+ :name => 'A Page',
115
+ :site_id => 1,
116
+ :is_default => true,
117
+ :template => 'a_section'
118
+ )
119
+ Page.create(
120
+ :name => 'Fresh stuff',
121
+ :site_id => 1,
122
+ :page_type_id => PageType.first(:name => 'Headlines').id
123
+ )
124
+ Page.create(
125
+ :name => 'About Me',
126
+ :site_id => 1,
127
+ :template => 'about_me',
128
+ :template_layout => 'about_me'
129
+ )
130
+ Page.create(
131
+ :name => 'My Posts',
132
+ :site_id => 1,
133
+ :template => 'my_articles'
134
+ )
135
+ Admin::PageAction.create(
136
+ :title => 'Users Stats',
137
+ :permalink => 'admin/users/stats',
138
+ :page_id => 0
139
+ )
140
+ Content.create(
141
+ :title => 'A title',
142
+ :body => 'A body',
143
+ :user_id => 2,
144
+ :site_id => 1,
145
+ :page_id => 1
146
+ )
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mariusz-dm-is-configurable
3
+ version: !ruby/object:Gem::Version
4
+ version: "0.1"
5
+ platform: ruby
6
+ authors:
7
+ - Piotr Solnica
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-10-31 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: dm-core
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.6
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: hoe
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.8.2
32
+ version:
33
+ description: DataMapper plugin which allows to add configuration to your models
34
+ email:
35
+ - piotr [a] zenbe [d] com
36
+ executables: []
37
+
38
+ extensions: []
39
+
40
+ extra_rdoc_files:
41
+ - README.markdown
42
+ - LICENSE
43
+ - TODO
44
+ files:
45
+ - History.txt
46
+ - LICENSE
47
+ - Manifest.txt
48
+ - README.txt
49
+ - Rakefile
50
+ - TODO
51
+ - lib/dm-is-configurable.rb
52
+ - lib/dm-is-configurable/is/configurable.rb
53
+ - lib/dm-is-configurable/is/version.rb
54
+ - lib/dm-is-configurable/types/option.rb
55
+ - lib/dm-is-configurable/configuration.rb
56
+ - lib/dm-is-configurable/configuration_option.rb
57
+ - spec/integration/configurable_spec.rb
58
+ - spec/unit/configuration_option_spec.rb
59
+ - spec/unit/configuration_spec.rb
60
+ - spec/spec.opts
61
+ - spec/spec_helper.rb
62
+ - README.markdown
63
+ has_rdoc: true
64
+ homepage: http://github.com/solnic/dm-is-configurable/tree/master
65
+ post_install_message:
66
+ rdoc_options:
67
+ - --main
68
+ - README.txt
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: "0"
76
+ version:
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: "0"
82
+ version:
83
+ requirements: []
84
+
85
+ rubyforge_project: dm-is-configurable
86
+ rubygems_version: 1.2.0
87
+ signing_key:
88
+ specification_version: 2
89
+ summary: DataMapper plugin which allows to add configuration to your models
90
+ test_files: []
91
+