heimdallr-resource 1.0.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.rspec +1 -2
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +9 -5
  4. data/heimdallr-resource.gemspec +4 -3
  5. data/lib/heimdallr-resource.rb +2 -0
  6. data/lib/heimdallr/resource.rb +21 -191
  7. data/lib/heimdallr/resource_implementation.rb +190 -0
  8. data/spec/{resource_spec.rb → controllers/entities_controller_spec.rb} +25 -7
  9. data/spec/controllers/fluffies_controller_spec.rb +20 -0
  10. data/spec/controllers/things_controller_spec.rb +31 -0
  11. data/spec/dummy/app/controllers/{entity_controller.rb → entities_controller.rb} +6 -2
  12. data/spec/dummy/app/controllers/things_controller.rb +29 -0
  13. data/spec/dummy/app/models/entity.rb +2 -0
  14. data/spec/dummy/app/models/thing.rb +16 -0
  15. data/spec/dummy/config/application.rb +1 -1
  16. data/spec/dummy/config/routes.rb +6 -5
  17. data/spec/dummy/db/schema.rb +5 -0
  18. data/spec/models/resource_implementation_spec.rb +382 -0
  19. data/spec/models/resource_spec.rb +91 -0
  20. data/spec/spec_helper.rb +1 -0
  21. metadata +44 -48
  22. data/spec/dummy/Rakefile +0 -7
  23. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  24. data/spec/dummy/config/environments/development.rb +0 -23
  25. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  26. data/spec/dummy/config/initializers/inflections.rb +0 -10
  27. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  28. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  29. data/spec/dummy/config/initializers/session_store.rb +0 -8
  30. data/spec/dummy/config/locales/en.yml +0 -5
  31. data/spec/dummy/public/404.html +0 -26
  32. data/spec/dummy/public/422.html +0 -26
  33. data/spec/dummy/public/500.html +0 -26
  34. data/spec/dummy/public/favicon.ico +0 -0
  35. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  36. data/spec/dummy/script/rails +0 -6
  37. data/spec/fluffies_spec.rb +0 -22
File without changes
File without changes
@@ -1,6 +0,0 @@
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'
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe FluffiesController, :type => :controller do
4
- before(:all) do
5
- @john = User.create! :admin => false
6
- @maria = User.create! :admin => false
7
- @admin = User.create! :admin => true
8
- @private = Entity.create! :name => 'ent1', :public => false
9
- @public = Entity.create! :name => 'ent1', :public => true, :owner_id => @john.id
10
- end
11
-
12
- after(:all) do
13
- Entity.delete_all
14
- end
15
-
16
- it "accepts load_and_authorize_resource params" do
17
- User.mock @admin
18
- get :index
19
-
20
- assigns(:entities).count.should == 2
21
- end
22
- end