redde 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.travis.yml +10 -0
  4. data/Gemfile +3 -3
  5. data/LICIENSE.md +21 -0
  6. data/README.md +53 -14
  7. data/lib/generators/redde/layout/layout_generator.rb +7 -4
  8. data/lib/generators/redde/layout/templates/assets/images/admin/error-label-triangle.png +0 -0
  9. data/lib/generators/redde/layout/templates/assets/images/admin/favicon.png +0 -0
  10. data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +9 -76
  11. data/lib/generators/redde/layout/templates/assets/redactor/images/.keep +0 -0
  12. data/lib/generators/redde/layout/templates/assets/redactor/images/redactor/icons.png +0 -0
  13. data/lib/generators/redde/layout/templates/assets/redactor/javascripts/jquery-migrate-1.2.1.js +521 -0
  14. data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/redactor.js.erb +9 -21
  15. data/lib/generators/redde/layout/templates/assets/{images/admin/redactor/css/redactor.css → redactor/stylesheets/redactor/redactor.css.scss} +1 -1
  16. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/error-msg.sass +47 -0
  17. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/paginate.sass +28 -0
  18. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/pagination.scss +28 -0
  19. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/phead-tabs.sass +27 -0
  20. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss +0 -0
  21. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/input.sass +35 -0
  22. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/header.sass +50 -0
  23. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/launchbar.sass +23 -0
  24. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/main.sass +39 -0
  25. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-header.sass +19 -0
  26. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/page-sidebar.sass +22 -0
  27. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/sidebar.sass +30 -0
  28. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/reset.sass +33 -0
  29. data/lib/generators/redde/layout/templates/assets/stylesheets/admin.scss +9 -9
  30. data/lib/generators/redde/layout/templates/base/_header.html.haml +12 -0
  31. data/lib/generators/redde/layout/templates/base/_launchbar.html.haml +11 -0
  32. data/lib/generators/redde/layout/templates/base/_sidebar.html.haml +15 -0
  33. data/lib/generators/redde/layout/templates/base/_validate.haml +8 -0
  34. data/lib/generators/redde/layout/templates/base/welcome.haml +2 -0
  35. data/lib/generators/redde/layout/templates/controllers/base_controller.rb +5 -0
  36. data/lib/generators/redde/layout/templates/layouts/admin.html.haml +14 -15
  37. data/lib/generators/redde/scaffold/scaffold_generator.rb +8 -0
  38. data/lib/generators/redde/scaffold/templates/edit.html.haml +2 -6
  39. data/lib/generators/redde/scaffold/templates/index.html.haml +1 -1
  40. data/lib/redde/version.rb +1 -1
  41. data/lib/redde.rb +3 -0
  42. data/redde.gemspec +11 -10
  43. data/spec/dummy/.rspec +1 -0
  44. data/spec/dummy/README.rdoc +28 -0
  45. data/spec/dummy/Rakefile +6 -0
  46. data/spec/dummy/app/assets/images/.keep +0 -0
  47. data/spec/dummy/app/assets/javascripts/application.js +14 -0
  48. data/spec/dummy/app/assets/stylesheets/application.css.scss +0 -0
  49. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  50. data/spec/dummy/app/controllers/articles_controller.rb +12 -0
  51. data/spec/dummy/app/models/.keep +0 -0
  52. data/spec/dummy/app/models/article.rb +3 -0
  53. data/spec/dummy/app/models/article_category.rb +2 -0
  54. data/spec/dummy/app/views/articles/show.html.haml +2 -0
  55. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  56. data/spec/dummy/bin/bundle +3 -0
  57. data/spec/dummy/bin/rails +4 -0
  58. data/spec/dummy/bin/rake +4 -0
  59. data/spec/dummy/config/application.rb +33 -0
  60. data/spec/dummy/config/boot.rb +5 -0
  61. data/spec/dummy/config/database.yml +25 -0
  62. data/spec/dummy/config/environment.rb +5 -0
  63. data/spec/dummy/config/environments/development.rb +29 -0
  64. data/spec/dummy/config/environments/production.rb +80 -0
  65. data/spec/dummy/config/environments/test.rb +36 -0
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  68. data/spec/dummy/config/initializers/inflections.rb +16 -0
  69. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  70. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  71. data/spec/dummy/config/initializers/session_store.rb +3 -0
  72. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  73. data/spec/dummy/config/locales/en.yml +36 -0
  74. data/spec/dummy/config/routes.rb +3 -0
  75. data/spec/dummy/config.ru +4 -0
  76. data/spec/dummy/db/development.sqlite3 +0 -0
  77. data/spec/dummy/db/migrate/20130908123351_create_articles.rb +9 -0
  78. data/spec/dummy/db/migrate/20140128152208_create_article_categories.rb +11 -0
  79. data/spec/dummy/db/schema.rb +29 -0
  80. data/spec/dummy/db/test.sqlite3 +0 -0
  81. data/spec/dummy/lib/assets/.keep +0 -0
  82. data/spec/dummy/log/.keep +0 -0
  83. data/spec/dummy/log/development.log +26606 -0
  84. data/spec/dummy/log/test.log +53411 -0
  85. data/spec/dummy/public/404.html +58 -0
  86. data/spec/dummy/public/422.html +58 -0
  87. data/spec/dummy/public/500.html +57 -0
  88. data/spec/dummy/public/favicon.ico +0 -0
  89. data/spec/{deploy_generator_spec.rb → generators/deploy_generator_spec.rb} +1 -1
  90. data/spec/{layout_generator_spec.rb → generators/layout_generator_spec.rb} +5 -5
  91. data/spec/generators/scaffold_generator_spec.rb +59 -0
  92. data/spec/spec_helper.rb +53 -4
  93. metadata +187 -155
  94. data/LICENSE +0 -22
  95. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/docstyle.css +0 -123
  96. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/style.css +0 -119
  97. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/img/icons.png +0 -0
  98. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/by.js +0 -72
  99. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/de.js +0 -75
  100. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/es.js +0 -76
  101. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/fr.js +0 -74
  102. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/hu.js +0 -76
  103. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/it.js +0 -76
  104. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ja.js +0 -76
  105. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/lv.js +0 -74
  106. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/nl.js +0 -76
  107. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pl.js +0 -75
  108. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pt_br.js +0 -81
  109. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/sq.js +0 -76
  110. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/tr.js +0 -76
  111. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ua.js +0 -75
  112. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/zh_cn.js +0 -77
  113. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.min.js +0 -1
  114. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/mini.js +0 -103
  115. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/_jquery.reddebox.js.erb +0 -214
  116. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/close.png +0 -0
  117. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb +0 -246
  118. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss +0 -31
  119. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/next.png +0 -0
  120. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/prev.png +0 -0
  121. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/change-log.txt +0 -19
  122. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/check-exists.php +0 -15
  123. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/index.php +0 -50
  124. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.js +0 -888
  125. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.min.js +0 -6
  126. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/license-standard.txt +0 -71
  127. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-cancel.png +0 -0
  128. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-image-only.php +0 -66
  129. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.css +0 -100
  130. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.php +0 -33
  131. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/#swfobject.js +0 -4
  132. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/cancel.png +0 -0
  133. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/jquery.uploadify.min.js +0 -315
  134. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify-cancel.png +0 -0
  135. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.css +0 -66
  136. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.swf +0 -0
  137. data/lib/generators/redde/layout/templates/assets/javascripts/admin/swfobject.js +0 -4
  138. data/lib/generators/redde/layout/templates/assets/javascripts/admin/zen_textarea.min.js +0 -17
  139. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/_reset.scss +0 -32
  140. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_input.scss +0 -43
  141. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_header.scss +0 -57
  142. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_launchbar.scss +0 -35
  143. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_main.scss +0 -59
  144. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_sidebar.scss +0 -35
  145. data/lib/generators/redde/layout/templates/shared/_header.html.haml +0 -13
  146. data/lib/generators/redde/layout/templates/shared/_launchbar.html.haml +0 -9
  147. data/lib/generators/redde/layout/templates/shared/_sidebar.html.haml +0 -9
  148. data/spec/scaffold_generator_spec.rb +0 -25
  149. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/file.html +0 -0
  150. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/image.html +0 -0
  151. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/image_edit.html +0 -0
  152. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/link.html +0 -0
  153. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/table.html +0 -0
  154. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/images}/redactor/plugins/video.html +0 -0
  155. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/langs/en.js +0 -0
  156. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/langs/ru.js +0 -0
  157. /data/lib/generators/redde/layout/templates/assets/{images/admin → redactor/javascripts}/redactor/toolbars/default.js +0 -0
  158. /data/lib/generators/redde/layout/templates/assets/{images/admin/redactor/css → redactor/stylesheets/redactor}/wym.css +0 -0
  159. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_list.scss → list.scss} +0 -0
  160. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_notice.scss → notice.scss} +0 -0
  161. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_orders.scss → orders.scss} +0 -0
  162. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_partners.scss → partners.scss} +0 -0
  163. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_photos.scss → photos.scss} +0 -0
  164. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/{_sortable.scss → sortable.scss} +0 -0
  165. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/{_table.scss → table.scss} +0 -0
  166. /data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/{_login.scss → login.scss} +0 -0
@@ -1,59 +0,0 @@
1
- #main {
2
- box-shadow: 0 0 3px #ccc;
3
- border-radius: 6px;
4
- border: 1px solid #D7D7D7;
5
- min-height: 500px;
6
- background-color: white;
7
- padding: 0;
8
- overflow: hidden;
9
- border-bottom: 1px solid #DADEE5;
10
- margin: 0;
11
- #content {padding: 30px;}
12
- .sidebar #content {
13
- margin-right:305px;
14
- }
15
- .sidebar #page_sidebar {float:right;}
16
-
17
- #page_sidebar{
18
- float: right;
19
- margin: 0 30px 0 0;
20
- padding: 30px 0 0 30px;
21
- width: 245px;
22
- border-left: 1px solid #efefef;
23
- ul.photos li {
24
- display: inline;list-style-type: none;
25
- }
26
- h5 {
27
- line-height: 1.0em;
28
- padding: 0 0 3px 0;
29
- font-size: 12px;
30
- text-transform: none;
31
- border-bottom: 1px solid #efefef;
32
- color: #222;
33
- font-weight: bold;
34
- }
35
- p {font-size:12px;}
36
- }
37
-
38
- #page-header{
39
- overflow: hidden;
40
- background: #F1F5F9;
41
- border-bottom: 1px solid #DADEE5;
42
- padding: 15px 30px;
43
- margin: 0;
44
- border-top-right-radius: 5px;
45
- border-top-left-radius: 5px;
46
- h1 {
47
- font-size: 16px;
48
- float: left;
49
- font-weight:normal;
50
- }
51
- p {
52
- margin: 0;
53
- font-size: 11px;
54
- float: right;
55
- line-height: 1.8em;
56
- a {color:#0047B3;}
57
- }
58
- }
59
- }
@@ -1,35 +0,0 @@
1
- #sidebar {
2
- width: 215px;
3
- float: left;
4
- }
5
-
6
- ul#nav{
7
- margin-top: 12px;
8
- margin-left: -6px;
9
- list-style: none;
10
- li{
11
- display: list-item;
12
- span {
13
- color: #999;
14
- padding-left: 5px;
15
- font-size: 10px;
16
- float: right;
17
- }
18
- a {
19
- display: block;
20
- overflow: hidden;
21
- padding: 0 6px 0 40px;
22
- text-decoration: none;
23
- line-height: 28px;
24
- font-size: 13px;
25
- color: #555;
26
- text-shadow: 0px 1px 1px white;
27
- }
28
- &.active a {
29
- font-weight: bold;
30
- color: black;
31
- background-color: #e5e3de;
32
- border-radius: 4px 0 0 4px;
33
- }
34
- }
35
- }
@@ -1,13 +0,0 @@
1
- #header
2
- #header_wrapper
3
- #links
4
- - if current_manager
5
- = link_to current_manager.email, "#"
6
- = link_to "Выход", destroy_manager_session_path, :method => :delete
7
- #center
8
- = link_to "<%= app_name %>", root_path, :target => :_blank
9
- #app_logo
10
- = link_to admin_root_path || "/admin" do
11
- REDDESHOP
12
- %br
13
- %span e-commerce platform
@@ -1,9 +0,0 @@
1
- - @active = :shop if (["products"].include? controller.controller_name)
2
- - @active = :materials if (["articles"].include? controller.controller_name)
3
- - @active = :system if ["users"].include? controller.controller_name
4
- #launchbar
5
- %ul.menus
6
- %li{:class => "#{'active' if @active == :materials}"}= link_to "Материалы"
7
- %li{:class => "#{'active' if @active == :shop}"}= link_to "Обратная связь"
8
- %li{:class => "#{'active' if @active == :system}"}= link_to "Система"
9
- %li.fr= Russian.strftime(Time.now,"%d %b, %Y %H:%M ")
@@ -1,9 +0,0 @@
1
- - a = controller.controller_name
2
- %ul#nav
3
- -case @active
4
- -when :shop then
5
- %li{:class => "#{'active' if a == 'products'}"}= link_to "Товары", admin_products_path
6
- -when :materials then
7
- %li{:class => "#{'active' if a == 'articles'}"}= link_to "Статьи", [:admin, :articles]
8
- -when :system
9
- %li{:class => "#{'active' if a == 'users'}"}= link_to "Пользователи", admin_users_path
@@ -1,25 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Redde::Generators::ScaffoldGenerator do
4
- include GeneratorSpec::TestCase
5
- destination File.expand_path("../../tmp", __FILE__)
6
- # arguments ['CategoryValues']
7
-
8
- before(:all) do
9
- prepare_destination
10
- run_generator
11
- end
12
-
13
- after(:all) do
14
- # FileUtils.rm_rf 'tmp'
15
- end
16
-
17
- describe "scaffold" do
18
-
19
- it "Test scaffold generator" do
20
-
21
- end
22
-
23
- end
24
-
25
- end