material 0.3.5 → 0.3.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c309b4f0ebe79449223bc3e92e21d5e237e97281d06c9a8c351f4a7e7d24c6c4
4
- data.tar.gz: ce4acb630e6f79bb5f2e2610a5cea8aaddfd7c7513a390c026d7e619573268ba
3
+ metadata.gz: 829e842bd296febb415517624619080df2a8a9cd838e5efc3ba4357966dd2185
4
+ data.tar.gz: 06a84a9858a6788ef633ca6e6d13e4019a3f03651dbcb09ffc58cfce68d2aa6a
5
5
  SHA512:
6
- metadata.gz: be491d5cc3341e7e2f61055a7eaf9f554421d343fb4abb07742c0d5aa0cc2ac808991a720fa1cc81bca882e6ecd660adcbd7a76c4f5f94f6cf59296b573232d4
7
- data.tar.gz: 4255dd525d878a15b2ef30e3c7a827c7fd691c664f793abe230d2933956b2e4d507e35a7594ccb3840a8a0dea789a619dd9257714052f099b9776ea01a85db23
6
+ metadata.gz: f7e1936b45f4019b3098b0445a9915f28f02a79942b7056b334d6f520298487af31d5143892a2d847abb4f1089eea25e013ba74aadc2a6e8cba7c660ed2047d7
7
+ data.tar.gz: 49a6ad076b235f9f3669a11b54a421371b47a9a89f4a59e337e948c2a5b7b43df7e152e187194eab23af6833d919aa1539b4a9d63b6ff30c2523f8686067c363
@@ -0,0 +1,11 @@
1
+ Description:
2
+ Stub a Material with a List.
3
+
4
+ Example:
5
+ `rails generate material foo`
6
+
7
+ Generates:
8
+ Material: app/materials/foo_material.rb
9
+ List: app/lists/foo_list.rb
10
+ Test: spec/materials/foo_material_spec.rb
11
+ Test: spec/lists/foo_list_spec.rb
@@ -0,0 +1,9 @@
1
+ Description:
2
+ Stub a List with test.
3
+
4
+ Example:
5
+ `rails generate material:list foo`
6
+
7
+ Generates:
8
+ State: app/lists/foo_list.rb
9
+ Test: spec/lists/foo_state_list.rb
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Material
4
+ module Generators
5
+ class ListGenerator < Rails::Generators::NamedBase
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ hook_for :test_framework
9
+
10
+ def create_application_state
11
+ template "list.rb.erb", File.join("app/lists/", class_path, "#{file_name}_list.rb")
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= class_name %>List < ApplicationList
4
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Material
4
+ module Generators
5
+ class MaterialGenerator < Rails::Generators::NamedBase
6
+ class_option :list, type: :boolean, default: true
7
+
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ hook_for :list, as: "material:list"
11
+ hook_for :test_framework
12
+
13
+ def create_material
14
+ template "material.rb.erb", File.join("app/materials/", class_path, "#{file_name}_material.rb")
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= class_name %>Material < ApplicationMaterial
4
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Stub a List test.
3
+
4
+ Example:
5
+ `rails generate rspec:list foo`
6
+
7
+ Generates:
8
+ Test: spec/lists/foo_list_spec.rb
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rspec
4
+ module Generators
5
+ class ListGenerator < Rails::Generators::NamedBase
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ def create_spec_file
9
+ template "list_spec.rb.erb", File.join("spec/lists/", class_path, "#{file_name}_list_spec.rb")
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails_helper"
4
+
5
+ RSpec.describe <%= class_name %>List, type: :list do
6
+ subject(:list) { described_class.new(**input) }
7
+
8
+ it { is_expected.to inherit_from ApplicationList }
9
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Stub a Material test.
3
+
4
+ Example:
5
+ `rails generate rspec:material foo`
6
+
7
+ Generates:
8
+ Test: spec/materials/foo_material_spec.rb
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rspec
4
+ module Generators
5
+ class MaterialGenerator < Rails::Generators::NamedBase
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ def create_spec_file
9
+ template "material_spec.rb.erb", File.join("spec/materials/", class_path, "#{file_name}_material_spec.rb")
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails_helper"
4
+
5
+ RSpec.describe <%= class_name %>Material, type: :material do
6
+ subject(:material) { described_class.new(**input) }
7
+
8
+ it { is_expected.to inherit_from ApplicationMaterial }
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Material
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Garside
8
+ - Brandon Trumpold
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
12
+ date: 2020-04-10 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -172,12 +173,25 @@ description: An extensible and lightweight object which defines how your objects
172
173
  viewed.
173
174
  email:
174
175
  - garside@gmail.com
176
+ - brandon.trumpold@gmail.com
175
177
  executables: []
176
178
  extensions: []
177
179
  extra_rdoc_files: []
178
180
  files:
179
181
  - LICENSE.txt
180
182
  - README.md
183
+ - lib/generators/material/USAGE
184
+ - lib/generators/material/list/USAGE
185
+ - lib/generators/material/list/list_generator.rb
186
+ - lib/generators/material/list/templates/list.rb.erb
187
+ - lib/generators/material/material_generator.rb
188
+ - lib/generators/material/templates/material.rb.erb
189
+ - lib/generators/rspec/list/USAGE
190
+ - lib/generators/rspec/list/list_generator.rb
191
+ - lib/generators/rspec/list/templates/list_spec.rb.erb
192
+ - lib/generators/rspec/material/USAGE
193
+ - lib/generators/rspec/material/material_generator.rb
194
+ - lib/generators/rspec/material/templates/material_spec.rb.erb
181
195
  - lib/material.rb
182
196
  - lib/material/base.rb
183
197
  - lib/material/concerns/attributes.rb
@@ -214,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
228
  - !ruby/object:Gem::Version
215
229
  version: '0'
216
230
  requirements: []
217
- rubygems_version: 3.0.3
231
+ rubygems_version: 3.1.2
218
232
  signing_key:
219
233
  specification_version: 4
220
234
  summary: Wrap your records with a presentation layer without cannibalizing view responsibility.