manage 1.3.41 → 1.3.42

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.rdoc +2 -0
  4. data/Rakefile +31 -31
  5. data/app/assets/javascripts/manage/collection_actions.js.coffee +30 -30
  6. data/app/assets/javascripts/manage/handlers.js.coffee +46 -46
  7. data/app/assets/javascripts/manage/table_checkboxes.js.coffee +11 -11
  8. data/app/controllers/manage/application_controller.rb +13 -13
  9. data/app/controllers/manage/dashboards_controller.rb +4 -4
  10. data/app/controllers/manage/responder.rb +11 -11
  11. data/app/controllers/manage/sessions_controller.rb +11 -11
  12. data/app/helpers/manage/application_helper.rb +42 -42
  13. data/app/helpers/manage/form_helper.rb +21 -21
  14. data/app/helpers/manage/resource_helper.rb +77 -77
  15. data/app/models/admin_user.rb +4 -4
  16. data/app/views/layouts/manage/_main_menu.html.slim +52 -52
  17. data/app/views/layouts/manage/sign_in.html.slim +30 -30
  18. data/app/views/manage/resource/_form.html.slim +4 -4
  19. data/app/views/manage/resource/index/_collection_actions.html.slim +2 -2
  20. data/app/views/manage/resource/index/_count.html.slim +6 -6
  21. data/app/views/manage/resource/show.html.slim +10 -10
  22. data/app/views/manage/sessions/new.html.slim +10 -10
  23. data/config/initializers/devise.rb +247 -247
  24. data/config/initializers/session_store.rb +1 -3
  25. data/config/initializers/simple_form.rb +145 -145
  26. data/config/initializers/simple_form_foundation.rb +26 -26
  27. data/config/locales/devise.en.yml +59 -59
  28. data/config/locales/en.yml +20 -20
  29. data/config/routes.rb +10 -10
  30. data/db/migrate/20131204142720_create_admin_users.rb +24 -24
  31. data/lib/manage.rb +5 -5
  32. data/lib/manage/engine.rb +21 -21
  33. data/lib/manage/fields.rb +6 -6
  34. data/lib/manage/version.rb +1 -1
  35. data/lib/tasks/manage_tasks.rake +15 -15
  36. data/lib/templates/erb/scaffold/_form.html.erb +13 -13
  37. data/spec/controllers/manage/resource_controller_spec.rb +29 -29
  38. data/spec/dummy/README.rdoc +28 -28
  39. data/spec/dummy/Rakefile +6 -6
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -13
  41. data/spec/dummy/app/assets/stylesheets/application.css +13 -13
  42. data/spec/dummy/app/controllers/application_controller.rb +5 -5
  43. data/spec/dummy/app/controllers/manage/posts_controller.rb +4 -4
  44. data/spec/dummy/app/helpers/application_helper.rb +2 -2
  45. data/spec/dummy/app/models/post.rb +3 -3
  46. data/spec/dummy/app/models/user.rb +5 -5
  47. data/spec/dummy/app/views/layouts/application.html.erb +14 -14
  48. data/spec/dummy/bin/bundle +3 -3
  49. data/spec/dummy/bin/rails +4 -4
  50. data/spec/dummy/bin/rake +4 -4
  51. data/spec/dummy/config.ru +4 -4
  52. data/spec/dummy/config/application.rb +24 -24
  53. data/spec/dummy/config/boot.rb +5 -5
  54. data/spec/dummy/config/database.yml +25 -25
  55. data/spec/dummy/config/environment.rb +5 -5
  56. data/spec/dummy/config/environments/development.rb +29 -29
  57. data/spec/dummy/config/environments/production.rb +80 -80
  58. data/spec/dummy/config/environments/test.rb +36 -36
  59. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
  60. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
  61. data/spec/dummy/config/initializers/inflections.rb +16 -16
  62. data/spec/dummy/config/initializers/mime_types.rb +5 -5
  63. data/spec/dummy/config/initializers/secret_token.rb +12 -12
  64. data/spec/dummy/config/initializers/session_store.rb +3 -3
  65. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
  66. data/spec/dummy/config/locales/en.yml +23 -23
  67. data/spec/dummy/config/routes.rb +10 -10
  68. data/spec/dummy/db/migrate/20130716083410_init_migration.rb +21 -21
  69. data/spec/dummy/db/schema.rb +53 -53
  70. data/spec/dummy/public/404.html +58 -58
  71. data/spec/dummy/public/422.html +58 -58
  72. data/spec/dummy/public/500.html +57 -57
  73. data/spec/fields/reader_spec.rb +79 -79
  74. data/spec/spec_helper.rb +24 -24
  75. metadata +24 -24
@@ -1,58 +1,58 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/422.html -->
52
- <div class="dialog">
53
- <h1>The change you wanted was rejected.</h1>
54
- <p>Maybe you tried to change something you didn't have access to.</p>
55
- </div>
56
- <p>If you are the application owner check the logs for more information.</p>
57
- </body>
58
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -1,57 +1,57 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/500.html -->
52
- <div class="dialog">
53
- <h1>We're sorry, but something went wrong.</h1>
54
- </div>
55
- <p>If you are the application owner check the logs for more information.</p>
56
- </body>
57
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/500.html -->
52
+ <div class="dialog">
53
+ <h1>We're sorry, but something went wrong.</h1>
54
+ </div>
55
+ <p>If you are the application owner check the logs for more information.</p>
56
+ </body>
57
+ </html>
@@ -1,79 +1,79 @@
1
- require 'spec_helper'
2
-
3
- module Manage
4
- module Fields
5
- describe Reader do
6
-
7
- it 'gets the right field value by using the field name represented as symbol' do
8
- test_object = Object.new
9
-
10
- mock_value = 'I am here!!!'
11
- test_object.stub(:me) {mock_value}
12
-
13
- value = Reader.field_value(test_object, :me)
14
- value.should eq(mock_value)
15
- end
16
-
17
- it 'gets the right field value by using the field name represented as string' do
18
- test_object = Object.new
19
-
20
- mock_value = 'I am you and you are me'
21
- test_object.stub(:me) {mock_value}
22
-
23
- value = Reader.field_value(test_object, 'me')
24
- value.should eq(mock_value)
25
- end
26
-
27
- it 'gets the right field value by using the composite field of the type "a.b.c"' do
28
- test_object = Object.new
29
-
30
- mock_value = 'Deep hidden stuff!'
31
- test_object.stub(:me) do
32
- test_object_level_two = Object.new
33
- test_object_level_two.stub(:you) do
34
- test_object_level_three = Object.new
35
- test_object_level_three.stub(:we) {mock_value}
36
- test_object_level_three
37
- end
38
-
39
- test_object_level_two
40
- end
41
-
42
- value = Reader.field_value(test_object, 'me.you.we')
43
- value.should eq(mock_value)
44
- end
45
-
46
- it 'can work with relations one level deep' do
47
- Reader.stub(:'_is_field_relation?') {true}
48
-
49
- test_object = Object.new
50
- test_object.stub(:list) {[Struct.new(:id).new(5), Struct.new(:id).new(6)]}
51
-
52
- value = Reader.field_value(test_object, 'list')
53
- value.should_not be_nil
54
- value.should be_a(String)
55
- value.should include('5', '6')
56
- end
57
-
58
- it 'displays relation values in custom format' do
59
- Reader.stub(:'_is_field_relation?') {true}
60
-
61
- test_object = Object.new
62
- test_object.stub(:list) {[
63
- Struct.new(:id, :name).new(5, 'meddle'),
64
- Struct.new(:id, :name).new(6, 'nickolay')
65
- ]}
66
-
67
- field_data = {'list' => {
68
- format: ->(obj) { obj.name }
69
- }}
70
-
71
- value = Reader.field_value(test_object, field_data)
72
- value.should_not be_nil
73
- value.should be_a(String)
74
- value.should include('meddle', 'nickolay')
75
- end
76
-
77
- end
78
- end
79
- end
1
+ require 'spec_helper'
2
+
3
+ module Manage
4
+ module Fields
5
+ describe Reader do
6
+
7
+ it 'gets the right field value by using the field name represented as symbol' do
8
+ test_object = Object.new
9
+
10
+ mock_value = 'I am here!!!'
11
+ test_object.stub(:me) {mock_value}
12
+
13
+ value = Reader.field_value(test_object, :me)
14
+ value.should eq(mock_value)
15
+ end
16
+
17
+ it 'gets the right field value by using the field name represented as string' do
18
+ test_object = Object.new
19
+
20
+ mock_value = 'I am you and you are me'
21
+ test_object.stub(:me) {mock_value}
22
+
23
+ value = Reader.field_value(test_object, 'me')
24
+ value.should eq(mock_value)
25
+ end
26
+
27
+ it 'gets the right field value by using the composite field of the type "a.b.c"' do
28
+ test_object = Object.new
29
+
30
+ mock_value = 'Deep hidden stuff!'
31
+ test_object.stub(:me) do
32
+ test_object_level_two = Object.new
33
+ test_object_level_two.stub(:you) do
34
+ test_object_level_three = Object.new
35
+ test_object_level_three.stub(:we) {mock_value}
36
+ test_object_level_three
37
+ end
38
+
39
+ test_object_level_two
40
+ end
41
+
42
+ value = Reader.field_value(test_object, 'me.you.we')
43
+ value.should eq(mock_value)
44
+ end
45
+
46
+ it 'can work with relations one level deep' do
47
+ Reader.stub(:'_is_field_relation?') {true}
48
+
49
+ test_object = Object.new
50
+ test_object.stub(:list) {[Struct.new(:id).new(5), Struct.new(:id).new(6)]}
51
+
52
+ value = Reader.field_value(test_object, 'list')
53
+ value.should_not be_nil
54
+ value.should be_a(String)
55
+ value.should include('5', '6')
56
+ end
57
+
58
+ it 'displays relation values in custom format' do
59
+ Reader.stub(:'_is_field_relation?') {true}
60
+
61
+ test_object = Object.new
62
+ test_object.stub(:list) {[
63
+ Struct.new(:id, :name).new(5, 'meddle'),
64
+ Struct.new(:id, :name).new(6, 'nickolay')
65
+ ]}
66
+
67
+ field_data = {'list' => {
68
+ format: ->(obj) { obj.name }
69
+ }}
70
+
71
+ value = Reader.field_value(test_object, field_data)
72
+ value.should_not be_nil
73
+ value.should be_a(String)
74
+ value.should include('meddle', 'nickolay')
75
+ end
76
+
77
+ end
78
+ end
79
+ end
@@ -1,24 +1,24 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
-
3
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
- load_schema = lambda {
5
- load "#{Rails.root.to_s}/db/schema.rb" # use db agnostic schema by default
6
- }
7
- silence_stream(STDOUT, &load_schema)
8
-
9
-
10
- require 'rspec/rails'
11
- require 'rspec/autorun'
12
-
13
- Rails.backtrace_cleaner.remove_silencers!
14
-
15
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
-
17
- RSpec.configure do |config|
18
- config.mock_with :rspec
19
- config.use_transactional_fixtures = true
20
- config.infer_base_class_for_anonymous_controllers = false
21
- config.order = "random"
22
- config.include Devise::TestHelpers, :type => :controller
23
- config.include Manage::Engine.routes.url_helpers
24
- end
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+
3
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ load_schema = lambda {
5
+ load "#{Rails.root.to_s}/db/schema.rb" # use db agnostic schema by default
6
+ }
7
+ silence_stream(STDOUT, &load_schema)
8
+
9
+
10
+ require 'rspec/rails'
11
+ require 'rspec/autorun'
12
+
13
+ Rails.backtrace_cleaner.remove_silencers!
14
+
15
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ config.mock_with :rspec
19
+ config.use_transactional_fixtures = true
20
+ config.infer_base_class_for_anonymous_controllers = false
21
+ config.order = "random"
22
+ config.include Devise::TestHelpers, :type => :controller
23
+ config.include Manage::Engine.routes.url_helpers
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.41
4
+ version: 1.3.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Empower United
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-06 00:00:00.000000000 Z
12
+ date: 2014-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -380,42 +380,42 @@ signing_key:
380
380
  specification_version: 4
381
381
  summary: Empower Unitited Manage Backend
382
382
  test_files:
383
- - spec/controllers/manage/resource_controller_spec.rb
384
- - spec/dummy/app/controllers/application_controller.rb
383
+ - spec/dummy/Rakefile
384
+ - spec/dummy/public/404.html
385
+ - spec/dummy/public/favicon.ico
386
+ - spec/dummy/public/500.html
387
+ - spec/dummy/public/422.html
388
+ - spec/dummy/bin/bundle
389
+ - spec/dummy/bin/rails
390
+ - spec/dummy/bin/rake
391
+ - spec/dummy/app/models/user.rb
392
+ - spec/dummy/app/models/post.rb
385
393
  - spec/dummy/app/controllers/manage/posts_controller.rb
386
- - spec/dummy/app/assets/stylesheets/application.css
394
+ - spec/dummy/app/controllers/application_controller.rb
387
395
  - spec/dummy/app/assets/javascripts/application.js
388
- - spec/dummy/app/models/post.rb
389
- - spec/dummy/app/models/user.rb
396
+ - spec/dummy/app/assets/stylesheets/application.css
390
397
  - spec/dummy/app/helpers/application_helper.rb
391
398
  - spec/dummy/app/views/layouts/application.html.erb
392
- - spec/dummy/Rakefile
393
399
  - spec/dummy/db/schema.rb
394
400
  - spec/dummy/db/migrate/20130716083410_init_migration.rb
395
- - spec/dummy/README.rdoc
396
- - spec/dummy/bin/rake
397
- - spec/dummy/bin/rails
398
- - spec/dummy/bin/bundle
399
- - spec/dummy/public/500.html
400
- - spec/dummy/public/422.html
401
- - spec/dummy/public/404.html
402
- - spec/dummy/public/favicon.ico
401
+ - spec/dummy/config.ru
403
402
  - spec/dummy/config/locales/en.yml
404
- - spec/dummy/config/boot.rb
403
+ - spec/dummy/config/routes.rb
404
+ - spec/dummy/config/environments/test.rb
405
405
  - spec/dummy/config/environments/development.rb
406
406
  - spec/dummy/config/environments/production.rb
407
- - spec/dummy/config/environments/test.rb
408
- - spec/dummy/config/environment.rb
409
- - spec/dummy/config/database.yml
410
- - spec/dummy/config/initializers/session_store.rb
411
407
  - spec/dummy/config/initializers/inflections.rb
412
- - spec/dummy/config/initializers/mime_types.rb
413
408
  - spec/dummy/config/initializers/backtrace_silencers.rb
409
+ - spec/dummy/config/initializers/session_store.rb
414
410
  - spec/dummy/config/initializers/secret_token.rb
415
411
  - spec/dummy/config/initializers/filter_parameter_logging.rb
416
412
  - spec/dummy/config/initializers/wrap_parameters.rb
413
+ - spec/dummy/config/initializers/mime_types.rb
414
+ - spec/dummy/config/boot.rb
415
+ - spec/dummy/config/environment.rb
416
+ - spec/dummy/config/database.yml
417
417
  - spec/dummy/config/application.rb
418
- - spec/dummy/config/routes.rb
419
- - spec/dummy/config.ru
418
+ - spec/dummy/README.rdoc
420
419
  - spec/fields/reader_spec.rb
420
+ - spec/controllers/manage/resource_controller_spec.rb
421
421
  - spec/spec_helper.rb