Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix cukes

  • Loading branch information...
commit b78d503217ce9847b7c3e9ce6b7746e7b8ecce51 1 parent 247e078
@sferik sferik authored
View
20 features/download.feature
@@ -7,9 +7,9 @@ Feature: Download Gems
Given I am signed up and confirmed as "email@person.com/password"
And I have a gem "sandworm" with version "1.0.0"
And I have a gem "sandworm" with version "2.0.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "sandworm-1.0.0.gem" with my api key
- And I push the gem "sandworm-2.0.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "sandworm-1.0.0.gem" with my API key
+ And I push the gem "sandworm-2.0.0.gem" with my API key
And the system processes jobs
When I visit the gem page for "sandworm"
@@ -29,7 +29,7 @@ Feature: Download Gems
When I follow "1.0.0"
Then I should see "5 total downloads"
And I should see "2 for this version"
-
+
When I download the rubygem "sandworm" version "2.0.0" 1000 times
And the system processes jobs
And I visit the gem page for "sandworm"
@@ -40,9 +40,9 @@ Feature: Download Gems
Given I am signed up and confirmed as "email@person.com/password"
And I have a gem "crysknife" with version "1.0.0"
And I have a gem "crysknife" with version "1.0.0" and platform "java"
- And I have an api key for "email@person.com/password"
- And I push the gem "crysknife-1.0.0.gem" with my api key
- And I push the gem "crysknife-1.0.0-java.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "crysknife-1.0.0.gem" with my API key
+ And I push the gem "crysknife-1.0.0-java.gem" with my API key
And the system processes jobs
When I visit the gem page for "crysknife" version "1.0.0"
@@ -64,9 +64,9 @@ Feature: Download Gems
Given I am signed up and confirmed as "email@person.com/password"
And I have a gem "andhapp" with version "1.1.1"
And I have a gem "andhapp" with version "1.1.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "andhapp-1.1.1.gem" with my api key
- And I push the gem "andhapp-1.1.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "andhapp-1.1.1.gem" with my API key
+ And I push the gem "andhapp-1.1.0.gem" with my API key
And the system processes jobs
When I visit the gem page for "andhapp" version "1.1.1"
View
4 features/gems_api.feature
@@ -5,12 +5,12 @@ Feature: List gems API
Scenario: Gem owner user lists their gems
Given I am signed up and confirmed as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
+ And I have an API key for "original@owner.org/password"
And the following version exists:
| rubygem | number |
| name: MyGem | 1.0.0 |
And the following ownership exists:
| rubygem | user |
| name: MyGem | email: original@owner.org |
- When I list the gems with my api key
+ When I list the gems with my API key
Then I should see "MyGem"
View
8 features/homepage.feature
@@ -2,13 +2,13 @@ Feature: Homepage
Scenario: Most downloaded gems for today
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a gem "sandworm" with version "1.0.0"
And I have a gem "sandworm" with version "2.0.0"
And I have a gem "fireworm" with version "1.0.0"
- And I push the gem "sandworm-1.0.0.gem" with my api key
- And I push the gem "sandworm-2.0.0.gem" with my api key
- And I push the gem "fireworm-1.0.0.gem" with my api key
+ And I push the gem "sandworm-1.0.0.gem" with my API key
+ And I push the gem "sandworm-2.0.0.gem" with my API key
+ And I push the gem "fireworm-1.0.0.gem" with my API key
When I am on the homepage
Then I should see "No downloads today"
View
36 features/owner.feature
@@ -17,8 +17,8 @@ Feature: Manage owners
Scenario Outline: Gem owner user lists gem owners
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
- When I list the owners of gem "OGem" as "<format>" with my api key
+ And I have an API key for "original@owner.org/password"
+ When I list the owners of gem "OGem" as "<format>" with my API key
Then I should see "original@owner.org"
And I should not see "new@owner.org"
@@ -29,54 +29,54 @@ Feature: Manage owners
Scenario: Gem owner adds another owner
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
- When I add the owner "new@owner.org" to the rubygem "OGem" with my api key
- And I list the owners of gem "OGem" with my api key
+ And I have an API key for "original@owner.org/password"
+ When I add the owner "new@owner.org" to the rubygem "OGem" with my API key
+ And I list the owners of gem "OGem" with my API key
Then I should see "original@owner.org"
And I should see "new@owner.org"
Scenario: Gem owner attempts to add another owner that does not exist
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
- When I add the owner "other@owner.org" to the rubygem "OGem" with my api key
+ And I have an API key for "original@owner.org/password"
+ When I add the owner "other@owner.org" to the rubygem "OGem" with my API key
Then the response should contain "Owner could not be found."
Scenario: Gem owner removes an owner
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
+ And I have an API key for "original@owner.org/password"
And the following ownership exists:
| user | rubygem |
| email: new@owner.org | name: OGem |
- When I remove the owner "new@owner.org" from the rubygem "OGem" with my api key
- And I list the owners of gem "OGem" with my api key
+ When I remove the owner "new@owner.org" from the rubygem "OGem" with my API key
+ And I list the owners of gem "OGem" with my API key
Then I should see "original@owner.org"
And I should not see "new@owner.org"
Scenario: Gem owner attempts to remove ownership from a user that is not an owner
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
- When I remove the owner "new@owner.org" from the rubygem "OGem" with my api key
+ And I have an API key for "original@owner.org/password"
+ When I remove the owner "new@owner.org" from the rubygem "OGem" with my API key
Then the response should contain "Owner could not be found."
Scenario: Gem owner removes himself when he is not the last owner
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
+ And I have an API key for "original@owner.org/password"
And the following ownership exists:
| user | rubygem |
| email: new@owner.org | name: OGem |
- When I remove the owner "original@owner.org" from the rubygem "OGem" with my api key
+ When I remove the owner "original@owner.org" from the rubygem "OGem" with my API key
Then the response should contain "Owner removed successfully."
Scenario: Gem owner removes himself when he is the last owner
Given I sign in as "original@owner.org/password"
- And I have an api key for "original@owner.org/password"
- When I remove the owner "original@owner.org" from the rubygem "OGem" with my api key
+ And I have an API key for "original@owner.org/password"
+ When I remove the owner "original@owner.org" from the rubygem "OGem" with my API key
Then the response should contain "Unable to remove owner."
Scenario Outline: Attempt to manage a gem without the right permission
Given I am signed up and confirmed as "non@owner.org/password"
- And I have an api key for "non@owner.org/password"
- When I <action> with my api key
+ And I have an API key for "non@owner.org/password"
+ When I <action> with my API key
Then the response should contain "You do not have permission to manage this gem."
Examples:
View
34 features/push.feature
@@ -6,8 +6,8 @@ Feature: Push Gems
Scenario: User pushes new gem
Given I am signed up and confirmed as "email@person.com/password"
And I have a gem "RGem" with version "1.2.3"
- And I have an api key for "email@person.com/password"
- When I push the gem "RGem-1.2.3.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ When I push the gem "RGem-1.2.3.gem" with my API key
And I visit the gem page for "RGem"
Then I should see "RGem"
And I should see "1.2.3"
@@ -15,15 +15,15 @@ Feature: Push Gems
Scenario: User pushes existing version of existing gem
Given I am signed up and confirmed as "email@person.com/password"
And I have a gem "PGem" with version "1.0.0" and summary "First try"
- And I have an api key for "email@person.com/password"
- When I push the gem "PGem-1.0.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ When I push the gem "PGem-1.0.0.gem" with my API key
And I visit the gem page for "PGem"
Then I should see "PGem"
And I should see "1.0.0"
And I should see "First try"
When I have a gem "PGem" with version "1.0.0" and summary "Second try"
- And I push the gem "PGem-1.0.0.gem" with my api key
+ And I push the gem "PGem-1.0.0.gem" with my API key
Then the response should contain "Repushing of gem versions is not allowed."
And the response should contain "Please use `gem yank` to remove bad gem releases."
And I visit the gem page for "PGem"
@@ -33,11 +33,11 @@ Feature: Push Gems
Scenario: User pushes new version of existing gem
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a gem "BGem" with version "2.0.0"
- And I push the gem "BGem-2.0.0.gem" with my api key
+ And I push the gem "BGem-2.0.0.gem" with my API key
And I have a gem "BGem" with version "3.0.0"
- When I push the gem "BGem-3.0.0.gem" with my api key
+ When I push the gem "BGem-3.0.0.gem" with my API key
And I visit the gem page for "BGem"
Then I should see "BGem"
And I should see "2.0.0"
@@ -45,30 +45,30 @@ Feature: Push Gems
Scenario: User pushes gem with bad url
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a gem "badurl" with version "1.0.0" and homepage "badurl.com"
- When I push the gem "badurl-1.0.0.gem" with my api key
+ When I push the gem "badurl-1.0.0.gem" with my API key
Then I should see "Home does not appear to be a valid URL"
Scenario: User pushes gem with bad name
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a bad gem "['badname']" with version "1.0.0"
- When I push the gem "badname-1.0.0.gem" with my api key
+ When I push the gem "badname-1.0.0.gem" with my API key
Then I should see "Name must be a String"
Scenario: User pushes gem with bad authors
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a gem "badauthors" with version "1.0.0" and authors "[3]"
- When I push the gem "badauthors-1.0.0.gem" with my api key
+ When I push the gem "badauthors-1.0.0.gem" with my API key
Then I should see "Authors must be an Array of Strings"
Scenario: User pushes gem with bad runtime dependency
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And I have a gem "baddeps" with version "1.0.0" and runtime dependency "unknown"
- When I push the gem "baddeps-1.0.0.gem" with my api key
+ When I push the gem "baddeps-1.0.0.gem" with my API key
Then I should see "Please specify dependencies that exist on RubyGems.org"
And the rubygem "unknown" does not exist
@@ -77,7 +77,7 @@ Feature: Push Gems
Scenario: User pushes file that is not a gem
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
When I push an invalid .gem file
Then I should see "RubyGems.org cannot process this gem."
And I should not see "Error:"
View
26 features/step_definitions/api_steps.rb
@@ -1,11 +1,11 @@
-Given /^I have an api key for "([^\"]*)"$/ do |creds|
+Given /^I have an API key for "([^\"]*)"$/ do |creds|
user, pass = creds.split('/')
page.driver.browser.basic_authorize(user, pass)
visit api_v1_api_key_path
@api_key = page.source
end
-When /^I push the gem "([^\"]*)" with my api key$/ do |name|
+When /^I push the gem "([^\"]*)" with my API key$/ do |name|
api_key_header
path = File.join(TEST_DIR, name)
page.driver.post api_v1_rubygems_path, File.read(path)
@@ -16,39 +16,39 @@
page.driver.post api_v1_rubygems_path, 'ZZZZZZZZZZZZZZZZZZ'
end
-When /^I yank the gem "([^\"]*)" version "([^\"]*)" with my api key$/ do |name, version_number|
+When /^I yank the gem "([^\"]*)" version "([^\"]*)" with my API key$/ do |name, version_number|
api_key_header
page.driver.delete yank_api_v1_rubygems_path(:gem_name => name, :version => version_number)
assert_match /Successfully yanked gem: #{name} \(#{version_number}\)/, page.source
end
-When /^I attempt to yank the gem "([^\"]*)" version "([^\"]*)" with my api key$/ do |name, version_number|
+When /^I attempt to yank the gem "([^\"]*)" version "([^\"]*)" with my API key$/ do |name, version_number|
api_key_header
page.driver.delete yank_api_v1_rubygems_path(:gem_name => name, :version => version_number)
end
-When /^I unyank the gem "([^\"]*)" version "([^\"]*)" with my api key$/ do |name, version_number|
+When /^I unyank the gem "([^\"]*)" version "([^\"]*)" with my API key$/ do |name, version_number|
api_key_header
page.driver.put unyank_api_v1_rubygems_path(:gem_name => name, :version => version_number)
assert_match /Successfully unyanked gem: #{name} \(#{version_number}\)/, page.source
end
-When /^I list the owners of gem "([^\"]*)" with my api key$/ do |name|
+When /^I list the owners of gem "([^\"]*)" with my API key$/ do |name|
api_key_header
- visit api_v1_rubygem_owners_path(:rubygem_id => name)
+ visit api_v1_rubygem_owners_path(:rubygem_id => name, :format => 'json')
end
-When /^I list the owners of gem "([^\"]*)" as "([^"]+)" with my api key$/ do |name, format|
+When /^I list the owners of gem "([^\"]*)" as "([^"]+)" with my API key$/ do |name, format|
api_key_header
- visit "#{api_v1_rubygem_owners_path(name)}.#{format}"
+ visit api_v1_rubygem_owners_path(:rubygem_id => name, :format => format)
end
-When /^I add the owner "([^\"]*)" to the rubygem "([^\"]*)" with my api key$/ do |owner_email, rubygem_name|
+When /^I add the owner "([^\"]*)" to the rubygem "([^\"]*)" with my API key$/ do |owner_email, rubygem_name|
api_key_header
page.driver.post api_v1_rubygem_owners_path(:rubygem_id => rubygem_name), :email => owner_email
end
-When /^I remove the owner "([^\"]*)" from the rubygem "([^\"]*)" with my api key$/ do |owner_email, rubygem_name|
+When /^I remove the owner "([^\"]*)" from the rubygem "([^\"]*)" with my API key$/ do |owner_email, rubygem_name|
api_key_header
page.driver.delete api_v1_rubygem_owners_path(:rubygem_id => rubygem_name), :email => owner_email
end
@@ -63,9 +63,9 @@
visit url
end
-When /I list the gems with my api key/ do
+When /I list the gems with my API key/ do
api_key_header
- visit api_v1_rubygems_path
+ visit api_v1_rubygems_path(:format => 'json')
end
Then /the response should contain "([^"]+)"/ do |text|
View
12 features/step_definitions/webhook_steps.rb
@@ -1,16 +1,16 @@
-When /^I have added a webhook for "([^\"]*)" to gem "([^\"]*)" with my api key$/ do |web_hook_url, gem_name|
+When /^I have added a webhook for "([^\"]*)" to gem "([^\"]*)" with my API key$/ do |web_hook_url, gem_name|
api_key_header
WebMock.stub_request(:post, web_hook_url)
page.driver.post api_v1_web_hooks_path, :gem_name => gem_name, :url => web_hook_url
end
-When /^I have added a global webhook for "([^\"]*)" with my api key$/ do |web_hook_url|
+When /^I have added a global webhook for "([^\"]*)" with my API key$/ do |web_hook_url|
api_key_header
WebMock.stub_request(:post, web_hook_url)
page.driver.post api_v1_web_hooks_path, :gem_name => WebHook::GLOBAL_PATTERN, :url => web_hook_url
end
-When /I list the webhooks as (json|yaml) with my api key/ do |format|
+When /I list the webhooks as (json|yaml) with my API key/ do |format|
api_key_header
visit api_v1_web_hooks_path(:format => format)
end
@@ -36,7 +36,7 @@
assert data[gem_name].find { |hook| hook['url'] == web_hook_url }
end
-When /^I have removed a webhook for "([^\"]*)" from gem "([^\"]*)" with my api key$/ do |web_hook_url, gem_name|
+When /^I have removed a webhook for "([^\"]*)" from gem "([^\"]*)" with my API key$/ do |web_hook_url, gem_name|
api_key_header
page.driver.delete remove_api_v1_web_hooks_path, :gem_name => gem_name, :url => web_hook_url
end
@@ -46,12 +46,12 @@
page.driver.delete remove_api_v1_web_hooks_path, :gem_name => WebHook::GLOBAL_PATTERN, :url => web_hook_url
end
-When /^I have fired a webhook to "([^\"]*)" for the "([^\"]*)" gem with my api key$/ do |web_hook_url, gem_name|
+When /^I have fired a webhook to "([^\"]*)" for the "([^\"]*)" gem with my API key$/ do |web_hook_url, gem_name|
api_key_header
page.driver.post fire_api_v1_web_hooks_path, :gem_name => gem_name, :url => web_hook_url
end
-When /^I have fired a webhook to "([^\"]*)" for all gems with my api key$/ do |web_hook_url|
+When /^I have fired a webhook to "([^\"]*)" for all gems with my API key$/ do |web_hook_url|
api_key_header
page.driver.post fire_api_v1_web_hooks_path, :gem_name => WebHook::GLOBAL_PATTERN, :url => web_hook_url
end
View
80 features/webhooks.feature
@@ -9,28 +9,28 @@ Feature: Web Hooks
Scenario: User pushes new gem with webhook
Given I have a gem "fiddler" with version "1.0.0"
And I have a gem "fiddler" with version "2.0.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "fiddler-1.0.0.gem" with my api key
- When I have added a webhook for "http://example.org/webhook" to gem "fiddler" with my api key
- And I push the gem "fiddler-2.0.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "fiddler-1.0.0.gem" with my API key
+ When I have added a webhook for "http://example.org/webhook" to gem "fiddler" with my API key
+ And I push the gem "fiddler-2.0.0.gem" with my API key
And the system processes jobs
Then the webhook "http://example.org/webhook" should receive a POST with gem "fiddler" at version "2.0.0"
Scenario: User pushes older gem with webhook
Given I have a gem "fiddler" with version "1.0.0"
And I have a gem "fiddler" with version "0.5.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "fiddler-1.0.0.gem" with my api key
- When I have added a webhook for "http://example.org/webhook" to gem "fiddler" with my api key
- And I push the gem "fiddler-0.5.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "fiddler-1.0.0.gem" with my API key
+ When I have added a webhook for "http://example.org/webhook" to gem "fiddler" with my API key
+ And I push the gem "fiddler-0.5.0.gem" with my API key
And the system processes jobs
Then the webhook "http://example.org/webhook" should receive a POST with gem "fiddler" at version "0.5.0"
Scenario: User pushes new gem after registering global webhook
Given I have a gem "vodka" with version "1.2.3"
- And I have an api key for "email@person.com/password"
- When I have added a global webhook for "http://example.org/webhook" with my api key
- And I push the gem "vodka-1.2.3.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ When I have added a global webhook for "http://example.org/webhook" with my API key
+ And I push the gem "vodka-1.2.3.gem" with my API key
And the system processes jobs
Then the webhook "http://example.org/webhook" should receive a POST with gem "vodka" at version "1.2.3"
@@ -39,13 +39,13 @@ Feature: Web Hooks
| name |
| mazeltov |
| vodka |
- And I have an api key for "email@person.com/password"
- And I have added a webhook for "http://example.org/webhook" to gem "mazeltov" with my api key
- And I have added a webhook for "http://example.org/webhook2" to gem "mazeltov" with my api key
- And I have added a webhook for "http://example.org/webhook3" to gem "vodka" with my api key
- And I have added a global webhook for "http://example.org/webhook4" with my api key
- And I have added a global webhook for "http://example.org/webhook5" with my api key
- When I list the webhooks as json with my api key
+ And I have an API key for "email@person.com/password"
+ And I have added a webhook for "http://example.org/webhook" to gem "mazeltov" with my API key
+ And I have added a webhook for "http://example.org/webhook2" to gem "mazeltov" with my API key
+ And I have added a webhook for "http://example.org/webhook3" to gem "vodka" with my API key
+ And I have added a global webhook for "http://example.org/webhook4" with my API key
+ And I have added a global webhook for "http://example.org/webhook5" with my API key
+ When I list the webhooks as json with my API key
Then I should see "http://example.org/webhook" under "mazeltov" in json
And I should see "http://example.org/webhook2" under "mazeltov" in json
And I should see "http://example.org/webhook3" under "vodka" in json
@@ -57,13 +57,13 @@ Feature: Web Hooks
| name |
| mazeltov |
| vodka |
- And I have an api key for "email@person.com/password"
- And I have added a webhook for "http://example.org/webhook" to gem "mazeltov" with my api key
- And I have added a webhook for "http://example.org/webhook2" to gem "mazeltov" with my api key
- And I have added a webhook for "http://example.org/webhook3" to gem "vodka" with my api key
- And I have added a global webhook for "http://example.org/webhook4" with my api key
- And I have added a global webhook for "http://example.org/webhook5" with my api key
- When I list the webhooks as yaml with my api key
+ And I have an API key for "email@person.com/password"
+ And I have added a webhook for "http://example.org/webhook" to gem "mazeltov" with my API key
+ And I have added a webhook for "http://example.org/webhook2" to gem "mazeltov" with my API key
+ And I have added a webhook for "http://example.org/webhook3" to gem "vodka" with my API key
+ And I have added a global webhook for "http://example.org/webhook4" with my API key
+ And I have added a global webhook for "http://example.org/webhook5" with my API key
+ When I list the webhooks as yaml with my API key
Then I should see "http://example.org/webhook" under "mazeltov" in yaml
And I should see "http://example.org/webhook2" under "mazeltov" in yaml
And I should see "http://example.org/webhook3" under "vodka" in yaml
@@ -73,22 +73,22 @@ Feature: Web Hooks
Scenario: User removes hook for a gem
Given I have a gem "vodka" with version "1.0.0"
And I have a gem "vodka" with version "2.0.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "vodka-1.0.0.gem" with my api key
- And I have added a webhook for "http://example.org/webhook" to gem "vodka" with my api key
- When I have removed a webhook for "http://example.org/webhook" from gem "vodka" with my api key
- And I push the gem "vodka-2.0.0.gem" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "vodka-1.0.0.gem" with my API key
+ And I have added a webhook for "http://example.org/webhook" to gem "vodka" with my API key
+ When I have removed a webhook for "http://example.org/webhook" from gem "vodka" with my API key
+ And I push the gem "vodka-2.0.0.gem" with my API key
And the system processes jobs
Then the webhook "http://example.org/webhook" should not receive a POST
Scenario: User removes global hook
Given I have a gem "vodka" with version "1.0.0"
And I have a gem "vodka" with version "2.0.0"
- And I have an api key for "email@person.com/password"
- And I push the gem "vodka-1.0.0.gem" with my api key
- And I have added a global webhook for "http://example.org/webhook" with my api key
+ And I have an API key for "email@person.com/password"
+ And I push the gem "vodka-1.0.0.gem" with my API key
+ And I have added a global webhook for "http://example.org/webhook" with my API key
When I have removed the global webhook for "http://example.org/webhook"
- And I push the gem "vodka-2.0.0.gem" with my api key
+ And I push the gem "vodka-2.0.0.gem" with my API key
And the system processes jobs
Then the webhook "http://example.org/webhook" should not receive a POST
@@ -96,16 +96,16 @@ Feature: Web Hooks
Given the following version exists:
| rubygem | number |
| name: vodka | 1.2.3 |
- And I have an api key for "email@person.com/password"
- And I have added a webhook for "http://example.org/webhook" to gem "vodka" with my api key
- When I have fired a webhook to "http://example.org/webhook" for the "vodka" gem with my api key
+ And I have an API key for "email@person.com/password"
+ And I have added a webhook for "http://example.org/webhook" to gem "vodka" with my API key
+ When I have fired a webhook to "http://example.org/webhook" for the "vodka" gem with my API key
Then the webhook "http://example.org/webhook" should receive a POST with gem "vodka" at version "1.2.3"
Scenario: User test fires global hook
Given the following version exists:
| rubygem | number |
| name: gemcutter | 1.0.0 |
- And I have an api key for "email@person.com/password"
- And I have added a global webhook for "http://example.org/webhook" with my api key
- When I have fired a webhook to "http://example.org/webhook" for all gems with my api key
+ And I have an API key for "email@person.com/password"
+ And I have added a global webhook for "http://example.org/webhook" with my API key
+ When I have fired a webhook to "http://example.org/webhook" for all gems with my API key
Then the webhook "http://example.org/webhook" should receive a POST with gem "gemcutter" at version "1.0.0"
View
30 features/yank.feature
@@ -5,7 +5,7 @@ Feature: Delete Gems
Scenario: User yanks a gem
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And the following ownership exists:
| rubygem | user |
| name: RGem | email: email@person.com |
@@ -13,7 +13,7 @@ Feature: Delete Gems
| rubygem | number |
| name: RGem | 1.2.2 |
| name: RGem | 1.2.3 |
- When I yank the gem "RGem" version "1.2.3" with my api key
+ When I yank the gem "RGem" version "1.2.3" with my API key
And I go to the dashboard
Then I should see "RGem"
And I visit the gem page for "RGem" version "1.2.3"
@@ -23,75 +23,75 @@ Feature: Delete Gems
Scenario: User yanks the last version of a gem and a new gem is pushed on that namespace
Given I am signed up and confirmed as "email@person.com/password"
- And I have an api key for "email@person.com/password"
+ And I have an API key for "email@person.com/password"
And the following ownership exists:
| rubygem | user |
| name: RGem | email: email@person.com |
And the following versions exist:
| rubygem | number |
| name: RGem | 1.2.3 |
- When I yank the gem "RGem" version "1.2.3" with my api key
+ When I yank the gem "RGem" version "1.2.3" with my API key
And I go to the dashboard
And I follow "RGem"
Then I should see "This gem has been yanked"
Given I am signed up and confirmed as "new@owner.com/password"
And I have a gem "RGem" with version "0.1.0"
- And I have an api key for "new@owner.com/password"
- When I push the gem "RGem-0.1.0.gem" with my api key
+ And I have an API key for "new@owner.com/password"
+ When I push the gem "RGem-0.1.0.gem" with my API key
And I visit the gem page for "RGem"
Then I should see "RGem"
And I should see "0.1.0"
- When I list the owners of gem "RGem" with my api key
+ When I list the owners of gem "RGem" with my API key
Then I should see "new@owner.com"
And I should not see "old@owner.com"
Scenario: User who is not owner attempts to yank a gem
Given I am signed up and confirmed as "non@owner.org/password"
- And I have an api key for "non@owner.org/password"
+ And I have an API key for "non@owner.org/password"
And the following version exists:
| rubygem | number | indexed |
| name: RGem | 1.2.3 | true |
And the following ownership exists:
| rubygem | user |
| name: RGem | email: the@owner.org |
- When I attempt to yank the gem "RGem" version "1.2.3" with my api key
+ When I attempt to yank the gem "RGem" version "1.2.3" with my API key
Then I should see "You do not have permission to yank this gem."
Scenario: User attempts to yank a nonexistent version of a gem
Given I am signed up and confirmed as "the@owner.com/password"
- And I have an api key for "the@owner.com/password"
+ And I have an API key for "the@owner.com/password"
And the following ownership exists:
| rubygem | user |
| name: RGem | email: the@owner.com |
And the following versions exist:
| rubygem | number |
| name: RGem | 1.2.3 |
- When I attempt to yank the gem "RGem" version "1.2.4" with my api key
+ When I attempt to yank the gem "RGem" version "1.2.4" with my API key
Then I should see "The version 1.2.4 does not exist."
Scenario: User attempts to yank a gem that has already been yanked
Given I am signed up and confirmed as "the@owner.com/password"
- And I have an api key for "the@owner.com/password"
+ And I have an API key for "the@owner.com/password"
And the following ownership exists:
| rubygem | user |
| name: RGem | email: the@owner.com |
And the following versions exist:
| rubygem | number | indexed |
| name: RGem | 1.2.3 | false |
- When I attempt to yank the gem "RGem" version "1.2.3" with my api key
+ When I attempt to yank the gem "RGem" version "1.2.3" with my API key
Then I should see "The version 1.2.3 has already been yanked"
Scenario: User unyanks a gem
Given I am signed up and confirmed as "the@owner.com/password"
- And I have an api key for "the@owner.com/password"
+ And I have an API key for "the@owner.com/password"
And the following ownership exists:
| rubygem | user |
| name: RGem | email: the@owner.com |
And the following versions exist:
| rubygem | number | indexed |
| name: RGem | 1.2.3 | false |
- When I unyank the gem "RGem" version "1.2.3" with my api key
+ When I unyank the gem "RGem" version "1.2.3" with my API key
And I go to the dashboard
And I follow "RGem"
Then I should not see "This gem has been yanked."
Please sign in to comment.
Something went wrong with that request. Please try again.