power-types 0.1.0 → 0.1.2
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 +4 -4
- data/README.md +2 -1
- data/lib/generators/rails/command_generator.rb +1 -1
- data/lib/generators/rails/service_generator.rb +1 -1
- data/lib/power_types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02ddf6cbe39cd78e379667b219b8a40e377c2e69
|
|
4
|
+
data.tar.gz: 8bf8aeb3f6272b77e047d419edfb562df5947ee4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06fbe1cbfd89bfce6567848e75d876ef6c4d8cc84d06a880c62ac744d9376e8e39a5f7b3e90c5ff0500d8eea207e911c3bdeb1dc0eee7865f995501c79f5d4bd
|
|
7
|
+
data.tar.gz: 33cdc3fbae9965bf4fb1c6ee4f0b07998c921ff393d7fae11ebf9c1f051d86d02222e2181d60c8b25c64efffd70b860efc39d5ec831b16c58a4191f6f6a45d12
|
data/README.md
CHANGED
|
@@ -25,6 +25,7 @@ This will create the MagicMakingService class, inheriting from a base service cl
|
|
|
25
25
|
|
|
26
26
|
class MagicMakingService < PowerTypes::Service.new(:foo, bar: nil)
|
|
27
27
|
|
|
28
|
+
The arguments get available to be used in the service class as instance variables: `@foo` and `@bar`
|
|
28
29
|
Default values for arguments are optional, and can't be defined in the generator, but manually after. In this case a `nil` value was given for `bar`.
|
|
29
30
|
This is a way to make the argument optional. If no default value is assigned, the argument will be required, and an error raised if missing.
|
|
30
31
|
|
|
@@ -95,4 +96,4 @@ Power-Types is maintained by [platanus](http://platan.us).
|
|
|
95
96
|
|
|
96
97
|
## License
|
|
97
98
|
|
|
98
|
-
Power-Types is © 2016 Platanus, S.p.A. It is free software and may be redistributed under the terms specified in the LICENSE file.
|
|
99
|
+
Power-Types is © 2016 Platanus, S.p.A. It is free software and may be redistributed under the terms specified in the LICENSE file.
|
|
@@ -7,7 +7,7 @@ module Rails
|
|
|
7
7
|
desc "This generator creates a new command at app/commands"
|
|
8
8
|
def create_command
|
|
9
9
|
template('command.rb', "app/commands/#{file_name.underscore}.rb")
|
|
10
|
-
template('command_spec.rb', "
|
|
10
|
+
template('command_spec.rb', "spec/commands/#{file_name.underscore}_spec.rb")
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -8,7 +8,7 @@ module Rails
|
|
|
8
8
|
def create_service
|
|
9
9
|
return puts "Service name must end with 'Service'" unless class_name.ends_with? "Service"
|
|
10
10
|
template('service.rb', "app/services/#{file_name.underscore}.rb")
|
|
11
|
-
template('service_spec.rb', "
|
|
11
|
+
template('service_spec.rb', "spec/services/#{file_name.underscore}_spec.rb")
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
end
|
data/lib/power_types/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: power-types
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ignacio Baixas
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|