grape-transformations 0.0.1

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 (69) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +19 -0
  5. data/lib/grape/generators/templates/entity.rb +12 -0
  6. data/lib/grape/generators/templates/grape-transformations.rb +4 -0
  7. data/lib/grape/generators/transformations/entity_generator.rb +54 -0
  8. data/lib/grape/generators/transformations/install_generator.rb +29 -0
  9. data/lib/grape/tasks/grapi_tasks.rake +4 -0
  10. data/lib/grape/transformations/base.rb +67 -0
  11. data/lib/grape/transformations/engine.rb +14 -0
  12. data/lib/grape/transformations/loader.rb +86 -0
  13. data/lib/grape/transformations/version.rb +5 -0
  14. data/lib/grape/transformations.rb +112 -0
  15. data/spec/api/animal_spec.rb +37 -0
  16. data/spec/api/user_spec.rb +55 -0
  17. data/spec/generators/entity_generator_spec.rb +25 -0
  18. data/spec/generators/install_generator_spec.rb +33 -0
  19. data/spec/grapi_spec.rb +132 -0
  20. data/spec/spec_helper.rb +78 -0
  21. data/spec/test_app/README.rdoc +28 -0
  22. data/spec/test_app/Rakefile +6 -0
  23. data/spec/test_app/app/api/api.rb +7 -0
  24. data/spec/test_app/app/api/test_app/entities/animals/compact.rb +10 -0
  25. data/spec/test_app/app/api/test_app/entities/animals/full.rb +12 -0
  26. data/spec/test_app/app/api/test_app/entities/food.rb +8 -0
  27. data/spec/test_app/app/api/test_app/entities/users/compact.rb +10 -0
  28. data/spec/test_app/app/api/test_app/entities/users/default.rb +13 -0
  29. data/spec/test_app/app/api/test_app/modules/animal.rb +39 -0
  30. data/spec/test_app/app/api/test_app/modules/user.rb +39 -0
  31. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  32. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  33. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  34. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  35. data/spec/test_app/app/models/animal.rb +12 -0
  36. data/spec/test_app/app/models/food.rb +7 -0
  37. data/spec/test_app/app/models/user.rb +13 -0
  38. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  39. data/spec/test_app/bin/bundle +3 -0
  40. data/spec/test_app/bin/rails +4 -0
  41. data/spec/test_app/bin/rake +4 -0
  42. data/spec/test_app/config/application.rb +32 -0
  43. data/spec/test_app/config/boot.rb +5 -0
  44. data/spec/test_app/config/database.yml +25 -0
  45. data/spec/test_app/config/environment.rb +5 -0
  46. data/spec/test_app/config/environments/development.rb +37 -0
  47. data/spec/test_app/config/environments/production.rb +78 -0
  48. data/spec/test_app/config/environments/test.rb +39 -0
  49. data/spec/test_app/config/initializers/assets.rb +8 -0
  50. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  51. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  52. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/spec/test_app/config/initializers/grapi.rb +4 -0
  54. data/spec/test_app/config/initializers/inflections.rb +16 -0
  55. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  56. data/spec/test_app/config/initializers/session_store.rb +3 -0
  57. data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
  58. data/spec/test_app/config/locales/en.yml +23 -0
  59. data/spec/test_app/config/routes.rb +3 -0
  60. data/spec/test_app/config/secrets.yml +22 -0
  61. data/spec/test_app/config.ru +4 -0
  62. data/spec/test_app/db/development.sqlite3 +0 -0
  63. data/spec/test_app/log/development.log +72 -0
  64. data/spec/test_app/public/404.html +67 -0
  65. data/spec/test_app/public/422.html +67 -0
  66. data/spec/test_app/public/500.html +66 -0
  67. data/spec/test_app/public/favicon.ico +0 -0
  68. data/spec/test_app/tmp/cache/7F3/650/registered_entities +1 -0
  69. metadata +400 -0
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,4 @@
1
+ # it loads automatically entities that are associated with models in your app
2
+ Grape::Transformations.setup do |config|
3
+ config.load_entities_from File.join('test_app', 'entities')
4
+ end
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_test_app_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ mount API => '/'
3
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: dbb2d4c8dee5793dc8d8fa209f596cb0e00e6a89b76b50a1986c4684b5c0153f214a99f16461fc766d71a5227df839665e905e133734e2cc70a3a5c1fe0264f9
15
+
16
+ test:
17
+ secret_key_base: 5845661a1f01d6379fc7069d819ec650e577c8e71e046ae2c412d6bdd908f933cefc7d475b14949e2f8a2e013d41c11b42599cf7fb473fbee7c4f4d2521c93ba
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
File without changes
@@ -0,0 +1,72 @@
1
+
2
+
3
+ Started GET "/api/v1/animals/foo" for 127.0.0.1 at 2014-11-19 12:19:01 -0500
4
+
5
+
6
+ Started GET "/api/v1/animals/bar/0" for 127.0.0.1 at 2014-11-19 12:19:01 -0500
7
+
8
+
9
+ Started GET "/api/v1/users" for 127.0.0.1 at 2014-11-19 12:19:01 -0500
10
+
11
+
12
+ Started GET "/api/v1/users/compact" for 127.0.0.1 at 2014-11-19 12:19:02 -0500
13
+
14
+
15
+ Started GET "/api/v1/users/0" for 127.0.0.1 at 2014-11-19 12:19:02 -0500
16
+
17
+
18
+ Started GET "/api/v1/users/compact/0" for 127.0.0.1 at 2014-11-19 12:19:02 -0500
19
+
20
+
21
+ Started GET "/api/v1/animals/foo" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
22
+
23
+
24
+ Started GET "/api/v1/animals/bar/0" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
25
+
26
+
27
+ Started GET "/api/v1/users" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
28
+
29
+
30
+ Started GET "/api/v1/users/compact" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
31
+
32
+
33
+ Started GET "/api/v1/users/0" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
34
+
35
+
36
+ Started GET "/api/v1/users/compact/0" for 127.0.0.1 at 2014-11-19 12:19:46 -0500
37
+
38
+
39
+ Started GET "/api/v1/animals/foo" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
40
+
41
+
42
+ Started GET "/api/v1/animals/bar/0" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
43
+
44
+
45
+ Started GET "/api/v1/users" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
46
+
47
+
48
+ Started GET "/api/v1/users/compact" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
49
+
50
+
51
+ Started GET "/api/v1/users/0" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
52
+
53
+
54
+ Started GET "/api/v1/users/compact/0" for 127.0.0.1 at 2014-11-19 12:21:24 -0500
55
+
56
+
57
+ Started GET "/api/v1/animals/foo" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
58
+
59
+
60
+ Started GET "/api/v1/animals/bar/0" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
61
+
62
+
63
+ Started GET "/api/v1/users" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
64
+
65
+
66
+ Started GET "/api/v1/users/compact" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
67
+
68
+
69
+ Started GET "/api/v1/users/0" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
70
+
71
+
72
+ Started GET "/api/v1/users/compact/0" for 127.0.0.1 at 2014-11-19 12:27:38 -0500
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1 @@
1
+ o: ActiveSupport::Cache::Entry: @value{I" Food:ETI"TestApp::Entities::Food;TI" User;TI"&TestApp::Entities::Users::Default;T:@created_atf1416418058.161626:@expires_in0
metadata ADDED
@@ -0,0 +1,400 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grape-transformations
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Johan Tique
8
+ - Miguel Diaz
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-11-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: 4.1.7
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: 4.1.7
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '1.5'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '1.5'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>='
47
+ - !ruby/object:Gem::Version
48
+ version: 10.3.2
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 10.3.2
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 3.1.0
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 3.1.0
70
+ - !ruby/object:Gem::Dependency
71
+ name: ammeter
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 1.1.2
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: 1.1.2
84
+ - !ruby/object:Gem::Dependency
85
+ name: sqlite3
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: 1.3.10
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - '>='
96
+ - !ruby/object:Gem::Version
97
+ version: 1.3.10
98
+ - !ruby/object:Gem::Dependency
99
+ name: virtus
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: 1.0.3
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: 1.0.3
112
+ - !ruby/object:Gem::Dependency
113
+ name: railties
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - '>='
117
+ - !ruby/object:Gem::Version
118
+ version: 4.1.7
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 4.1.7
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-rails
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '>='
131
+ - !ruby/object:Gem::Version
132
+ version: 3.1.0
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '>='
138
+ - !ruby/object:Gem::Version
139
+ version: 3.1.0
140
+ - !ruby/object:Gem::Dependency
141
+ name: activesupport
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '>='
145
+ - !ruby/object:Gem::Version
146
+ version: 4.1.7
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: 4.1.7
154
+ - !ruby/object:Gem::Dependency
155
+ name: pry-byebug
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - '>='
159
+ - !ruby/object:Gem::Version
160
+ version: 2.0.0
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '>='
166
+ - !ruby/object:Gem::Version
167
+ version: 2.0.0
168
+ - !ruby/object:Gem::Dependency
169
+ name: simplecov
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '>='
173
+ - !ruby/object:Gem::Version
174
+ version: 0.8.2
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: 0.8.2
182
+ - !ruby/object:Gem::Dependency
183
+ name: rspec-mocks
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '>='
187
+ - !ruby/object:Gem::Version
188
+ version: 3.1.0
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - '>='
194
+ - !ruby/object:Gem::Version
195
+ version: 3.1.0
196
+ - !ruby/object:Gem::Dependency
197
+ name: codeclimate-test-reporter
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - '='
201
+ - !ruby/object:Gem::Version
202
+ version: 0.4.0
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - '='
208
+ - !ruby/object:Gem::Version
209
+ version: 0.4.0
210
+ - !ruby/object:Gem::Dependency
211
+ name: grape
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - '>='
215
+ - !ruby/object:Gem::Version
216
+ version: 0.7.0
217
+ - - <=
218
+ - !ruby/object:Gem::Version
219
+ version: 0.9.0
220
+ type: :runtime
221
+ prerelease: false
222
+ version_requirements: !ruby/object:Gem::Requirement
223
+ requirements:
224
+ - - '>='
225
+ - !ruby/object:Gem::Version
226
+ version: 0.7.0
227
+ - - <=
228
+ - !ruby/object:Gem::Version
229
+ version: 0.9.0
230
+ - !ruby/object:Gem::Dependency
231
+ name: grape-entity
232
+ requirement: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ~>
235
+ - !ruby/object:Gem::Version
236
+ version: 0.4.0
237
+ type: :runtime
238
+ prerelease: false
239
+ version_requirements: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ~>
242
+ - !ruby/object:Gem::Version
243
+ version: 0.4.0
244
+ description: 'grape-transformations your entities from your models and also organizes
245
+ and lets you use multiple entities per model '
246
+ email:
247
+ - johan.tique@codescrum.com
248
+ - miguel.diaz@codescrum.com
249
+ executables: []
250
+ extensions: []
251
+ extra_rdoc_files: []
252
+ files:
253
+ - MIT-LICENSE
254
+ - README.rdoc
255
+ - Rakefile
256
+ - lib/grape/generators/templates/entity.rb
257
+ - lib/grape/generators/templates/grape-transformations.rb
258
+ - lib/grape/generators/transformations/entity_generator.rb
259
+ - lib/grape/generators/transformations/install_generator.rb
260
+ - lib/grape/tasks/grapi_tasks.rake
261
+ - lib/grape/transformations.rb
262
+ - lib/grape/transformations/base.rb
263
+ - lib/grape/transformations/engine.rb
264
+ - lib/grape/transformations/loader.rb
265
+ - lib/grape/transformations/version.rb
266
+ - spec/api/animal_spec.rb
267
+ - spec/api/user_spec.rb
268
+ - spec/generators/entity_generator_spec.rb
269
+ - spec/generators/install_generator_spec.rb
270
+ - spec/grapi_spec.rb
271
+ - spec/spec_helper.rb
272
+ - spec/test_app/README.rdoc
273
+ - spec/test_app/Rakefile
274
+ - spec/test_app/app/api/api.rb
275
+ - spec/test_app/app/api/test_app/entities/animals/compact.rb
276
+ - spec/test_app/app/api/test_app/entities/animals/full.rb
277
+ - spec/test_app/app/api/test_app/entities/food.rb
278
+ - spec/test_app/app/api/test_app/entities/users/compact.rb
279
+ - spec/test_app/app/api/test_app/entities/users/default.rb
280
+ - spec/test_app/app/api/test_app/modules/animal.rb
281
+ - spec/test_app/app/api/test_app/modules/user.rb
282
+ - spec/test_app/app/assets/javascripts/application.js
283
+ - spec/test_app/app/assets/stylesheets/application.css
284
+ - spec/test_app/app/controllers/application_controller.rb
285
+ - spec/test_app/app/helpers/application_helper.rb
286
+ - spec/test_app/app/models/animal.rb
287
+ - spec/test_app/app/models/food.rb
288
+ - spec/test_app/app/models/user.rb
289
+ - spec/test_app/app/views/layouts/application.html.erb
290
+ - spec/test_app/bin/bundle
291
+ - spec/test_app/bin/rails
292
+ - spec/test_app/bin/rake
293
+ - spec/test_app/config.ru
294
+ - spec/test_app/config/application.rb
295
+ - spec/test_app/config/boot.rb
296
+ - spec/test_app/config/database.yml
297
+ - spec/test_app/config/environment.rb
298
+ - spec/test_app/config/environments/development.rb
299
+ - spec/test_app/config/environments/production.rb
300
+ - spec/test_app/config/environments/test.rb
301
+ - spec/test_app/config/initializers/assets.rb
302
+ - spec/test_app/config/initializers/backtrace_silencers.rb
303
+ - spec/test_app/config/initializers/cookies_serializer.rb
304
+ - spec/test_app/config/initializers/filter_parameter_logging.rb
305
+ - spec/test_app/config/initializers/grapi.rb
306
+ - spec/test_app/config/initializers/inflections.rb
307
+ - spec/test_app/config/initializers/mime_types.rb
308
+ - spec/test_app/config/initializers/session_store.rb
309
+ - spec/test_app/config/initializers/wrap_parameters.rb
310
+ - spec/test_app/config/locales/en.yml
311
+ - spec/test_app/config/routes.rb
312
+ - spec/test_app/config/secrets.yml
313
+ - spec/test_app/db/development.sqlite3
314
+ - spec/test_app/log/development.log
315
+ - spec/test_app/public/404.html
316
+ - spec/test_app/public/422.html
317
+ - spec/test_app/public/500.html
318
+ - spec/test_app/public/favicon.ico
319
+ - spec/test_app/tmp/cache/7F3/650/registered_entities
320
+ homepage: http://www.codescrum.com
321
+ licenses:
322
+ - MIT
323
+ metadata: {}
324
+ post_install_message:
325
+ rdoc_options: []
326
+ require_paths:
327
+ - lib
328
+ required_ruby_version: !ruby/object:Gem::Requirement
329
+ requirements:
330
+ - - '>='
331
+ - !ruby/object:Gem::Version
332
+ version: '0'
333
+ required_rubygems_version: !ruby/object:Gem::Requirement
334
+ requirements:
335
+ - - '>='
336
+ - !ruby/object:Gem::Version
337
+ version: '0'
338
+ requirements: []
339
+ rubyforge_project:
340
+ rubygems_version: 2.2.1
341
+ signing_key:
342
+ specification_version: 4
343
+ summary: grape-transformations decouples your entities from your models and also organizes
344
+ and lets you use multiple entities per model
345
+ test_files:
346
+ - spec/api/animal_spec.rb
347
+ - spec/api/user_spec.rb
348
+ - spec/generators/entity_generator_spec.rb
349
+ - spec/generators/install_generator_spec.rb
350
+ - spec/grapi_spec.rb
351
+ - spec/spec_helper.rb
352
+ - spec/test_app/app/api/api.rb
353
+ - spec/test_app/app/api/test_app/entities/animals/compact.rb
354
+ - spec/test_app/app/api/test_app/entities/animals/full.rb
355
+ - spec/test_app/app/api/test_app/entities/food.rb
356
+ - spec/test_app/app/api/test_app/entities/users/compact.rb
357
+ - spec/test_app/app/api/test_app/entities/users/default.rb
358
+ - spec/test_app/app/api/test_app/modules/animal.rb
359
+ - spec/test_app/app/api/test_app/modules/user.rb
360
+ - spec/test_app/app/assets/javascripts/application.js
361
+ - spec/test_app/app/assets/stylesheets/application.css
362
+ - spec/test_app/app/controllers/application_controller.rb
363
+ - spec/test_app/app/helpers/application_helper.rb
364
+ - spec/test_app/app/models/animal.rb
365
+ - spec/test_app/app/models/food.rb
366
+ - spec/test_app/app/models/user.rb
367
+ - spec/test_app/app/views/layouts/application.html.erb
368
+ - spec/test_app/bin/bundle
369
+ - spec/test_app/bin/rails
370
+ - spec/test_app/bin/rake
371
+ - spec/test_app/config/application.rb
372
+ - spec/test_app/config/boot.rb
373
+ - spec/test_app/config/database.yml
374
+ - spec/test_app/config/environment.rb
375
+ - spec/test_app/config/environments/development.rb
376
+ - spec/test_app/config/environments/production.rb
377
+ - spec/test_app/config/environments/test.rb
378
+ - spec/test_app/config/initializers/assets.rb
379
+ - spec/test_app/config/initializers/backtrace_silencers.rb
380
+ - spec/test_app/config/initializers/cookies_serializer.rb
381
+ - spec/test_app/config/initializers/filter_parameter_logging.rb
382
+ - spec/test_app/config/initializers/grapi.rb
383
+ - spec/test_app/config/initializers/inflections.rb
384
+ - spec/test_app/config/initializers/mime_types.rb
385
+ - spec/test_app/config/initializers/session_store.rb
386
+ - spec/test_app/config/initializers/wrap_parameters.rb
387
+ - spec/test_app/config/locales/en.yml
388
+ - spec/test_app/config/routes.rb
389
+ - spec/test_app/config/secrets.yml
390
+ - spec/test_app/config.ru
391
+ - spec/test_app/db/development.sqlite3
392
+ - spec/test_app/log/development.log
393
+ - spec/test_app/public/404.html
394
+ - spec/test_app/public/422.html
395
+ - spec/test_app/public/500.html
396
+ - spec/test_app/public/favicon.ico
397
+ - spec/test_app/Rakefile
398
+ - spec/test_app/README.rdoc
399
+ - spec/test_app/tmp/cache/7F3/650/registered_entities
400
+ has_rdoc: