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

Commit

Permalink
Merge pull request #35 from sanger/next_release
Browse files Browse the repository at this point in the history
Release-1.10.00
  • Loading branch information
James Glover authored Dec 5, 2016
2 parents f4fc29e + d76e830 commit 27c19b3
Show file tree
Hide file tree
Showing 171 changed files with 20,320 additions and 509 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tmp/
public/stylesheets/*.css
.DS_Store
.sass-cache/
*.orig
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
2 changes: 1 addition & 1 deletion .rvmrc
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
16 changes: 13 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
136 changes: 97 additions & 39 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ GIT

GIT
remote: git://github.com/sanger/sequencescape-client-api.git
revision: e39210258080d2011b2391d44055a849494097c6
revision: 79a7e0818410acb62f5befcc24eb4d72f092abca
branch: production
specs:
sequencescape-client-api (0.2.6)
sequencescape-client-api (0.2.9)
activemodel (~> 3.0.0)
activesupport (~> 3.0.0)
i18n
Expand Down Expand Up @@ -56,68 +56,83 @@ GEM
archive-tar-minitar (0.5.2)
arel (2.0.10)
builder (2.1.2)
capybara (1.1.1)
capybara (2.9.0)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.2.2)
ffi (~> 1.0.6)
xpath (~> 2.0)
chunky_png (1.2.4)
cliver (0.3.2)
coderay (1.1.1)
columnize (0.3.4)
compass (0.11.5)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
cucumber (1.0.6)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.4.18)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
cucumber-rails (1.0.5)
capybara (>= 1.1.1)
cucumber (~> 1.0.6)
nokogiri (>= 1.5.0)
daemons (1.1.4)
diff-lcs (1.1.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.2.4)
debugger-ruby_core_source (1.3.8)
diff-lcs (1.2.5)
erubis (2.6.6)
abstract (>= 1.0.0)
eventmachine (0.12.10)
eventmachine (1.2.0.1)
exception_notification (2.5.2)
actionmailer (>= 3.0.4)
ffi (1.0.9)
ffi (1.9.14)
formatador (0.2.5)
formtastic (1.2.4)
actionpack (>= 2.3.7)
activesupport (>= 2.3.7)
i18n (~> 0.4)
fssm (0.2.7)
gherkin (2.4.18)
json (>= 1.4.6)
guard (1.8.3)
formatador (>= 0.2.4)
listen (~> 1.3)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-rspec (1.2.2)
guard (>= 1.1)
gyoku (1.2.2)
builder (>= 2.1.2)
hashdiff (0.3.0)
hashie (1.0.0)
httpi (2.2.7)
rack
i18n (0.5.4)
json (1.6.0)
json_pure (1.6.0)
launchy (2.0.5)
addressable (~> 2.2.6)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
lumberjack (1.0.10)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.19)
nokogiri (1.5.0)
nori (2.4.0)
phantomjs (2.1.1.0)
poltergeist (1.10.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
polyglot (0.3.3)
rack (1.2.6)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.2.8)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
Expand All @@ -137,43 +152,76 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.9.6)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rb-kqueue (0.2.4)
ffi (>= 0.5.0)
rdoc (3.12)
json (~> 1.4)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.3)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-legacy_formatters (1.0.1)
rspec (~> 3.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug-base19x (0.11.31)
debugger-ruby_core_source (> 0)
rake (>= 0.8.1)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
safe_yaml (1.0.4)
sass (3.1.7)
savon (0.9.2)
builder (>= 2.1.2)
gyoku (>= 0.4.0)
httpi (>= 0.7.8)
nokogiri (>= 1.4.0)
nori (>= 0.2.0)
selenium-webdriver (2.6.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
slop (3.6.0)
state_machine (1.0.2)
term-ansicolor (1.0.6)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thin (1.7.0)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.14.6)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
xpath (0.1.4)
webmock (1.22.5)
addressable (< 2.4.0)
crack (>= 0.3.2)
hashdiff
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.1.0)

Expand All @@ -183,16 +231,26 @@ PLATFORMS
DEPENDENCIES
capybara
compass (>= 0.11.1)
cucumber-rails
exception_notification
formtastic (~> 1.2.3)
guard-rspec
hashie (~> 1.0.0)
launchy
phantomjs
poltergeist
pry
psd_logger!
rails (~> 3.0.19)
rake (~> 0.9.2)
rspec-legacy_formatters
rspec-rails
ruby-debug-base19x
ruby-debug19
sanger_barcode (>= 0.2.0)!
sequencescape-client-api (>= 0.2.6)!
sequencescape-client-api (>= 0.2.9)!
state_machine (~> 1.0.1)
thin
webmock

BUNDLED WITH
1.13.6
24 changes: 24 additions & 0 deletions Guardfile
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

5 changes: 4 additions & 1 deletion app/controllers/creation_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ def create

respond_to do |format|
format.html do
alert = [ "Cannot create the plate: #{exception.message}"]
alert.concat << exception.resource.errors.full_messages.join('; ') if exception.respond_to?(:resource)

redirect_to(
illumina_c_plate_path(@creation_form.parent),
:alert => [ "Cannot create the plate: #{exception.message}", *exception.resource.errors.full_messages ]
:alert => alert
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/labware_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class LabwareController < ApplicationController
before_filter :check_for_current_user!, :only => [ :update ]

def locate_labware
@labware = locate_labware_identified_by(params[:id])
@labware = locate_labware_identified_by(params[:id])
end
private :locate_labware

Expand Down
20 changes: 20 additions & 0 deletions app/controllers/metadata_controller.rb
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 app/controllers/multiple_target_state_change_controller.rb
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
Loading

0 comments on commit 27c19b3

Please sign in to comment.