styleguide_rails 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,14 +9,13 @@ module Styleguide
9
9
  desc "Creates a widget in your styleguide"
10
10
 
11
11
  def create_widget
12
- supported_template_engines = [:haml, :erb, :slim]
13
- destination_name = name.gsub(/-/, '_').parameterize(sep = '_')
14
- template_engine = Rails.configuration.generators.options[:rails][:template_engine]
15
-
16
- # use erb if we don't have a template for the engine currently in use
17
- template_engine = :erb if !supported_template_engines.include? template_engine
12
+ template_engine = Rails.configuration.generators.options[:rails][:template_engine]
13
+ template_engine = :erb unless [:haml, :erb, :slim].include? template_engine
14
+ stylesheet_engine = Rails.configuration.generators.options[:rails][:stylesheet_engine]
18
15
 
16
+ destination_name = name.gsub(/-/, '_').parameterize(sep = '_')
19
17
  copy_file "widget.html.#{template_engine}", "app/views/styleguide/widgets/_#{destination_name}.html.#{template_engine}"
18
+ create_file "app/assets/stylesheets/widgets/#{destination_name}.css.#{stylesheet_engine}"
20
19
  end
21
20
  end
22
21
  end
@@ -1,3 +1,3 @@
1
1
  module StyleguideRails
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: styleguide_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-03 00:00:00.000000000 Z
12
+ date: 2013-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -105,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: -456976210801234736
108
+ hash: 3176242918652939805
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  none: false
111
111
  requirements:
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  segments:
116
116
  - 0
117
- hash: -456976210801234736
117
+ hash: 3176242918652939805
118
118
  requirements: []
119
119
  rubyforge_project:
120
120
  rubygems_version: 1.8.25