rad_themes 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'rake_ext'
2
+
3
+ project(
4
+ name: "themes",
5
+ official_name: "rad_themes",
6
+ summary: "Themes for Rad Face (rad_face)",
7
+ gem: true,
8
+
9
+ author: "Alexey Petrushin",
10
+ homepage: "http://github.com/alexeypetrushin/rad_themes"
11
+ )
@@ -0,0 +1,15 @@
1
+ rad.register :themes, depends_on: :common_interface do
2
+ require 'themes/gems'
3
+ require 'themes/require'
4
+
5
+ rad.face.available_themes.push 'simple_organization'
6
+ (rad.face.availiable_layouts[:simple_organization] ||= []).push :default, :home
7
+
8
+ rad.configure :web, "#{__FILE__}/../../.." do |c|
9
+ c.template_paths 'app/views'
10
+ c.asset_paths 'app/static'
11
+ c.routes
12
+ end
13
+
14
+ true
15
+ end
@@ -0,0 +1,8 @@
1
+ class Rad::Face::Demo::Objects < Rad::Face::Demo::Base
2
+ def items; end
3
+ def folder; end
4
+ def list; end
5
+ def page; end
6
+ def selector; end
7
+ def user; end
8
+ end
@@ -0,0 +1,4 @@
1
+ class Rad::Face::Demo::Stores < Rad::Face::Demo::Base
2
+ def product; end
3
+ def products; end
4
+ end
@@ -0,0 +1,3 @@
1
+ if respond_to? :fake_gem
2
+ fake_gem 'rad_common_interface'
3
+ end
@@ -0,0 +1,4 @@
1
+ module Rad::Face::Demo
2
+ autoload :Objects, 'themes/demo/objects'
3
+ autoload :Stores, 'themes/demo/stores'
4
+ end
data/readme.md ADDED
@@ -0,0 +1 @@
1
+ Themes for Rad Face (rad_face)
@@ -0,0 +1,7 @@
1
+ require "spec_helper"
2
+
3
+ describe "Commons" do
4
+ before{@theme = 'simple_organization'}
5
+
6
+ it_should_behave_like "commons demo"
7
+ end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ %w(default simple_organization).each do |theme|
4
+ describe "Objects (#{theme})" do
5
+ set_controller Rad::Face::Demo::Objects
6
+
7
+ [:items, :folder, :list, :page, :selector, :user].each do |action|
8
+ it action do
9
+ wcall action, theme: theme
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ require "spec_helper"
2
+
3
+ describe "Sites" do
4
+ before do
5
+ @theme = 'simple_organization'
6
+ @layouts = {
7
+ home: :home,
8
+ style: :default,
9
+ blog: :default,
10
+ post: :default
11
+ }
12
+ end
13
+
14
+ it_should_behave_like "site demo"
15
+ end
@@ -0,0 +1,6 @@
1
+ require 'common_interface/spec'
2
+
3
+ rad.bag
4
+ rad.users
5
+ rad.store
6
+ rad.themes
@@ -0,0 +1,22 @@
1
+ require "spec_helper"
2
+
3
+ {
4
+ default: {
5
+ product: :default,
6
+ products: :default
7
+ },
8
+ simple_organization: {
9
+ product: :default,
10
+ products: :home
11
+ }
12
+ }.each do |theme, meta|
13
+ describe "Stores (#{theme})" do
14
+ set_controller Rad::Face::Demo::Stores
15
+
16
+ meta.each do |action, layout_template|
17
+ it action do
18
+ wcall action, theme: theme, layout_template: layout_template
19
+ end
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rad_themes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alexey Petrushin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-09-22 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rad_common_interface
16
+ requirement: &2774270 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2774270
25
+ description:
26
+ email:
27
+ executables: []
28
+ extensions: []
29
+ extra_rdoc_files: []
30
+ files:
31
+ - Rakefile
32
+ - readme.md
33
+ - lib/components/themes.rb
34
+ - lib/themes/demo/objects.rb
35
+ - lib/themes/demo/stores.rb
36
+ - lib/themes/gems.rb
37
+ - lib/themes/require.rb
38
+ - spec/commons_spec.rb
39
+ - spec/objects_spec.rb
40
+ - spec/sites_spec.rb
41
+ - spec/spec_helper.rb
42
+ - spec/stores_spec.rb
43
+ homepage: http://github.com/alexeypetrushin/rad_themes
44
+ licenses: []
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 1.8.6
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: Themes for Rad Face (rad_face)
67
+ test_files: []