jsonapi_suite 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/jsonapi_suite.gemspec +0 -1
- data/lib/generators/jsonapi_suite/install_generator.rb +27 -0
- data/lib/generators/jsonapi_suite/templates/initializer.rb.erb +1 -0
- data/lib/generators/jsonapi_suite/templates/strong_resources.rb.erb +2 -0
- data/lib/jsonapi_suite/version.rb +1 -1
- metadata +5 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b293a213e22bb372bc8c87fb8e341f79ab46baaa
|
4
|
+
data.tar.gz: 4ec742745959edbec72bf3d97c7e018f22bce7e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc14ebd0183c3fe3e18686a634dcb755e4bbed75c39b1ce23eab4785c7f5292c525aee9af385a503eab1388a538980237812fb2279565dd1d0c1ebf41775ac6
|
7
|
+
data.tar.gz: b97d18d38a3a5c7f509bf1bdd401a9e37eaab7b653ef5726f2af6131dbbd6f927e6a543a784427919edfa7d3101b0b6e7523931722d56d41519ccfebba3d95c6
|
data/README.md
CHANGED
data/jsonapi_suite.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency 'strong_resources', '~> 0.6'
|
24
24
|
spec.add_dependency 'jsonapi_compliable', '~> 0.6'
|
25
25
|
spec.add_dependency 'jsonapi_errorable', '~> 0.6'
|
26
|
-
spec.add_dependency 'jsonapi_spec_helpers', '~> 0.3'
|
27
26
|
|
28
27
|
spec.add_development_dependency "bundler", "~> 1.12"
|
29
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module JsonapiSuite
|
2
|
+
class InstallGenerator < ::Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
# spec helpers to test?
|
6
|
+
# gem 'jsonapi-rails', '~> 0.1'
|
7
|
+
# require 'jsonapi_compliable/adapters/active_record'
|
8
|
+
desc "This generator boostraps jsonapi-suite with an initialize and controller mixin"
|
9
|
+
def create_initializer
|
10
|
+
to = File.join('config/initializers', 'jsonapi.rb')
|
11
|
+
template('initializer.rb.erb', to)
|
12
|
+
|
13
|
+
to = File.join('config/initializers', "strong_resources.rb")
|
14
|
+
template('strong_resources.rb.erb', to)
|
15
|
+
|
16
|
+
inject_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::API\n" do <<-'RUBY'
|
17
|
+
include JsonapiSuite::ControllerMixin
|
18
|
+
RUBY
|
19
|
+
end
|
20
|
+
|
21
|
+
inject_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::Base\n" do <<-'RUBY'
|
22
|
+
include JsonapiSuite::ControllerMixin
|
23
|
+
RUBY
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'jsonapi_compliable/adapters/active_record'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_suite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -92,20 +92,6 @@ dependencies:
|
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0.6'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: jsonapi_spec_helpers
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0.3'
|
102
|
-
type: :runtime
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '0.3'
|
109
95
|
- !ruby/object:Gem::Dependency
|
110
96
|
name: bundler
|
111
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,6 +152,9 @@ files:
|
|
166
152
|
- bin/console
|
167
153
|
- bin/setup
|
168
154
|
- jsonapi_suite.gemspec
|
155
|
+
- lib/generators/jsonapi_suite/install_generator.rb
|
156
|
+
- lib/generators/jsonapi_suite/templates/initializer.rb.erb
|
157
|
+
- lib/generators/jsonapi_suite/templates/strong_resources.rb.erb
|
169
158
|
- lib/jsonapi_suite.rb
|
170
159
|
- lib/jsonapi_suite/controller_mixin.rb
|
171
160
|
- lib/jsonapi_suite/version.rb
|