roger_style_guide 0.2.3 → 1.0.0

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
- SHA1:
3
- metadata.gz: 194a543ff0a9b538773b4010212ee2663f4059c9
4
- data.tar.gz: f40509cbb2ecf8bd49f948d5c31e11be8b84bb02
2
+ SHA256:
3
+ metadata.gz: 391ad8b16edb54bf7fef64c0340b2833b35d5361ab0cf4212c24f0118528d783
4
+ data.tar.gz: 48e57651005592493e58c5fc2a5f643e2d6e3b5edf5c995f7eb1dc0db1ba77f1
5
5
  SHA512:
6
- metadata.gz: c49cf9768bd799382b9e0d66c55f9c4d63394a9641df580a67df4d8b4b3b49a2aaafc8a655d32b903da85e3f55843cbcaeed61bf855deb429c77cb40e995df8d
7
- data.tar.gz: 4cfacfb7bbebd98778d87163d901d1eded77b205e063b21d0dc91c0e78ebfb897ec73b58421d9ead6da59f014d0ee375e8b6651da16686263068be7201a85ac3
6
+ metadata.gz: 0371e3a200e3df73541ce325dcc310661d0e6b49c8a253d12bce47fdc568843352673491e2d8c6b90de7e8b68a2ea5f1d52ab4671039ab73384ff9b450a8d4dd
7
+ data.tar.gz: 1ec3933f761df9299d39b42fb7afccffc531a4b1e97e1d9ba358185097823b255c9d1e053acfc1504637915d7004b9acdda4f301c1d229114f94b76d251dd200
@@ -12,7 +12,7 @@ module RogerStyleGuide::Generators
12
12
  class_option(
13
13
  :components_path,
14
14
  type: :string,
15
- desc: "Components path, default: roger.project.html_path/#{RogerStyleGuide.components_path}"
15
+ desc: "Components path, default: roger.project.html_path/#{RogerStyleGuide.components_paths[0]}"
16
16
  )
17
17
 
18
18
  class_option(
@@ -66,7 +66,7 @@ module RogerStyleGuide::Generators
66
66
  def components_path
67
67
  options[:components_path] && Pathname.new(options[:components_path]) ||
68
68
  Roger::Cli::Base.project &&
69
- Roger::Cli::Base.project.html_path + RogerStyleGuide.components_path
69
+ Roger::Cli::Base.project.html_path + RogerStyleGuide.components_paths[0]
70
70
  end
71
71
 
72
72
  def project_template_path
@@ -26,17 +26,19 @@ module RogerStyleGuide::Helpers::ComponentHelper
26
26
  extension = File.extname(name)[1..-1]
27
27
  name_without_extension = extension ? name.sub(/\.#{Regexp.escape(extension)}\Z/, "") : name
28
28
 
29
- dir = File.join(
30
- RogerStyleGuide.components_path,
31
- path.slice(0, path.size - name.size).to_s.strip
32
- )
29
+ dirs = RogerStyleGuide.components_paths.inject([]) do |dirs, components_path|
30
+ dir = File.join(
31
+ components_path,
32
+ path.slice(0, path.size - name.size).to_s.strip
33
+ )
33
34
 
34
- [
35
- # component_path/name/_name.xyz
36
- File.join(dir, name_without_extension, local_name),
37
- # component_path/name
38
- File.join(dir, name)
39
- ]
35
+ dirs += [
36
+ # component_path/name/_name.xyz
37
+ File.join(dir, name_without_extension, local_name),
38
+ # component_path/name
39
+ File.join(dir, name)
40
+ ]
41
+ end
40
42
  end
41
43
  end
42
44
 
@@ -1,4 +1,4 @@
1
1
  # RogerStyleGuide Version
2
2
  module RogerStyleGuide
3
- VERSION = "0.2.3"
3
+ VERSION = "1.0.0"
4
4
  end
@@ -3,12 +3,12 @@ require "pathname"
3
3
  # Toplevel module for all things concerning RogerStyleGuide
4
4
  module RogerStyleGuide
5
5
  # The path within project.html_path where the components reside
6
- def self.components_path=(path)
7
- @components_path = Pathname.new(path)
6
+ def self.components_paths=(path)
7
+ @components_paths = [Pathname.new(path)]
8
8
  end
9
9
 
10
- def self.components_path
11
- @components_path || "components"
10
+ def self.components_paths
11
+ @components_paths || ["components"]
12
12
  end
13
13
  end
14
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger_style_guide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roger
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.6.10
188
+ rubygems_version: 2.7.7
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Styleguide plugin for Roger