web-app-theme 0.3.0
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/.gitignore +2 -0
- data/LICENSE +21 -0
- data/README.md +22 -0
- data/Rakefile +25 -0
- data/VERSION +1 -0
- data/features/step_definitions/layout_steps.rb +55 -0
- data/features/step_definitions/themed_steps.rb +19 -0
- data/features/support/env.rb +82 -0
- data/features/theme_generator.feature +51 -0
- data/features/themed_generator.feature +52 -0
- data/images/avatar.png +0 -0
- data/index.html +474 -0
- data/javascripts/jquery-1.3.min.js +19 -0
- data/javascripts/jquery.localscroll.js +104 -0
- data/javascripts/jquery.scrollTo.js +150 -0
- data/lib/web_app_theme.rb +2 -0
- data/rails_generators/theme/USAGE +4 -0
- data/rails_generators/theme/templates/view_layout_administration.html.erb +48 -0
- data/rails_generators/theme/templates/view_layout_sign.html.erb +15 -0
- data/rails_generators/theme/templates/web_app_theme_override.css +1 -0
- data/rails_generators/theme/theme_generator.rb +39 -0
- data/rails_generators/themed/USAGE +4 -0
- data/rails_generators/themed/templates/view_edit.html.erb +20 -0
- data/rails_generators/themed/templates/view_form.html.erb +10 -0
- data/rails_generators/themed/templates/view_new.html.erb +19 -0
- data/rails_generators/themed/templates/view_show.html.erb +23 -0
- data/rails_generators/themed/templates/view_sidebar.html.erb +13 -0
- data/rails_generators/themed/templates/view_signin.html.erb +39 -0
- data/rails_generators/themed/templates/view_signup.html.erb +56 -0
- data/rails_generators/themed/templates/view_tables.html.erb +54 -0
- data/rails_generators/themed/templates/view_text.html.erb +18 -0
- data/rails_generators/themed/themed_generator.rb +95 -0
- data/stylesheets/base.css +336 -0
- data/stylesheets/themes/bec-green/style.css +290 -0
- data/stylesheets/themes/bec/style.css +301 -0
- data/stylesheets/themes/blue/style.css +280 -0
- data/stylesheets/themes/default/style.css +267 -0
- data/stylesheets/themes/djime-cerulean/style.css +298 -0
- data/stylesheets/themes/drastic-dark/style.css +373 -0
- data/stylesheets/themes/kathleene/style.css +272 -0
- data/stylesheets/themes/orange/style.css +263 -0
- data/stylesheets/themes/reidb-greenish/style.css +301 -0
- data/stylesheets/themes/warehouse/style.css +391 -0
- data/test/spec_helper.rb +5 -0
- data/test/themed_generator_spec.rb +115 -0
- metadata +101 -0
data/test/spec_helper.rb
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/spec_helper"
|
2
|
+
|
3
|
+
describe ThemedGenerator, "with 'script/generate themed posts'" do
|
4
|
+
before do
|
5
|
+
Post = Class.new
|
6
|
+
Post.stub!(:columns).and_return([])
|
7
|
+
options = {:destination => File.dirname(__FILE__), :quiet => true, :source => File.dirname(__FILE__)}
|
8
|
+
@generator = ThemedGenerator.new(["posts", "post"], options)
|
9
|
+
@generator.manifest
|
10
|
+
end
|
11
|
+
|
12
|
+
after do
|
13
|
+
Object::send(:remove_const, :Post)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should set the right controller_routing_path" do
|
17
|
+
@generator.instance_variable_get("@controller_routing_path").should == "posts"
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should set the right singular_controller_routing_path" do
|
21
|
+
@generator.instance_variable_get("@singular_controller_routing_path").should == "post"
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should set the right model_name" do
|
25
|
+
@generator.instance_variable_get("@model_name").should == "Post"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should set the right plural_model_name" do
|
29
|
+
@generator.instance_variable_get("@plural_model_name").should == "Posts"
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should set the right resource_name" do
|
33
|
+
@generator.instance_variable_get("@resource_name").should == "post"
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should set the right plural_resource_name" do
|
37
|
+
@generator.instance_variable_get("@plural_resource_name").should == "posts"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe ThemedGenerator, "with 'script/generate themed admin/gallery_items'" do
|
42
|
+
before do
|
43
|
+
GalleryItem = Class.new
|
44
|
+
GalleryItem.stub!(:columns).and_return([])
|
45
|
+
options = {:destination => File.dirname(__FILE__), :quiet => true, :source => File.dirname(__FILE__)}
|
46
|
+
@generator = ThemedGenerator.new(["admin/gallery_items"], options)
|
47
|
+
@generator.manifest
|
48
|
+
end
|
49
|
+
|
50
|
+
after do
|
51
|
+
Object::send(:remove_const, :GalleryItem)
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should set the right controller_routing_path" do
|
55
|
+
@generator.instance_variable_get("@controller_routing_path").should == "admin_gallery_items"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should set the right singular_controller_routing_path" do
|
59
|
+
@generator.instance_variable_get("@singular_controller_routing_path").should == "admin_gallery_item"
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should set the right model_name" do
|
63
|
+
@generator.instance_variable_get("@model_name").should == "GalleryItem"
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should set the right plural_model_name" do
|
67
|
+
@generator.instance_variable_get("@plural_model_name").should == "GalleryItems"
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should set the right resource_name" do
|
71
|
+
@generator.instance_variable_get("@resource_name").should == "gallery_item"
|
72
|
+
end
|
73
|
+
|
74
|
+
it "should set the right plural_resource_name" do
|
75
|
+
@generator.instance_variable_get("@plural_resource_name").should == "gallery_items"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe ThemedGenerator, "with 'script/generate themed admin/gallery_items pictures'" do
|
80
|
+
before do
|
81
|
+
Picture = Class.new
|
82
|
+
Picture.stub!(:columns).and_return([])
|
83
|
+
options = {:destination => File.dirname(__FILE__), :quiet => true, :source => File.dirname(__FILE__)}
|
84
|
+
@generator = ThemedGenerator.new(["admin/gallery_items", "picture"], options)
|
85
|
+
@generator.manifest
|
86
|
+
end
|
87
|
+
|
88
|
+
after do
|
89
|
+
Object::send(:remove_const, :Picture)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should set the right controller_routing_path" do
|
93
|
+
@generator.instance_variable_get("@controller_routing_path").should == "admin_gallery_items"
|
94
|
+
end
|
95
|
+
|
96
|
+
it "should set the right singular_controller_routing_path" do
|
97
|
+
@generator.instance_variable_get("@singular_controller_routing_path").should == "admin_gallery_item"
|
98
|
+
end
|
99
|
+
|
100
|
+
it "should set the right model_name" do
|
101
|
+
@generator.instance_variable_get("@model_name").should == "Picture"
|
102
|
+
end
|
103
|
+
|
104
|
+
it "should set the right plural_model_name" do
|
105
|
+
@generator.instance_variable_get("@plural_model_name").should == "Pictures"
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should set the right resource_name" do
|
109
|
+
@generator.instance_variable_get("@resource_name").should == "picture"
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should set the right plural_resource_name" do
|
113
|
+
@generator.instance_variable_get("@plural_resource_name").should == "pictures"
|
114
|
+
end
|
115
|
+
end
|
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: web-app-theme
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrea Franz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-17 00:00:00 +02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Web app theme generator for rails projects
|
17
|
+
email: andrea@gravityblast.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.md
|
25
|
+
files:
|
26
|
+
- .gitignore
|
27
|
+
- LICENSE
|
28
|
+
- README.md
|
29
|
+
- Rakefile
|
30
|
+
- VERSION
|
31
|
+
- features/step_definitions/layout_steps.rb
|
32
|
+
- features/step_definitions/themed_steps.rb
|
33
|
+
- features/support/env.rb
|
34
|
+
- features/theme_generator.feature
|
35
|
+
- features/themed_generator.feature
|
36
|
+
- images/avatar.png
|
37
|
+
- index.html
|
38
|
+
- javascripts/jquery-1.3.min.js
|
39
|
+
- javascripts/jquery.localscroll.js
|
40
|
+
- javascripts/jquery.scrollTo.js
|
41
|
+
- lib/web_app_theme.rb
|
42
|
+
- rails_generators/theme/USAGE
|
43
|
+
- rails_generators/theme/templates/view_layout_administration.html.erb
|
44
|
+
- rails_generators/theme/templates/view_layout_sign.html.erb
|
45
|
+
- rails_generators/theme/templates/web_app_theme_override.css
|
46
|
+
- rails_generators/theme/theme_generator.rb
|
47
|
+
- rails_generators/themed/USAGE
|
48
|
+
- rails_generators/themed/templates/view_edit.html.erb
|
49
|
+
- rails_generators/themed/templates/view_form.html.erb
|
50
|
+
- rails_generators/themed/templates/view_new.html.erb
|
51
|
+
- rails_generators/themed/templates/view_show.html.erb
|
52
|
+
- rails_generators/themed/templates/view_sidebar.html.erb
|
53
|
+
- rails_generators/themed/templates/view_signin.html.erb
|
54
|
+
- rails_generators/themed/templates/view_signup.html.erb
|
55
|
+
- rails_generators/themed/templates/view_tables.html.erb
|
56
|
+
- rails_generators/themed/templates/view_text.html.erb
|
57
|
+
- rails_generators/themed/themed_generator.rb
|
58
|
+
- stylesheets/base.css
|
59
|
+
- stylesheets/themes/bec-green/style.css
|
60
|
+
- stylesheets/themes/bec/style.css
|
61
|
+
- stylesheets/themes/blue/style.css
|
62
|
+
- stylesheets/themes/default/style.css
|
63
|
+
- stylesheets/themes/djime-cerulean/style.css
|
64
|
+
- stylesheets/themes/drastic-dark/style.css
|
65
|
+
- stylesheets/themes/kathleene/style.css
|
66
|
+
- stylesheets/themes/orange/style.css
|
67
|
+
- stylesheets/themes/reidb-greenish/style.css
|
68
|
+
- stylesheets/themes/warehouse/style.css
|
69
|
+
- test/spec_helper.rb
|
70
|
+
- test/themed_generator_spec.rb
|
71
|
+
has_rdoc: true
|
72
|
+
homepage: http://github.com/pilu/web-app-theme
|
73
|
+
licenses: []
|
74
|
+
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options:
|
77
|
+
- --charset=UTF-8
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
version:
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: "0"
|
91
|
+
version:
|
92
|
+
requirements: []
|
93
|
+
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 1.3.5
|
96
|
+
signing_key:
|
97
|
+
specification_version: 3
|
98
|
+
summary: Web app theme generator
|
99
|
+
test_files:
|
100
|
+
- test/spec_helper.rb
|
101
|
+
- test/themed_generator_spec.rb
|