This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from sanger/next_release
Release-1.10.00
- Loading branch information
Showing
171 changed files
with
20,320 additions
and
509 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ tmp/ | |
public/stylesheets/*.css | ||
.DS_Store | ||
.sass-cache/ | ||
*.orig |
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,2 @@ | ||
--color | ||
--require spec_helper |
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 +1 @@ | ||
rvm use 1.9.2@illumina_c_pipeline --create | ||
rvm use 1.9.3@illumina_c_pipeline --create |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ gem 'state_machine', '~>1.0.1' | |
gem 'hashie', '~>1.0.0' | ||
gem 'exception_notification' | ||
|
||
gem 'sequencescape-client-api', '>=0.2.6', | ||
gem 'sequencescape-client-api', '>=0.2.9', | ||
:github => 'sanger/sequencescape-client-api', | ||
:branch => 'production', | ||
:require => 'sequencescape' | ||
|
@@ -19,15 +19,25 @@ gem 'sanger_barcode', '>= 0.2.0', | |
# put test-only gems in this group so their generators | ||
# and rake tasks are available in development mode: | ||
group :test do | ||
gem 'capybara' | ||
gem 'cucumber-rails', :require => false | ||
gem 'launchy' | ||
gem 'rspec-rails' | ||
gem 'webmock' | ||
|
||
gem 'capybara' | ||
gem 'phantomjs' | ||
gem 'poltergeist' | ||
end | ||
|
||
group :development do | ||
gem 'ruby-debug19', :require => 'ruby-debug' | ||
gem 'ruby-debug-base19x' | ||
gem 'pry' | ||
end | ||
|
||
group :deployment do | ||
gem 'thin' | ||
gem "psd_logger", :git => "git+ssh://[email protected]/sanger/psd_logger.git" | ||
# Due to guar changes, can likely be fied with ruby updates | ||
gem "rspec-legacy_formatters" | ||
gem 'guard-rspec', require: false | ||
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# A sample Guardfile | ||
# More info at https://github.com/guard/guard#readme | ||
|
||
guard 'rspec', :version => 2 do | ||
watch(%r{^spec/.+_spec\.rb$}) | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | ||
watch('spec/spec_helper.rb') { "spec" } | ||
|
||
# Rails example | ||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | ||
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | ||
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } | ||
watch('config/routes.rb') { "spec/routing" } | ||
watch('app/controllers/application_controller.rb') { "spec/controllers" } | ||
|
||
# Capybara request specs | ||
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } | ||
|
||
# Turnip features and steps | ||
watch(%r{^spec/acceptance/(.+)\.feature$}) | ||
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } | ||
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class MetadataController < ApplicationController | ||
|
||
def create | ||
metadata = metadata_hash | ||
api.custom_metadatum_collection.create!(user: current_user_uuid, asset: params[:asset_id], metadata: metadata) | ||
redirect_to(:back, notice: "Metadata was added successfully") | ||
end | ||
|
||
def update | ||
metadata = metadata_hash | ||
api.custom_metadatum_collection.find(params[:id]).update_attributes!(metadata: metadata) | ||
redirect_to(:back, notice: "Metadata was updated successfully") | ||
end | ||
|
||
def metadata_hash | ||
key_values = params[:metadata].map {|metadatum| [metadatum[:key], metadatum[:value]]} | ||
Hash[key_values.reject {|k, v| k.blank? || v.blank? }] | ||
end | ||
|
||
end |
29 changes: 29 additions & 0 deletions
29
app/controllers/multiple_target_state_change_controller.rb
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,29 @@ | ||
class MultipleTargetStateChangeController < ApplicationController | ||
|
||
def create | ||
|
||
if params[:tubes] | ||
tubes_uuid = params[:tubes].keys | ||
tubes_uuid.each do |uuid| | ||
purpose_uuid = api.multiplexed_library_tube.find(uuid).purpose.uuid | ||
state_changer_for(purpose_uuid, uuid).move_to!("passed") | ||
end | ||
tubes_ean13_barcodes = params[:tubes].values | ||
redirect_to(search_path, :notice => "Labware: #{tubes_ean13_barcodes.join(", ")} have been changed to a state of Passed") | ||
else | ||
redirect_to(search_path, :notice => "Nothing to pass") | ||
end | ||
|
||
rescue StateChangers::StateChangeError => exception | ||
respond_to do |format| | ||
format.html { redirect_to(search_path, :alert=> exception.message) } | ||
format.csv | ||
end | ||
end | ||
|
||
def state_changer_for(purpose_uuid, labware_uuid) | ||
StateChangers.lookup_for(purpose_uuid).new(api, labware_uuid, current_user_uuid) | ||
end | ||
private :state_changer_for | ||
|
||
end |
Oops, something went wrong.