enju_manifestation_viewer 0.1.1 → 0.2.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 184176f5b7b1be4fe4c4799516842683f82f339c
4
- data.tar.gz: ea8fe8a57fce8271448be29934bf2647cb6df9e0
3
+ metadata.gz: cfaafbbaa40cc291eafb49a2afb49a3174183fee
4
+ data.tar.gz: 3771dfd5cc07e11988d1c3f91311ba72bdc88ba0
5
5
  SHA512:
6
- metadata.gz: 2cf849f32ecc8cf74f4e440f216c82fbd7fc7c5881fdc20dd9c4107d19c1fbbde5efc6d3290d888aaf4d75579c065b0c5b1886b72777610e6c90cac905c7e7ce
7
- data.tar.gz: 1cb3a47ed96a05990ad0484a86bf0714a7aa356111ee4afa4a30cd6bfc63b82d72210523f38d44283e9f5e56b6714a7c6a0e0c71d702b0e61791e6f559b55056
6
+ metadata.gz: 18ecbb431a74363d5aab403e80fc41cf5f72f7098b5949fae9e6c289146d903529cff1d1b8a360a442a39a62ca71b5e3b44d99d721d278b8a3a59cc22ebfd860
7
+ data.tar.gz: 91e7fe25b9acb45fe67ccfad74a0c4fd5f0ad6e4f359bd5229c69133683f375ffe878331c5f68195fc56910a9b9a193ffd732a088d709dc203243642ab1aef3e
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = EnjuManifestationViewer
2
- {<img src="https://travis-ci.org/next-l/enju_manifestation_viewer.png?branch=1.1" alt="Build Status" />}[https://travis-ci.org/next-l/enju_manifestation_viewer]
3
- {<img src="https://coveralls.io/repos/next-l/enju_manifestation_viewer/badge.svg?branch=1.1&service=github" alt="Coverage Status" />}[https://coveralls.io/github/next-l/enju_manifestation_viewer?branch=1.1]
4
- {<img src="https://hakiri.io/github/next-l/enju_manifestation_viewer/1.1.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_manifestation_viewer/1.1]
2
+ {<img src="https://travis-ci.org/next-l/enju_manifestation_viewer.svg?branch=1.2" alt="Build Status" />}[https://travis-ci.org/next-l/enju_manifestation_viewer]
3
+ {<img src="https://coveralls.io/repos/next-l/enju_manifestation_viewer/badge.svg?branch=1.2&service=github" alt="Coverage Status" />}[https://coveralls.io/github/next-l/enju_manifestation_viewer?branch=1.2]
4
+ {<img src="https://hakiri.io/github/next-l/enju_manifestation_viewer/1.2.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_manifestation_viewer/1.2]
5
5
 
6
6
  This project rocks and uses MIT-LICENSE.
7
7
 
@@ -7,6 +7,6 @@
7
7
  <% if @library_group.settings[:book_jacket_unknown_resource] %>
8
8
  <%= @library_group.settings[:book_jacket_unknown_resource] %>
9
9
  <% else %>
10
- <%= image_tag("unknown_resource.png", size: "100x100", alt: "No Image") %>
10
+ <%= image_tag("unknown_resource.png", size: "100x100", alt: "No Image", class: "book_jacket") %>
11
11
  <% end %>
12
12
  <% end %>
@@ -10,7 +10,7 @@
10
10
  thumbnail = parser.href;
11
11
  }
12
12
  if (thumbnail) {
13
- var link = '<img src="' + thumbnail + '" alt="' + book.volumeInfo.title + '" />';
13
+ var link = '<img src="' + thumbnail + '" alt="' + book.volumeInfo.title + '" class="book_jacket" />';
14
14
  if (book.accessInfo && book.accessInfo.viewability != "NO_PAGES") {
15
15
  var preview = book.volumeInfo.previewLink;
16
16
  link += '<br /><a href="' + preview + '" target="_blank"><img border=0 src="//www.google.com/googlebooks/images/gbs_preview_button1.gif" title="Google Preview" alt="Google Preview" /></a>';
@@ -48,7 +48,7 @@
48
48
  <% if @library_group.settings[:book_jacket_unknown_resource] %>
49
49
  thumb_element.innerHTML = '<%= @library_group.settings[:book_jacket_unknown_resource] %>';
50
50
  <% else %>
51
- thumb_element.innerHTML = '<%= image_tag("unknown_resource.png", size: "100x100", alt: "No Image") %>';
51
+ thumb_element.innerHTML = '<%= image_tag("unknown_resource.png", size: "100x100", alt: "No Image", class: "book_jacket") %>';
52
52
  <% end %>
53
53
  }
54
54
  });
@@ -1,3 +1,3 @@
1
1
  module EnjuManifestationViewer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0.beta.1"
3
3
  end
@@ -2,4 +2,7 @@ class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
3
 
4
4
  enju_leaf
5
+ after_action :verify_authorized
6
+
7
+ include Pundit
5
8
  end
@@ -2,8 +2,9 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- Bundler.require
6
- require "enju_manifestation_viewer"
5
+ Bundler.require(*Rails.groups)
6
+ require 'enju_manifestation_viewer'
7
+ require 'enju_leaf'
7
8
 
8
9
  module Dummy
9
10
  class Application < Rails::Application
@@ -11,16 +12,6 @@ module Dummy
11
12
  # Application configuration should go into files in config/initializers
12
13
  # -- all .rb files in that directory are automatically loaded.
13
14
 
14
- # Custom directories with classes and modules you want to be autoloadable.
15
- # config.autoload_paths += %W(#{config.root}/extras)
16
-
17
- # Only load the plugins named here, in the order given (default is alphabetical).
18
- # :all can be used as a placeholder for all plugins not explicitly named.
19
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
-
21
- # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
-
24
15
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
16
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
17
  # config.time_zone = 'Central Time (US & Canada)'
@@ -29,29 +20,8 @@ module Dummy
29
20
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
21
  # config.i18n.default_locale = :de
31
22
 
32
- # Configure the default encoding used in templates for Ruby 1.9.
33
- config.encoding = "utf-8"
34
-
35
- # Configure sensitive parameters which will be filtered from the log file.
36
- config.filter_parameters += [:password]
37
-
38
- # Use SQL instead of Active Record's schema dumper when creating the database.
39
- # This is necessary if your schema can't be completely dumped by the schema dumper,
40
- # like if you have constraints or database-specific column types
41
- # config.active_record.schema_format = :sql
42
-
43
- # Enforce whitelist mode for mass assignment.
44
- # This will create an empty whitelist of attributes available for mass-assignment for all models
45
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
46
- # parameters by using an attr_accessible or attr_protected declaration.
47
- # config.active_record.whitelist_attributes = true
48
-
49
- # Enable the asset pipeline
50
- config.assets.enabled = true
51
-
52
- # Version of your assets, change this if you want to expire all your assets
53
- config.assets.version = '1.0'
23
+ # Do not swallow errors in after_commit/after_rollback callbacks.
24
+ config.active_record.raise_in_transactional_callbacks = true
54
25
  end
55
26
  end
56
27
 
57
- require 'enju_leaf'
@@ -1,37 +1,41 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
27
29
 
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
31
33
 
32
- # Do not compress assets
33
- config.assets.compress = false
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
34
38
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
37
41
  end
@@ -1,67 +1,79 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
13
26
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
16
30
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
32
  config.assets.compile = false
19
33
 
20
- # Generate digests for assets URLs
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
21
36
  config.assets.digest = true
22
37
 
23
- # Defaults to Rails.root.join("public/assets")
24
- # config.assets.manifest = YOUR_PATH
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
39
 
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
29
43
 
30
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
45
  # config.force_ssl = true
32
46
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
35
50
 
36
- # Prepend all log lines with the following tags
51
+ # Prepend all log lines with the following tags.
37
52
  # config.log_tags = [ :subdomain, :uuid ]
38
53
 
39
- # Use a different logger for distributed setups
54
+ # Use a different logger for distributed setups.
40
55
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
50
62
 
51
- # Disable delivery errors, bad email addresses will be ignored
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
65
  # config.action_mailer.raise_delivery_errors = false
53
66
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
67
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
68
+ # the I18n.default_locale when a translation cannot be found).
59
69
  config.i18n.fallbacks = true
60
70
 
61
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
62
72
  config.active_support.deprecation = :notify
63
73
 
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
67
79
  end
@@ -1,5 +1,5 @@
1
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,31 +7,38 @@ Dummy::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
13
14
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
16
18
 
17
- # Show full error reports and disable caching
19
+ # Show full error reports and disable caching.
18
20
  config.consider_all_requests_local = true
19
21
  config.action_controller.perform_caching = false
20
22
 
21
- # Raise exceptions instead of rendering exception templates
23
+ # Raise exceptions instead of rendering exception templates.
22
24
  config.action_dispatch.show_exceptions = false
23
25
 
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
26
28
 
27
29
  # Tell Action Mailer not to deliver emails to the real world.
28
30
  # The :test delivery method accumulates sent emails in the
29
31
  # ActionMailer::Base.deliveries array.
30
32
  config.action_mailer.delivery_method = :test
31
33
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- #config.active_record.mass_assignment_sanitizer = :strict
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
34
36
 
35
- # Print deprecation notices to the stderr
37
+ # Print deprecation notices to the stderr.
36
38
  config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+
43
+ config.action_mailer.default_url_options = {:host => 'localhost:3000'}
37
44
  end
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
1
+ require 'rails_helper'
3
2
 
4
3
  # Specs in this file have access to a helper object that includes
5
4
  # the PatronsHelper. For example:
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  # Specs in this file have access to a helper object that includes
4
4
  # the PatronsHelper. For example:
@@ -0,0 +1,63 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+ SimpleCov.start 'rails'
4
+ Coveralls.wear!
5
+
6
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
7
+ ENV['RAILS_ENV'] ||= 'test'
8
+ require File.expand_path('../../spec/dummy/config/environment', __FILE__)
9
+ # Prevent database truncation if the environment is production
10
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
11
+ require 'spec_helper'
12
+ require 'rspec/rails'
13
+ # Add additional requires below this line. Rails is not loaded until this point!
14
+ require 'factory_girl'
15
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
+
17
+ # Requires supporting ruby files with custom matchers and macros, etc, in
18
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
19
+ # run as spec files by default. This means that files in spec/support that end
20
+ # in _spec.rb will both be required and run as specs, causing the specs to be
21
+ # run twice. It is recommended that you do not name files matching this glob to
22
+ # end with _spec.rb. You can configure this pattern with the --pattern
23
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
24
+ #
25
+ # The following line is provided for convenience purposes. It has the downside
26
+ # of increasing the boot-up time by auto-requiring all files in the support
27
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
28
+ # require only the support files necessary.
29
+ #
30
+ # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
31
+
32
+ # Checks for pending migrations before tests are run.
33
+ # If you are not using ActiveRecord, you can remove this line.
34
+ ActiveRecord::Migration.maintain_test_schema!
35
+
36
+ RSpec.configure do |config|
37
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
38
+ config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
39
+
40
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
41
+ # examples within a transaction, remove the following line or assign false
42
+ # instead of true.
43
+ config.use_transactional_fixtures = true
44
+
45
+ # RSpec Rails can automatically mix in different behaviours to your tests
46
+ # based on their file location, for example enabling you to call `get` and
47
+ # `post` in specs under `spec/controllers`.
48
+ #
49
+ # You can disable this behaviour by removing the line below, and instead
50
+ # explicitly tag your specs with their type, e.g.:
51
+ #
52
+ # RSpec.describe UsersController, :type => :controller do
53
+ # # ...
54
+ # end
55
+ #
56
+ # The different available types are documented in the features, such as in
57
+ # https://relishapp.com/rspec/rspec-rails/docs
58
+ config.infer_spec_type_from_file_location!
59
+ end
60
+
61
+ FactoryGirl.definition_file_paths << "#{::Rails.root}/../../spec/factories"
62
+ FactoryGirl.find_definitions
63
+
data/spec/spec_helper.rb CHANGED
@@ -1,40 +1,92 @@
1
- require 'simplecov'
2
- require 'coveralls'
3
- SimpleCov.start 'rails'
4
- Coveralls.wear!
1
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
5
33
 
6
- # This file is copied to spec/ when you run 'rails generate rspec:install'
7
- ENV["RAILS_ENV"] ||= 'test'
8
- require File.expand_path("../dummy/config/environment", __FILE__)
9
- require 'rspec/rails'
10
- require 'rspec/autorun'
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
11
42
 
12
- # Requires supporting ruby files with custom matchers and macros, etc,
13
- # in spec/support/ and its subdirectories.
14
- Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
15
52
 
16
- RSpec.configure do |config|
17
- # ## Mock Framework
18
- #
19
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
20
- #
21
- # config.mock_with :mocha
22
- # config.mock_with :flexmock
23
- # config.mock_with :rr
24
-
25
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26
- config.fixture_path = "#{::Rails.root}/../../spec/fixtures"
27
-
28
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
29
- # examples within a transaction, remove the following line or assign false
30
- # instead of true.
31
- config.use_transactional_fixtures = true
32
-
33
- # If true, the base class of anonymous controllers will be inferred
34
- # automatically. This will be the default behavior in future versions of
35
- # rspec-rails.
36
- config.infer_base_class_for_anonymous_controllers = false
37
-
38
- config.infer_spec_type_from_file_location!
39
- end
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
63
+ config.disable_monkey_patching!
40
64
 
65
+ # Many RSpec users commonly either run the entire suite or an individual
66
+ # file, and it's useful to allow more verbose output when running an
67
+ # individual spec file.
68
+ if config.files_to_run.one?
69
+ # Use the documentation formatter for detailed output,
70
+ # unless a formatter has already been configured
71
+ # (e.g. via a command-line flag).
72
+ config.default_formatter = 'doc'
73
+ end
74
+
75
+ # Print the 10 slowest examples and example groups at the
76
+ # end of the spec run, to help surface which specs are running
77
+ # particularly slow.
78
+ config.profile_examples = 10
79
+
80
+ # Run specs in random order to surface order dependencies. If you find an
81
+ # order dependency and want to debug it, you can fix the order by providing
82
+ # the seed, which is printed after each run.
83
+ # --seed 1234
84
+ config.order = :random
85
+
86
+ # Seed global randomization in this process using the `--seed` CLI option.
87
+ # Setting this allows you to use `--seed` to deterministically reproduce
88
+ # test failures related to randomization by passing the same `--seed` value
89
+ # as the one that triggered the failure.
90
+ Kernel.srand config.seed
91
+ =end
92
+ end
@@ -0,0 +1,4 @@
1
+ RSpec.configure do |config|
2
+ config.include Devise::TestHelpers, :type => :controller
3
+ config.include Devise::TestHelpers, :type => :view
4
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_manifestation_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-26 00:00:00.000000000 Z
11
+ date: 2016-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_biblio
@@ -16,28 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.2
19
+ version: 0.2.0.beta.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.2
26
+ version: 0.2.0.beta.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: enju_library
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.0.beta.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.0.beta.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: enju_leaf
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: 1.1.2
47
+ version: 1.2.0.beta.1
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: 1.1.2
54
+ version: 1.2.0.beta.1
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: sqlite3
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +70,16 @@ dependencies:
56
70
  name: mysql2
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: 0.3.20
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: 0.3.20
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: pg
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +137,7 @@ dependencies:
123
137
  - !ruby/object:Gem::Version
124
138
  version: '0'
125
139
  - !ruby/object:Gem::Dependency
126
- name: appraisal
140
+ name: coveralls
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - ">="
@@ -174,7 +188,6 @@ files:
174
188
  - spec/dummy/bin/setup
175
189
  - spec/dummy/config.ru
176
190
  - spec/dummy/config/application.rb
177
- - spec/dummy/config/application.yml
178
191
  - spec/dummy/config/boot.rb
179
192
  - spec/dummy/config/database.yml
180
193
  - spec/dummy/config/environment.rb
@@ -330,7 +343,9 @@ files:
330
343
  - spec/fixtures/manifestations.yml
331
344
  - spec/helpers/book_jacket_helper_spec.rb
332
345
  - spec/helpers/manifestation_viewer_helper_spec.rb
346
+ - spec/rails_helper.rb
333
347
  - spec/spec_helper.rb
348
+ - spec/support/devise.rb
334
349
  homepage: https://github.com/next-l/enju_manifestation_viewer
335
350
  licenses: []
336
351
  metadata: {}
@@ -345,12 +360,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
345
360
  version: '0'
346
361
  required_rubygems_version: !ruby/object:Gem::Requirement
347
362
  requirements:
348
- - - ">="
363
+ - - ">"
349
364
  - !ruby/object:Gem::Version
350
- version: '0'
365
+ version: 1.3.1
351
366
  requirements: []
352
367
  rubyforge_project:
353
- rubygems_version: 2.5.0
368
+ rubygems_version: 2.5.1
354
369
  signing_key:
355
370
  specification_version: 4
356
371
  summary: enju_manifestation_viewer plugin
@@ -366,7 +381,6 @@ test_files:
366
381
  - spec/dummy/bin/rake
367
382
  - spec/dummy/bin/setup
368
383
  - spec/dummy/config/application.rb
369
- - spec/dummy/config/application.yml
370
384
  - spec/dummy/config/boot.rb
371
385
  - spec/dummy/config/database.yml
372
386
  - spec/dummy/config/environment.rb
@@ -525,4 +539,6 @@ test_files:
525
539
  - spec/fixtures/manifestations.yml
526
540
  - spec/helpers/book_jacket_helper_spec.rb
527
541
  - spec/helpers/manifestation_viewer_helper_spec.rb
542
+ - spec/rails_helper.rb
528
543
  - spec/spec_helper.rb
544
+ - spec/support/devise.rb
@@ -1,38 +0,0 @@
1
- defaults: &defaults
2
- enju:
3
- web_hostname: localhost
4
- web_port_number: 3000
5
-
6
- family_name_first: true
7
- max_number_of_results: 500
8
- write_search_log_to_file: true
9
- csv_charset_conversion: true
10
-
11
- # Choose a locale from 'ca', 'de', 'fr', 'jp', 'uk', 'us'
12
- #AMAZON_AWS_HOSTNAME = 'ecs.amazonaws.com'
13
- amazon:
14
- aws_hostname: ecs.amazonaws.jp
15
- hostname: www.amazon.co.jp
16
- access_key: REPLACE_WITH_YOUR_AMAZON_ACCESS_KEY
17
- secret_access_key: REPLACE_WITH_YOUR_AMAZON_SECRET_ACCESS_KEY
18
-
19
- # :google, :amazon
20
- book_jacket:
21
- source: :google
22
- unknown_resource:
23
-
24
- # :mozshot, :simpleapi, :heartrails, :thumbalizr
25
- screenshot:
26
- generator: :mozshot
27
-
28
- uploaded_file:
29
- storage: :local
30
-
31
- development:
32
- <<: *defaults
33
-
34
- test:
35
- <<: *defaults
36
-
37
- production:
38
- <<: *defaults