usmu 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.rspec +1 -0
- data/.simplecov +4 -0
- data/.travis.yml +3 -0
- data/CONTRIBUTING.md +16 -0
- data/Guardfile +13 -0
- data/README.md +7 -6
- data/Rakefile +9 -10
- data/bin/usmu +5 -1
- data/lib/usmu.rb +73 -4
- data/lib/usmu/configuration.rb +40 -1
- data/lib/usmu/layout.rb +30 -7
- data/lib/usmu/page.rb +1 -0
- data/lib/usmu/plugin.rb +65 -0
- data/lib/usmu/plugin/core.rb +23 -0
- data/lib/usmu/site_generator.rb +17 -24
- data/lib/usmu/static_file.rb +10 -1
- data/lib/usmu/ui/console.rb +38 -10
- data/lib/usmu/version.rb +2 -2
- data/test/expected-site/default.html +14 -3
- data/test/site/layouts/html.meta.yml +1 -0
- data/test/{features/generator.feature → spec/acceptance/full_site_build.feature} +1 -0
- data/test/spec/acceptance/steps/full_site_build_steps.rb +24 -0
- data/test/spec/configuration_spec.rb +90 -1
- data/test/spec/layout_spec.rb +9 -17
- data/test/spec/mock/usmu/mock_plugin.rb +8 -0
- data/test/spec/page_spec.rb +9 -5
- data/test/spec/plugin/core_spec.rb +5 -0
- data/test/spec/plugin_spec.rb +49 -0
- data/test/spec/site_generator_spec.rb +0 -2
- data/test/spec/spec_helper.rb +12 -1
- data/test/spec/static_file_spec.rb +7 -1
- data/test/spec/support/shared_layout.rb +89 -5
- data/test/spec/ui/console_spec.rb +20 -0
- data/usmu-jruby.gemspec +6 -3
- data/usmu.gemspec +7 -6
- metadata +82 -27
- data/test/features/step_definitions/step_general.rb +0 -18
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'usmu/ui/console'
|
2
|
-
require 'open3'
|
3
|
-
|
4
|
-
Given(/^I have a site at "([^"]*)"$/) do |location|
|
5
|
-
@site = Usmu::Ui::Console.new([location])
|
6
|
-
end
|
7
|
-
|
8
|
-
When(/^I generate the site$/) do
|
9
|
-
@site.execute
|
10
|
-
end
|
11
|
-
|
12
|
-
Then(/^the destination directory should match "([^"]*)"$/) do |test_folder|
|
13
|
-
run = %W{diff -qr #{@site.configuration.destination_path} #{test_folder}}
|
14
|
-
Open3.popen2e(*run) do |i, o, t|
|
15
|
-
output = run.join(' ') + "\n" + o.read
|
16
|
-
fail output if t.value != 0
|
17
|
-
end
|
18
|
-
end
|