angus 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/angus +13 -0
- data/lib/angus.rb +6 -4
- data/lib/angus/base.rb +119 -0
- data/lib/angus/base_actions.rb +38 -0
- data/lib/angus/base_resource.rb +14 -0
- data/lib/angus/command.rb +27 -0
- data/lib/angus/generator.rb +141 -0
- data/lib/angus/generator/templates/Gemfile +5 -0
- data/lib/angus/generator/templates/README.md +0 -0
- data/lib/angus/generator/templates/config.ru.erb +10 -0
- data/lib/angus/generator/templates/definitions/messages.yml +0 -0
- data/lib/angus/generator/templates/definitions/operations.yml.erb +21 -0
- data/lib/angus/generator/templates/definitions/representations.yml +0 -0
- data/lib/angus/generator/templates/definitions/service.yml.erb +3 -0
- data/lib/angus/generator/templates/resources/resource.rb.erb +6 -0
- data/lib/angus/generator/templates/services/service.rb.erb +4 -0
- data/lib/angus/marshallings/base.rb +2 -0
- data/lib/angus/marshallings/marshalling.rb +136 -0
- data/lib/angus/marshallings/unmarshalling.rb +29 -0
- data/lib/angus/renders/base.rb +2 -0
- data/lib/angus/renders/html_render.rb +9 -0
- data/lib/angus/renders/json_render.rb +15 -0
- data/lib/angus/request_handler.rb +62 -0
- data/lib/angus/resource_definition.rb +78 -0
- data/lib/angus/response.rb +53 -0
- data/lib/angus/responses.rb +232 -0
- data/lib/angus/rspec/spec_helper.rb +3 -0
- data/lib/angus/rspec/support/examples.rb +64 -0
- data/lib/angus/rspec/support/examples/describe_errors.rb +36 -0
- data/lib/angus/rspec/support/matchers/operation_response_matchers.rb +117 -0
- data/lib/angus/rspec/support/operation_response.rb +57 -0
- data/lib/angus/utils.rb +2 -0
- data/lib/angus/utils/params.rb +24 -0
- data/lib/angus/utils/string.rb +27 -0
- data/lib/angus/version.rb +2 -2
- data/spec/angus/rspec/examples/describe_errors_spec.rb +64 -0
- data/spec/spec_helper.rb +27 -0
- metadata +181 -19
- data/.gitignore +0 -17
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -29
- data/Rakefile +0 -1
- data/angus.gemspec +0 -23
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2013 Adrian Gomez
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Angus
|
2
|
-
|
3
|
-
TODO: Write a gem description
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'angus'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install angus
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Contributing
|
24
|
-
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
data/angus.gemspec
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'angus/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "angus"
|
8
|
-
spec.version = Angus::VERSION
|
9
|
-
spec.authors = ["Adrian Gomez"]
|
10
|
-
spec.email = ["adrian.gomez@moove-it.com"]
|
11
|
-
spec.description = %q{Angus}
|
12
|
-
spec.summary = %q{Angus}
|
13
|
-
spec.homepage = ""
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
end
|