cantango_editor 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. data/.rspec +2 -0
  2. data/Gemfile +26 -0
  3. data/Gemfile.lock +177 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +80 -0
  6. data/Rakefile +54 -0
  7. data/VERSION +1 -0
  8. data/app/assets/images/cantango_editor/+.png +0 -0
  9. data/app/assets/images/cantango_editor/-.png +0 -0
  10. data/app/assets/images/cantango_editor/.gitkeep +0 -0
  11. data/app/assets/images/cantango_editor/bg-1.gif +0 -0
  12. data/app/assets/images/cantango_editor/bg-2.gif +0 -0
  13. data/app/assets/images/cantango_editor/bg-model.png +0 -0
  14. data/app/assets/images/cantango_editor/bg.gif +0 -0
  15. data/app/assets/images/cantango_editor/bg_action.gif +0 -0
  16. data/app/assets/images/cantango_editor/bg_action.png +0 -0
  17. data/app/assets/images/cantango_editor/bg_can.gif +0 -0
  18. data/app/assets/images/cantango_editor/bg_can.png +0 -0
  19. data/app/assets/images/cantango_editor/bg_cannot.gif +0 -0
  20. data/app/assets/images/cantango_editor/bg_cannot.png +0 -0
  21. data/app/assets/images/cantango_editor/button-top-r.png +0 -0
  22. data/app/assets/images/cantango_editor/button-top.png +0 -0
  23. data/app/assets/images/cantango_editor/cantangologo.png +0 -0
  24. data/app/assets/images/cantango_editor/cantangologo_big.png +0 -0
  25. data/app/assets/images/cantango_editor/cantangologo_big2.png +0 -0
  26. data/app/assets/images/cantango_editor/cantangologo_big3.png +0 -0
  27. data/app/assets/images/cantango_editor/ico-uc.png +0 -0
  28. data/app/assets/images/cantango_editor/images/ui-bg_diagonal-maze_20_6e4f1c_10x10.png +0 -0
  29. data/app/assets/images/cantango_editor/images/ui-bg_diagonal-maze_40_000000_10x10.png +0 -0
  30. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_10_eceadf_60x60.png +0 -0
  31. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_10_f8f7f6_60x60.png +0 -0
  32. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_eceadf_60x60.png +0 -0
  33. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_f7f3de_60x60.png +0 -0
  34. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_ffffff_60x60.png +0 -0
  35. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
  36. data/app/assets/images/cantango_editor/images/ui-bg_fine-grain_68_b83400_60x60.png +0 -0
  37. data/app/assets/images/cantango_editor/images/ui-icons_222222_256x240.png +0 -0
  38. data/app/assets/images/cantango_editor/images/ui-icons_3572ac_256x240.png +0 -0
  39. data/app/assets/images/cantango_editor/images/ui-icons_8c291d_256x240.png +0 -0
  40. data/app/assets/images/cantango_editor/images/ui-icons_b83400_256x240.png +0 -0
  41. data/app/assets/images/cantango_editor/images/ui-icons_fbdb93_256x240.png +0 -0
  42. data/app/assets/images/cantango_editor/images/ui-icons_ffffff_256x240.png +0 -0
  43. data/app/assets/images/cantango_editor/line2.png +0 -0
  44. data/app/assets/images/cantango_editor/line3.png +0 -0
  45. data/app/assets/images/cantango_editor/panel-l.gif +0 -0
  46. data/app/assets/images/cantango_editor/panel-l.png +0 -0
  47. data/app/assets/images/cantango_editor/panel-r.gif +0 -0
  48. data/app/assets/images/cantango_editor/panel-r.png +0 -0
  49. data/app/assets/images/cantango_editor/panel.gif +0 -0
  50. data/app/assets/images/cantango_editor/panel.png +0 -0
  51. data/app/assets/images/cantango_editor/remember.png +0 -0
  52. data/app/assets/images/cantango_editor/sexy.png +0 -0
  53. data/app/assets/images/cantango_editor/x.png +0 -0
  54. data/app/assets/images/cantango_editor/xx.png +0 -0
  55. data/app/assets/javascripts/cantango_editor/application.js +59 -0
  56. data/app/assets/javascripts/cantango_editor/jquery.collapse.js +149 -0
  57. data/app/assets/javascripts/cantango_editor/jquery.cookie.js +96 -0
  58. data/app/assets/javascripts/cantango_editor/jquery.ui/jquery-ui-1.8.16.custom.js +996 -0
  59. data/app/assets/javascripts/cantango_editor/jquery.ui/jquery.ui.selectmenu.js +802 -0
  60. data/app/assets/stylesheets/cantango_editor/.main.css +157 -0
  61. data/app/assets/stylesheets/cantango_editor/application.css +7 -0
  62. data/app/assets/stylesheets/cantango_editor/areset.css +53 -0
  63. data/app/assets/stylesheets/cantango_editor/clearing.css +52 -0
  64. data/app/assets/stylesheets/cantango_editor/jquery-ui-1.8.16.custom.css +290 -0
  65. data/app/assets/stylesheets/cantango_editor/jquery.ui.selectmenu.css +30 -0
  66. data/app/assets/stylesheets/cantango_editor/main.css +294 -0
  67. data/app/assets/stylesheets/cantango_editor/text.css +97 -0
  68. data/app/controllers/cantango_editor/application_controller.rb +12 -0
  69. data/app/controllers/cantango_editor/permissions_controller.rb +47 -0
  70. data/app/helpers/cantango_editor/application_helper.rb +49 -0
  71. data/app/models/cantango_editor/categories.rb +52 -0
  72. data/app/models/cantango_editor/category.rb +21 -0
  73. data/app/models/cantango_editor/permissions.rb +119 -0
  74. data/app/views/cantango_editor/permissions/_footer.html.erb +4 -0
  75. data/app/views/cantango_editor/permissions/_header.html.erb +7 -0
  76. data/app/views/cantango_editor/permissions/_menu.html.erb +7 -0
  77. data/app/views/cantango_editor/permissions/_new_categories_select.html.erb +5 -0
  78. data/app/views/cantango_editor/permissions/_new_custom_targets.html.erb +5 -0
  79. data/app/views/cantango_editor/permissions/_new_targets_select.html.erb +5 -0
  80. data/app/views/cantango_editor/permissions/_permissions_form.html.erb +63 -0
  81. data/app/views/cantango_editor/permissions/index.html.erb +5 -0
  82. data/app/views/cantango_editor/permissions/index.js.erb +2 -0
  83. data/app/views/cantango_editor/permissions/new_category.js.erb +3 -0
  84. data/app/views/cantango_editor/permissions/new_custom_target.js.erb +2 -0
  85. data/app/views/cantango_editor/permissions/new_target.js.erb +4 -0
  86. data/app/views/cantango_editor/permissions/notes.html.erb +19 -0
  87. data/app/views/cantango_editor/permissions/preview_raw.html.erb +3 -0
  88. data/app/views/cantango_editor/permissions/temp _permissions_form.html.erb +55 -0
  89. data/app/views/layouts/cantango_editor/application.html.erb +14 -0
  90. data/cantango_editor.gemspec +258 -0
  91. data/config/routes.rb +15 -0
  92. data/lib/array.rb +11 -0
  93. data/lib/cantango_editor.rb +25 -0
  94. data/lib/cantango_editor/configuration.rb +34 -0
  95. data/lib/cantango_editor/engine.rb +11 -0
  96. data/lib/cantango_editor/version.rb +3 -0
  97. data/lib/permissions_hash.rb +80 -0
  98. data/lib/tasks/cantango-editor_tasks.rake +4 -0
  99. data/lib/time_precise.rb +7 -0
  100. data/script/rails +6 -0
  101. data/spec/cantango_editor/configuration/configuration_spec.rb +33 -0
  102. data/spec/cantango_editor/models/permissions_spec.rb +9 -0
  103. data/spec/cantango_editor_spec.rb +17 -0
  104. data/spec/dummy/Rakefile +7 -0
  105. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  106. data/spec/dummy/app/assets/javascripts/main.js +2 -0
  107. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  108. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  109. data/spec/dummy/app/controllers/main_controller.rb +5 -0
  110. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  111. data/spec/dummy/app/helpers/main_helper.rb +2 -0
  112. data/spec/dummy/app/mailers/.gitkeep +0 -0
  113. data/spec/dummy/app/models/.gitkeep +0 -0
  114. data/spec/dummy/app/models/admin.rb +5 -0
  115. data/spec/dummy/app/models/article.rb +2 -0
  116. data/spec/dummy/app/models/comment.rb +2 -0
  117. data/spec/dummy/app/models/concerto.rb +2 -0
  118. data/spec/dummy/app/models/guest.rb +14 -0
  119. data/spec/dummy/app/models/improvisation.rb +2 -0
  120. data/spec/dummy/app/models/post.rb +2 -0
  121. data/spec/dummy/app/models/song.rb +2 -0
  122. data/spec/dummy/app/models/tune.rb +2 -0
  123. data/spec/dummy/app/models/user.rb +11 -0
  124. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  125. data/spec/dummy/app/views/main/index.html.erb +3 -0
  126. data/spec/dummy/config.ru +4 -0
  127. data/spec/dummy/config/application.rb +53 -0
  128. data/spec/dummy/config/boot.rb +10 -0
  129. data/spec/dummy/config/categories.yml +10 -0
  130. data/spec/dummy/config/database.yml +25 -0
  131. data/spec/dummy/config/environment.rb +5 -0
  132. data/spec/dummy/config/environments/development.rb +30 -0
  133. data/spec/dummy/config/environments/production.rb +60 -0
  134. data/spec/dummy/config/environments/test.rb +39 -0
  135. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  136. data/spec/dummy/config/initializers/cantango.rb +4 -0
  137. data/spec/dummy/config/initializers/cantango_editor.rb +4 -0
  138. data/spec/dummy/config/initializers/devise.rb +210 -0
  139. data/spec/dummy/config/initializers/inflections.rb +10 -0
  140. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  141. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  142. data/spec/dummy/config/initializers/session_store.rb +8 -0
  143. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  144. data/spec/dummy/config/locales/devise.en.yml +58 -0
  145. data/spec/dummy/config/locales/en.yml +5 -0
  146. data/spec/dummy/config/permissions.yml.save +59 -0
  147. data/spec/dummy/config/routes.rb +15 -0
  148. data/spec/dummy/db/development.sqlite3 +0 -0
  149. data/spec/dummy/db/migrate/20111018203622_create_posts.rb +9 -0
  150. data/spec/dummy/db/migrate/20111018203648_create_articles.rb +9 -0
  151. data/spec/dummy/db/migrate/20111018203800_create_comments.rb +9 -0
  152. data/spec/dummy/db/migrate/20111018203817_create_songs.rb +9 -0
  153. data/spec/dummy/db/migrate/20111018203827_create_tunes.rb +9 -0
  154. data/spec/dummy/db/migrate/20111018203859_create_concertos.rb +9 -0
  155. data/spec/dummy/db/migrate/20111018203917_create_improvisations.rb +9 -0
  156. data/spec/dummy/db/migrate/20111019122217_devise_create_users.rb +28 -0
  157. data/spec/dummy/db/schema.rb +58 -0
  158. data/spec/dummy/db/test.sqlite3 +0 -0
  159. data/spec/dummy/lib/assets/.gitkeep +0 -0
  160. data/spec/dummy/log/.gitkeep +0 -0
  161. data/spec/dummy/public/404.html +26 -0
  162. data/spec/dummy/public/422.html +26 -0
  163. data/spec/dummy/public/500.html +26 -0
  164. data/spec/dummy/public/favicon.ico +0 -0
  165. data/spec/dummy/script/rails +6 -0
  166. data/spec/integration/navigation_spec.rb +18 -0
  167. data/spec/permissions_hash_spec.rb +63 -0
  168. data/spec/requests/requests_spec.rb +9 -0
  169. data/spec/spec_helper.rb +16 -0
  170. metadata +416 -0
@@ -0,0 +1,15 @@
1
+ Rails.application.routes.draw do
2
+
3
+ resources :bones do
4
+ collection do
5
+ post :update
6
+ end
7
+ end
8
+ devise_for :users
9
+
10
+ get "main/index"
11
+
12
+ mount CantangoEditor::Engine => "/cantango_editor"
13
+
14
+ root :to => "main#index"
15
+ end
Binary file
@@ -0,0 +1,9 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateArticles < ActiveRecord::Migration
2
+ def change
3
+ create_table :articles do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateComments < ActiveRecord::Migration
2
+ def change
3
+ create_table :comments do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateSongs < ActiveRecord::Migration
2
+ def change
3
+ create_table :songs do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateTunes < ActiveRecord::Migration
2
+ def change
3
+ create_table :tunes do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateConcertos < ActiveRecord::Migration
2
+ def change
3
+ create_table :concertos do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateImprovisations < ActiveRecord::Migration
2
+ def change
3
+ create_table :improvisations do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,28 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table(:users) do |t|
4
+ t.database_authenticatable :null => false
5
+ t.recoverable
6
+ t.rememberable
7
+ t.trackable
8
+
9
+ # t.encryptable
10
+ # t.confirmable
11
+ # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
12
+ # t.token_authenticatable
13
+
14
+
15
+ t.timestamps
16
+ end
17
+
18
+ add_index :users, :email, :unique => true
19
+ add_index :users, :reset_password_token, :unique => true
20
+ # add_index :users, :confirmation_token, :unique => true
21
+ # add_index :users, :unlock_token, :unique => true
22
+ # add_index :users, :authentication_token, :unique => true
23
+ end
24
+
25
+ def self.down
26
+ drop_table :users
27
+ end
28
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20111018203917) do
15
+
16
+ create_table "articles", :force => true do |t|
17
+ t.string "name"
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
+ end
21
+
22
+ create_table "comments", :force => true do |t|
23
+ t.string "name"
24
+ t.datetime "created_at"
25
+ t.datetime "updated_at"
26
+ end
27
+
28
+ create_table "concertos", :force => true do |t|
29
+ t.string "name"
30
+ t.datetime "created_at"
31
+ t.datetime "updated_at"
32
+ end
33
+
34
+ create_table "improvisations", :force => true do |t|
35
+ t.string "name"
36
+ t.datetime "created_at"
37
+ t.datetime "updated_at"
38
+ end
39
+
40
+ create_table "posts", :force => true do |t|
41
+ t.string "name"
42
+ t.datetime "created_at"
43
+ t.datetime "updated_at"
44
+ end
45
+
46
+ create_table "songs", :force => true do |t|
47
+ t.string "name"
48
+ t.datetime "created_at"
49
+ t.datetime "updated_at"
50
+ end
51
+
52
+ create_table "tunes", :force => true do |t|
53
+ t.string "name"
54
+ t.datetime "created_at"
55
+ t.datetime "updated_at"
56
+ end
57
+
58
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,18 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'spec_helper'
4
+
5
+ feature "Basic usage of CantangoEditor" do
6
+
7
+ background do
8
+ end
9
+
10
+ scenario "" do
11
+ with page do
12
+ visit '/cantango_editor/permissions'
13
+ body.should =~ /roles:/
14
+ body.should =~ /role_groups:/
15
+ body.should =~ /CantangoEditor/
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,63 @@
1
+ require 'permissions_hash'
2
+
3
+ describe PermissionsHash do
4
+
5
+ context "#deep_merge_permissions!" do
6
+ it "should accumulate arrays if original {} is empty" do
7
+ result = PermissionsHash[{} ].deep_merge_permissions!({:a => 1, :c => {:b => [2, 4]}} )
8
+ result.should == {:a => 1, :c => {:b => [2, 4]}}
9
+ end
10
+ it "should accumulate arrays if other_hash's end values are arrays" do
11
+ result = PermissionsHash[{:a => 1, :c => {:b => [1, 2, 3]}} ].deep_merge_permissions!({:a => 1, :c => {:b => [2, 4]}} )
12
+ result.should == {:a => 1, :c => {:b => [1, 2, 3, 4]}}
13
+ end
14
+ end
15
+
16
+ context "#deep_remove_permissions!" do
17
+ it "should accumulate arrays if other_hash's end values are arrays" do
18
+ result = PermissionsHash[{:a => 1, :c => {:b => [1, 2, 3]}}].deep_remove_permissions!({:a => 1, :c => {:b => [2, 4]}})
19
+ result.should == {:a => 1, :c => {:b => [1, 3]}}
20
+ end
21
+ end
22
+
23
+ context "#to_hash" do
24
+ it "should return Hash object" do
25
+ PermissionsHash.new.to_hash.should == Hash.new
26
+ PermissionsHash[:a => 2, :b => 2].to_hash.should == {:a => 2, :b => 2}
27
+ end
28
+
29
+ it "should return Hash object" do
30
+ a = PermissionsHash[{:a => 2, :b => PermissionsHash[{:c => PermissionsHash[{:d => {:e => 2}}]}]}].to_hash
31
+ b = {:a=>2, :b=>{:c=>{:d=>{:e=>2}}}}
32
+
33
+ a.class.should == b.class
34
+ a.should == b
35
+ a[:b].class.should == b[:b].class
36
+ a[:b][:c].class.should == b[:b][:c].class
37
+ end
38
+ end
39
+
40
+ context "[]" do
41
+ let(:phash) do
42
+ PermissionsHash.new
43
+ end
44
+
45
+ it "should accept both symbols and strings as keys" do
46
+ phash[:a] = 1
47
+ phash[:a].should == 1
48
+ phash['a'].should == 1
49
+ end
50
+
51
+ it "should return empty PermissionHash if key passed don't exist" do
52
+ phash[:a].should == PermissionsHash.new
53
+ end
54
+
55
+ it "should return PermissionHash based on value if value is a Hash
56
+ and just a value otherwise" do
57
+ phash[:a] = {:a => 2}
58
+ phash[:a].should == PermissionsHash[{:a => 2}]
59
+ phash[:b] = 'Non-hash!'
60
+ phash['b'].should == 'Non-hash!'
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+ # encoding: UTF-8
3
+
4
+ describe CantangoEditor do
5
+ it "should GET /" do
6
+ get root_path
7
+ response.code.should == "200"
8
+ end
9
+ end
@@ -0,0 +1,16 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "sugar-high/dsl"
6
+
7
+ require "rspec/rails"
8
+
9
+ require "capybara/rails"
10
+
11
+ #require "rails/test_help"
12
+
13
+ Rails.backtrace_cleaner.remove_silencers!
14
+
15
+ # Load support files
16
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata ADDED
@@ -0,0 +1,416 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cantango_editor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - stanislaw
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-11-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: cantango_editor
16
+ requirement: &76255420 !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: *76255420
25
+ - !ruby/object:Gem::Dependency
26
+ name: jquery-rails
27
+ requirement: &76251460 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *76251460
36
+ - !ruby/object:Gem::Dependency
37
+ name: cantango
38
+ requirement: &76136390 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *76136390
47
+ - !ruby/object:Gem::Dependency
48
+ name: jeweler
49
+ requirement: &76133230 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *76133230
58
+ - !ruby/object:Gem::Dependency
59
+ name: devise
60
+ requirement: &76129350 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *76129350
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: &76002500 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *76002500
80
+ - !ruby/object:Gem::Dependency
81
+ name: cutter
82
+ requirement: &75998880 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *75998880
91
+ - !ruby/object:Gem::Dependency
92
+ name: rspec-rails
93
+ requirement: &75994480 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *75994480
102
+ - !ruby/object:Gem::Dependency
103
+ name: capybara
104
+ requirement: &75991150 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *75991150
113
+ - !ruby/object:Gem::Dependency
114
+ name: unicorn
115
+ requirement: &75964410 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: *75964410
124
+ - !ruby/object:Gem::Dependency
125
+ name: cantango
126
+ requirement: &75961910 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: *75961910
135
+ - !ruby/object:Gem::Dependency
136
+ name: jeweler
137
+ requirement: &75959840 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: *75959840
146
+ - !ruby/object:Gem::Dependency
147
+ name: devise
148
+ requirement: &75957750 !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ! '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ type: :development
155
+ prerelease: false
156
+ version_requirements: *75957750
157
+ - !ruby/object:Gem::Dependency
158
+ name: sqlite3
159
+ requirement: &75883780 !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ type: :development
166
+ prerelease: false
167
+ version_requirements: *75883780
168
+ - !ruby/object:Gem::Dependency
169
+ name: cutter
170
+ requirement: &75881230 !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ! '>='
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: *75881230
179
+ - !ruby/object:Gem::Dependency
180
+ name: rspec-rails
181
+ requirement: &75880090 !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ type: :development
188
+ prerelease: false
189
+ version_requirements: *75880090
190
+ - !ruby/object:Gem::Dependency
191
+ name: capybara
192
+ requirement: &75879130 !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :development
199
+ prerelease: false
200
+ version_requirements: *75879130
201
+ - !ruby/object:Gem::Dependency
202
+ name: unicorn
203
+ requirement: &75878280 !ruby/object:Gem::Requirement
204
+ none: false
205
+ requirements:
206
+ - - ! '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ type: :development
210
+ prerelease: false
211
+ version_requirements: *75878280
212
+ description: Admin Web UI to manage permissions - Who can do What on Which objects
213
+ email: s.pankevich@gmail.com
214
+ executables: []
215
+ extensions: []
216
+ extra_rdoc_files:
217
+ - README.md
218
+ files:
219
+ - .rspec
220
+ - Gemfile
221
+ - Gemfile.lock
222
+ - MIT-LICENSE
223
+ - README.md
224
+ - Rakefile
225
+ - VERSION
226
+ - app/assets/images/cantango_editor/+.png
227
+ - app/assets/images/cantango_editor/-.png
228
+ - app/assets/images/cantango_editor/.gitkeep
229
+ - app/assets/images/cantango_editor/bg-1.gif
230
+ - app/assets/images/cantango_editor/bg-2.gif
231
+ - app/assets/images/cantango_editor/bg-model.png
232
+ - app/assets/images/cantango_editor/bg.gif
233
+ - app/assets/images/cantango_editor/bg_action.gif
234
+ - app/assets/images/cantango_editor/bg_action.png
235
+ - app/assets/images/cantango_editor/bg_can.gif
236
+ - app/assets/images/cantango_editor/bg_can.png
237
+ - app/assets/images/cantango_editor/bg_cannot.gif
238
+ - app/assets/images/cantango_editor/bg_cannot.png
239
+ - app/assets/images/cantango_editor/button-top-r.png
240
+ - app/assets/images/cantango_editor/button-top.png
241
+ - app/assets/images/cantango_editor/cantangologo.png
242
+ - app/assets/images/cantango_editor/cantangologo_big.png
243
+ - app/assets/images/cantango_editor/cantangologo_big2.png
244
+ - app/assets/images/cantango_editor/cantangologo_big3.png
245
+ - app/assets/images/cantango_editor/ico-uc.png
246
+ - app/assets/images/cantango_editor/images/ui-bg_diagonal-maze_20_6e4f1c_10x10.png
247
+ - app/assets/images/cantango_editor/images/ui-bg_diagonal-maze_40_000000_10x10.png
248
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_10_eceadf_60x60.png
249
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_10_f8f7f6_60x60.png
250
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_eceadf_60x60.png
251
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_f7f3de_60x60.png
252
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_15_ffffff_60x60.png
253
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_65_654b24_60x60.png
254
+ - app/assets/images/cantango_editor/images/ui-bg_fine-grain_68_b83400_60x60.png
255
+ - app/assets/images/cantango_editor/images/ui-icons_222222_256x240.png
256
+ - app/assets/images/cantango_editor/images/ui-icons_3572ac_256x240.png
257
+ - app/assets/images/cantango_editor/images/ui-icons_8c291d_256x240.png
258
+ - app/assets/images/cantango_editor/images/ui-icons_b83400_256x240.png
259
+ - app/assets/images/cantango_editor/images/ui-icons_fbdb93_256x240.png
260
+ - app/assets/images/cantango_editor/images/ui-icons_ffffff_256x240.png
261
+ - app/assets/images/cantango_editor/line2.png
262
+ - app/assets/images/cantango_editor/line3.png
263
+ - app/assets/images/cantango_editor/panel-l.gif
264
+ - app/assets/images/cantango_editor/panel-l.png
265
+ - app/assets/images/cantango_editor/panel-r.gif
266
+ - app/assets/images/cantango_editor/panel-r.png
267
+ - app/assets/images/cantango_editor/panel.gif
268
+ - app/assets/images/cantango_editor/panel.png
269
+ - app/assets/images/cantango_editor/remember.png
270
+ - app/assets/images/cantango_editor/sexy.png
271
+ - app/assets/images/cantango_editor/x.png
272
+ - app/assets/images/cantango_editor/xx.png
273
+ - app/assets/javascripts/cantango_editor/application.js
274
+ - app/assets/javascripts/cantango_editor/jquery.collapse.js
275
+ - app/assets/javascripts/cantango_editor/jquery.cookie.js
276
+ - app/assets/javascripts/cantango_editor/jquery.ui/jquery-ui-1.8.16.custom.js
277
+ - app/assets/javascripts/cantango_editor/jquery.ui/jquery.ui.selectmenu.js
278
+ - app/assets/stylesheets/cantango_editor/.main.css
279
+ - app/assets/stylesheets/cantango_editor/application.css
280
+ - app/assets/stylesheets/cantango_editor/areset.css
281
+ - app/assets/stylesheets/cantango_editor/clearing.css
282
+ - app/assets/stylesheets/cantango_editor/jquery-ui-1.8.16.custom.css
283
+ - app/assets/stylesheets/cantango_editor/jquery.ui.selectmenu.css
284
+ - app/assets/stylesheets/cantango_editor/main.css
285
+ - app/assets/stylesheets/cantango_editor/text.css
286
+ - app/controllers/cantango_editor/application_controller.rb
287
+ - app/controllers/cantango_editor/permissions_controller.rb
288
+ - app/helpers/cantango_editor/application_helper.rb
289
+ - app/models/cantango_editor/categories.rb
290
+ - app/models/cantango_editor/category.rb
291
+ - app/models/cantango_editor/permissions.rb
292
+ - app/views/cantango_editor/permissions/_footer.html.erb
293
+ - app/views/cantango_editor/permissions/_header.html.erb
294
+ - app/views/cantango_editor/permissions/_menu.html.erb
295
+ - app/views/cantango_editor/permissions/_new_categories_select.html.erb
296
+ - app/views/cantango_editor/permissions/_new_custom_targets.html.erb
297
+ - app/views/cantango_editor/permissions/_new_targets_select.html.erb
298
+ - app/views/cantango_editor/permissions/_permissions_form.html.erb
299
+ - app/views/cantango_editor/permissions/index.html.erb
300
+ - app/views/cantango_editor/permissions/index.js.erb
301
+ - app/views/cantango_editor/permissions/new_category.js.erb
302
+ - app/views/cantango_editor/permissions/new_custom_target.js.erb
303
+ - app/views/cantango_editor/permissions/new_target.js.erb
304
+ - app/views/cantango_editor/permissions/notes.html.erb
305
+ - app/views/cantango_editor/permissions/preview_raw.html.erb
306
+ - app/views/cantango_editor/permissions/temp _permissions_form.html.erb
307
+ - app/views/layouts/cantango_editor/application.html.erb
308
+ - cantango_editor.gemspec
309
+ - config/routes.rb
310
+ - lib/array.rb
311
+ - lib/cantango_editor.rb
312
+ - lib/cantango_editor/configuration.rb
313
+ - lib/cantango_editor/engine.rb
314
+ - lib/cantango_editor/version.rb
315
+ - lib/permissions_hash.rb
316
+ - lib/tasks/cantango-editor_tasks.rake
317
+ - lib/time_precise.rb
318
+ - script/rails
319
+ - spec/cantango_editor/configuration/configuration_spec.rb
320
+ - spec/cantango_editor/models/permissions_spec.rb
321
+ - spec/cantango_editor_spec.rb
322
+ - spec/dummy/Rakefile
323
+ - spec/dummy/app/assets/javascripts/application.js
324
+ - spec/dummy/app/assets/javascripts/main.js
325
+ - spec/dummy/app/assets/stylesheets/application.css
326
+ - spec/dummy/app/controllers/application_controller.rb
327
+ - spec/dummy/app/controllers/main_controller.rb
328
+ - spec/dummy/app/helpers/application_helper.rb
329
+ - spec/dummy/app/helpers/main_helper.rb
330
+ - spec/dummy/app/mailers/.gitkeep
331
+ - spec/dummy/app/models/.gitkeep
332
+ - spec/dummy/app/models/admin.rb
333
+ - spec/dummy/app/models/article.rb
334
+ - spec/dummy/app/models/comment.rb
335
+ - spec/dummy/app/models/concerto.rb
336
+ - spec/dummy/app/models/guest.rb
337
+ - spec/dummy/app/models/improvisation.rb
338
+ - spec/dummy/app/models/post.rb
339
+ - spec/dummy/app/models/song.rb
340
+ - spec/dummy/app/models/tune.rb
341
+ - spec/dummy/app/models/user.rb
342
+ - spec/dummy/app/views/layouts/application.html.erb
343
+ - spec/dummy/app/views/main/index.html.erb
344
+ - spec/dummy/config.ru
345
+ - spec/dummy/config/application.rb
346
+ - spec/dummy/config/boot.rb
347
+ - spec/dummy/config/categories.yml
348
+ - spec/dummy/config/database.yml
349
+ - spec/dummy/config/environment.rb
350
+ - spec/dummy/config/environments/development.rb
351
+ - spec/dummy/config/environments/production.rb
352
+ - spec/dummy/config/environments/test.rb
353
+ - spec/dummy/config/initializers/backtrace_silencers.rb
354
+ - spec/dummy/config/initializers/cantango.rb
355
+ - spec/dummy/config/initializers/cantango_editor.rb
356
+ - spec/dummy/config/initializers/devise.rb
357
+ - spec/dummy/config/initializers/inflections.rb
358
+ - spec/dummy/config/initializers/mime_types.rb
359
+ - spec/dummy/config/initializers/secret_token.rb
360
+ - spec/dummy/config/initializers/session_store.rb
361
+ - spec/dummy/config/initializers/wrap_parameters.rb
362
+ - spec/dummy/config/locales/devise.en.yml
363
+ - spec/dummy/config/locales/en.yml
364
+ - spec/dummy/config/permissions.yml.save
365
+ - spec/dummy/config/routes.rb
366
+ - spec/dummy/db/development.sqlite3
367
+ - spec/dummy/db/migrate/20111018203622_create_posts.rb
368
+ - spec/dummy/db/migrate/20111018203648_create_articles.rb
369
+ - spec/dummy/db/migrate/20111018203800_create_comments.rb
370
+ - spec/dummy/db/migrate/20111018203817_create_songs.rb
371
+ - spec/dummy/db/migrate/20111018203827_create_tunes.rb
372
+ - spec/dummy/db/migrate/20111018203859_create_concertos.rb
373
+ - spec/dummy/db/migrate/20111018203917_create_improvisations.rb
374
+ - spec/dummy/db/migrate/20111019122217_devise_create_users.rb
375
+ - spec/dummy/db/schema.rb
376
+ - spec/dummy/db/test.sqlite3
377
+ - spec/dummy/lib/assets/.gitkeep
378
+ - spec/dummy/log/.gitkeep
379
+ - spec/dummy/public/404.html
380
+ - spec/dummy/public/422.html
381
+ - spec/dummy/public/500.html
382
+ - spec/dummy/public/favicon.ico
383
+ - spec/dummy/script/rails
384
+ - spec/integration/navigation_spec.rb
385
+ - spec/permissions_hash_spec.rb
386
+ - spec/requests/requests_spec.rb
387
+ - spec/spec_helper.rb
388
+ homepage: http://github.com/stanislaw/cantango_editor
389
+ licenses:
390
+ - MIT
391
+ post_install_message:
392
+ rdoc_options: []
393
+ require_paths:
394
+ - lib
395
+ required_ruby_version: !ruby/object:Gem::Requirement
396
+ none: false
397
+ requirements:
398
+ - - ! '>='
399
+ - !ruby/object:Gem::Version
400
+ version: '0'
401
+ segments:
402
+ - 0
403
+ hash: 281201553
404
+ required_rubygems_version: !ruby/object:Gem::Requirement
405
+ none: false
406
+ requirements:
407
+ - - ! '>='
408
+ - !ruby/object:Gem::Version
409
+ version: '0'
410
+ requirements: []
411
+ rubyforge_project:
412
+ rubygems_version: 1.8.11
413
+ signing_key:
414
+ specification_version: 3
415
+ summary: Rails Engine to manage permissions stored in yaml file
416
+ test_files: []