Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
Upgrade to Polytrix 0.1.0 - should now be (more) stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlinc committed Sep 19, 2014
1 parent f1f16c3 commit 4d226d8
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ tmp
.sublime*
tags
pacto.log
.polytrix/
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ group :samples do
gem 'rack'
end

gem 'polytrix', git: 'https://github.com/rackerlabs/polytrix'
gem 'polytrix', '~> 0.1.0'
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sample_apis: sh -c 'cd samples && bundle exec rackup -s puma -o localhost -p $PORT sample_apis/config.ru'
sample_apis: sh -c 'bundle exec rackup -s puma -o localhost -p $PORT sample_apis/config.ru'
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ end
desc 'Run the samples'
task :samples do
FileUtils.rm_rf('samples/tmp')
sh 'bundle exec polytrix exec --code2doc samples/*.rb samples/*.sh'
sh 'bundle exec polytrix exec --solo=samples --solo-glob="*.{rb,sh}"'
sh 'bundle exec polytrix code2doc --solo=samples --solo-glob="*.{rb,sh}"'
end

desc 'Build the documentation from the samples'
Expand Down
6 changes: 3 additions & 3 deletions features/steps/pacto_steps.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Given(/^Pacto is configured with:$/) do |string|
steps %Q(
steps %(
Given a file named "pacto_config.rb" with:
"""ruby
#{string}
Expand All @@ -8,7 +8,7 @@
end

Given(/^I have a Rakefile$/) do
steps %Q(
steps %(
Given a file named "Rakefile" with:
"""ruby
require 'pacto/rake_task'
Expand All @@ -17,7 +17,7 @@
end

When(/^I request "(.*?)"$/) do |url|
steps %Q{
steps %{
Given a file named "request.rb" with:
"""ruby
require 'pacto'
Expand Down
5 changes: 0 additions & 5 deletions polytrix.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions spec/unit/pacto/stubs/uri_pattern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,10 @@ module Pacto
end

it 'creates a regex that does not allow additional path elements' do
$enable_tracing = false
$trace_out = open('trace.txt', 'w')

set_trace_func proc { |event, file, line, id, binding, classname|
if $enable_tracing && event == 'call'
$trace_out.puts "#{file}:#{line} #{classname}##{id}"
end
}

$enable_tracing = true
request = Fabricate(:request_clause, host: 'myhost.com', path: '/:id')
pattern = UriPattern.for(request)
expect(pattern).to match('myhost.com/foo')
expect(pattern).to_not match('myhost.com/foo/bar')
$enable_tracing = false
end

it 'creates a regex that does allow query parameters', :deprecated do
Expand Down

0 comments on commit 4d226d8

Please sign in to comment.