Skip to content

Commit

Permalink
Merge pull request #317 from jrgriffiniii/issues-315-jrgriffiniii-rub…
Browse files Browse the repository at this point in the history
…y-2.7

Adds Ruby 2.7 and Rails 6.0.2 to the CircleCI config.
  • Loading branch information
cjcolvar authored Nov 16, 2020
2 parents d8252f5 + 8b6de30 commit cd6c825
Show file tree
Hide file tree
Showing 24 changed files with 1,301 additions and 474 deletions.
52 changes: 37 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
type: string
bundler_version:
type: string
default: 2.0.1
default: 2.1.4
executor:
name: 'samvera/ruby'
ruby_version: << parameters.ruby_version >>
Expand All @@ -27,7 +27,7 @@ jobs:
project: 'browse-everything'

- samvera/engine_cart_generate:
cache_key: v1-internal-test-app-{{ checksum "browse-everything.gemspec" }}-{{ checksum "spec/test_app_templates/lib/generators/test_app_generator.rb" }}-{{ checksum "lib/generators/browse_everything/install_generator.rb" }}-{{ checksum "lib/generators/browse_everything/config_generator.rb" }}--<< parameters.rails_version >>-<< parameters.ruby_version >>
cache_key: v1-internal-test-app-{{ checksum "browse-everything.gemspec" }}-{{ checksum "Gemfile" }}-{{ checksum "spec/test_app_templates/lib/generators/test_app_generator.rb" }}-{{ checksum "lib/generators/browse_everything/install_generator.rb" }}-{{ checksum "lib/generators/browse_everything/config_generator.rb" }}--<< parameters.rails_version >>-<< parameters.ruby_version >>

- samvera/bundle_for_gem:
ruby_version: << parameters.ruby_version >>
Expand All @@ -45,27 +45,49 @@ jobs:
workflows:
ci:
jobs:
- build:
name: "ruby2-7_rails6-0"
ruby_version: 2.7.1
rails_version: 6.0.3.1
- build:
name: "ruby2-6_rails6-0"
ruby_version: 2.6.6
rails_version: 6.0.3.1
- build:
name: "ruby2-5_rails6-0"
ruby_version: 2.5.8
rails_version: 6.0.3.1

- build:
name: "ruby2-7_rails5-2"
ruby_version: 2.7.1
rails_version: 5.2.4.3
- build:
name: "ruby2-6_rails5-2"
ruby_version: 2.6.3
rails_version: 5.2.3
ruby_version: 2.6.6
rails_version: 5.2.4.3
- build:
name: "ruby2-6_rails5-1"
ruby_version: 2.6.3
name: "ruby2-5_rails5-2"
ruby_version: 2.5.8
rails_version: 5.2.4.3
- build:
name: "ruby2-4_rails5-2"
ruby_version: 2.4.10
rails_version: 5.2.4.3

- build:
name: "ruby2-7_rails5-1"
ruby_version: 2.7.1
rails_version: 5.1.7
- build:
name: "ruby2-5_rails5-2"
ruby_version: 2.5.5
rails_version: 5.2.3
name: "ruby2-6_rails5-1"
ruby_version: 2.6.6
rails_version: 5.1.7
- build:
name: "ruby2-5_rails5-1"
ruby_version: 2.5.5
ruby_version: 2.5.8
rails_version: 5.1.7
- build:
name: "ruby2-4_rails5-2"
ruby_version: 2.4.6
rails_version: 5.2.3
- build:
name: "ruby2-4_rails5-1"
ruby_version: 2.4.6
ruby_version: 2.4.10
rails_version: 5.1.7
78 changes: 43 additions & 35 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,79 @@ inherit_gem:
bixby: bixby_default.yml

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.6
DisplayCopNames: true
Exclude:
- 'vendor/**/*'

Rails:
Enabled: true
Rails/FilePath:
Bundler/DuplicatedGem:
Exclude:
- 'lib/generators/browse_everything/config_generator.rb'
- 'Gemfile'

Metrics/ClassLength:
Max: 130
Exclude:
- 'lib/browse_everything/driver/google_drive.rb'
Metrics/LineLength:
Layout/LineLength:
Max: 400
Exclude:
- 'spec/lib/browse_everything/driver/box_spec.rb'
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'

Metrics/BlockLength:
Exclude:
- '*.gemspec'
- 'spec/**/*'

RSpec/NestedGroups:
Enabled: false
Metrics/ClassLength:
Max: 130
Exclude:
- 'lib/browse_everything/driver/google_drive.rb'

Metrics/MethodLength:
Exclude:
- 'spec/test_app_templates/lib/generators/test_app_generator.rb'

Naming/FileName:
Exclude:
- 'browse-everything.gemspec'
- 'Gemfile'
- 'lib/browse-everything.rb'

Rails:
Enabled: true

Rails/FilePath:
Exclude:
- 'lib/generators/browse_everything/config_generator.rb'

RSpec/DescribeClass:
Exclude:
- 'spec/javascripts/**/*'

RSpec/LeadingSubject:
Enabled: false

RSpec/ExampleLength:
Enabled: false

RSpec/MultipleExpectations:
RSpec/LeadingSubject:
Enabled: false

Style/NumericLiterals:
MinDigits: 7

Layout/IndentationConsistency:
EnforcedStyle: rails
RSpec/MultipleExpectations:
Enabled: false

Naming/FileName:
Exclude:
- 'browse-everything.gemspec'
- 'Gemfile'
- 'lib/browse-everything.rb'
RSpec/NestedGroups:
Enabled: false

Style/MixinUsage:
Exclude:
- 'spec/lib/browse_everything/driver/s3_spec.rb'
- 'spec/lib/browse_everything/driver/google_drive_spec.rb'
- 'spec/lib/browse_everything/driver/file_system_spec.rb'
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'
- 'spec/lib/browse_everything/driver/box_spec.rb'
- 'spec/lib/browse_everything/driver/base_spec.rb'
- 'spec/helper/browse_everything_controller_helper_spec.rb'
- 'spec/lib/browse_everything/browser_spec.rb'
- 'spec/lib/browse_everything/driver/base_spec.rb'
- 'spec/lib/browse_everything/driver/box_spec.rb'
- 'spec/lib/browse_everything/driver/dropbox_spec.rb'
- 'spec/lib/browse_everything/driver/file_system_spec.rb'
- 'spec/lib/browse_everything/driver/google_drive_spec.rb'
- 'spec/lib/browse_everything/driver/s3_spec.rb'
- 'spec/services/browser_factory_spec.rb'
- 'spec/helper/browse_everything_controller_helper_spec.rb'

Bundler/DuplicatedGem:
Style/NumericLiterals:
MinDigits: 7

Style/RedundantBegin:
Exclude:
- 'Gemfile'
- 'lib/browse_everything/browser.rb'
9 changes: 3 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@ else
end

case ENV['RAILS_VERSION']
when /^6\./
gem 'puma', '~> 4.1'
when /^5\./
gem 'capybara', '~> 2.18.0'
when /^4\.2/
gem 'coffee-rails', '~> 4.1.0'
gem 'json', '~> 1.8'
gem 'railties', '~> 4.2'
gem 'responders', '~> 2.0'
gem 'sass-rails', '>= 5.0'
gem 'puma', '~> 3.11'
end
end
# END ENGINE_CART BLOCK
Expand Down
24 changes: 16 additions & 8 deletions app/assets/javascripts/browse_everything/behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,29 @@ $(function () {

$.fn.browseEverything = function (options) {
var ctx = $(this).data('ev-state');

// Try and load the options from the HTML data attributes
if (ctx == null && options == null) {
options = $(this).data();
}

if (options != null) {
ctx = initialize(this[0], options);
$(this).click(function () {
dialog.data('ev-state', ctx);
return dialog.load(ctx.opts.route, function () {
setTimeout(refreshFiles, 500);
ctx.callbacks.show.fire();
return dialog.modal('show');
});
});
}

$(this).click(function () {
dialog.data('ev-state', ctx);
return dialog.load(ctx.opts.route, function () {
setTimeout(refreshFiles, 50);
ctx.callbacks.show.fire();
dialog.removeClass('fade')
.removeClass('in')
.addClass('show');

return dialog.modal('show');
});
});

if (ctx) {
return ctx.callback_proxy;
} else {
Expand Down
Loading

0 comments on commit cd6c825

Please sign in to comment.