bootscaf 0.1.19 → 0.1.20

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
  SHA1:
3
- metadata.gz: 0cfdb5b1d321befac162780438c1c5514a5a2f75
4
- data.tar.gz: 23dc6f8d5d3b95ad550452aa14949c5aef5f273f
3
+ metadata.gz: 6df486119fb97353da442b83fce919ddf7d045f6
4
+ data.tar.gz: 23ed0403a172e6767748489a62d97b03293a0ce3
5
5
  SHA512:
6
- metadata.gz: ce3657f36807c3222a748196788d1ab5ee59472a2b3c138d12d8f7464b68cd3538c7e801856d6a9c283d7fe4f3bf9f450c5aaaad9c5981fd1ea7350816ea92a2
7
- data.tar.gz: e33889e572649d1dc77340b5ebab0506c386aae580329ff2050167bfafbbe802cbe58fe26f5b99ac12eac5de5c8ea6f49ff7e034ee909b3d59c3726bbedbe8e6
6
+ metadata.gz: 38ca57bfe470467efcd5471df3241266b8e3fd20dce0ff9b97b00d3831911ecc040905aea4a988b6fd64f6999d23556e8ccc23dc015e6d98663f55029046244a
7
+ data.tar.gz: 4541b37ec635aa91f8664f8c183c6b2d5d3d68568d0bd50df66c25b90d0214a16f1a428d464a67eff5daf788cf5c86f371dcb72f46e661724a72fd3eb25d4b11
data/lib/bootscaf/cli.rb CHANGED
@@ -20,7 +20,8 @@ module Bootscaf
20
20
  desc "nest PLURALMODELNAME:PLURALMODELNAME[:PLURALMODELNAME...]", "Updates the scaffold controller and views to nest the models"
21
21
  def nest(nestpath)
22
22
 
23
- is_mac = (RbConfig::CONFIG['host_os'] =~ /^darwin/) >= 0
23
+ darwin_match = (RbConfig::CONFIG['host_os'] =~ /^darwin/)
24
+ is_mac = !darwin_match.nil? && darwin_match >= 0
24
25
  icmd = is_mac ? "-i ''" : '--in-place'
25
26
 
26
27
  fullpath = nestpath.split(':').map { |a| a.downcase }
@@ -93,7 +94,8 @@ module Bootscaf
93
94
  models = Dir.glob("#{Dir.pwd}/app/views/*").select { |f| File.directory? f }.map { |f| f.split('/app/views/').last }.reject { |f| f == 'layouts' }
94
95
  end
95
96
 
96
- is_mac = (RbConfig::CONFIG['host_os'] =~ /^darwin/) >= 0
97
+ darwin_match = (RbConfig::CONFIG['host_os'] =~ /^darwin/)
98
+ is_mac = !darwin_match.nil? && darwin_match >= 0
97
99
  icmd = is_mac ? "-i ''" : '--in-place'
98
100
 
99
101
  print "Would you like to update app/views/layouts/application.html.erb [y/n(default)]? "
@@ -1,3 +1,3 @@
1
1
  module Bootscaf
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootscaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Moore