foobara-domain-mapper-generator 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/src/generators/domain_mapper_generator.rb +1 -2
- metadata +4 -9
- data/src/generators/gemfile_generator.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f893b20e275edcb1ea24d481b643d2a6adab97cf959f093ecc50f11918f8c425
|
4
|
+
data.tar.gz: 18211bdc4cfc0cf26315f6e2b4db87a3636d0880781d5fccf4e692cfe1e081d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4782cfa5d8cd2a445a2b6bb25f5ff6e06117dc2f1d5303be27196fa37257d9bb53550f70e6da45847b3fea2c5eccd6019cc38a0f49746572902753fd1461cd24
|
7
|
+
data.tar.gz: 9c04f93e3ff8a3ab1cb05f87d53a8f6db5499e678ae228f96a219b76c32e4a82cc5a4cff104c5a04efb244ec99d4e4e6321ff44fa25afe71d99db5b23f319183
|
data/CHANGELOG.md
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-domain-mapper-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-07 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: foobara
|
@@ -38,7 +37,6 @@ dependencies:
|
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
39
|
version: '0'
|
41
|
-
description:
|
42
40
|
email:
|
43
41
|
- azimux@gmail.com
|
44
42
|
executables: []
|
@@ -54,7 +52,6 @@ files:
|
|
54
52
|
- src/domain_mapper_config.rb
|
55
53
|
- src/generate_domain_mapper.rb
|
56
54
|
- src/generators/domain_mapper_generator.rb
|
57
|
-
- src/generators/gemfile_generator.rb
|
58
55
|
- src/write_domain_mapper_to_disk.rb
|
59
56
|
- templates/src/domain_mapper.rb.erb
|
60
57
|
homepage: https://github.com/foobara/generators-domain-mapper-generator
|
@@ -66,7 +63,6 @@ metadata:
|
|
66
63
|
source_code_uri: https://github.com/foobara/generators-domain-mapper-generator
|
67
64
|
changelog_uri: https://github.com/foobara/generators-domain-mapper-generator/blob/main/CHANGELOG.md
|
68
65
|
rubygems_mfa_required: 'true'
|
69
|
-
post_install_message:
|
70
66
|
rdoc_options: []
|
71
67
|
require_paths:
|
72
68
|
- lib
|
@@ -74,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
70
|
requirements:
|
75
71
|
- - ">="
|
76
72
|
- !ruby/object:Gem::Version
|
77
|
-
version: 3.
|
73
|
+
version: 3.4.0
|
78
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
75
|
requirements:
|
80
76
|
- - ">="
|
81
77
|
- !ruby/object:Gem::Version
|
82
78
|
version: '0'
|
83
79
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
85
|
-
signing_key:
|
80
|
+
rubygems_version: 3.6.2
|
86
81
|
specification_version: 4
|
87
82
|
summary: Generates Foobara domain mappers
|
88
83
|
test_files: []
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module Foobara
|
2
|
-
module Generators
|
3
|
-
module DomainMapperGenerator
|
4
|
-
module Generators
|
5
|
-
class GemfileGenerator < DomainMapperGenerator
|
6
|
-
def applicable?
|
7
|
-
gemfile_contents !~ /^\s*gem\s*["']foobara-domain-mapper-generator\b/
|
8
|
-
end
|
9
|
-
|
10
|
-
def template_path
|
11
|
-
"Gemfile"
|
12
|
-
end
|
13
|
-
|
14
|
-
def target_path
|
15
|
-
"Gemfile"
|
16
|
-
end
|
17
|
-
|
18
|
-
def generate(_elements_to_generate)
|
19
|
-
match = gemfile_contents.match(/^gem /)
|
20
|
-
|
21
|
-
if match
|
22
|
-
new_entry = 'gem "foobara-domain-mapper-generator", github: "foobara/domain-mapper-generator"'
|
23
|
-
"#{match.pre_match}\n#{new_entry}\n#{match}#{match.post_match}"
|
24
|
-
else
|
25
|
-
# TODO: maybe print a warning and return the original Gemfile
|
26
|
-
# :nocov:
|
27
|
-
raise "Not sure how to inject foobara-domain-mapper-generator into the Gemfile"
|
28
|
-
# :nocov:
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def gemfile_contents
|
33
|
-
File.read(template_path)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|