law 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/law/USAGE +9 -0
- data/lib/generators/law/law_generator.rb +15 -0
- data/lib/generators/law/regulation/USAGE +9 -0
- data/lib/generators/law/regulation/regulation_generator.rb +15 -0
- data/lib/generators/law/regulation/templates/regulation.rb.erb +4 -0
- data/lib/generators/law/statute/USAGE +9 -0
- data/lib/generators/law/statute/statute_generator.rb +15 -0
- data/lib/generators/law/statute/templates/statute.rb.erb +4 -0
- data/lib/generators/law/templates/law.rb.erb +4 -0
- data/lib/generators/rspec/law/USAGE +9 -0
- data/lib/generators/rspec/law/law_generator.rb +13 -0
- data/lib/generators/rspec/law/templates/law_spec.rb.erb +7 -0
- data/lib/generators/rspec/regulation/USAGE +9 -0
- data/lib/generators/rspec/regulation/regulation_generator.rb +13 -0
- data/lib/generators/rspec/regulation/templates/regulation_spec.rb.erb +7 -0
- data/lib/generators/rspec/statute/USAGE +9 -0
- data/lib/generators/rspec/statute/statute_generator.rb +13 -0
- data/lib/generators/rspec/statute/templates/statute_spec.rb.erb +7 -0
- data/lib/law/version.rb +1 -1
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc69dc5d1f320859b6bdf0790ca7f6cda5f2cd360a1914b0ac8a0ee64fb55ded
|
4
|
+
data.tar.gz: 63809c047c647f20f484b18fcc4d533d744acf5ce45752c4b29b862fc2884110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14a075af23f0f27219ea367bac150b86502e84ae04ee3c3d1935a722c52c6a552337ee6881e7f180332b41c05af55d23b560d51edf1b8d826d94ea79c763b367
|
7
|
+
data.tar.gz: 271db0565571b6872c5b00d8766146db0d466b9c480be9087f24fe98c2ba34fad3c4f01874e8e3a2d8ac1d72cf842b68dddcb9c11b9e78f646cf400649f5658e
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Law
|
4
|
+
module Generators
|
5
|
+
class LawGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
hook_for :test_framework
|
9
|
+
|
10
|
+
def create_law
|
11
|
+
template "law.rb.erb", File.join("app/laws/", class_path, "#{file_name}_law.rb")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Law
|
4
|
+
module Generators
|
5
|
+
class RegulationGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
hook_for :test_framework
|
9
|
+
|
10
|
+
def create_regulation
|
11
|
+
template "regulation.rb.erb", File.join("app/regulations/", class_path, "#{file_name}_regulation.rb")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Law
|
4
|
+
module Generators
|
5
|
+
class StatuteGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
hook_for :test_framework
|
9
|
+
|
10
|
+
def create_statute
|
11
|
+
template "statute.rb.erb", File.join("app/statutes/", class_path, "#{file_name}_statute.rb")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rspec
|
4
|
+
module Generators
|
5
|
+
class LawGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
def create_spec_file
|
9
|
+
template "law_spec.rb.erb", File.join("spec/laws/", class_path, "#{file_name}_law_spec.rb")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rspec
|
4
|
+
module Generators
|
5
|
+
class RegulationGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
def create_spec_file
|
9
|
+
template "regulation_spec.rb.erb", File.join("spec/regulations/", class_path, "#{file_name}_regulation_spec.rb")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rspec
|
4
|
+
module Generators
|
5
|
+
class StatuteGenerator < Rails::Generators::NamedBase
|
6
|
+
source_root File.expand_path("templates", __dir__)
|
7
|
+
|
8
|
+
def create_spec_file
|
9
|
+
template "statute_spec.rb.erb", File.join("spec/statutes/", class_path, "#{file_name}_statute_spec.rb")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/law/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: law
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-04-
|
12
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -180,6 +180,24 @@ extra_rdoc_files: []
|
|
180
180
|
files:
|
181
181
|
- LICENSE.txt
|
182
182
|
- README.md
|
183
|
+
- lib/generators/law/USAGE
|
184
|
+
- lib/generators/law/law_generator.rb
|
185
|
+
- lib/generators/law/regulation/USAGE
|
186
|
+
- lib/generators/law/regulation/regulation_generator.rb
|
187
|
+
- lib/generators/law/regulation/templates/regulation.rb.erb
|
188
|
+
- lib/generators/law/statute/USAGE
|
189
|
+
- lib/generators/law/statute/statute_generator.rb
|
190
|
+
- lib/generators/law/statute/templates/statute.rb.erb
|
191
|
+
- lib/generators/law/templates/law.rb.erb
|
192
|
+
- lib/generators/rspec/law/USAGE
|
193
|
+
- lib/generators/rspec/law/law_generator.rb
|
194
|
+
- lib/generators/rspec/law/templates/law_spec.rb.erb
|
195
|
+
- lib/generators/rspec/regulation/USAGE
|
196
|
+
- lib/generators/rspec/regulation/regulation_generator.rb
|
197
|
+
- lib/generators/rspec/regulation/templates/regulation_spec.rb.erb
|
198
|
+
- lib/generators/rspec/statute/USAGE
|
199
|
+
- lib/generators/rspec/statute/statute_generator.rb
|
200
|
+
- lib/generators/rspec/statute/templates/statute_spec.rb.erb
|
183
201
|
- lib/law.rb
|
184
202
|
- lib/law/judgement.rb
|
185
203
|
- lib/law/law_base.rb
|