bullet_train-super_scaffolding 1.0.12 → 1.0.15

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: 4383583527b6e82c8c4a2c3b3377b70febe3aac37d81fb87e0bb8c03a740b8f4
4
- data.tar.gz: b805ee23858fdb68dcb5c42809a6bfa8a8b5476457a3a4c7186066cf6ba21ed2
3
+ metadata.gz: 5c966df93c569e1cca8e0e0b8be383d696ce36652302d41a33e4d620b521b94d
4
+ data.tar.gz: f241ebd8222f05cdb9c1b206f221cfc7b866be44518cfffbeb74df19970438c0
5
5
  SHA512:
6
- metadata.gz: a566c140c290fe44daf385d5b34d288d15335d3bcbad7cacad976e42f688c7eab844bea717f75b70dd75e484c0fedd96e87d6c39de0bbe5bd87703339679d9ea
7
- data.tar.gz: '000539d956b409f05f7cb365278d3ef3953e5d8466fe407de7a0503b476f99cac25d7eb785ac2b262cf65e9ac759f2c1c31354422d31a9b04eff42d301300c51'
6
+ metadata.gz: 3a3455329a08c928e3cb85ede143268c8c7eec588676d823a0823b44c2e95847f3f8fa01afcf19dabe6c68e782386f1d5eff856b500b6314047c55bab460f2fc
7
+ data.tar.gz: 2fa179db17354d27695821ab2555ca61b2c61130992a940a01533ab678e05f8ca06fa98bdad3bc5fcfb55c7ed16a5b3f7b7ebd10021efa96bf4ac87b07b2ee70
@@ -11,14 +11,17 @@ module BulletTrain
11
11
  end
12
12
 
13
13
  initializer "bullet_train.super_scaffolding.templates.register_api_endpoints" do |app|
14
- if BulletTrain::Api
14
+ if defined?(BulletTrain::Api)
15
15
  BulletTrain::Api.endpoints << "Api::V1::Scaffolding::AbsolutelyAbstract::CreativeConceptsEndpoint"
16
16
  BulletTrain::Api.endpoints << "Api::V1::Scaffolding::CompletelyConcrete::TangibleThingsEndpoint"
17
17
  end
18
18
  end
19
19
 
20
20
  initializer "bullet_train.super_scaffolding.register" do |app|
21
- BulletTrain.linked_gems << "bullet_train-super_scaffolding"
21
+ # Older versions of Bullet Train have a `BulletTrain` module, but it doesn't have `linked_gems`.
22
+ if BulletTrain.respond_to?(:linked_gems)
23
+ BulletTrain.linked_gems << "bullet_train-super_scaffolding"
24
+ end
22
25
  end
23
26
  end
24
27
  end
@@ -0,0 +1,2 @@
1
+ class BulletTrain::SuperScaffolding::CannotFindParentResourceException < Exception
2
+ end
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.0.12"
3
+ VERSION = "1.0.15"
4
4
  end
5
5
  end
@@ -1,11 +1,14 @@
1
1
  require "bullet_train/super_scaffolding/version"
2
2
  require "bullet_train/super_scaffolding/engine"
3
+ require "bullet_train/super_scaffolding/exceptions"
3
4
  require "bullet_train/super_scaffolding/scaffolder"
4
5
  require "bullet_train/super_scaffolding/scaffolders/crud_scaffolder"
5
6
  require "bullet_train/super_scaffolding/scaffolders/crud_field_scaffolder"
6
7
  require "bullet_train/super_scaffolding/scaffolders/join_model_scaffolder"
7
8
  require "bullet_train/super_scaffolding/scaffolders/oauth_provider_scaffolder"
8
9
 
10
+ require "indefinite_article"
11
+
9
12
  module BulletTrain
10
13
  module SuperScaffolding
11
14
  mattr_accessor :template_paths, default: []
@@ -270,7 +270,7 @@ class Scaffolding::RoutesFileManipulator
270
270
  lines[resource_line_number].gsub!("\n", " do\n")
271
271
  insert_after(["end"], resource_line_number)
272
272
  else
273
- raise "the parent resource (`#{parent_resource}`) doesn't appear to exist in `#{@filename}`."
273
+ raise BulletTrain::SuperScaffolding::CannotFindParentResourceException.new("the parent resource (`#{parent_resource}`) doesn't appear to exist in `#{@filename}`.")
274
274
  end
275
275
  end
276
276
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-super_scaffolding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-27 00:00:00.000000000 Z
11
+ date: 2022-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 6.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: indefinite_article
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Bullet Train Super Scaffolding
28
42
  email:
29
43
  - andrew.culver@gmail.com
@@ -108,6 +122,7 @@ files:
108
122
  - db/migrate/20210602230736_add_option_fields_to_scaffolding_completely_concrete_tangible_things.rb
109
123
  - lib/bullet_train/super_scaffolding.rb
110
124
  - lib/bullet_train/super_scaffolding/engine.rb
125
+ - lib/bullet_train/super_scaffolding/exceptions.rb
111
126
  - lib/bullet_train/super_scaffolding/scaffolder.rb
112
127
  - lib/bullet_train/super_scaffolding/scaffolders/crud_field_scaffolder.rb
113
128
  - lib/bullet_train/super_scaffolding/scaffolders/crud_scaffolder.rb