-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
1,301 additions
and
1,313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ gemspec | |
|
||
gem "rake", "~> 13.0" | ||
|
||
gem "minitest", "~> 5.0" | ||
gem "minitest", "~> 5.17" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
<% @spacer = ' ' * (@model.namespace.split(/::/).size - 1) -%> | ||
# frozen_string_literal: true | ||
require_relative "entity" | ||
|
||
<%= @model.open_namespace %> | ||
<%= @spacer %> # <%= @model.desc %> | ||
<%= @spacer %> class <%= @model.const %> < Entity | ||
<%= @model.properties.lines.map{"#{@spacer} #{_1}"}.join %> | ||
<%= @spacer %> def initialize(id: nil, <%= @model.parameters %>) | ||
<%= @spacer %> super(id) | ||
<%= @model.assignment.lines.map{"#{@spacer} #{_1}"}.join %> | ||
<%= @spacer %> end | ||
<%= @spacer %> end | ||
|
||
<%= @model.close_namespace %> | ||
# frozen_string_literal: true | ||
require 'securerandom' | ||
|
||
<%= @model.open_namespace %> | ||
|
||
% | ||
% indent = @model.indentation | ||
% membrs = @model.params.map(&:name) | ||
% .unshift('id').map{|e| ?: + e}.join(', ') | ||
% | ||
% params = 'id: SecureRanodm.uuid, ' + @model.keyword_params | ||
% | ||
<%= indent %># <%= @model.const %> <%= @model.desc %> | ||
<%= indent %># @!parse class <%= @model.const %> < Data | ||
<%= indent %>class <%= @model.const %> < Data.define(<%= membrs %>) | ||
<%= indent %> <%= @model.params_yarpro.lines.join(' ' + indent) %> | ||
<%= indent %> | ||
<%= indent %> <%= @model.params_yardoc.lines.join(' ' + indent) %> | ||
<%= indent %> def initialize(<%= params %>) | ||
<%= indent %> <%= @model.params_guard.lines.join(' ' + indent) %> | ||
<%= indent %> super | ||
<%= indent %> end | ||
<%= indent %>end | ||
|
||
<%= @model.close_namespace %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
<% @spacer = ' ' * (@model.namespace.split(/::/).size - 1) -%> | ||
# frozen_string_literal: true | ||
require_relative "../basics" | ||
|
||
<%= @model.open_namespace %> | ||
<%= @spacer %> # <%= @model.desc %> | ||
<%= @spacer %> class <%= @model.const %> | ||
<%= @spacer %> extend Plugin | ||
|
||
<%= @spacer %> Failure = Class.new(StandardError) | ||
|
||
<%= @spacer %> def self.inherited(klass) | ||
<%= @spacer %> klass.const_set(:Failure, Class.new(klass::Failure)) | ||
<%= @spacer %> super | ||
<%= @spacer %> end | ||
|
||
<%= @spacer %> def initialize(<%= @model.parameters %>) | ||
<%= @model.assignment.lines.map{"#{@spacer} #{_1}"}.join %> | ||
<%= @spacer %> end | ||
<%= @spacer %> end | ||
% indentation = @model.indentation | ||
<%= indentation %># <%= @model.const %> <%= @model.desc %> | ||
<%= indentation %>class <%= @model.const %> | ||
<%= indentation %> extend Plugin | ||
<%= indentation %> | ||
<%= indentation %> Failure = Class.new(StandardError) | ||
<%= indentation %> | ||
<%= indentation %> def self.inherited(klass) | ||
<%= indentation %> klass.const_set(:Failure, Class.new(klass::Failure)) | ||
<%= indentation %> super | ||
<%= indentation %> end | ||
<%= indentation %>end | ||
|
||
<%= @model.close_namespace %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# <%= @model.desc %> | ||
<%= @model.const %> = Sentry.new(:key, "<%= @model.desc %>" | ||
) {|v| <%= @model.block %>} | ||
<%= @model.const %> = Sentry.new(:key, "must bee <%= @model.name %>" | ||
) {|v| <%= @model.proc %> } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
<% @spacer = ' ' * (@model.namespace.split(/::/).size - 1) -%> | ||
# frozen_string_literal: true | ||
require_relative "service" | ||
require_relative 'service' | ||
|
||
<%= @model.open_namespace %> | ||
<%= @spacer %> # <%= @model.desc %> | ||
<%= @spacer %> class <%= @model.const %> < Service | ||
|
||
<%= @model.yardoc.lines.map{"#{@spacer} #{_1}"}.join %> | ||
<%= @spacer %> def initialize(<%= @model.parameters %>) | ||
<%= @model.assignment.lines.map{"#{@spacer} #{_1}"}.join %> | ||
<%= @spacer %> end | ||
|
||
<%= @spacer %> def call | ||
<%= @spacer %> # user = storage.find(User, email: @email) | ||
<%= @spacer %> fail "#{self.class}#call UNDER CONSTRUCTION" | ||
<%= @spacer %> end | ||
<%= @spacer %> end | ||
% indent = @model.indentation | ||
<%= indent %># <%= @model.const %> <%= @model.desc %> | ||
<%= indent %>class <%= @model.const %> < Service | ||
<%= indent %> <%= @model.params_yardoc.lines.join(' ' + indent) %> | ||
<%= indent %> def initialize(<%= @model.keyword_params %>) | ||
<%= indent %> <%= @model.params_guard.lines.join(' ' + indent) %> | ||
<%= indent %> super | ||
<%= indent %> end | ||
<%= indent %> | ||
<%= indent %> # @return [] what? | ||
<%= indent %> def call | ||
<%= indent %> # user = store.get(User, id: @user_id) | ||
<%= indent %> # fail "unkown user #{@user_id}" unless user | ||
<%= indent %> fail "#{self.class}#call must be overridden" | ||
<%= indent %> end | ||
<%= indent %>end | ||
|
||
<%= @model.close_namespace %> |
Oops, something went wrong.