File tree 11 files changed +135
-12
lines changed
11 files changed +135
-12
lines changed Original file line number Diff line number Diff line change
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version : 2
6
+ jobs :
7
+ build :
8
+ docker :
9
+ # specify the version you desire here
10
+ - image : circleci/ruby:2.4.3-node-browsers
11
+
12
+ # Specify service dependencies here if necessary
13
+ # CircleCI maintains a library of pre-built images
14
+ # documented at https://circleci.com/docs/2.0/circleci-images/
15
+ # - image: circleci/postgres:9.4
16
+
17
+ working_directory : ~/repo
18
+
19
+ steps :
20
+ - checkout
21
+
22
+ # Download and cache dependencies
23
+ - restore_cache :
24
+ keys :
25
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
26
+ # fallback to using the latest cache if no exact match is found
27
+ - v1-dependencies-
28
+
29
+ - run :
30
+ name : install dependencies
31
+ command : |
32
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
33
+
34
+ - save_cache :
35
+ paths :
36
+ - ./vendor/bundle
37
+ key : v1-dependencies-{{ checksum "Gemfile.lock" }}
38
+
39
+ # run tests!
40
+ - run :
41
+ name : run tests
42
+ command : |
43
+ mkdir /tmp/test-results
44
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
45
+
46
+ bundle exec rspec --format progress \
47
+ --format RspecJunitFormatter \
48
+ --out /tmp/test-results/rspec.xml \
49
+ --format progress \
50
+ $TEST_FILES
51
+
52
+ # collect reports
53
+ - store_test_results :
54
+ path : /tmp/test-results
55
+ - store_artifacts :
56
+ path : /tmp/test-results
57
+ destination : test-results
Original file line number Diff line number Diff line change
1
+ --require spec_helper
Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ source "https://rubygems.org"
2
2
gem 'materialize-sass'
3
3
gem "jekyll" , "~> 3.6.2"
4
4
gem "minima" , "~> 2.0"
5
+ gem 'rspec'
6
+ gem 'capybara'
7
+ gem "selenium-webdriver"
8
+ gem "chromedriver-helper"
9
+ gem "rack-jekyll"
10
+ gem "pry"
11
+
5
12
6
13
group :jekyll_plugins do
7
14
gem "jekyll-feed" , "~> 0.6"
Original file line number Diff line number Diff line change 6
6
< div class ="card-image ">
7
7
< img src ="{{post.image}} ">
8
8
< span class ="card-title "> < a style ="color:white "> {{ post.title | escape }}</ a > </ span >
9
- < a class ="btn-floating halfway-fab waves-effect waves-light red " href ="{{ post.url | relative_url }} "> < i class ="material-icons "> more_horiz</ i > </ a >
9
+ < a id =" {{post.url}} " class ="btn-floating halfway-fab waves-effect waves-light red " href ="{{ post.url | relative_url }} "> < i class ="material-icons "> more_horiz</ i > </ a >
10
10
</ div >
11
11
< div class ="card-content ">
12
12
< p > {{post.excerpt}}</ p >
Original file line number Diff line number Diff line change @@ -51,12 +51,16 @@ Or install it yourself as:
51
51
52
52
The ` ` ` _config.yml``` file has the following options.
53
53
54
+ Please ensure to copy this sample before serving up your site as some variables are required in order to make the site run correctly.
55
+
54
56
` ` ` yaml
55
57
title: Your awesome title
56
58
name: Your Name
57
59
58
60
description: Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
59
61
62
+ theme: jekyll-material-theme
63
+
60
64
parallax_image_one: assets/images/startup3.jpg # These are the images used for the parallax background
61
65
parallax_image_two: assets/images/startup3.jpg
62
66
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -10,17 +10,20 @@ Gem::Specification.new do |spec|
10
10
spec . homepage = "https://github.com/jameshamann/jekyll-material-theme"
11
11
spec . license = "MIT"
12
12
13
- spec . files = `git ls-files -z` . split ( "\x0 " ) . select { |f | f . match ( %r{^(js|css|assets|_layouts|_includes|_posts|LICENSE|README)}i ) }
13
+ spec . files = `git ls-files -z` . split ( "\x0 " ) . select { |f | f . match ( %r{^(js|css|assets|_layouts|_includes|_posts|LICENSE|README|_config.yml )}i ) }
14
14
15
15
spec . add_runtime_dependency "jekyll" , "~> 3.5"
16
- spec . add_runtime_dependency "jekyll-assets"
17
- spec . add_runtime_dependency "jekyll-minifier"
18
- spec . add_runtime_dependency "jekyll-feed"
19
- spec . add_runtime_dependency "kramdown"
20
-
21
-
16
+ spec . add_runtime_dependency "jekyll-assets" , "~> 3.0"
17
+ spec . add_runtime_dependency "jekyll-minifier" , "~> 0.1"
18
+ spec . add_runtime_dependency "jekyll-feed" , "~> 0.9"
19
+ spec . add_runtime_dependency "kramdown" , "~> 1.16"
22
20
23
21
24
22
spec . add_development_dependency "bundler" , "~> 1.12"
25
23
spec . add_development_dependency "rake" , "~> 10.0"
24
+ spec . add_development_dependency "capybara" , "~> 10.0"
25
+ spec . add_development_dependency "rspec" , "~> 3.7"
26
+ spec . add_development_dependency "selenium-webdriver" , "~> 3.8"
27
+
28
+
26
29
end
Original file line number Diff line number Diff line change @@ -19,8 +19,11 @@ Gem::Specification.new do |spec|
19
19
spec . add_runtime_dependency "kramdown" , "~> 1.16"
20
20
21
21
22
-
23
-
24
22
spec . add_development_dependency "bundler" , "~> 1.12"
25
23
spec . add_development_dependency "rake" , "~> 10.0"
24
+ spec . add_development_dependency "capybara" , "~> 10.0"
25
+ spec . add_development_dependency "rspec" , "~> 3.7"
26
+ spec . add_development_dependency "selenium-webdriver" , "~> 3.8"
27
+
28
+
26
29
end
Original file line number Diff line number Diff line change
1
+ require "spec_helper"
2
+
3
+
4
+ describe "Website Loads Up" , type : :feature , js : true do
5
+ it "has the page title" do
6
+ visit '/'
7
+
8
+ expect ( page ) . to have_content ( 'Your awesome title' )
9
+ expect ( page ) . to have_content ( 'Portfolio' )
10
+
11
+ end
12
+ it "renders the blog post page" do
13
+ visit '/'
14
+
15
+ click_link ( '/2017/12/04/hello-world/' )
16
+ expect ( page ) . to have_content ( 'Hello World!' )
17
+
18
+ end
19
+ end
Original file line number Diff line number Diff line change
1
+ # Require all of the necessary gems
2
+ require 'yaml'
3
+ require 'rspec'
4
+ require 'capybara/rspec'
5
+ require 'rack/jekyll'
6
+ require 'rack/test'
7
+ require 'pry'
8
+
9
+ RSpec . configure do |config |
10
+ config . expect_with :rspec do |expectations |
11
+ expectations . include_chain_clauses_in_custom_matcher_descriptions = true
12
+ end
13
+
14
+ config . mock_with :rspec do |mocks |
15
+ mocks . verify_partial_doubles = true
16
+ end
17
+
18
+ # Configure Capybara to use Selenium.
19
+ Capybara . register_driver :selenium do |app |
20
+ # Configure selenium to use Chrome.
21
+ Capybara ::Selenium ::Driver . new ( app , :browser => :chrome )
22
+ end
23
+
24
+ # Configure Capybara to load the website through rack-jekyll.
25
+ # (force_build: true) builds the site before the tests are run,
26
+ # so our tests are always running against the latest version
27
+ # of our jekyll site.
28
+ Capybara . app = Rack ::Jekyll . new ( force_build : true )
29
+ end
You can’t perform that action at this time.
0 commit comments