docks_theme_api 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/docks_config.rb +6 -8
- data/docks_theme_api.gemspec +1 -1
- data/lib/docks_theme_api/theme.rb +2 -2
- data/spec/lib/theme_spec.rb +7 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjA0MTA4NDg2NDRhNjE3MmI4ZWViNDhmNGYzMjllMGViMGYyMDRhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzAxZmU5M2MxZDQxMjNlNTc3ZTM2ZDVjODg5NGYzMTVlM2E0ZTlhZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTIxMTYxNThmNmU1MmFiOGZkNDY5Mjg5NTQ5ZDEzNmEwMzBmMTA3ZWEzOWI1
|
10
|
+
OWI5ZGI4ZjRlMmE0M2RmYTdkMGMwNTJlNDBmYTA3MjljOTcwMzM4NWM2OGM0
|
11
|
+
ZmE2OTM1YTQxYmM0YmQ0YmVhOGNmZTMwMWRlN2EwYTA5ZGFkYWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGFlM2I3ZDU0YmIxOWExODBjY2Q4YmE1NDRiMmZkYjM3ODZlN2U4ZTYwMzFj
|
14
|
+
NmVmNTk5NTVhNWJhZjcyN2QwZGEzM2EwOWVmMmIxODU4ZjIwMzExZGJjY2U0
|
15
|
+
MmZhNzhkMDRlM2EzYjAxYThlZWNjNjRmY2E1OGQzZDZlNzQyNzU=
|
data/docks_config.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require File.expand_path("../lib/docks_theme_api/helpers/ui_helper.rb", __FILE__)
|
2
|
+
|
1
3
|
Docks.configure do |config|
|
2
4
|
config.sources = [
|
3
5
|
"source/components/**/*.{scss,js,md}",
|
@@ -14,16 +16,12 @@ Docks.configure do |config|
|
|
14
16
|
"pattern_library.js"
|
15
17
|
]
|
16
18
|
|
17
|
-
config.
|
18
|
-
|
19
|
-
styles: "styles"
|
20
|
-
}
|
21
|
-
|
22
|
-
config.templates = "pattern_library_assets/templates/erb"
|
19
|
+
config.templates = "assets/templates/erb"
|
20
|
+
config.helpers = [Docks::Themes::API::Helpers]
|
23
21
|
|
24
22
|
config.mount_at = "pattern-library"
|
25
|
-
config.
|
26
|
-
config.
|
23
|
+
config.github_repo = "docks-app/api_theme"
|
24
|
+
config.theme = false
|
27
25
|
|
28
26
|
config.pattern_id = lambda do |file|
|
29
27
|
dir = File.basename(File.dirname(file))
|
data/docks_theme_api.gemspec
CHANGED
@@ -10,11 +10,11 @@ module Docks
|
|
10
10
|
def initialize
|
11
11
|
project_root = Pathname.new(File.expand_path("../../../", __FILE__))
|
12
12
|
@assets = Assets.new(root: project_root + "assets", source_root: project_root + "source")
|
13
|
+
@helpers = [Helpers]
|
13
14
|
end
|
14
15
|
|
15
16
|
def configure(config)
|
16
|
-
config.paginate =
|
17
|
-
config.helpers += [Helpers]
|
17
|
+
config.paginate = "pattern"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/spec/lib/theme_spec.rb
CHANGED
@@ -3,23 +3,18 @@ require "spec_helper"
|
|
3
3
|
describe Docks::Themes::API do
|
4
4
|
subject { described_class.instance }
|
5
5
|
|
6
|
+
describe "#helpers" do
|
7
|
+
it "has the helpers module" do
|
8
|
+
expect(subject.helpers).to eq [described_class::Helpers]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
describe "#configure" do
|
7
13
|
let(:config) { OpenStruct.new(paginate: false, helpers: [:foo]) }
|
8
14
|
|
9
15
|
it "updates pagination to be by pattern" do
|
10
16
|
subject.configure(config)
|
11
|
-
expect(config.paginate).to
|
12
|
-
end
|
13
|
-
|
14
|
-
it "adds the helper module to helpers" do
|
15
|
-
original_helpers = config.helpers.dup
|
16
|
-
subject.configure(config)
|
17
|
-
|
18
|
-
expect(config.helpers.length).to be original_helpers.length + 1
|
19
|
-
expect(config.helpers).to include described_class::Helpers
|
20
|
-
original_helpers.each do |helper|
|
21
|
-
expect(config.helpers).to include helper
|
22
|
-
end
|
17
|
+
expect(config.paginate).to eq "pattern"
|
23
18
|
end
|
24
19
|
end
|
25
20
|
end
|