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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b5d1173eefe9342b59f6b403dbc575a08df5c422ec3e7818da37438b87694b5
4
- data.tar.gz: dda825a1c7e89125354a42d8930a54ac9ed59ab5f9138694ba0ac4290248eda9
3
+ metadata.gz: eccfd65a990a55c7b1d365e1590278fbbe378234e3dab7cf86d39739384948a7
4
+ data.tar.gz: c7ca4f6c56ce023a13ed2e047977352c28b794cc80dc2c13d61a34bdea428b0e
5
5
  SHA512:
6
- metadata.gz: d86172233a071be4ad87fbe6cf8db1845c4a2f5b82f08f2e2f963b2a3290b79f4242e4316fd09d48646d4fac4907d7afbd5f5766ab884eb9f2910d9877a50f40
7
- data.tar.gz: 60549c9c85efa3572492fb9a7afbbb14c2cd4d7ffc78f8f55bd4c546fd7d637d4d7c401733e673c9df12bdb3ac34272331e577aa4e55ac7261f2706d2e5851e6
6
+ metadata.gz: cb25ec736a6f5f5021ea7c01f7273ee9b2f770d8f0e021147f383aae9eefd4fd84088bfb600d2412bb2f019719b554e3ea4dad3b169ea7de093629594e1d6846
7
+ data.tar.gz: f064806fbeecb0f464e4ac2ca343b25b28d70db7dbc5f5cb26b3ea571ed0a9cbc1e2600d23ef49e8c2168898439aaedd01f90e79638747d0bc53b91fd9cac93b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.21.2)
4
+ souls (0.21.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![SOULs](https://firebasestorage.googleapis.com/v0/b/el-quest.appspot.com/o/mediaLibrary%2F1605615287402_souls-ogp.jpg?alt=media&token=1115aa76-6863-469d-acc8-9815ca7fac37)](https://rubygems.org/gems/souls)
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.delete_all class_name: ARGV[2]
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
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.21.2"
2
+ VERSION = "0.21.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.2
4
+ version: 0.21.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI