azeroth 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a25a470aa0a7ec2b2b2288071d32e319f45065d9
4
- data.tar.gz: a4763a44d43aa42ff5b89c92d142fc11fe8ebc34
3
+ metadata.gz: cd0ac3f2f138aaf17ba9d7d6a59191625cba1835
4
+ data.tar.gz: caede26b0d20a7825d4a73537eda1ae6c4254f4a
5
5
  SHA512:
6
- metadata.gz: ed300989d5b19a336b39b08bc08f0c7385030af5258a76326411b67f0776e4f778532e0a19c3581a6871a9f2f54922c1218acc68bc50ba462567ae0c703d260f
7
- data.tar.gz: 66c85f82d6a6b58b47a8e7a1bf14cc3fcec1cd7a1ea98a16b1a8634ea775b3cf7fb7e069d122033c8b32d854e40ceab550f4f27ed55ec04ec1df53239bfded87
6
+ metadata.gz: 01c09c16de69d05b817544a75b193e194da9c3bfb91afc97bcd55a6ccb52d0b2e0a26489746ba89cd38665f6b24e007334780d464c3f3007212d3c85ca48ccbc
7
+ data.tar.gz: 32b1cf4e03487ce7f29e86d1e7c4ea55ad64f62627e7e5cbaa173aa7c9c72ea3a6c39c7dad0beb75116ac804c4f887f759a6f2ed69316f365802948b912cc07c
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ jobs:
3
+ build:
4
+ docker:
5
+ - image: circleci/ruby:2.4.1
6
+ steps:
7
+ - checkout
8
+ - run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
9
+ - run: chmod +x ./cc-test-reporter
10
+ - run: ./cc-test-reporter before-build
11
+ - run: bundle install
12
+ - run: bundle exec rspec
13
+ - run: rubocop
14
+ - run: ./cc-test-reporter after-build --exit-code $?
data/.gitignore CHANGED
@@ -1 +1,3 @@
1
1
  coverage/
2
+ pkg/
3
+ Gemfile.lock
data/.rubocop.yml ADDED
@@ -0,0 +1 @@
1
+ inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,40 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-06-20 21:55:03 +0000 using RuboCop version 0.57.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ Metrics/AbcSize:
11
+ Max: 22
12
+
13
+ # Offense count: 2
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ Metrics/BlockLength:
16
+ Max: 58
17
+
18
+ # Offense count: 1
19
+ # Configuration parameters: CountComments.
20
+ Metrics/MethodLength:
21
+ Max: 11
22
+
23
+ # Offense count: 7
24
+ Style/Documentation:
25
+ Exclude:
26
+ - 'spec/**/*'
27
+ - 'test/**/*'
28
+ - 'lib/azeroth.rb'
29
+ - 'lib/azeroth/model.rb'
30
+ - 'lib/azeroth/resourceable.rb'
31
+ - 'lib/azeroth/resourceable/builder.rb'
32
+ - 'lib/azeroth/resourceable/resource_builder.rb'
33
+ - 'lib/azeroth/resourceable/resource_route_builder.rb'
34
+ - 'lib/azeroth/resourceable/routes_builder.rb'
35
+
36
+ # Offense count: 6
37
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
38
+ # URISchemes: http, https
39
+ Metrics/LineLength:
40
+ Max: 121
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Favini
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,7 @@
1
+ Azeroth
2
+ ========
3
+ [![Code Climate](https://codeclimate.com/github/darthjee/azeroth/badges/gpa.svg)](https://codeclimate.com/github/darthjee/azeroth)
4
+ [![Test Coverage](https://codeclimate.com/github/darthjee/azeroth/badges/coverage.svg)](https://codeclimate.com/github/darthjee/azeroth/coverage)
5
+ [![Issue Count](https://codeclimate.com/github/darthjee/azeroth/badges/issue_count.svg)](https://codeclimate.com/github/darthjee/azeroth)
6
+
7
+ ![azeroth](https://raw.githubusercontent.com/darthjee/azeroth/master/azeroth.jpg)
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new
5
5
 
6
- task :default => :spec
6
+ task default: :spec
7
7
  task test: :spec
data/azeroth.gemspec CHANGED
@@ -1,35 +1,34 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'azeroth/version'
5
4
 
6
5
  Gem::Specification.new do |gem|
7
- gem.name = "azeroth"
6
+ gem.name = 'azeroth'
8
7
  gem.version = Azeroth::VERSION
9
- gem.authors = ["Darthjee"]
10
- gem.email = ["dev@gmail.com"]
11
- gem.summary = "Azeroth"
8
+ gem.authors = ['Darthjee']
9
+ gem.email = ['dev@gmail.com']
10
+ gem.summary = 'Azeroth'
12
11
  gem.description = gem.description
13
- gem.homepage = "https://github.com/darthjee/azeroth"
12
+ gem.homepage = 'https://github.com/darthjee/azeroth'
14
13
 
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
15
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
17
+ gem.require_paths = ['lib']
19
18
 
20
19
  gem.add_runtime_dependency 'sinclair', '>= 1.0.0'
21
20
 
22
21
  gem.add_runtime_dependency 'activesupport', '~> 5.x'
23
22
  gem.add_runtime_dependency 'darthjee-active_ext', '>= 1.3.2'
24
23
 
25
- gem.add_development_dependency 'activerecord', '~> 5.x'
26
24
  gem.add_development_dependency 'actionpack', '~> 5.x'
25
+ gem.add_development_dependency 'activerecord', '~> 5.x'
27
26
  gem.add_development_dependency 'sqlite3', '>= 1.3.13'
28
27
 
29
28
  gem.add_development_dependency 'bundler', '~> 1.6'
29
+ gem.add_development_dependency 'pry-nav'
30
30
  gem.add_development_dependency 'rake', '>= 12.3'
31
31
  gem.add_development_dependency 'rspec', '>= 3.7'
32
+ gem.add_development_dependency 'rubocop'
32
33
  gem.add_development_dependency 'simplecov', '~> 0.16.1'
33
- gem.add_development_dependency 'pry-nav'
34
34
  end
35
-
data/azeroth.jpg ADDED
Binary file
data/lib/azeroth.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  module Azeroth
2
2
  autoload :Resourceable, 'azeroth/resourceable'
3
+ autoload :Model, 'azeroth/model'
3
4
  end
@@ -0,0 +1,17 @@
1
+ module Azeroth
2
+ class Model
3
+ attr_reader :name
4
+
5
+ def initialize(name)
6
+ @name ||= name.to_s
7
+ end
8
+
9
+ def klass
10
+ @klass ||= name.camelize.constantize
11
+ end
12
+
13
+ def plural
14
+ name.pluralize
15
+ end
16
+ end
17
+ end
@@ -1,13 +1,18 @@
1
1
  require 'active_support'
2
2
 
3
- module Azeroth::Resourceable
4
- extend ActiveSupport::Concern
3
+ module Azeroth
4
+ module Resourceable
5
+ extend ActiveSupport::Concern
5
6
 
6
- autoload :Builder, 'azeroth/resourceable/builder'
7
+ autoload :Builder, 'azeroth/resourceable/builder'
8
+ autoload :RoutesBuilder, 'azeroth/resourceable/routes_builder'
9
+ autoload :ResourceBuilder, 'azeroth/resourceable/resource_builder'
10
+ autoload :ResourceRouteBuilder, 'azeroth/resourceable/resource_route_builder'
7
11
 
8
- class_methods do
9
- def resource_for(name, **options)
10
- Builder.new(self, name, **options).build
12
+ class_methods do
13
+ def resource_for(name, **options)
14
+ Builder.new(self, name, **options).build
15
+ end
11
16
  end
12
17
  end
13
18
  end
@@ -1,60 +1,48 @@
1
1
  require 'sinclair'
2
2
 
3
- module Azeroth::Resourceable
4
- class Builder < Sinclair
5
- delegate :resource, to: :options_object
3
+ module Azeroth
4
+ module Resourceable
5
+ class Builder
6
+ attr_reader :clazz, :model
6
7
 
7
- def initialize(clazz, resource, **options)
8
- super(clazz, resource: resource.to_s, **options)
8
+ delegate :build, :add_method, to: :builder
9
9
 
10
- add_params
11
- add_resource
12
- add_resource_for_routes
13
- add_routes
14
- end
10
+ def initialize(clazz, model_name, **_options)
11
+ @clazz = clazz
12
+ @model = Azeroth::Model.new(model_name)
15
13
 
16
- private
14
+ add_params
15
+ add_resource
16
+ add_resource_for_routes
17
+ add_routes
18
+ end
17
19
 
18
- def add_params
19
- add_method("#{resource}_id", "params.require(:id)")
20
- add_method("#{resource}_params", "params.require(:#{resource}).permit(:#{permitted_attributes.join(', :')})")
21
- end
20
+ private
22
21
 
23
- def add_resource
24
- add_method(resource_plural, "@#{resource_plural} ||= #{resource_class}.all")
25
- add_method(resource, "@#{resource} ||= #{resource_plural}.find(#{resource}_id)")
26
- end
27
-
28
- def add_resource_for_routes
29
- add_method(:new_resource, "@new_resource ||= #{resource_class}.new")
30
- add_method(:create_resource, "@create_resource ||= #{resource_class}.create(#{resource}_params)")
31
- add_method(:update_resource, "@update_resource ||= #{resource}.tap { |v| v.update(#{resource}_params) }")
32
- add_method(:index_resource, resource_plural)
33
- add_method(:edit_resource, resource)
34
- add_method(:show_resource, resource)
35
- end
22
+ def builder
23
+ @builder ||= Sinclair.new(clazz)
24
+ end
36
25
 
37
- def add_routes
38
- %i(index show new edit create update).each do |route|
39
- add_method(route, 'render_basic')
26
+ def add_params
27
+ add_method("#{model.name}_id", 'params.require(:id)')
28
+ add_method("#{model.name}_params", "params.require(:#{model.name}).permit(:#{permitted_attributes.join(', :')})")
40
29
  end
41
- add_method(:destroy, %{
42
- #{resource}.destroy
43
- head :no_content
44
- })
45
30
 
46
- end
31
+ def add_resource
32
+ ResourceBuilder.new(model, builder).append
33
+ end
47
34
 
48
- def resource_class
49
- @resource_class ||= resource.camelize.constantize
50
- end
35
+ def add_resource_for_routes
36
+ ResourceRouteBuilder.new(model, builder).append
37
+ end
51
38
 
52
- def permitted_attributes
53
- @permitted_attributes ||= resource_class.attribute_names - ['id']
54
- end
39
+ def add_routes
40
+ RoutesBuilder.new(model, builder).append
41
+ end
55
42
 
56
- def resource_plural
57
- resource.pluralize
43
+ def permitted_attributes
44
+ @permitted_attributes ||= model.klass.attribute_names - ['id']
45
+ end
58
46
  end
59
47
  end
60
48
  end
@@ -0,0 +1,19 @@
1
+ module Azeroth
2
+ module Resourceable
3
+ class ResourceBuilder
4
+ attr_reader :model, :builder
5
+
6
+ delegate :add_method, to: :builder
7
+
8
+ def initialize(model, builder)
9
+ @model = model
10
+ @builder = builder
11
+ end
12
+
13
+ def append
14
+ add_method(model.plural, "@#{model.plural} ||= #{model.klass}.all")
15
+ add_method(model.name, "@#{model.name} ||= #{model.plural}.find(#{model.name}_id)")
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,23 @@
1
+ module Azeroth
2
+ module Resourceable
3
+ class ResourceRouteBuilder
4
+ attr_reader :model, :builder
5
+
6
+ delegate :add_method, to: :builder
7
+
8
+ def initialize(model, builder)
9
+ @model = model
10
+ @builder = builder
11
+ end
12
+
13
+ def append
14
+ add_method(:new_resource, "@new_resource ||= #{model.klass}.new")
15
+ add_method(:create_resource, "@create_resource ||= #{model.klass}.create(#{model.name}_params)")
16
+ add_method(:update_resource, "@update_resource ||= #{model.name}.tap { |v| v.update(#{model.name}_params) }")
17
+ add_method(:index_resource, model.plural)
18
+ add_method(:edit_resource, model.name)
19
+ add_method(:show_resource, model.name)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,37 @@
1
+ module Azeroth
2
+ module Resourceable
3
+ class RoutesBuilder
4
+ attr_reader :model, :builder
5
+
6
+ delegate :add_method, to: :builder
7
+
8
+ def initialize(model, builder)
9
+ @model = model
10
+ @builder = builder
11
+ end
12
+
13
+ def append
14
+ %i[index show new edit create update destroy].each do |route|
15
+ add_method(route, route_code[route].to_s)
16
+ end
17
+ end
18
+
19
+ private
20
+
21
+ def route_code
22
+ {
23
+ index: :render_basic,
24
+ show: :render_basic,
25
+ new: :render_basic,
26
+ edit: :render_basic,
27
+ create: :render_basic,
28
+ update: :render_basic,
29
+ destroy: <<-RUBY
30
+ #{model.name}.destroy
31
+ head :no_content
32
+ RUBY
33
+ }
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,4 +1,3 @@
1
1
  module Azeroth
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'.freeze
3
3
  end
4
-
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ shared_examples 'a model wrapper' do
4
+ describe '#name' do
5
+ it 'returns the model name' do
6
+ expect(subject.name).to eq('document')
7
+ end
8
+ end
9
+
10
+ describe '#plural' do
11
+ it 'returns the model name pluralized' do
12
+ expect(subject.plural).to eq('documents')
13
+ end
14
+ end
15
+
16
+ describe '#klass' do
17
+ it 'returns the class of the model' do
18
+ expect(subject.klass).to eq(Document)
19
+ end
20
+ end
21
+ end
22
+
23
+ describe Azeroth::Model do
24
+ subject { described_class.new(input) }
25
+
26
+ context 'when initializing with simbol' do
27
+ let(:input) { :document }
28
+
29
+ it_behaves_like 'a model wrapper'
30
+ end
31
+ end
@@ -21,7 +21,7 @@ describe Azeroth::Resourceable::Builder do
21
21
  subject { described_class.new(clazz, :document) }
22
22
 
23
23
  let(:name) { 'The Doc' }
24
- let(:document_params) { { name: name} }
24
+ let(:document_params) { { name: name } }
25
25
 
26
26
  let(:clazz) do
27
27
  Class.new(Controller) do
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Azeroth::Resourceable::ResourceBuilder do
4
+ xit 'Need to write it'
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Azeroth::Resourceable::ResourceRouteBuilder do
4
+ xit 'Need to write it'
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Azeroth::Resourceable::RoutesBuilder do
4
+ xit 'Needs to write it'
5
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,14 +1,16 @@
1
1
  require 'simplecov'
2
- SimpleCov.start
2
+ SimpleCov.start do
3
+ add_filter '/spec/'
4
+ end
3
5
 
4
6
  require 'pry-nav'
5
7
  require 'azeroth'
6
8
 
7
9
  require 'active_record'
8
- ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
10
+ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
9
11
 
10
- support_files = File.expand_path("spec/support/**/*.rb")
11
- Dir[support_files].each { |file| require file }
12
+ support_files = File.expand_path('spec/support/**/*.rb')
13
+ Dir[support_files].each { |file| require file }
12
14
 
13
15
  RSpec.configure do |config|
14
16
  config.run_all_when_everything_filtered = true
@@ -1,7 +1,7 @@
1
1
  ActiveRecord::Schema.define do
2
2
  self.verbose = false
3
3
 
4
- create_table :documents, :force => true do |t|
4
+ create_table :documents, force: true do |t|
5
5
  t.string :name
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azeroth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darthjee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-19 00:00:00.000000000 Z
11
+ date: 2018-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinclair
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.2
55
55
  - !ruby/object:Gem::Dependency
56
- name: activerecord
56
+ name: actionpack
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 5.x
69
69
  - !ruby/object:Gem::Dependency
70
- name: actionpack
70
+ name: activerecord
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.6'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry-nav
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rake
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -137,33 +151,33 @@ dependencies:
137
151
  - !ruby/object:Gem::Version
138
152
  version: '3.7'
139
153
  - !ruby/object:Gem::Dependency
140
- name: simplecov
154
+ name: rubocop
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - "~>"
157
+ - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: 0.16.1
159
+ version: '0'
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - "~>"
164
+ - - ">="
151
165
  - !ruby/object:Gem::Version
152
- version: 0.16.1
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
- name: pry-nav
168
+ name: simplecov
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
- - - ">="
171
+ - - "~>"
158
172
  - !ruby/object:Gem::Version
159
- version: '0'
173
+ version: 0.16.1
160
174
  type: :development
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
- - - ">="
178
+ - - "~>"
165
179
  - !ruby/object:Gem::Version
166
- version: '0'
180
+ version: 0.16.1
167
181
  description: ''
168
182
  email:
169
183
  - dev@gmail.com
@@ -171,17 +185,30 @@ executables: []
171
185
  extensions: []
172
186
  extra_rdoc_files: []
173
187
  files:
188
+ - ".circleci/config.yml"
174
189
  - ".gitignore"
190
+ - ".rubocop.yml"
191
+ - ".rubocop_todo.yml"
175
192
  - Gemfile
176
- - Gemfile.lock
193
+ - LICENSE
194
+ - README.md
177
195
  - Rakefile
178
196
  - azeroth.gemspec
197
+ - azeroth.jpg
179
198
  - docker-compose.yml
180
199
  - lib/azeroth.rb
200
+ - lib/azeroth/model.rb
181
201
  - lib/azeroth/resourceable.rb
182
202
  - lib/azeroth/resourceable/builder.rb
203
+ - lib/azeroth/resourceable/resource_builder.rb
204
+ - lib/azeroth/resourceable/resource_route_builder.rb
205
+ - lib/azeroth/resourceable/routes_builder.rb
183
206
  - lib/azeroth/version.rb
207
+ - spec/lib/azeroth/model_spec.rb
184
208
  - spec/lib/azeroth/resourceable/builder_spec.rb
209
+ - spec/lib/azeroth/resourceable/resource_builder_spec.rb
210
+ - spec/lib/azeroth/resourceable/resource_route_builder_spec.rb
211
+ - spec/lib/azeroth/resourceable/routes_builder_spec.rb
185
212
  - spec/spec_helper.rb
186
213
  - spec/support/models/controller.rb
187
214
  - spec/support/models/document.rb
@@ -211,7 +238,11 @@ signing_key:
211
238
  specification_version: 4
212
239
  summary: Azeroth
213
240
  test_files:
241
+ - spec/lib/azeroth/model_spec.rb
214
242
  - spec/lib/azeroth/resourceable/builder_spec.rb
243
+ - spec/lib/azeroth/resourceable/resource_builder_spec.rb
244
+ - spec/lib/azeroth/resourceable/resource_route_builder_spec.rb
245
+ - spec/lib/azeroth/resourceable/routes_builder_spec.rb
215
246
  - spec/spec_helper.rb
216
247
  - spec/support/models/controller.rb
217
248
  - spec/support/models/document.rb
data/Gemfile.lock DELETED
@@ -1,116 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- azeroth (0.0.2)
5
- activesupport (~> 5.x)
6
- darthjee-active_ext (>= 1.3.2)
7
- sinclair (>= 1.0.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actionpack (5.2.0)
13
- actionview (= 5.2.0)
14
- activesupport (= 5.2.0)
15
- rack (~> 2.0)
16
- rack-test (>= 0.6.3)
17
- rails-dom-testing (~> 2.0)
18
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.2.0)
20
- activesupport (= 5.2.0)
21
- builder (~> 3.1)
22
- erubi (~> 1.4)
23
- rails-dom-testing (~> 2.0)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activemodel (5.2.0)
26
- activesupport (= 5.2.0)
27
- activerecord (5.2.0)
28
- activemodel (= 5.2.0)
29
- activesupport (= 5.2.0)
30
- arel (>= 9.0)
31
- activesupport (5.2.0)
32
- concurrent-ruby (~> 1.0, >= 1.0.2)
33
- i18n (>= 0.7, < 2)
34
- minitest (~> 5.1)
35
- tzinfo (~> 1.1)
36
- arel (9.0.0)
37
- builder (3.2.3)
38
- coderay (1.1.2)
39
- concurrent-ruby (1.0.5)
40
- crass (1.0.4)
41
- darthjee-active_ext (1.3.2)
42
- activesupport (>= 5.x)
43
- darthjee-core_ext (>= 1.5.6)
44
- darthjee-core_ext (1.5.6)
45
- activesupport (>= 5.x)
46
- diff-lcs (1.3)
47
- docile (1.3.1)
48
- erubi (1.7.1)
49
- i18n (1.0.1)
50
- concurrent-ruby (~> 1.0)
51
- json (2.1.0)
52
- loofah (2.2.2)
53
- crass (~> 1.0.2)
54
- nokogiri (>= 1.5.9)
55
- method_source (0.8.2)
56
- mini_portile2 (2.3.0)
57
- minitest (5.11.3)
58
- nokogiri (1.8.3)
59
- mini_portile2 (~> 2.3.0)
60
- pry (0.10.4)
61
- coderay (~> 1.1.0)
62
- method_source (~> 0.8.1)
63
- slop (~> 3.4)
64
- pry-nav (0.2.4)
65
- pry (>= 0.9.10, < 0.11.0)
66
- rack (2.0.5)
67
- rack-test (1.0.0)
68
- rack (>= 1.0, < 3)
69
- rails-dom-testing (2.0.3)
70
- activesupport (>= 4.2.0)
71
- nokogiri (>= 1.6)
72
- rails-html-sanitizer (1.0.4)
73
- loofah (~> 2.2, >= 2.2.2)
74
- rake (12.3.1)
75
- rspec (3.7.0)
76
- rspec-core (~> 3.7.0)
77
- rspec-expectations (~> 3.7.0)
78
- rspec-mocks (~> 3.7.0)
79
- rspec-core (3.7.1)
80
- rspec-support (~> 3.7.0)
81
- rspec-expectations (3.7.0)
82
- diff-lcs (>= 1.2.0, < 2.0)
83
- rspec-support (~> 3.7.0)
84
- rspec-mocks (3.7.0)
85
- diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.7.0)
87
- rspec-support (3.7.1)
88
- simplecov (0.16.1)
89
- docile (~> 1.1)
90
- json (>= 1.8, < 3)
91
- simplecov-html (~> 0.10.0)
92
- simplecov-html (0.10.2)
93
- sinclair (1.0.0)
94
- activesupport (~> 5.2.0)
95
- slop (3.6.0)
96
- sqlite3 (1.3.13)
97
- thread_safe (0.3.6)
98
- tzinfo (1.2.5)
99
- thread_safe (~> 0.1)
100
-
101
- PLATFORMS
102
- ruby
103
-
104
- DEPENDENCIES
105
- actionpack (~> 5.x)
106
- activerecord (~> 5.x)
107
- azeroth!
108
- bundler (~> 1.6)
109
- pry-nav
110
- rake (>= 12.3)
111
- rspec (>= 3.7)
112
- simplecov (~> 0.16.1)
113
- sqlite3 (>= 1.3.13)
114
-
115
- BUNDLED WITH
116
- 1.14.6