souls 0.21.2 → 0.21.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/exe/souls +1 -1
- data/lib/souls/generate/application.rb +17 -0
- data/lib/souls/generate/resolver.rb +0 -3
- data/lib/souls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eccfd65a990a55c7b1d365e1590278fbbe378234e3dab7cf86d39739384948a7
|
4
|
+
data.tar.gz: c7ca4f6c56ce023a13ed2e047977352c28b794cc80dc2c13d61a34bdea428b0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb25ec736a6f5f5021ea7c01f7273ee9b2f770d8f0e021147f383aae9eefd4fd84088bfb600d2412bb2f019719b554e3ea4dad3b169ea7de093629594e1d6846
|
7
|
+
data.tar.gz: f064806fbeecb0f464e4ac2ca343b25b28d70db7dbc5f5cb26b3ea571ed0a9cbc1e2600d23ef49e8c2168898439aaedd01f90e79638747d0bc53b91fd9cac93b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![SOULs](https://
|
1
|
+
[![SOULs](https://storage.googleapis.com/souls/souls-ogp-vertical.jpg)](https://rubygems.org/gems/souls)
|
2
2
|
|
3
3
|
<p align="center">
|
4
4
|
<a aria-label="Ruby logo" href="https://el-soul.com">
|
data/exe/souls
CHANGED
@@ -99,7 +99,7 @@ begin
|
|
99
99
|
when "migration"
|
100
100
|
system "rake db:create_migration NAME=create_#{ARGV[2]}"
|
101
101
|
when "update"
|
102
|
-
Souls::Generate.
|
102
|
+
Souls::Generate.update_delete class_name: ARGV[2]
|
103
103
|
Souls::Generate.single_migrate class_name: ARGV[2]
|
104
104
|
else
|
105
105
|
"SOULs!"
|
@@ -134,6 +134,23 @@ module Souls
|
|
134
134
|
puts error
|
135
135
|
end
|
136
136
|
|
137
|
+
def update_delete class_name: "souls"
|
138
|
+
singularized_class_name = class_name.singularize.underscore
|
139
|
+
pluralized_class_name = class_name.pluralize.underscore
|
140
|
+
FileUtils.rm_rf "./app/graphql/mutations/#{singularized_class_name}"
|
141
|
+
FileUtils.rm "./app/graphql/queries/#{singularized_class_name}.rb"
|
142
|
+
FileUtils.rm "./app/graphql/queries/#{pluralized_class_name}.rb"
|
143
|
+
FileUtils.rm "./app/graphql/resolvers/#{singularized_class_name}_search.rb"
|
144
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_type.rb"
|
145
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_node_type.rb"
|
146
|
+
FileUtils.rm "./spec/mutations/#{singularized_class_name}_spec.rb"
|
147
|
+
FileUtils.rm "./spec/queries/#{singularized_class_name}_spec.rb"
|
148
|
+
FileUtils.rm "./spec/resolvers/#{singularized_class_name}_search_spec.rb"
|
149
|
+
puts "deleted #{class_name.camelize} CRUD!"
|
150
|
+
rescue StandardError => error
|
151
|
+
puts error
|
152
|
+
end
|
153
|
+
|
137
154
|
def single_migrate class_name: "user"
|
138
155
|
puts "◆◆◆ Let's Auto Generate CRUD API SET ◆◆◆\n"
|
139
156
|
migrate class_name: class_name
|
@@ -125,11 +125,8 @@ module Souls
|
|
125
125
|
f.write <<~EOS
|
126
126
|
scope = scope.where("created_at >= ?", value[:start_date]) if value[:start_date]
|
127
127
|
scope = scope.where("created_at <= ?", value[:end_date]) if value[:end_date]
|
128
|
-
#{' '}
|
129
128
|
branches << scope
|
130
|
-
#{' '}
|
131
129
|
value[:OR].inject(branches) { |s, v| normalize_filters(v, s) } if value[:OR].present?
|
132
|
-
#{' '}
|
133
130
|
branches
|
134
131
|
end
|
135
132
|
end
|
data/lib/souls/version.rb
CHANGED