Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to rubocop standards, test against stable and master Middleman…
…, fix build
- Loading branch information
Showing
64 changed files
with
568 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
Include: | ||
- '**/*.rb' | ||
- '**/Rakefile' | ||
- '**/Gemfile' | ||
- '**/config.ru' | ||
Exclude: | ||
- 'vendor/**/*' | ||
- '**/tmp/**/*' | ||
- 'middleman-cli/lib/middleman-cli/templates/**/*' | ||
Security/YAMLLoad: | ||
Enabled: false | ||
Style/GuardClause: | ||
Enabled: false | ||
Metrics/LineLength: | ||
Enabled: false | ||
Metrics/MethodLength: | ||
Enabled: false | ||
Style/Documentation: | ||
Enabled: false | ||
Metrics/AbcSize: | ||
Enabled: false | ||
Metrics/CyclomaticComplexity: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Enabled: false | ||
Metrics/ModuleLength: | ||
Enabled: false | ||
Metrics/PerceivedComplexity: | ||
Enabled: false | ||
Metrics/ClassLength: | ||
Enabled: false | ||
Lint/AmbiguousRegexpLiteral: | ||
Enabled: false | ||
Lint/AmbiguousBlockAssociation: | ||
Enabled: false | ||
Lint/UriEscapeUnescape: | ||
Enabled: false | ||
Lint/HandleExceptions: | ||
Enabled: false | ||
Lint/ShadowedException: | ||
Enabled: false | ||
Naming/FileName: | ||
Enabled: false | ||
Naming/UncommunicativeMethodParamName: | ||
Enabled: false | ||
Naming/MemoizedInstanceVariableName: | ||
Enabled: false | ||
Naming/HeredocDelimiterNaming: | ||
Enabled: false | ||
Security/Eval: | ||
Enabled: false | ||
Style/RegexpLiteral: | ||
Enabled: false | ||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
Style/MissingRespondToMissing: | ||
Enabled: false | ||
Style/MethodMissingSuper: | ||
Enabled: false | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
Style/EvalWithLocation: | ||
Enabled: false | ||
Style/ClassVars: | ||
Enabled: false | ||
Style/GlobalVars: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,29 @@ | ||
## | ||
# Travis YAML | ||
## | ||
language: ruby | ||
cache: bundler | ||
|
||
language : ruby | ||
sudo : false | ||
cache : bundler | ||
|
||
before_script : | ||
- bundle update | ||
|
||
rvm : | ||
rvm: | ||
- ruby-head | ||
- 2.4.0 | ||
- 2.3.1 | ||
- 2.2.4 | ||
- 2.5.3 | ||
- 2.4.5 | ||
- 2.3.8 | ||
|
||
os : | ||
os: | ||
- linux | ||
# - osx | ||
|
||
matrix : | ||
fast_finish : true | ||
allow_failures : | ||
- rvm : ruby-head | ||
fast_finish: true | ||
allow_failures: | ||
- rvm: ruby-head | ||
|
||
# gemfile: | ||
# - Gemfile | ||
gemfile: | ||
- Gemfile | ||
- Gemfile-4.x | ||
|
||
script : bundle exec rake test | ||
script: bundle exec rake test | ||
|
||
env : | ||
global : | ||
env: | ||
global: | ||
- TEST=true | ||
# - CODECLIMATE_REPO_TOKEN=81787f7b1c3bfa937edadcafbc94f807bf5af5c1142c7b793f2d9969a271de1f | ||
|
||
notifications: | ||
email: false | ||
# slack: middleman:JW9OvXmn1m3XrSERe8866nBR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
## | ||
# If you do not have OpenSSL installed, change | ||
# the following line to use 'http://' | ||
## | ||
source 'https://rubygems.org' | ||
|
||
# Middleman Gems | ||
gem "middleman-cli", git: "https://github.com/middleman/middleman.git", branch: 'master' | ||
gem "middleman-core", git: "https://github.com/middleman/middleman.git", branch: 'master' | ||
gem 'middleman-cli', git: 'https://github.com/middleman/middleman.git', branch: 'master' | ||
gem 'middleman-core', git: 'https://github.com/middleman/middleman.git', branch: 'master' | ||
|
||
# Specify your gem's dependencies in middleman-blog.gemspec | ||
gemspec | ||
|
||
# Build and doc tools | ||
gem 'rake', '~> 10.3', require: false # Latest 12.0.0 | ||
gem 'yard', '~> 0.8', require: false # Latest 0.9.8 | ||
gem 'rake', '~> 12.3', require: false | ||
gem 'yard', '~> 0.9.11', require: false | ||
|
||
# Test tools | ||
gem 'pry', '~> 0.10', require: false, group: :development # Latest 1.0.0.pre1 | ||
gem 'aruba', '~> 0.7.4', require: false # Latest 0.14.2 | ||
gem 'capybara', '~> 2.5.0', require: false # Latest 2.13.0 middleman-core forces all plugins to declare this | ||
gem 'rspec', '~> 3.0', require: false # Latest 3.6.0.beta2 | ||
gem 'cucumber', '~> 2.4', require: false # Latest 3.0.0.pre.1 | ||
gem 'aruba', '~> 0.14.0', require: false | ||
gem 'byebug' | ||
gem 'capybara', '~> 2.5.0', require: false | ||
gem 'cucumber', '~> 3.0', require: false | ||
gem 'rspec', '~> 3.0', require: false | ||
|
||
gem "timecop", "~> 0.6.3" # Latest 0.8.1 | ||
gem "nokogiri" # Latest 1.7.1 | ||
gem "kramdown" # Latest 1.13.2 | ||
# Pry tools | ||
gem 'pry' | ||
gem 'pry-rescue' | ||
gem 'pry-stack_explorer' | ||
|
||
gem 'kramdown' # Latest 1.13.2 | ||
gem 'nokogiri' # Latest 1.7.1 | ||
gem 'timecop', '~> 0.6.3' # Latest 0.8.1 | ||
|
||
# Code Quality | ||
gem 'rubocop', '~> 0.24', require: false # Latest 0.47.1 | ||
gem 'simplecov', '~> 0.10', require: false # Latest 0.14.1 | ||
gem 'coveralls', '~> 0.8', require: false # Latest 0.8.19 | ||
gem 'codeclimate-test-reporter', '~> 0.3', require: false, group: :test # Latest 1.0.8 | ||
gem 'rubocop', '~> 0.59', require: false | ||
gem 'simplecov', '~> 0.10', require: false | ||
|
||
# Set the ruby platform - not windows | ||
platforms :ruby do | ||
gem "redcarpet", "~> 3.1" # Latest 3.4.0 | ||
gem 'redcarpet', '~> 3.1' # Latest 3.4.0 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
source 'https://rubygems.org' | ||
|
||
# Middleman Gems | ||
gem 'middleman-cli', '~> 4.2' | ||
gem 'middleman-core', '~> 4.2' | ||
|
||
# Specify your gem's dependencies in middleman-blog.gemspec | ||
gemspec | ||
# Build and doc tools | ||
gem 'rake', '~> 12.3', require: false | ||
gem 'yard', '~> 0.9.11', require: false | ||
|
||
# Test tools | ||
gem 'aruba', '~> 0.14.0', require: false | ||
gem 'byebug' | ||
gem 'capybara', '~> 2.5.0', require: false | ||
gem 'cucumber', '~> 3.0', require: false | ||
gem 'rspec', '~> 3.0', require: false | ||
|
||
# Pry tools | ||
gem 'pry' | ||
gem 'pry-rescue' | ||
gem 'pry-stack_explorer' | ||
|
||
gem 'kramdown' # Latest 1.13.2 | ||
gem 'nokogiri' # Latest 1.7.1 | ||
gem 'timecop', '~> 0.6.3' # Latest 0.8.1 | ||
|
||
# Code Quality | ||
gem 'rubocop', '~> 0.59', require: false | ||
gem 'simplecov', '~> 0.10', require: false | ||
|
||
# Set the ruby platform - not windows | ||
platforms :ruby do | ||
gem 'redcarpet', '~> 3.1' # Latest 3.4.0 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
require 'simplecov' | ||
|
||
SimpleCov.start do | ||
add_filter "/features/" | ||
add_filter '/features/' | ||
end | ||
|
||
require 'coveralls' | ||
Coveralls.wear! | ||
ENV['TEST'] = 'true' | ||
ENV['AUTOLOAD_SPROCKETS'] = 'false' | ||
|
||
ENV[ "TEST" ] = "true" | ||
ENV[ "AUTOLOAD_SPROCKETS" ] = "false" | ||
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__))) | ||
|
||
PROJECT_ROOT_PATH = File.dirname( File.dirname( File.dirname( __FILE__ ) ) ) | ||
require 'middleman-core' | ||
require 'middleman-core/step_definitions' | ||
|
||
require "middleman-core" | ||
require "middleman-core/step_definitions" | ||
|
||
require File.join( PROJECT_ROOT_PATH, 'lib', 'middleman-blog' ) | ||
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-blog') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
require 'timecop' | ||
require 'active_support/core_ext/time/calculations' | ||
|
||
Time.zone = "UTC" if Time.zone.nil? | ||
Time.zone = 'UTC' if Time.zone.nil? | ||
|
||
Given /the timezone is "(.+?)"$/ do | zone | | ||
Time.zone = zone | ||
Given /the timezone is "(.+?)"$/ do |zone| | ||
Time.zone = zone | ||
end | ||
|
||
Given /the (date|time|date and time) is (.+?)$/ do | datetime, value | | ||
Given /the (date|time|date and time) is (.+?)$/ do |datetime, value| | ||
time = case datetime | ||
when "date" | ||
when 'date' | ||
Date.parse(value) | ||
when "time" | ||
when 'time' | ||
Time.parse(value) | ||
when "date and time" | ||
when 'date and time' | ||
Time.zone.parse(value) | ||
end | ||
|
||
Timecop.travel time | ||
|
||
end | ||
|
||
After do | ||
|
||
Timecop.return | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
activate :blog do |blog| | ||
blog.permalink = "{year}/{month}/{day}/{title}" | ||
blog.sources = "blog/:year-:month-:day-:title.html" | ||
blog.permalink = '{year}/{month}/{day}/{title}' | ||
blog.sources = 'blog/:year-:month-:day-:title.html' | ||
end | ||
|
||
activate :directory_indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
activate :blog do |blog| | ||
blog.permalink = "{year}.{month}.{day}/{title}" | ||
blog.sources = "blog/:year-:month-:day-:title.html" | ||
blog.permalink = '{year}.{month}.{day}/{title}' | ||
blog.sources = 'blog/:year-:month-:day-:title.html' | ||
end | ||
|
||
activate :directory_indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
activate :blog do |blog| | ||
blog.sources = "blog/:year-:month-:day-:title.html" | ||
end | ||
blog.sources = 'blog/:year-:month-:day-:title.html' | ||
end |
Oops, something went wrong.