livingstyleguide 2.0.1 → 2.0.2

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
  SHA1:
3
- metadata.gz: 87e479b61b3908455eba0e0736876700f7db009e
4
- data.tar.gz: 41f5b342d7b41d198b06863925ddd864adab556f
3
+ metadata.gz: 64cdaebf4e8ee2f95b58bd7a689d8c7a927c16e2
4
+ data.tar.gz: 7f2b08b238b72eb5161edbb5f76443855b11c376
5
5
  SHA512:
6
- metadata.gz: 688c685befee8c0950bc3abb04d13d38208526dd5c7e03ec5d51bed01737983d7b1dc48a1365d241720dadcb942aff55f013c46776a04a267d52b50daaa8b944
7
- data.tar.gz: 4dffe131b8f86d86cbe93e5282ad362b056abbecc81f0f5bd4a089798aee562430d0b5d4fd3d7f7be40f31739c2eac0f0fbc5fc06269901016674c26e56025c1
6
+ metadata.gz: 4f60204edcdf4bdc42534164cfdf202c0361f8aa9d85247c7c28fb5231768490ca72a7c50e340282db99f289f5dc47cb3ce495a9ee9c70a79797897f60760818
7
+ data.tar.gz: 76d76af98139c61258bdc0fe56b64ba70a1ef3acdd9a8f1a5c7fc62171c82d3f228f14a122b848ece9dee4907c5fd92f747a9fd8615964fb97d37a6cb768f6cd
@@ -10,6 +10,9 @@ LivingStyleGuide.command :scss do |arguments, options, scss|
10
10
  end
11
11
  document.depend_on file
12
12
  document.scss << %Q(@import "#{file}";\n)
13
+ elsif options[:sprockets] && defined?(Rails) && defined?(Rails::Railtie) && defined?(Sprockets)
14
+ css = Rails.application.assets.find_asset(options[:sprockets]).source
15
+ document.scss << css
13
16
  else
14
17
  id = document.id.gsub(/[\/\.]/, '\\\\\0')
15
18
  document.scss << "##{id} {\n#{scss}\n}\n"
@@ -70,7 +70,11 @@ module LivingStyleGuide
70
70
 
71
71
  def slug(text)
72
72
  require "active_support/core_ext/string/inflections"
73
- ::ActiveSupport::Inflector.parameterize(text, "-")
73
+ if ::ActiveSupport::VERSION::MAJOR >= 5
74
+ ::ActiveSupport::Inflector.parameterize(text, separator: "-")
75
+ else
76
+ ::ActiveSupport::Inflector.parameterize(text, "-")
77
+ end
74
78
  rescue LoadError
75
79
  text.downcase.gsub(/[ _\.\-!\?\(\)\[\]]+/, "-").gsub(/^-|-$/, "")
76
80
  end
@@ -1,3 +1,3 @@
1
1
  module LivingStyleGuide
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livingstyleguide
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Hagenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-06 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minisyntax