Skip to content

Fix shared steps dsl #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 131 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
896fd19
renamed README for markdown formatting
IdahoEv Aug 11, 2011
b373eaa
added new README file
IdahoEv Aug 11, 2011
99915ac
Expanded the README docco
IdahoEv Aug 11, 2011
4486fc6
updated gemspec
IdahoEv Aug 11, 2011
5f1ca18
Fix to before_ivar handling - important for let!
nyarly Aug 30, 2011
60099dd
Removing ungemmer from spec_helper (Bundler makes unnecessary)
nyarly Sep 25, 2011
632d284
Making compatible with rspec-2.7.0
nyarly Oct 17, 2011
8911ed6
Bumping version
nyarly Oct 17, 2011
309018d
Changing example-group to require rspec-core entirely
nyarly Jan 11, 2012
d5a20dd
Version bump
nyarly Jan 11, 2012
29995c8
Rename example group spec to convention
IdahoEv Jan 31, 2013
ee56ad5
Update readme with version info.
IdahoEv Jan 31, 2013
40fbe38
Local dev, pushed for ED's inspection
nyarly Jan 31, 2013
f4640cf
Update Corundum dependency and change .rspec paths to relative
IdahoEv Jan 31, 2013
b929778
unfinished work on 2.10 compatibility
IdahoEv Jan 31, 2013
922de7f
Fixes to add compatibility with rspec-core 2.10.x.
IdahoEv Feb 1, 2013
103d7dd
Some Gemfile changes
nyarly Feb 22, 2013
0c4d19b
Making ready for 0.0.9 release
nyarly Feb 22, 2013
7dc250c
Added gemfile for rspec 2.10
IdahoEv Mar 7, 2013
f92d355
Merge branch 'master' of github.com:LRDesign/rspec-steps
IdahoEv Mar 7, 2013
4f3bba3
Readme note about compatibility
IdahoEv Mar 7, 2013
a8f733d
Compatibile with 2.13
nyarly Mar 13, 2013
1fae0d6
Version bump to 0.1
nyarly Mar 13, 2013
f6aad74
Merge branch 'master' of github.com:LRDesign/rspec-steps
nyarly Mar 13, 2013
d35cd4c
Updated docs
nyarly Mar 13, 2013
54d9aa4
Fix for Rakefile and doc generation
nyarly Mar 13, 2013
bae7c2e
Added fix for false result type
nyarly Nov 6, 2013
7fbc410
Bumping version
nyarly Nov 6, 2013
7edcf63
Updating Corundum
nyarly Nov 6, 2013
0ac1d48
Checking whole list example in search for exceptions
brenes Dec 12, 2013
9e07096
Merge pull request #14 from simplelogica/features/silent-before-errors
nyarly Dec 16, 2013
9ddaf73
Bumping version
nyarly Dec 30, 2013
d46d787
Adding missing file
nyarly Dec 31, 2013
43f5328
Removing a TODO
nyarly Dec 31, 2013
ae1a88a
Coverage threshold increased: a whole 80%
nyarly Dec 31, 2013
0a14009
Un-escaping a # in response to #3
nyarly Jan 28, 2014
5edce75
Adding before and after :step
nyarly Jan 28, 2014
b9143f9
Added completely untested "it" synonyms per #1
nyarly Jan 28, 2014
a53772a
Version bump
nyarly Jan 28, 2014
ba3b7fa
Working against 2.14
nyarly Jan 29, 2014
4201390
Version bump
nyarly Jan 29, 2014
f742913
Adding CI testing matrix vs. rspec versions
nyarly Jan 29, 2014
e484fa0
Trying to get build matrix going...
nyarly Jan 29, 2014
ebe14df
Stupid commas
nyarly Jan 29, 2014
be85f79
Right the first time
nyarly Jan 29, 2014
41708cb
Adding Ruby version to the matrix
nyarly Jan 29, 2014
c591dba
s/ruby/rvm
nyarly Jan 29, 2014
52a5c99
Fixing shared_steps
nyarly Feb 24, 2014
34fd497
Version bump
nyarly Feb 24, 2014
0ae64f6
Adding Travis for RSpec 3.0
nyarly Jun 7, 2014
9994fd9
Added 3.0 to build matrix
nyarly Jun 7, 2014
fb9ba6d
Irritating status result error
nyarly Jun 7, 2014
097af03
Version bump
nyarly Jun 7, 2014
ee898cb
Experimental relaxation of version lock
nyarly Jun 7, 2014
1d2801e
Attempting cached bundles
nyarly Jun 17, 2014
8620235
Gemfile locks
nyarly Jun 17, 2014
56bafde
Fixing for travis
nyarly Jun 17, 2014
09dc996
Fixing(?) travis creds
nyarly Jun 17, 2014
620ba09
Tweaking cached-bundle somewhat
nyarly Jun 17, 2014
4507472
Working around for weirdness in bundler vendoring
nyarly Jun 17, 2014
5822216
Working around for weirdness in bundler vendoring
nyarly Jun 17, 2014
774ca78
Travis debug
nyarly Jun 17, 2014
be57585
Travis debug
nyarly Jun 17, 2014
4ed078d
Travis debug
nyarly Jun 17, 2014
b95fe5d
Making S3 caching more chatty
nyarly Jun 17, 2014
f68fc14
Removing attempt to set ACL on S3 objects
nyarly Jun 17, 2014
6889aab
Reattempting
nyarly Jun 17, 2014
5a488f5
Adding vendor/bundle to simplecov filter
nyarly Jun 17, 2014
7926537
Support for RSpec3
nyarly Aug 23, 2014
5a4e9b7
transpec result and cleanup
nyarly Aug 23, 2014
668db86
Update to CI scripts
nyarly Aug 23, 2014
794c3e1
Travis config
nyarly Aug 23, 2014
427b4bf
Travis fix
nyarly Aug 23, 2014
a08cae6
Travis fix
nyarly Aug 23, 2014
9f5e83c
Travis fix
nyarly Aug 25, 2014
7511419
Travis gemfile caching fix
nyarly Aug 25, 2014
47ee125
Updating gemfile/*.lock + added 2.8
nyarly Aug 25, 2014
9ed89cc
Updating gemfiles
nyarly Aug 25, 2014
5ea8bfd
Adding 2.8 to matrix
nyarly Aug 25, 2014
ae6772a
Bundle updates to get coru-0.4.1
nyarly Aug 25, 2014
f92cd1a
Abandoning RSpec 2.x (but see two-step)
nyarly Nov 8, 2014
7801678
Removing 2.x from build matrix
nyarly Nov 8, 2014
84445cb
Version 1.0
nyarly Nov 8, 2014
043792a
Bundler
nyarly Nov 8, 2014
d517615
Adding :step context
nyarly Nov 30, 2014
56fcc2d
Update Travis gemfiles
nyarly Nov 30, 2014
cfe3f4a
HookCollections :|
nyarly Nov 30, 2014
390f2f6
Fixing gemspec
nyarly Nov 30, 2014
e85ae0d
Version bump
nyarly Nov 30, 2014
85a916b
Travis gemfiles
nyarly Nov 30, 2014
da3deb9
Hooks needed more punching
nyarly Nov 30, 2014
dbe2086
Travis gemfiles
nyarly Nov 30, 2014
320d1f6
A couple of comaptibility updates
nyarly Dec 5, 2014
2748890
Version bump
nyarly Dec 5, 2014
f14e256
Travis
nyarly Dec 5, 2014
9fc2ed8
Fixes against RSpec 3
nyarly Dec 5, 2014
2c5e6ea
Reduced coverage req 75 -> 74%
nyarly Dec 5, 2014
46382f2
Version bump
nyarly Dec 6, 2014
d765012
Removing useless postinstall mesage
nyarly Dec 6, 2014
0a735c4
Travis
nyarly Dec 6, 2014
a97bb3e
Fixing a problem related to exit status
nyarly Dec 6, 2014
a42dc9e
Subversion bump
nyarly Dec 6, 2014
c45ccb9
Error reporting fix
nyarly Dec 6, 2014
69e63de
Possible regression related to failures in before
nyarly Dec 6, 2014
5dc8c3c
Slightly less chatty warnings
nyarly Dec 31, 2014
b27c361
Reducing warn to puts
nyarly Dec 31, 2014
1da45ab
New approach, hopefully more compatible, easier to understand
nyarly Aug 26, 2015
67ca1dd
Specs all pass on new version
nyarly Aug 27, 2015
bfcdbd8
Split into reasonable files
nyarly Aug 27, 2015
ac09490
Updating gemfiles
nyarly Aug 27, 2015
c4ecbad
Version bumpage
nyarly Aug 27, 2015
9bed828
Gemspec, updating coverage threshold
nyarly Aug 27, 2015
e19d7f1
Updating travis.yml
nyarly Aug 27, 2015
e7d680c
Adding flowdock notifications
nyarly Aug 27, 2015
395801e
Updating sandbox to work with more rspecs
nyarly Aug 28, 2015
c2b49f7
Fixes related to let blocks
nyarly Sep 16, 2015
8f585a2
Major version bump - before :step -> before :each
nyarly Sep 16, 2015
c389529
Updated docs
nyarly Sep 17, 2015
69143e5
Forgot to update the per-rspec gemfiles
nyarly Sep 17, 2015
14d119d
Typo
nyarly Sep 17, 2015
43dea29
Fixin' gemfiles...
nyarly Sep 17, 2015
31a46d3
Update to README, file structure.
nyarly Sep 18, 2015
7b5bc59
Adding file to gemspec manifest
nyarly Sep 18, 2015
0686223
Merge pull request #20 from LRDesign/compatible_version
hannahhoward Sep 21, 2015
51cb9d6
Little note added to README
nyarly Sep 21, 2015
df12313
Indents
nyarly Sep 21, 2015
df2f1c8
Manifest fix
nyarly Sep 21, 2015
f26420b
Missed monkeypatching.rb
nyarly Sep 21, 2015
adb060b
Fixing gemfiles for travis
nyarly Sep 21, 2015
b8ad524
Update to description
nyarly Sep 22, 2015
fc0b8d7
Add required metadata to Describer.new() call in shared_steps
IdahoEv Oct 18, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@ pkg
.conductor
.mtn-ignore
*.sw?
rspec-steps-*.gem
.bundle
corundum/
.sass-cache/
.yardoc/
gh-pages/
tmp/
spec/examples.txt
.cadre/
errors.err
spec_help/cadre.rb
9 changes: 5 additions & 4 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--format documentation
-I /home/judson/ruby/gems/rspec-steps/spec_help/interpose
-I /home/judson/ruby/gems/rspec-steps/lib
-I /home/judson/ruby/gems/rspec-steps/spec_help
-I ./spec_help/interpose
-I ./lib
-I ./spec_help
--require spec_helper
--pattern *.rb
--color
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0
13 changes: 13 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'simplecov-json'
require 'cadre/simplecov'

SimpleCov.start do
coverage_dir "corundum/docs/coverage"
add_filter "./spec"
add_filter "vendor/bundle"
formatter SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter,
Cadre::SimpleCov::VimFormatter
]
end
48 changes: 48 additions & 0 deletions .travis-support/cached-bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Usage: cached-bundle install --deployment
#
# After running `bundle`, caches the `vendor/bundle` directory to S3.
# On the next run, restores the cached directory before running `bundle`.
# When `Gemfile.lock` changes, the cache gets rebuilt.
#
# Requirements:
# - Gemfile.lock
# - TRAVIS_REPO_SLUG
# - TRAVIS_RUBY_VERSION
# - AMAZON_S3_BUCKET
# - script/s3-put
# - bundle
# - curl
#
# Author: Mislav Marohnić

set -e

compute_md5() {
local output="$(openssl md5)"
echo "${output##* }"
}

download() {
curl --tcp-nodelay -qfL "$1" -o "$2"
}

bundle_path=${CUSTOM_BUNDLE_PATH:-vendor/bundle}
gemfile_hash="$(compute_md5 <"${BUNDLE_GEMFILE:-Gemfile}.lock")"
cache_name="${TRAVIS_RUBY_VERSION}-${gemfile_hash}.tgz"
fetch_url="http://${AMAZON_S3_BUCKET}.s3.amazonaws.com/${TRAVIS_REPO_SLUG}/${cache_name}"

if download "$fetch_url" "$cache_name"; then
echo "Reusing cached bundle ${cache_name}"
ls -l $cache_name
tar xzf "$cache_name"
fi

bundle "$@"

if [ ! -f "$cache_name" ]; then
echo "Caching \`${bundle_path}' to S3"
tar czf "$cache_name" "$bundle_path"
echo "Putting $cache_name to ${AMAZON_S3_BUCKET}:${TRAVIS_REPO_SLUG}/${cache_name}"
.travis-support/s3-put "$cache_name" "${AMAZON_S3_BUCKET}:${TRAVIS_REPO_SLUG}/${cache_name}"
fi
71 changes: 71 additions & 0 deletions .travis-support/s3-put
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Usage: s3-put <FILE> <S3_BUCKET>[:<PATH>] [<CONTENT_TYPE>]
#
# Uploads a file to the Amazon S3 service.
# Outputs the URL for the newly uploaded file.
#
# Requirements:
# - AMAZON_ACCESS_KEY_ID
# - AMAZON_SECRET_ACCESS_KEY
# - openssl
# - curl
#
# Author: Mislav Marohnić

set -e

authorization() {
local signature="$(string_to_sign | hmac_sha1 | base64)"
echo "AWS ${AMAZON_ACCESS_KEY_ID?}:${signature}"
}

hmac_sha1() {
openssl dgst -binary -sha1 -hmac "${AMAZON_SECRET_ACCESS_KEY?}"
}

base64() {
openssl enc -base64
}

bin_md5() {
openssl dgst -binary -md5
}

string_to_sign() {
echo "$http_method"
echo "$content_md5"
echo "$content_type"
echo "$date"
printf "/$bucket/$remote_path"
}

date_string() {
LC_TIME=C date "+%a, %d %h %Y %T %z"
}

file="$1"
bucket="${2%%:*}"
remote_path="${2#*:}"
content_type="${3:-binary/octet-stream}"

if [ -z "$remote_path" ] || [ "$remote_path" = "$bucket" ]; then
remote_path="${file##*/}"
fi

http_method=PUT
acl="public-read"
content_md5="$(bin_md5 < "$file" | base64)"
date="$(date_string)"

url="https://$bucket.s3.amazonaws.com/$remote_path"

echo "Uploading $file to S3 bucket $bucket/$remote_path with ${AMAZON_ACCESS_KEY_ID}"

curl -qSf -T "$file" \
-H "Authorization: $(authorization)" \
-H "Date: $date" \
-H "Content-MD5: $content_md5" \
-H "Content-Type: $content_type" \
"$url"

echo "$url"
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
sudo: false
language: ruby
script: bundle exec rake ci
matrix:
include:
- gemfile: gemfiles/3.0
rvm: 1.9.3
- gemfile: gemfiles/3.1
rvm: 1.9.3
- gemfile: gemfiles/3.2
rvm: 1.9.3
- gemfile: gemfiles/3.3
rvm: 1.9.3


- gemfile: gemfiles/3.0
rvm: 2.0.0
- gemfile: gemfiles/3.1
rvm: 2.0.0
- gemfile: gemfiles/3.2
rvm: 2.0.0
- gemfile: gemfiles/3.3
rvm: 2.0.0


- gemfile: gemfiles/3.0
rvm: 2.1.2
- gemfile: gemfiles/3.1
rvm: 2.1.2
- gemfile: gemfiles/3.2
rvm: 2.1.2
- gemfile: gemfiles/3.3
rvm: 2.1.2

notifications:
flowdock:
secure: "iri0YRV17TZXSZ4IDGHd1e1k52u/Kz9EAqP4oGO1wI1OkIvD5t+2RvkSRoRNpQ080kzkjrlIQwpMaLMgUC9Y8TZ11JEq+uujmotRwOJIFtyAIbBwh3enQlOyPRU9kzdlmBHYtd7nLA92dd0PGfhoti2RkqUtqzgWAlZjqg/52zs="
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source "http://judson:[email protected]"
source "http://gemcutter.org"
source "http://gems.github.com"
source "https://rubygems.org"

gem 'fuubar'
gem 'rspec', "~> 3.0.0"
gem 'cadre'

gemspec
Loading