souls 0.30.6 → 0.30.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ebfb8f46ba74e3981c76d2c31a0605338f899f0921214394cc1f130fe10d443
4
- data.tar.gz: ce856e57c384e0b7f21d2e1b74995cef24796e5779269545d441ff51b829708e
3
+ metadata.gz: 662fb44f2b3215a7d00391f43f1634b30252c7906fb46a41e7aa3433e90b80dc
4
+ data.tar.gz: ab691832bb96a5b741d7a0408cd235d4b0fb543579d206594a40273d72e1c56b
5
5
  SHA512:
6
- metadata.gz: 3edd0d19021505e7795100eeaf9f64f480684445d1d8d8d7310c24781757443dfdf4f62e1ca433a5a030be79bf7dd2d340673369496f6593b215968ff953c575
7
- data.tar.gz: b5d1f18fefacc8978e157b34d045d5b58d5c591b3cf963021be832b99903aba898ee95b81a201759a4be2cc4cbc8b9472742231e0953298e65285b606e1cef4a
6
+ metadata.gz: 8714483b126cd1ee860ef4993c85b2c096532deba10380cee55fbfc00f7d6f65009a9bb4b50995ebab41c7fcc94579425b61eabac8e3909aba5915c919080bb7
7
+ data.tar.gz: 98f558afb85dcda6e7ae347622c603683a40c607e4403388743d61439f4895c2c5de0c84e98a5a3857f7352afe8b3ee189e9e102278f66cec6bc4e29720819d5
data/lib/souls.rb CHANGED
@@ -3,9 +3,7 @@ require "active_support/core_ext/string/inflections"
3
3
  require_relative "souls/init"
4
4
  require_relative "souls/api"
5
5
  require_relative "souls/worker"
6
- require_relative "souls/gcloud"
7
- require_relative "souls/release"
8
- require_relative "souls/docker"
6
+ require_relative "souls/cli"
9
7
  require "date"
10
8
  require "dotenv/load"
11
9
  require "json"
@@ -230,9 +230,17 @@ module Souls
230
230
  new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(String),\n")
231
231
  end
232
232
  when "boolean"
233
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
233
+ if array_true
234
+ new_line.write(" \"#{name.pluralize.camelize(:lower)}\" => be_all([true, false]),\n")
235
+ else
236
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
237
+ end
234
238
  when "string", "bigint", "integer", "float"
235
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
239
+ if array_true
240
+ new_line.write(" \"#{name.pluralize.camelize(:lower)}\" => be_all(#{field}),\n")
241
+ else
242
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
243
+ end
236
244
  end
237
245
  end
238
246
  end
@@ -157,9 +157,17 @@ module Souls
157
157
  new_line.write(" \"#{name.camelize(:lower)}\" => be_a(String),\n")
158
158
  end
159
159
  when "boolean"
160
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
160
+ if array_true
161
+ new_line.write(" \"#{name.camelize(:lower)}\" => be_all([true, false]),\n")
162
+ else
163
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
164
+ end
161
165
  when "string", "bigint", "integer", "float"
162
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
166
+ if array_true
167
+ new_line.write(" \"#{name.camelize(:lower)}\" => be_all(#{field}),\n")
168
+ else
169
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
170
+ end
163
171
  end
164
172
  end
165
173
  end
@@ -44,6 +44,8 @@ module Souls
44
44
  FileUtils.rm(file_path)
45
45
  FileUtils.mv(new_file_path, file_path)
46
46
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
47
+ rescue StandardError => e
48
+ p(e)
47
49
  end
48
50
 
49
51
  def check_resolver_argument(class_name: "user", action: "argument")
@@ -17,6 +17,8 @@ module Souls
17
17
  next unless line.include?("{") && !argument
18
18
 
19
19
  new_cols.each do |col|
20
+ next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
21
+
20
22
  type = Souls::Api::Generate.get_test_type(col[:type])
21
23
  type = "[#{type}]" if col[:array]
22
24
  args = check_factory_argument(class_name: class_name)
@@ -23,6 +23,8 @@ module Souls
23
23
  if line.include?('#{') && !argument
24
24
  new_cols.each do |col|
25
25
  type = Souls::Api::Generate.type_check(col[:type])
26
+ next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
27
+
26
28
  type_line =
27
29
  if type == "String" && !col[:array]
28
30
  " #{col[:column_name].camelize(:lower)}: \"\#{#{class_name}[:#{col[:column_name].underscore}]}\"\n"
@@ -30,7 +32,7 @@ module Souls
30
32
  " #{col[:column_name].camelize(:lower)}: \#{#{class_name}[:#{col[:column_name].underscore}]}\n"
31
33
  end
32
34
  args = check_rspec_mutation_argument(class_name: class_name)
33
- new_line.write(type_line) unless args.include?(col[:column_name].singularize.underscore)
35
+ new_line.write(type_line) unless args.include?(col[:column_name].underscore)
34
36
  end
35
37
  argument = true
36
38
  elsif node_res && !line.include?("{")
data/lib/souls/cli.rb ADDED
@@ -0,0 +1,6 @@
1
+ require_relative "./cli/docker"
2
+ require_relative "./cli/gcloud"
3
+ require_relative "./cli/release"
4
+
5
+ module Souls
6
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.30.6".freeze
2
+ VERSION = "0.30.10".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.9.6
1
+ 0.9.10
@@ -1 +1 @@
1
- 0.9.6
1
+ 0.9.10
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.30.6
4
+ version: 0.30.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -127,17 +127,18 @@ files:
127
127
  - lib/souls/api/update/rspec_mutation.rb
128
128
  - lib/souls/api/update/rspec_resolver.rb
129
129
  - lib/souls/api/update/type.rb
130
- - lib/souls/docker.rb
131
- - lib/souls/docker/docker.rb
132
- - lib/souls/gcloud.rb
133
- - lib/souls/gcloud/compute.rb
134
- - lib/souls/gcloud/iam.rb
135
- - lib/souls/gcloud/methods.rb
136
- - lib/souls/gcloud/pubsub.rb
137
- - lib/souls/gcloud/run.rb
130
+ - lib/souls/cli.rb
131
+ - lib/souls/cli/docker.rb
132
+ - lib/souls/cli/docker/docker.rb
133
+ - lib/souls/cli/gcloud.rb
134
+ - lib/souls/cli/gcloud/compute.rb
135
+ - lib/souls/cli/gcloud/iam.rb
136
+ - lib/souls/cli/gcloud/methods.rb
137
+ - lib/souls/cli/gcloud/pubsub.rb
138
+ - lib/souls/cli/gcloud/run.rb
139
+ - lib/souls/cli/release.rb
140
+ - lib/souls/cli/release/release.rb
138
141
  - lib/souls/init.rb
139
- - lib/souls/release.rb
140
- - lib/souls/release/release.rb
141
142
  - lib/souls/version.rb
142
143
  - lib/souls/versions/.souls_api_version
143
144
  - lib/souls/versions/.souls_worker_version