dbla 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75c9521ff855accf2dab0da8198d25967aa43751
4
- data.tar.gz: 1ec160bbcea255947aee766adbcf51bb7b19a96a
3
+ metadata.gz: 46375a579a4844b2e5b03c9ee9bc2f32091f7085
4
+ data.tar.gz: 1b71db3ae756939c2404cc0511cb0b6b354746c4
5
5
  SHA512:
6
- metadata.gz: 9d664cf531f499dbe6f78f1948d4cda665d9b4bf4d410d3126edb71ebf816eeb96851c87d129132ac2f8508f2387e8389629b1a56ce70293850fafd34fc7a95d
7
- data.tar.gz: b7882621624b0811c9d71c3776a2a7a2fa5a9dd1bc374b630ddab1b6a8e630fbe67165d58f1c8be773fc9c7c04f0e1989563056afecdb3da9545de09c0a48f7b
6
+ metadata.gz: d08d8af66f5ba45af228082c556384edb75b45a78375e2f5b78bf42f0358f30a703d985316d97628e0565875be3570d9f2d992aafca490f419dd56d1877cfa62
7
+ data.tar.gz: 3dda719b6a749db423e10ca3d6e42566c030e0c0dd254a26d3f2ad569b7646f24d40d868cffb9dfbdea69ee5edcb0672b57f86e5aaebde5a9a7ada4238020e8a
@@ -31,9 +31,9 @@ module Dbla
31
31
  end
32
32
  def has? f, *values
33
33
  if values.empty?
34
- !self[f].empty?
34
+ !self[f].blank?
35
35
  else
36
- !(self[f] & values).empty?
36
+ !(self[f] & values).blank?
37
37
  end
38
38
  end
39
39
  end
@@ -1,5 +1,9 @@
1
1
  module Dbla
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace Dbla
4
+ config.generators do |g|
5
+ g.test_framework :rspec
6
+ g.fixture_replacement :factory_girl, :dir => 'spec/factories'
7
+ end
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module Dbla
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -0,0 +1,10 @@
1
+ # -*- encoding : utf-8 -*-
2
+ module Dbla
3
+ class HelperGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ def assets
7
+ copy_file "dbla_helper.rb", "app/helpers/dbla_helper.rb"
8
+ end
9
+ end
10
+ end
@@ -28,6 +28,10 @@ module Dbla
28
28
  generate 'dbla:models'
29
29
  end
30
30
 
31
+ def generate_dbla_helper
32
+ generate 'dbla:helper'
33
+ end
34
+
31
35
  def generate_dbla_routes
32
36
  generate 'dbla:routes'
33
37
  end
@@ -0,0 +1,3 @@
1
+ module DblaHelper
2
+ include Dbla::ApplicationHelperBehavior
3
+ end
@@ -2,7 +2,7 @@
2
2
  // listed below.
3
3
  //
4
4
  // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
8
  // compiled file.
@@ -3,7 +3,7 @@
3
3
  * listed below.
4
4
  *
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
9
  * compiled file so the styles you add here take precedence over styles defined in any styles
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
3
  require_relative '../config/boot'
4
4
  require 'rails/commands'
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
4
  run Rails.application
@@ -1,6 +1,12 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- require 'rails/all'
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "action_view/railtie"
8
+ require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
4
10
 
5
11
  Bundler.require(*Rails.groups)
6
12
  require "dbla"
@@ -18,6 +24,9 @@ module Dummy
18
24
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
25
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
26
  # config.i18n.default_locale = :de
27
+
28
+ # Do not swallow errors in after_commit/after_rollback callbacks.
29
+ config.active_record.raise_in_transactional_callbacks = true
21
30
  end
22
31
  end
23
32
 
@@ -27,6 +27,10 @@ Rails.application.configure do
27
27
  # number of complex assets.
28
28
  config.assets.debug = true
29
29
 
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
33
+
30
34
  # Adds additional error checking when serving assets at runtime.
31
35
  # Checks for improperly declared sprockets dependencies.
32
36
  # Raises helpful error messages.
@@ -16,11 +16,13 @@ Rails.application.configure do
16
16
 
17
17
  # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
18
  # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
20
21
  # config.action_dispatch.rack_cache = true
21
22
 
22
- # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
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?
24
26
 
25
27
  # Compress JavaScripts and CSS.
26
28
  config.assets.js_compressor = :uglifier
@@ -29,20 +31,22 @@ Rails.application.configure do
29
31
  # Do not fallback to assets pipeline if a precompiled asset is missed.
30
32
  config.assets.compile = false
31
33
 
32
- # 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.
33
36
  config.assets.digest = true
34
37
 
35
38
  # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
39
 
37
40
  # Specifies the header that your server uses for sending files.
38
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
43
 
41
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
45
  # config.force_ssl = true
43
46
 
44
- # Set to :debug to see everything in the log.
45
- config.log_level = :info
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
46
50
 
47
51
  # Prepend all log lines with the following tags.
48
52
  # config.log_tags = [ :subdomain, :uuid ]
@@ -54,7 +58,7 @@ Rails.application.configure do
54
58
  # config.cache_store = :mem_cache_store
55
59
 
56
60
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
- # config.action_controller.asset_host = "http://assets.example.com"
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
58
62
 
59
63
  # Ignore bad email addresses and do not raise email delivery errors.
60
64
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -67,9 +71,6 @@ Rails.application.configure do
67
71
  # Send deprecation notices to registered listeners.
68
72
  config.active_support.deprecation = :notify
69
73
 
70
- # Disable automatic flushing of the log to improve performance.
71
- # config.autoflush_log = false
72
-
73
74
  # Use default logging formatter so that PID and timestamp are not suppressed.
74
75
  config.log_formatter = ::Logger::Formatter.new
75
76
 
@@ -12,8 +12,8 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
17
  config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -31,6 +31,9 @@ Rails.application.configure do
31
31
  # ActionMailer::Base.deliveries array.
32
32
  config.action_mailer.delivery_method = :test
33
33
 
34
+ # Randomize the order test cases are executed.
35
+ config.active_support.test_order = :random
36
+
34
37
  # Print deprecation notices to the stderr.
35
38
  config.active_support.deprecation = :stderr
36
39
 
@@ -3,6 +3,9 @@
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
4
  Rails.application.config.assets.version = '1.0'
5
5
 
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
6
9
  # Precompile additional assets.
7
10
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
11
  # Rails.application.config.assets.precompile += %w( search.js )
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Rails.application.config.action_dispatch.cookies_serializer = :json
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -11,10 +11,10 @@
11
11
  # if you're sharing your code publicly.
12
12
 
13
13
  development:
14
- secret_key_base: 48634cfcea7238eb7412d2b798ccf4600fcbc6482ac72eac871e04aac8e97649e9a4fc5d837ce3dd4c5f3116cd064ed8581ddc349c2283ca9b98dfc4f9d58932
14
+ secret_key_base: 432d2e4070b7c71b47af679a6027dd5e10f9cd138ba10d2a545ab7b6788004a62daa07195c4f66000d7ab93605a5b0641238e0fae09cba412e1e216c20326d28
15
15
 
16
16
  test:
17
- secret_key_base: 44f1ed1f5b3c9a0e581714fe30f7ce72500493c59233813fc969a545bc7c1ac573b3c0aeb6a88dcf0e8e1cc5e4e90cf5a11d7e67fad9c44187a13724011f4ff2
17
+ secret_key_base: efaf991c0810eb0bf26280a736fa6b5075232d55ded27138d3730c083b419f6870f772fa9f7889ce4cc7ff662207329f1cbf0340dbfc498e1ebd17d4cb7f7701
18
18
 
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Audrey Altman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-04-21 00:00:00.000000000 Z
13
+ date: 2015-05-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -129,6 +129,7 @@ files:
129
129
  - lib/dbla/version.rb
130
130
  - lib/generators/dbla/assets_generator.rb
131
131
  - lib/generators/dbla/catalog_generator.rb
132
+ - lib/generators/dbla/helper_generator.rb
132
133
  - lib/generators/dbla/install_generator.rb
133
134
  - lib/generators/dbla/models_generator.rb
134
135
  - lib/generators/dbla/routes_generator.rb
@@ -137,6 +138,7 @@ files:
137
138
  - lib/generators/dbla/templates/collection.rb
138
139
  - lib/generators/dbla/templates/collections_controller.rb
139
140
  - lib/generators/dbla/templates/dbla.css.scss
141
+ - lib/generators/dbla/templates/dbla_helper.rb
140
142
  - lib/generators/dbla/templates/item.rb
141
143
  - lib/generators/dbla/templates/search_builder.rb
142
144
  - lib/tasks/dbla_key.rake
@@ -151,6 +153,7 @@ files:
151
153
  - spec/dummy/bin/bundle
152
154
  - spec/dummy/bin/rails
153
155
  - spec/dummy/bin/rake
156
+ - spec/dummy/bin/setup
154
157
  - spec/dummy/config.ru
155
158
  - spec/dummy/config/application.rb
156
159
  - spec/dummy/config/boot.rb
@@ -202,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
205
  version: '0'
203
206
  requirements: []
204
207
  rubyforge_project:
205
- rubygems_version: 2.2.2
208
+ rubygems_version: 2.4.5
206
209
  signing_key:
207
210
  specification_version: 4
208
211
  summary: Rails engine to put BL on DPLA
@@ -216,6 +219,7 @@ test_files:
216
219
  - spec/dummy/bin/bundle
217
220
  - spec/dummy/bin/rails
218
221
  - spec/dummy/bin/rake
222
+ - spec/dummy/bin/setup
219
223
  - spec/dummy/config/application.rb
220
224
  - spec/dummy/config/boot.rb
221
225
  - spec/dummy/config/database.yml
@@ -249,4 +253,3 @@ test_files:
249
253
  - spec/unit/document_presenter_spec.rb
250
254
  - spec/unit/document_spec.rb
251
255
  - spec/unit/search_builder_spec.rb
252
- has_rdoc: