web-app-theme 0.7.0 → 0.8.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.
Files changed (127) hide show
  1. data/{LICENSE → MIT-LICENSE} +0 -0
  2. data/README.md +17 -1
  3. data/Rakefile +21 -23
  4. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/arrow.png +0 -0
  5. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/boxbar-background.png +0 -0
  6. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/button-background-active.png +0 -0
  7. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/button-background.png +0 -0
  8. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/menubar-background.png +0 -0
  9. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/arrow.png +0 -0
  10. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/bgd.jpg +0 -0
  11. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/boxbar-background.png +0 -0
  12. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/button-background-active.png +0 -0
  13. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/button-background.png +0 -0
  14. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/error.png +0 -0
  15. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/notice.png +0 -0
  16. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/warning.png +0 -0
  17. data/{stylesheets → app/assets/stylesheets/web-app-theme}/base.css +0 -0
  18. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/activo/style.css +0 -0
  19. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/amro/style.css +0 -0
  20. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/bec-green/style.css +0 -0
  21. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/bec/style.css +0 -0
  22. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/blue/style.css +0 -0
  23. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.eot +0 -0
  24. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.svg +0 -0
  25. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.ttf +0 -0
  26. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.woff +0 -0
  27. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.eot +0 -0
  28. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.svg +0 -0
  29. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.ttf +0 -0
  30. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.woff +0 -0
  31. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.eot +0 -0
  32. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.svg +0 -0
  33. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.ttf +0 -0
  34. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.woff +0 -0
  35. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/style.css +0 -0
  36. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/djime-cerulean/style.css +0 -0
  37. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/drastic-dark/style.css +0 -0
  38. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/kathleene/style.css +0 -0
  39. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/olive/style.css +0 -0
  40. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/orange/style.css +0 -0
  41. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/red/style.css +0 -0
  42. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/reidb-greenish/style.css +0 -0
  43. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/warehouse/style.css +0 -0
  44. data/features/assets_generator.feature +18 -0
  45. data/features/step_definitions/assets_step.rb +11 -0
  46. data/features/step_definitions/common_steps.rb +82 -0
  47. data/features/step_definitions/theme_steps.rb +35 -0
  48. data/features/step_definitions/themed_steps.rb +12 -14
  49. data/features/support/env.rb +7 -80
  50. data/features/theme_generator.feature +15 -18
  51. data/features/themed_generator.feature +10 -10
  52. data/lib/generators/web_app_theme/assets/assets_generator.rb +17 -0
  53. data/lib/generators/web_app_theme/theme/templates/layout_admin.html.erb +1 -1
  54. data/lib/generators/web_app_theme/theme/templates/layout_sign.html.erb +1 -1
  55. data/lib/generators/web_app_theme/theme/templates/web_app_theme.css.erb +9 -0
  56. data/lib/generators/web_app_theme/theme/theme_generator.rb +3 -19
  57. data/lib/web-app-theme.rb +5 -0
  58. data/lib/web-app-theme/version.rb +3 -0
  59. data/spec/dummy/Rakefile +7 -0
  60. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  61. data/spec/dummy/app/assets/javascripts/testing.js +2 -0
  62. data/spec/dummy/app/assets/stylesheets/web_app_theme.css +7 -0
  63. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  64. data/spec/dummy/app/controllers/testing_controller.rb +5 -0
  65. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  66. data/spec/dummy/app/helpers/testing_helper.rb +2 -0
  67. data/spec/dummy/app/models/post.rb +2 -0
  68. data/spec/dummy/app/views/articles/_form.html.erb +8 -0
  69. data/spec/dummy/app/views/articles/_sidebar.html.erb +13 -0
  70. data/spec/dummy/app/views/articles/edit.html.erb +19 -0
  71. data/spec/dummy/app/views/articles/index.html.erb +42 -0
  72. data/spec/dummy/app/views/articles/new.html.erb +18 -0
  73. data/spec/dummy/app/views/articles/show.html.erb +19 -0
  74. data/spec/dummy/app/views/layouts/application.html.erb +46 -0
  75. data/spec/dummy/app/views/posts/_form.html.erb +8 -0
  76. data/spec/dummy/app/views/posts/_sidebar.html.erb +13 -0
  77. data/spec/dummy/app/views/posts/edit.html.erb +19 -0
  78. data/spec/dummy/app/views/posts/index.html.erb +42 -0
  79. data/spec/dummy/app/views/posts/new.html.erb +18 -0
  80. data/spec/dummy/app/views/posts/show.html.erb +19 -0
  81. data/spec/dummy/app/views/testing/index.html.erb +2 -0
  82. data/spec/dummy/config.ru +4 -0
  83. data/spec/dummy/config/application.rb +42 -0
  84. data/spec/dummy/config/boot.rb +10 -0
  85. data/spec/dummy/config/database.yml +25 -0
  86. data/spec/dummy/config/environment.rb +5 -0
  87. data/spec/dummy/config/environments/development.rb +27 -0
  88. data/spec/dummy/config/environments/production.rb +51 -0
  89. data/spec/dummy/config/environments/test.rb +39 -0
  90. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/spec/dummy/config/initializers/inflections.rb +10 -0
  92. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  93. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  94. data/spec/dummy/config/initializers/session_store.rb +8 -0
  95. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  96. data/spec/dummy/config/locales/en.yml +5 -0
  97. data/spec/dummy/config/routes.rb +58 -0
  98. data/spec/dummy/db/development.sqlite3 +0 -0
  99. data/spec/dummy/db/migrate/20110827160301_create_posts.rb +8 -0
  100. data/spec/dummy/db/schema.rb +21 -0
  101. data/spec/dummy/db/test.sqlite3 +0 -0
  102. data/spec/dummy/public/404.html +26 -0
  103. data/spec/dummy/public/422.html +26 -0
  104. data/spec/dummy/public/500.html +26 -0
  105. data/spec/dummy/public/favicon.ico +0 -0
  106. data/{images → spec/dummy/public/images}/avatar.png +0 -0
  107. data/{images → spec/dummy/public/images}/icons/application_edit.png +0 -0
  108. data/{images → spec/dummy/public/images}/icons/cross.png +0 -0
  109. data/{images → spec/dummy/public/images}/icons/key.png +0 -0
  110. data/{images → spec/dummy/public/images}/icons/tick.png +0 -0
  111. data/{index.html → spec/dummy/public/index.html} +3 -3
  112. data/{javascripts → spec/dummy/public/javascripts}/jquery-1.3.min.js +0 -0
  113. data/{javascripts → spec/dummy/public/javascripts}/jquery.localscroll.js +0 -0
  114. data/{javascripts → spec/dummy/public/javascripts}/jquery.scrollTo.js +0 -0
  115. data/spec/dummy/script/rails +6 -0
  116. data/spec/dummy/spec/models/post_spec.rb +5 -0
  117. data/spec/dummy/test/functional/testing_controller_test.rb +9 -0
  118. data/spec/dummy/test/unit/helpers/testing_helper_test.rb +4 -0
  119. data/spec/spec_helper.rb +30 -0
  120. metadata +226 -71
  121. data/VERSION +0 -1
  122. data/features/step_definitions/layout_steps.rb +0 -59
  123. data/lib/web_app_theme.rb +0 -2
  124. data/stylesheets/override.css +0 -1
  125. data/test/spec_helper.rb +0 -5
  126. data/test/themed_generator_spec.rb +0 -115
  127. data/web-app-theme.gemspec +0 -117
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.7.0
@@ -1,59 +0,0 @@
1
- Given /^I have a new rails app$/ do
2
- generate_rails_app
3
- end
4
-
5
- Given /^I have no layouts$/ do
6
- remove_layouts
7
- end
8
-
9
- Given /^I have no stylesheets$/ do
10
- remove_stylesheets
11
- end
12
-
13
- Given /^I generate a theme$/ do
14
- generate_layout
15
- end
16
-
17
- Given /^I generate a theme with name "([^\"]*)"$/ do |name|
18
- generate_layout(name)
19
- end
20
-
21
- Given /^I generate a theme choosing the "([^\"]*)" theme$/ do |theme_name|
22
- generate_layout(:theme => theme_name)
23
- end
24
-
25
- Then /^I should have a layout named "([^\"]*)"$/ do |filename|
26
- layout_exists?(filename).should be_true
27
- end
28
-
29
- Then /^I should have a stylesheet named "([^\"]*)"$/ do |filename|
30
- stylesheet_exists?(filename).should be_true
31
- end
32
-
33
- Then /^I should have an image named "([^\"]*)"$/ do |filename|
34
- image_exists?(filename).should be_true
35
- end
36
-
37
- Given /^I generate a theme without layout choosing the "([^\"]*)" theme$/ do |theme_name|
38
- generate_layout(:theme => theme_name, :no_layout => true )
39
- end
40
-
41
- Then /^I should not have any layouts$/ do
42
- layouts_count.should == 0
43
- end
44
-
45
- Given /^I generate a theme with application name "([^\"]*)"$/ do |name|
46
- generate_layout(:app_name => name )
47
- end
48
-
49
- Then /^the layout "([^\"]*)" should have "([^\"]*)" as page title$/ do |layout, title|
50
- layout_title(layout).should == title
51
- end
52
-
53
- Given /^I generate a theme for signin and signup$/ do
54
- generate_layout(:layout_type => :sign)
55
- end
56
-
57
- Then /^I should have a layout named "([^\"]*)" with just a box$/ do |layout|
58
- layout_with_box?(layout).should be_true
59
- end
@@ -1,2 +0,0 @@
1
- module WebAppTheme
2
- end
@@ -1 +0,0 @@
1
- /* Override here any style defined by web-app-theme */
@@ -1,5 +0,0 @@
1
- require "rubygems"
2
- require "spec"
3
- require "rails_generator"
4
- require "rails_generator/scripts/generate"
5
- require File.dirname(__FILE__) + "/../rails_generators/themed/themed_generator"
@@ -1,115 +0,0 @@
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
@@ -1,117 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{web-app-theme}
8
- s.version = "0.7.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Andrea Franz"]
12
- s.date = %q{2011-07-25}
13
- s.description = %q{Web app theme generator for rails projects}
14
- s.email = %q{andrea@gravityblast.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- "LICENSE",
21
- "README.md",
22
- "Rakefile",
23
- "VERSION",
24
- "config/locales/de_de.yml",
25
- "config/locales/pt_br.yml",
26
- "features/step_definitions/layout_steps.rb",
27
- "features/step_definitions/themed_steps.rb",
28
- "features/support/env.rb",
29
- "features/theme_generator.feature",
30
- "features/themed_generator.feature",
31
- "images/avatar.png",
32
- "images/icons/application_edit.png",
33
- "images/icons/cross.png",
34
- "images/icons/key.png",
35
- "images/icons/tick.png",
36
- "index.html",
37
- "javascripts/jquery-1.3.min.js",
38
- "javascripts/jquery.localscroll.js",
39
- "javascripts/jquery.scrollTo.js",
40
- "lib/generators/web_app_theme/theme/templates/layout_admin.html.erb",
41
- "lib/generators/web_app_theme/theme/templates/layout_sign.html.erb",
42
- "lib/generators/web_app_theme/theme/theme_generator.rb",
43
- "lib/generators/web_app_theme/themed/templates/view_edit.html.erb",
44
- "lib/generators/web_app_theme/themed/templates/view_form.html.erb",
45
- "lib/generators/web_app_theme/themed/templates/view_new.html.erb",
46
- "lib/generators/web_app_theme/themed/templates/view_show.html.erb",
47
- "lib/generators/web_app_theme/themed/templates/view_sidebar.html.erb",
48
- "lib/generators/web_app_theme/themed/templates/view_signin.html.erb",
49
- "lib/generators/web_app_theme/themed/templates/view_signup.html.erb",
50
- "lib/generators/web_app_theme/themed/templates/view_tables.html.erb",
51
- "lib/generators/web_app_theme/themed/templates/view_text.html.erb",
52
- "lib/generators/web_app_theme/themed/themed_generator.rb",
53
- "lib/web_app_theme.rb",
54
- "stylesheets/base.css",
55
- "stylesheets/override.css",
56
- "stylesheets/themes/activo/images/arrow.png",
57
- "stylesheets/themes/activo/images/boxbar-background.png",
58
- "stylesheets/themes/activo/images/button-background-active.png",
59
- "stylesheets/themes/activo/images/button-background.png",
60
- "stylesheets/themes/activo/images/menubar-background.png",
61
- "stylesheets/themes/activo/style.css",
62
- "stylesheets/themes/amro/style.css",
63
- "stylesheets/themes/bec-green/style.css",
64
- "stylesheets/themes/bec/style.css",
65
- "stylesheets/themes/blue/style.css",
66
- "stylesheets/themes/default/fonts/museo700-regular-webfont.eot",
67
- "stylesheets/themes/default/fonts/museo700-regular-webfont.svg",
68
- "stylesheets/themes/default/fonts/museo700-regular-webfont.ttf",
69
- "stylesheets/themes/default/fonts/museo700-regular-webfont.woff",
70
- "stylesheets/themes/default/fonts/museosans_500-webfont.eot",
71
- "stylesheets/themes/default/fonts/museosans_500-webfont.svg",
72
- "stylesheets/themes/default/fonts/museosans_500-webfont.ttf",
73
- "stylesheets/themes/default/fonts/museosans_500-webfont.woff",
74
- "stylesheets/themes/default/fonts/museosans_500_italic-webfont.eot",
75
- "stylesheets/themes/default/fonts/museosans_500_italic-webfont.svg",
76
- "stylesheets/themes/default/fonts/museosans_500_italic-webfont.ttf",
77
- "stylesheets/themes/default/fonts/museosans_500_italic-webfont.woff",
78
- "stylesheets/themes/default/images/arrow.png",
79
- "stylesheets/themes/default/images/bgd.jpg",
80
- "stylesheets/themes/default/images/boxbar-background.png",
81
- "stylesheets/themes/default/images/button-background-active.png",
82
- "stylesheets/themes/default/images/button-background.png",
83
- "stylesheets/themes/default/images/messages/error.png",
84
- "stylesheets/themes/default/images/messages/notice.png",
85
- "stylesheets/themes/default/images/messages/warning.png",
86
- "stylesheets/themes/default/style.css",
87
- "stylesheets/themes/djime-cerulean/style.css",
88
- "stylesheets/themes/drastic-dark/style.css",
89
- "stylesheets/themes/kathleene/style.css",
90
- "stylesheets/themes/olive/style.css",
91
- "stylesheets/themes/orange/style.css",
92
- "stylesheets/themes/red/style.css",
93
- "stylesheets/themes/reidb-greenish/style.css",
94
- "stylesheets/themes/warehouse/style.css",
95
- "test/spec_helper.rb",
96
- "test/themed_generator_spec.rb",
97
- "web-app-theme.gemspec"
98
- ]
99
- s.homepage = %q{http://github.com/pilu/web-app-theme}
100
- s.require_paths = ["lib"]
101
- s.rubygems_version = %q{1.5.0}
102
- s.summary = %q{Web app theme generator}
103
- s.test_files = [
104
- "test/spec_helper.rb",
105
- "test/themed_generator_spec.rb"
106
- ]
107
-
108
- if s.respond_to? :specification_version then
109
- s.specification_version = 3
110
-
111
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
112
- else
113
- end
114
- else
115
- end
116
- end
117
-