souls 0.8.8 → 0.9.3

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: f5859735f56d7954ebc4b65d76b8961050dd13ce6b9e5572efc0feb08ddde21d
4
- data.tar.gz: 95bc765b4a97393f94d53f5b08f34dc893482f5e266fb4a514429f2f40a39f3a
3
+ metadata.gz: 22daf35890d58a1d3ae94c4554bbde04d0ea51bc2a653ad2c0c1e7628fdf986f
4
+ data.tar.gz: c23215bf1aa3d8e8bb2041eaa882bf962dd539a8e3fbc4ee4d0bf6a63839eb56
5
5
  SHA512:
6
- metadata.gz: 4fc5d3918a769fdfc7b67bf4466d65536b97a380e3504f736982889c0ae5a92cff0584e924bdd296049c91c260213954d5bfd22298570fab5ca26edda94eeab3
7
- data.tar.gz: 14b3e574b8aed7a8563726edeca5c827bf0c37011d2a7d6c7f6de6a2456466a402c9172c1a5c21e684f0ef5a093d9db6ce8169a55d80ae3c5b3b40f5f96c38ad
6
+ metadata.gz: 0347e0819b7ff95322466e6fb0882d17b7fdb7e97c832926efadbf68356306cb3e4718029ffbb9f5b8df8f735c4f7dd45517ad91c9ba15561db9a3d841594c3f
7
+ data.tar.gz: 23b1f76b4f35acf20bb72debff438249ea15efc663129de7758a50d2181e376e44675d0055def2d21088fe5d076841f95b2a90784a59f76055deb5cda21f6def
data/Gemfile CHANGED
@@ -7,3 +7,4 @@ gem "activesupport", "6.1.0"
7
7
  gem "rake", "13.0.3"
8
8
  gem "rspec", "3.1.0"
9
9
  gem "steep", "0.39.0"
10
+ gem "rubocop", "1.7.0"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.8.7)
4
+ souls (0.9.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -26,6 +26,7 @@ GEM
26
26
  rb-fsevent (~> 0.10, >= 0.10.3)
27
27
  rb-inotify (~> 0.9, >= 0.9.10)
28
28
  minitest (5.14.2)
29
+ parallel (1.20.1)
29
30
  parser (2.7.2.0)
30
31
  ast (~> 2.4.1)
31
32
  rainbow (3.0.0)
@@ -34,6 +35,8 @@ GEM
34
35
  rb-inotify (0.10.1)
35
36
  ffi (~> 1.0)
36
37
  rbs (1.0.0)
38
+ regexp_parser (2.0.3)
39
+ rexml (3.2.4)
37
40
  rspec (3.1.0)
38
41
  rspec-core (~> 3.1.0)
39
42
  rspec-expectations (~> 3.1.0)
@@ -46,6 +49,18 @@ GEM
46
49
  rspec-mocks (3.1.3)
47
50
  rspec-support (~> 3.1.0)
48
51
  rspec-support (3.1.2)
52
+ rubocop (1.7.0)
53
+ parallel (~> 1.10)
54
+ parser (>= 2.7.1.5)
55
+ rainbow (>= 2.2.2, < 4.0)
56
+ regexp_parser (>= 1.8, < 3.0)
57
+ rexml
58
+ rubocop-ast (>= 1.2.0, < 2.0)
59
+ ruby-progressbar (~> 1.7)
60
+ unicode-display_width (>= 1.4.0, < 2.0)
61
+ rubocop-ast (1.4.0)
62
+ parser (>= 2.7.1.5)
63
+ ruby-progressbar (1.11.0)
49
64
  steep (0.39.0)
50
65
  activesupport (>= 5.1)
51
66
  ast_utils (~> 0.3.0)
@@ -57,6 +72,7 @@ GEM
57
72
  thor (1.0.1)
58
73
  tzinfo (2.0.4)
59
74
  concurrent-ruby (~> 1.0)
75
+ unicode-display_width (1.7.0)
60
76
  zeitwerk (2.4.2)
61
77
 
62
78
  PLATFORMS
@@ -66,6 +82,7 @@ DEPENDENCIES
66
82
  activesupport (= 6.1.0)
67
83
  rake (= 13.0.3)
68
84
  rspec (= 3.1.0)
85
+ rubocop (= 1.7.0)
69
86
  souls!
70
87
  steep (= 0.39.0)
71
88
 
data/exe/souls CHANGED
@@ -57,8 +57,10 @@ begin
57
57
  Souls::Init.query class_name: ARGV[2]
58
58
  when "type"
59
59
  Souls::Init.type class_name: ARGV[2]
60
- when "migration"
60
+ when "migrate"
61
61
  Souls::Init.migration class_name: ARGV[2]
62
+ when "migration"
63
+ `rake db:create_migration NAME=#{ARGV[3]}`
62
64
  when "rspec_factory"
63
65
  Souls::Init.rspec_factory class_name: ARGV[2]
64
66
  when "rspec_model"
@@ -72,15 +74,8 @@ begin
72
74
  else
73
75
  end
74
76
  when "t", "test"
75
- case ARGV[1]
76
- when "-r"
77
- `bundle exec rspec`
78
- when "-s"
79
- `bundle exec steep check`
80
- else
81
- `bundle exec steep check`
82
- `bundle exec rspec`
83
- end
77
+ `rubocop`
78
+ `bundle exec rspec`
84
79
  when "deploy"
85
80
  project_id = Souls.configuration.project_id
86
81
  `gcloud builds submit --config=cloudbuild.yml --project #{project_id}`
@@ -427,11 +427,12 @@ module Souls
427
427
  end
428
428
 
429
429
  def mutation class_name: "souls"
430
- create_mutation_head class_name: class_name
431
- create_mutation_params class_name: class_name
432
- create_mutation_end class_name: class_name
433
- update_mutation class_name: class_name
434
- delete_mutation class_name: class_name
430
+ singularized_class_name = class_name.singularize
431
+ create_mutation_head class_name: singularized_class_name
432
+ create_mutation_params class_name: singularized_class_name
433
+ create_mutation_end class_name: singularized_class_name
434
+ update_mutation class_name: singularized_class_name
435
+ delete_mutation class_name: singularized_class_name
435
436
  end
436
437
 
437
438
  def create_query class_name: "souls"
@@ -476,8 +477,9 @@ module Souls
476
477
  end
477
478
 
478
479
  def query class_name: "souls"
479
- create_query class_name: class_name
480
- create_queries class_name: class_name
480
+ singularized_class_name = class_name.singularize
481
+ create_query class_name: singularized_class_name
482
+ create_queries class_name: singularized_class_name
481
483
  end
482
484
 
483
485
  def create_type_head class_name: "souls"
@@ -526,9 +528,10 @@ module Souls
526
528
  end
527
529
 
528
530
  def type class_name: "souls"
529
- create_type_head class_name: class_name
530
- create_type_params class_name: class_name
531
- create_type_end class_name: class_name
531
+ singularized_class_name = class_name.singularize
532
+ create_type_head class_name: singularized_class_name
533
+ create_type_params class_name: singularized_class_name
534
+ create_type_end class_name: singularized_class_name
532
535
  end
533
536
 
534
537
  def rspec_factory_head class_name: "souls"
@@ -574,9 +577,10 @@ module Souls
574
577
  end
575
578
 
576
579
  def rspec_factory class_name: "souls"
577
- rspec_factory_head class_name: class_name
578
- rspec_factory_params class_name: class_name
579
- rspec_factory_end class_name: class_name
580
+ singularized_class_name = class_name.singularize
581
+ rspec_factory_head class_name: singularized_class_name
582
+ rspec_factory_params class_name: singularized_class_name
583
+ rspec_factory_end class_name: singularized_class_name
580
584
  end
581
585
 
582
586
  def rspec_model class_name: "souls"
@@ -628,7 +632,7 @@ module Souls
628
632
  end
629
633
 
630
634
  def migration class_name: "souls"
631
- # `rake db:migrate`
635
+ `rake db:migrate`
632
636
  model class_name: class_name
633
637
  mutation class_name: class_name
634
638
  query class_name: class_name
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.8.8"
2
+ VERSION = "0.9.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.8.8
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI