cqrs-generators 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: 4aa7fe4997f517d368a35fee3aa86f1d116ae7c6ffd1fdc4b8585bca37b395e2
4
- data.tar.gz: 3ddd0557f4c1ea8419046f401ba5802bc51a77e715eb2cf5572c8575a4b7107a
3
+ metadata.gz: e71c420a5993b5fadb77b258bdaeabd87e0710bdf96c2050c3bc58af2a432ddb
4
+ data.tar.gz: 7d0ef4c8566ec879b0574ec7c4d0a29c1bfc332144c060cf892e6e923353c255
5
5
  SHA512:
6
- metadata.gz: 6280110473314a140b78acfe1c42fb8b894c534e1c97ace08caf5709d301a62c7997f9c5cc19e133dd4e88216a12cacb22961fd234e13a55fd6bca532ee376d3
7
- data.tar.gz: f834efd7e1e8066892fd8d23ede3e20b9c65eaae4c96462c49418749e87f947539c236c67f1cbd845b22be17c9859618ca6454d58cede7b1da9104125a30a112
6
+ metadata.gz: 8b8c80b8a47b399bb87a34d155bf1d1b126c4c1c44dbdca1317f8ed3d7f436ad020a2811bc1148877ab67d871f1e42b21306db041927426ebbcddfa8a4cf96f3
7
+ data.tar.gz: 7406212017ad9c945fc64a63df28df530dfeac513039f2de4b9f62594a3033b9355017c22972e23a000db0e4e95329665f89e205c583e0fc3072ce16be68fcea
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Cqrs::Generators
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cqrs/generators`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Adds simple generators to create CQRS commands and queries.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,19 +20,12 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
23
+ To create commands and/or queries use:
30
24
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
25
+ $ cqrs:command CommandName
26
+ $ cqrs:query QueryName
27
+
32
28
 
33
29
  ## Contributing
34
30
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cqrs-generators. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/cqrs-generators/blob/master/CODE_OF_CONDUCT.md).
36
-
37
-
38
- ## Code of Conduct
39
-
40
- Everyone interacting in the Cqrs::Generators project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cqrs-generators/blob/master/CODE_OF_CONDUCT.md).
31
+ Bug reports and pull requests are welcome at https://gitlab.nexdev.uk/pub/cqrs-generators.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "cqrs-generators"
3
- spec.version = "0.0.1"
3
+ spec.version = "0.0.2"
4
4
  spec.authors = ["Dean Lovett"]
5
5
  spec.email = ["dean.lovett@nexusmods.com"]
6
6
 
@@ -0,0 +1,12 @@
1
+ module Commands
2
+ class <%= class_name %> < BaseCommand
3
+
4
+ # Define attributes for this command
5
+ attr_accessor :id
6
+
7
+ # Define the constructor
8
+ def initialize(id)
9
+ @id = id
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ module Commands
2
+ class <%= class_name %>Handler < BaseCommandHandler
3
+
4
+ # call is where the Command is executed
5
+ def call(command)
6
+
7
+ end
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cqrs-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Lovett
@@ -18,7 +18,6 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - ".gitignore"
21
- - CODE_OF_CONDUCT.md
22
21
  - Gemfile
23
22
  - README.md
24
23
  - Rakefile
@@ -28,6 +27,8 @@ files:
28
27
  - lib/generators/cqrs/USAGE
29
28
  - lib/generators/cqrs/command_generator.rb
30
29
  - lib/generators/cqrs/query_generator.rb
30
+ - lib/generators/cqrs/templates/command.rb
31
+ - lib/generators/cqrs/templates/command_handler.rb
31
32
  - lib/generators/cqrs/templates/query.rb
32
33
  - lib/generators/cqrs/templates/query_handler.rb
33
34
  homepage:
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at dean.lovett@nexusmods.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [https://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: https://contributor-covenant.org
74
- [version]: https://contributor-covenant.org/version/1/4/