bullet_train-super_scaffolding 1.0.13 → 1.0.16

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: 5585041419ffd4159ecd8df3148f4aaa784aed3fa891b599263258afb393857a
4
- data.tar.gz: c6a202d8ae578be5d347a557fdd2a2ce20443d7cfa17cb803f02f13876c3c76f
3
+ metadata.gz: 1c31da16417de5e8bb5b83fe154a3d01d093a540f049f4da7189b6200aa04569
4
+ data.tar.gz: 3e1005d7ac00f0beeab6b35af98d06387a5932be24f2bd495523355cde9da7fb
5
5
  SHA512:
6
- metadata.gz: 2dcbf80601d5967d016ce24d94d6617e65a59767358da4316d045e4867798150414a3d185a9f98521dcf7650987fc063fedf996c63c37c8b95cacb2cc6f21a56
7
- data.tar.gz: 8b77ecbffa7552a2bc6b880f1b8fe1c405f8826320ae3f48cc1fbaf2096303dac878da31e364c0a45fe4ac8468ba33b53505bf3a9dfffc9077e963bd65f7fd0b
6
+ metadata.gz: 3c55928b85cc3ee60cd3dac9712feffbb05d627019b4928e6ddffb4e4c13e0739d926c20dc4e18f34dbf448efe52e1d795c934daf3f86a6d941ca4f44e744b2d
7
+ data.tar.gz: 68352c9af1093311cbab0a7cc7a9cd4e922c407f937005aea3da2608ea1b644e80bc96c517b5c204e1c9de9dc66d01f3b6ea30e8ec72cd5fa9217854515c2224
@@ -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.13"
3
+ VERSION = "1.0.16"
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: []
@@ -265,13 +265,12 @@ class Scaffolding::RoutesFileManipulator
265
265
 
266
266
  def find_or_convert_resource_block(parent_resource, options = {})
267
267
  unless find_resource_block([parent_resource], options)
268
- binding.pry
269
268
  if (resource_line_number = find_resource([parent_resource], options))
270
269
  # convert it.
271
270
  lines[resource_line_number].gsub!("\n", " do\n")
272
271
  insert_after(["end"], resource_line_number)
273
272
  else
274
- 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}`.")
275
274
  end
276
275
  end
277
276
 
@@ -1347,16 +1347,20 @@ class Scaffolding::Transformer
1347
1347
  $stdin.gets.chomp
1348
1348
  if `which open`.present?
1349
1349
  `open https://themify.me/themify-icons`
1350
- `open https://fontawesome.com/icons?d=gallery&s=light`
1350
+ if font_awesome?
1351
+ `open https://fontawesome.com/icons?d=gallery&s=light`
1352
+ end
1351
1353
  else
1352
1354
  puts "Sorry! We can't open these URLs automatically on your platform, but you can visit them manually:"
1353
1355
  puts ""
1354
1356
  puts " https://themify.me/themify-icons"
1355
- puts " https://fontawesome.com/icons?d=gallery&s=light"
1357
+ if font_awesome?
1358
+ puts " https://fontawesome.com/icons?d=gallery&s=light"
1359
+ end
1356
1360
  puts ""
1357
1361
  end
1358
1362
  puts ""
1359
- puts "Did you find an icon you wanted to use? Enter the full CSS class here (e.g. 'ti ti-globe' or 'fal fa-puzzle-piece') or hit enter to just use the puzzle piece:"
1363
+ puts "Did you find an icon you wanted to use? Enter the full CSS class here (e.g. 'ti ti-world'#{" or 'fal fa-puzzle-piece'" if font_awesome?}) or hit enter to just use the puzzle piece:"
1360
1364
  icon_name = $stdin.gets.chomp
1361
1365
  puts ""
1362
1366
  unless icon_name.length > 0 || icon_name.downcase == "y"
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.13
4
+ version: 1.0.16
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-03-03 00:00:00.000000000 Z
11
+ date: 2022-03-10 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