locomotivecms_wagon 3.0.0 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/bin/wagon +64 -3
- data/bin/wagon_dev +11 -0
- data/generators/.DS_Store +0 -0
- data/generators/blank/Gemfile.tt +6 -2
- data/generators/blank/app/assets/stylesheets/app.scss +2 -0
- data/generators/blank/app/assets/stylesheets/sections/.empty_directory +1 -0
- data/generators/blank/app/views/pages/404.liquid +1 -1
- data/generators/blank/app/views/pages/index.liquid +1 -1
- data/generators/section/%type%.scss.tt +3 -0
- data/generators/section/template.liquid.tt +139 -80
- data/generators/webpack/app/assets/javascripts/.DS_Store +0 -0
- data/lib/locomotive/wagon.rb +15 -1
- data/lib/locomotive/wagon/cli.rb +11 -11
- data/lib/locomotive/wagon/commands/generate_command.rb +2 -7
- data/lib/locomotive/wagon/commands/push_command.rb +4 -8
- data/lib/locomotive/wagon/commands/serve_command.rb +5 -5
- data/lib/locomotive/wagon/generators/section.rb +121 -17
- data/lib/locomotive/wagon/generators/site/base.rb +0 -23
- data/lib/locomotive/wagon/version.rb +1 -1
- data/locomotivecms_wagon.gemspec +7 -4
- metadata +14 -233
- data/.gitignore +0 -36
- data/.rspec +0 -1
- data/.travis.yml +0 -11
- data/Gemfile +0 -30
- data/Rakefile +0 -32
- data/spec/fixtures/blog/app/content_types/comments.yml +0 -20
- data/spec/fixtures/blog/app/content_types/posts.yml +0 -19
- data/spec/fixtures/blog/app/views/pages/404.liquid +0 -11
- data/spec/fixtures/blog/app/views/pages/about-us.liquid.haml +0 -29
- data/spec/fixtures/blog/app/views/pages/index.liquid +0 -25
- data/spec/fixtures/blog/app/views/pages/posts.fr.liquid +0 -13
- data/spec/fixtures/blog/app/views/pages/posts.liquid +0 -13
- data/spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid +0 -14
- data/spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid +0 -15
- data/spec/fixtures/blog/config/deploy.yml +0 -4
- data/spec/fixtures/blog/config/site.yml +0 -16
- data/spec/fixtures/blog/data/comments.yml +0 -16
- data/spec/fixtures/blog/data/posts.yml +0 -7
- data/spec/fixtures/cassettes/authenticate.yml +0 -236
- data/spec/fixtures/cassettes/delete.yml +0 -1255
- data/spec/fixtures/cassettes/push.yml +0 -9946
- data/spec/fixtures/cassettes/sync.yml +0 -11462
- data/spec/fixtures/default/README +0 -0
- data/spec/fixtures/default/app/content_types/bands.yml +0 -21
- data/spec/fixtures/default/app/content_types/events.yml +0 -25
- data/spec/fixtures/default/app/content_types/messages.yml +0 -17
- data/spec/fixtures/default/app/content_types/songs.yml +0 -25
- data/spec/fixtures/default/app/content_types/updates.yml +0 -33
- data/spec/fixtures/default/app/views/pages/404.liquid.haml +0 -10
- data/spec/fixtures/default/app/views/pages/about_us.fr.liquid.haml +0 -7
- data/spec/fixtures/default/app/views/pages/about_us.liquid.haml +0 -21
- data/spec/fixtures/default/app/views/pages/about_us.nb.liquid.haml +0 -4
- data/spec/fixtures/default/app/views/pages/about_us/jane_doe.liquid.haml +0 -4
- data/spec/fixtures/default/app/views/pages/about_us/john_doe.fr.liquid.haml +0 -5
- data/spec/fixtures/default/app/views/pages/about_us/john_doe.liquid.haml +0 -6
- data/spec/fixtures/default/app/views/pages/all.liquid.haml +0 -16
- data/spec/fixtures/default/app/views/pages/archives/news.liquid.haml +0 -10
- data/spec/fixtures/default/app/views/pages/contact.liquid.haml +0 -54
- data/spec/fixtures/default/app/views/pages/contest.liquid.haml +0 -18
- data/spec/fixtures/default/app/views/pages/events.liquid.haml +0 -64
- data/spec/fixtures/default/app/views/pages/filtered.liquid.haml +0 -20
- data/spec/fixtures/default/app/views/pages/grunge_bands.liquid.haml +0 -8
- data/spec/fixtures/default/app/views/pages/index.fr.liquid.haml +0 -3
- data/spec/fixtures/default/app/views/pages/index.liquid.haml +0 -101
- data/spec/fixtures/default/app/views/pages/layouts/simple.liquid.haml +0 -13
- data/spec/fixtures/default/app/views/pages/music.fr.liquid.haml +0 -4
- data/spec/fixtures/default/app/views/pages/music.liquid.haml +0 -42
- data/spec/fixtures/default/app/views/pages/songs/template.fr.liquid.haml +0 -16
- data/spec/fixtures/default/app/views/pages/songs/template.liquid.haml +0 -18
- data/spec/fixtures/default/app/views/pages/songs/template/band.liquid.haml +0 -16
- data/spec/fixtures/default/app/views/pages/store.fr.liquid.haml +0 -5
- data/spec/fixtures/default/app/views/pages/store.liquid +0 -5
- data/spec/fixtures/default/app/views/pages/tags/nav.liquid.haml +0 -6
- data/spec/fixtures/default/app/views/pages/tags/nav_in_deep.liquid.haml +0 -6
- data/spec/fixtures/default/app/views/pages/unlisted_pages.liquid.haml +0 -9
- data/spec/fixtures/default/app/views/snippets/A_Complicated-one.liquid.haml +0 -1
- data/spec/fixtures/default/app/views/snippets/footer.liquid.haml +0 -6
- data/spec/fixtures/default/app/views/snippets/header.liquid.haml +0 -1
- data/spec/fixtures/default/app/views/snippets/song.fr.liquid.haml +0 -8
- data/spec/fixtures/default/app/views/snippets/song.liquid +0 -12
- data/spec/fixtures/default/config/autoprefixer.yml +0 -2
- data/spec/fixtures/default/config/deploy.yml +0 -12
- data/spec/fixtures/default/config/deploy_example.yml +0 -12
- data/spec/fixtures/default/config/site.yml +0 -13
- data/spec/fixtures/default/config/translations.yml +0 -3
- data/spec/fixtures/default/data/bands.yml +0 -13
- data/spec/fixtures/default/data/events.yml +0 -54
- data/spec/fixtures/default/data/songs.yml +0 -46
- data/spec/fixtures/default/data/updates.yml +0 -48
- data/spec/fixtures/default/icon.png +0 -0
- data/spec/fixtures/default/public/fonts/chunkfive-webfont.eot +0 -0
- data/spec/fixtures/default/public/fonts/chunkfive-webfont.svg +0 -213
- data/spec/fixtures/default/public/fonts/chunkfive-webfont.ttf +0 -0
- data/spec/fixtures/default/public/fonts/chunkfive-webfont.woff +0 -0
- data/spec/fixtures/default/public/fonts/chunkfive.css +0 -8
- data/spec/fixtures/default/public/fonts/chunkfive.otf +0 -0
- data/spec/fixtures/default/public/images/nav_on.png +0 -0
- data/spec/fixtures/default/public/images/photo_frame.png +0 -0
- data/spec/fixtures/default/public/images/sep.png +0 -0
- data/spec/fixtures/default/public/images/top.jpg +0 -0
- data/spec/fixtures/default/public/javascripts/application.js.coffee +0 -2
- data/spec/fixtures/default/public/javascripts/common.js +0 -1
- data/spec/fixtures/default/public/samples/asset_collections/cover.jpg +0 -0
- data/spec/fixtures/default/public/samples/photo.jpg +0 -0
- data/spec/fixtures/default/public/samples/photo_2.jpg +0 -0
- data/spec/fixtures/default/public/stylesheets/application.css +0 -64
- data/spec/fixtures/default/public/stylesheets/other/extra.css.less +0 -8
- data/spec/fixtures/default/public/stylesheets/other/style.css.scss +0 -13
- data/spec/fixtures/default/public/stylesheets/reboot.css +0 -77
- data/spec/integration/cli_spec.rb +0 -17
- data/spec/integration/commands/authenticate_command_spec.rb +0 -60
- data/spec/integration/commands/delete_command_spec.rb +0 -147
- data/spec/integration/commands/push_command_spec.rb +0 -86
- data/spec/integration/commands/sync_command_spec.rb +0 -60
- data/spec/integration/generators/page_spec.rb +0 -87
- data/spec/integration/generators/relationship_spec.rb +0 -102
- data/spec/integration/integration_helper.rb +0 -15
- data/spec/spec_helper.rb +0 -19
- data/spec/support/api_settings.rb +0 -5
- data/spec/support/chronic.rb +0 -6
- data/spec/support/helpers.rb +0 -39
- data/spec/support/matchers.rb +0 -5
- data/spec/support/pry.rb +0 -4
- data/spec/support/thor.rb +0 -12
- data/spec/support/vcr.rb +0 -27
- data/spec/unit/commands/pull_sub_commands/concerns/assets_concern_spec.rb +0 -48
- data/spec/unit/commands/pull_sub_commands/pull_content_types_command_spec.rb +0 -41
- data/spec/unit/commands/push_sub_commands/push_pages_command_spec.rb +0 -125
- data/spec/unit/commands/push_sub_commands/push_theme_assets_command_spec.rb +0 -42
- data/spec/unit/decorators/content_entry_decorator_spec.rb +0 -104
- data/spec/unit/decorators/page_decorator_spec.rb +0 -35
- data/spec/unit/decorators/site_decorator_spec.rb +0 -62
- data/spec/unit/decorators/theme_asset_decorator_spec.rb +0 -89
- data/spec/unit/tools/glob_spec.rb +0 -26
- data/spec/unit/tools/yaml_ext_spec.rb +0 -46
@@ -1,26 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
require_relative '../../../lib/locomotive/wagon/tools/glob.rb'
|
6
|
-
|
7
|
-
describe Locomotive::Wagon::Glob do
|
8
|
-
|
9
|
-
let(:string) { '' }
|
10
|
-
let(:instance) { described_class.new(string) }
|
11
|
-
|
12
|
-
describe "#to_regexp" do
|
13
|
-
|
14
|
-
subject { instance.to_regexp }
|
15
|
-
|
16
|
-
describe '**/*.css' do
|
17
|
-
|
18
|
-
let(:string) { '**/*.css' }
|
19
|
-
|
20
|
-
it { expect(subject.match('foo/bar/test.css')).not_to eq nil }
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
require_relative '../../../lib/locomotive/wagon/tools/yaml_ext.rb'
|
6
|
-
|
7
|
-
describe Locomotive::Wagon::YamlExt do
|
8
|
-
|
9
|
-
describe '.transform' do
|
10
|
-
|
11
|
-
let(:hash) { nil }
|
12
|
-
let(:block) { -> (value) { value + '!' } }
|
13
|
-
|
14
|
-
subject { described_class.transform(hash, &block); hash }
|
15
|
-
|
16
|
-
it { expect(subject).to eq nil }
|
17
|
-
|
18
|
-
describe 'simple hash' do
|
19
|
-
|
20
|
-
let(:hash) { { 'foo' => 'a', 'bar' => 'b' } }
|
21
|
-
|
22
|
-
it { expect(subject['foo']).to eq 'a!' }
|
23
|
-
it { expect(subject['bar']).to eq 'b!' }
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
describe 'hash of hashes' do
|
28
|
-
|
29
|
-
let(:hash) { { 'foo' => { 'bar' => 'a' } } }
|
30
|
-
|
31
|
-
it { expect(subject['foo']['bar']).to eq 'a!' }
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
describe 'hash with an array' do
|
36
|
-
|
37
|
-
let(:hash) { { 'foo' => [{ 'bar' => 'a' }, 2] } }
|
38
|
-
|
39
|
-
it { expect(subject['foo'][0]['bar']).to eq 'a!' }
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|