blacklight_cql 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/VERSION +1 -1
  3. data/app/views/blacklight_cql/explain.xml.builder +1 -1
  4. data/lib/blacklight_cql/controller_extension.rb +41 -0
  5. data/lib/blacklight_cql/engine.rb +1 -39
  6. data/lib/blacklight_cql/{solr_helper_extension.rb → search_builder_extension.rb} +12 -11
  7. data/lib/blacklight_cql.rb +33 -2
  8. data/spec/internal/Gemfile +22 -27
  9. data/spec/internal/Gemfile.lock +135 -111
  10. data/spec/internal/Rakefile +1 -1
  11. data/spec/internal/app/assets/javascripts/application.js +2 -2
  12. data/spec/internal/app/assets/stylesheets/application.css +6 -4
  13. data/spec/internal/app/views/layouts/application.html.erb +2 -2
  14. data/spec/internal/bin/rails +1 -1
  15. data/spec/internal/bin/setup +29 -0
  16. data/spec/internal/config/application.rb +4 -1
  17. data/spec/internal/config/boot.rb +1 -2
  18. data/spec/internal/config/database.yml +8 -8
  19. data/spec/internal/config/environment.rb +1 -1
  20. data/spec/internal/config/environments/development.rb +14 -2
  21. data/spec/internal/config/environments/production.rb +20 -21
  22. data/spec/internal/config/environments/test.rb +10 -4
  23. data/spec/internal/config/initializers/assets.rb +11 -0
  24. data/spec/internal/config/initializers/cookies_serializer.rb +3 -0
  25. data/spec/internal/config/initializers/mime_types.rb +0 -1
  26. data/spec/internal/config/initializers/session_store.rb +1 -1
  27. data/spec/internal/config/routes.rb +1 -1
  28. data/spec/internal/config/secrets.yml +22 -0
  29. data/spec/internal/config.ru +1 -1
  30. data/spec/internal/db/development.sqlite3 +0 -0
  31. data/spec/internal/db/test.sqlite3 +0 -0
  32. data/spec/internal/log/development.log +7 -5
  33. data/spec/internal/public/404.html +20 -11
  34. data/spec/internal/public/422.html +20 -11
  35. data/spec/internal/public/500.html +19 -10
  36. data/spec/internal/public/robots.txt +1 -1
  37. data/spec/internal/test/test_helper.rb +1 -6
  38. metadata +46 -59
  39. data/lib/blacklight_cql/template_helper_extension.rb +0 -19
  40. data/spec/internal/config/initializers/secret_token.rb +0 -12
  41. data/spec/internal/log/test.log +0 -2
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 037c165862ba98cc2f5d033ead4aaf63e418fe16
4
+ data.tar.gz: 3b19262b64a0179783f297ac374e3fba384bc9e5
5
+ SHA512:
6
+ metadata.gz: 5d509a21cea371bfcba7930f41790559a1118f50dd62654d7309d827dc1588e71f29738b93fa9650d2f8f0009d790a20781ad8985cd6495cd78ea8d94872e71f
7
+ data.tar.gz: e9fe43326d1050703abfa413442bd15e00030a6d493d7c122576808aa2ca853dbe91cd4282ab1df4bbe4de11294e75570ae5452dcde71d04d98ce070a8b3346d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 3.0.0
@@ -5,7 +5,7 @@ xml.explain("xmlns" => "http://explain.z3950.org/dtd/2.0/") do
5
5
  xml.serverInfo("protocol" => "http-cql") do
6
6
  xml.host request.host
7
7
  xml.port request.port
8
- xml.database url_for(:action => "index", :search_field => BlacklightCql::SolrHelperExtension.pseudo_search_field[:key], :only_path => false)
8
+ xml.database url_for(:action => "index", :search_field => BlacklightCql::SearchBuilderExtension.pseudo_search_field[:key], :only_path => false)
9
9
  end
10
10
 
11
11
  xml.indexInfo do
@@ -0,0 +1,41 @@
1
+ # Mix-in for Blacklight CatalogController
2
+ #
3
+ # 1) Adds search_field to the controller representing a CQL search.
4
+ # It comes from the SearchBuilderExtension.psuedo_search_field class
5
+ # variable. It's configured to not show up ordinarily in the search type
6
+ # select menu, or the advanced search choices either.
7
+ #
8
+ # 2) Over-rides the default blacklight search_fields methods so that
9
+ # when CQL search has been triggered, it'll be reflected in the
10
+ # on-screen search select menu for search type, so the context
11
+ # makes sense.
12
+ #
13
+ module BlacklightCql::ControllerExtension
14
+ extend ActiveSupport::Concern
15
+
16
+
17
+ included do
18
+ self.blacklight_config.configure do |config|
19
+ hash = BlacklightCql::SearchBuilderExtension.pseudo_search_field
20
+ config.add_search_field hash[:key], hash
21
+ end
22
+
23
+ self.helper BlacklightCql::ControllerExtension::Helpers
24
+ end
25
+
26
+ module Helpers
27
+ # Make sure the CQL pseudo-search_field is included in the 'select'
28
+ # when we're displaying a CQL search, so the select makes sense.
29
+ def search_fields
30
+ field = BlacklightCql::SearchBuilderExtension.pseudo_search_field
31
+
32
+ if params[:q].blank? || params[:search_field] != field[:key]
33
+ super
34
+ else
35
+ super.clone.push([field[:label], field[:key]]).uniq
36
+ end
37
+ end
38
+ end
39
+
40
+
41
+ end
@@ -1,44 +1,6 @@
1
1
  require 'cql_ruby'
2
2
 
3
- require 'rails'
4
- require 'blacklight'
5
- require 'blacklight_cql'
6
-
7
- require 'blacklight_cql/solr_helper_extension'
8
- require 'blacklight_cql/template_helper_extension'
9
- require 'blacklight_cql/explain_behavior'
10
-
11
-
12
3
  module BlacklightCql
13
4
  class Engine < Rails::Engine
14
-
15
-
16
- # Call in after_initialze to make sure the default search_fields are
17
- # already created, AND the local app has had the opportunity to customize
18
- # our placeholder search_field.
19
- config.after_initialize do
20
- CatalogController.blacklight_config.configure do |config|
21
- hash = BlacklightCql::SolrHelperExtension.pseudo_search_field
22
- config.add_search_field hash[:key], hash
23
- end
24
- end
25
-
26
-
27
- # Wrapping in Dispatcher.to_prepare will, theoretically, take care of things
28
- # working properly even in development mode with cache_classes=false (per-request
29
- # class reloading).
30
- config.to_prepare do
31
- #Check in case CatalogController _hasn't_ really been re-loaded
32
- unless (CatalogController.kind_of?( BlacklightCql::SolrHelperExtension ))
33
- # Will over-ride #solr_params to deal with CQL
34
- CatalogController.send(:include, BlacklightCql::SolrHelperExtension)
35
-
36
- # Will over-ride helper methods for search form select, to ensure
37
- # query is echo'd properly.
38
- CatalogController.send(:helper, BlacklightCql::TemplateHelperExtension)
39
- end
40
- end
41
-
42
-
43
5
  end
44
- end
6
+ end
@@ -1,11 +1,10 @@
1
- # We over-ride methods on CatalogController simply by include'ing this
2
- # module into CatalogController, which this plugins setup will do.
1
+ # Mix-in to a SearchBuilder
3
2
  #
4
- # This works ONLY becuase the methods we're over-riding come from
5
- # a module themsleves (SolrHelper) -- if they were defined on CatalogController
6
- # itself, it would not, and we'd have to use some ugly monkey patching
7
- # alias_method_chain instead, thankfully we do not.
8
- module BlacklightCql::SolrHelperExtension
3
+ # => Adds logic for handling CQL queries, and adds it to the default_processor_chain
4
+ #
5
+ # If you are still using CatalogController#search_params_logic, you will need to add
6
+ # :cql_to_solr_search_params to it.
7
+ module BlacklightCql::SearchBuilderExtension
9
8
  extend ActiveSupport::Concern
10
9
 
11
10
  mattr_accessor :pseudo_search_field
@@ -18,16 +17,18 @@ module BlacklightCql::SolrHelperExtension
18
17
  }
19
18
 
20
19
  included do
21
- solr_search_params_logic << :cql_to_solr_search_params
20
+ self.default_processor_chain << :cql_to_solr_search_params
22
21
  end
23
22
 
24
23
  # Over-ride solr_search_params to do special CQL-to-complex-solr-query
25
24
  # processing iff the "search_field" is our pseudo-search-field indicating
26
25
  # a CQL query.
27
- def cql_to_solr_search_params(solr_params ={}, user_params ={})
28
- if user_params["search_field"] == self.pseudo_search_field[:key] && ! params["q"].blank?
26
+ def cql_to_solr_search_params(solr_params)
27
+
28
+ if blacklight_params["search_field"] == self.pseudo_search_field[:key] && ! blacklight_params["q"].blank?
29
29
  parser = CqlRuby::CqlParser.new
30
- solr_params[:q] = "{!lucene} " + parser.parse( params["q"] ).to_bl_solr(blacklight_config)
30
+
31
+ solr_params[:q] = "{!lucene} " + parser.parse( blacklight_params["q"] ).to_bl_solr(self.blacklight_config)
31
32
  end
32
33
  return solr_params
33
34
  end
@@ -1,10 +1,17 @@
1
1
  # Blacklight-cql
2
2
 
3
- require 'blacklight_cql/blacklight_to_solr'
4
-
5
3
  require 'blacklight_cql/version'
6
4
  require 'blacklight_cql/engine'
7
5
 
6
+ require 'rails'
7
+ require 'blacklight'
8
+
9
+ require 'blacklight_cql/blacklight_to_solr'
10
+ require 'blacklight_cql/search_builder_extension'
11
+ require 'blacklight_cql/controller_extension'
12
+ require 'blacklight_cql/explain_behavior'
13
+
14
+
8
15
  module BlacklightCql
9
16
  mattr_accessor :cql_search_field_key
10
17
  self.cql_search_field_key = "cql"
@@ -24,5 +31,29 @@ mattr_accessor :cql_search_field_key
24
31
  end
25
32
  return val
26
33
  end
34
+
35
+ # Called by app using this gem in it's SearchBuilder class definition
36
+ #
37
+ # BlacklightCql.configure_search_builder(self)
38
+ #
39
+ # to configure for BlacklightCql
40
+ def self.configure_search_builder(search_builder_class)
41
+ search_builder_class.send(:include, BlacklightCql::SolrHelperExtension)
42
+ end
43
+
44
+ # Called by app using this gem in it's (eg) CatalogController class
45
+ # definition
46
+ #
47
+ # BlacklightCql.configure_controller(self)
48
+ #
49
+ # to configure for BlacklightCql
50
+ def self.configure_controller(bl_controller_class)
51
+ bl_controller_class.blacklight_config.configure do |config|
52
+ hash = BlacklightCql::SolrHelperExtension.pseudo_search_field
53
+ config.add_search_field hash[:key], hash
54
+ end
55
+
56
+ bl_controller_class.send(:helper, BlacklightCql::TemplateHelperExtension)
57
+ end
27
58
 
28
59
  end
@@ -1,50 +1,45 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4
- gem 'rails', '4.0.2'
5
3
 
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '4.2.3'
6
6
  # Use sqlite3 as the database for Active Record
7
7
  gem 'sqlite3'
8
-
9
8
  # Use SCSS for stylesheets
10
- gem 'sass-rails', '~> 4.0.0'
11
-
9
+ gem 'sass-rails', '~> 5.0'
12
10
  # Use Uglifier as compressor for JavaScript assets
13
11
  gem 'uglifier', '>= 1.3.0'
14
-
15
- # Use CoffeeScript for .js.coffee assets and views
16
- gem 'coffee-rails', '~> 4.0.0'
17
-
18
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
12
+ # Use CoffeeScript for .coffee assets and views
13
+ gem 'coffee-rails', '~> 4.1.0'
14
+ # See https://github.com/rails/execjs#readme for more supported runtimes
19
15
  # gem 'therubyracer', platforms: :ruby
20
16
 
21
17
  # Use jquery as the JavaScript library
22
18
  gem 'jquery-rails'
23
-
24
19
  # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
25
20
  gem 'turbolinks'
26
-
27
21
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
28
- gem 'jbuilder', '~> 1.2'
29
-
30
- group :doc do
31
- # bundle exec rake doc:rails generates the API under doc/api.
32
- gem 'sdoc', require: false
33
- end
22
+ gem 'jbuilder', '~> 2.0'
23
+ # bundle exec rake doc:rails generates the API under doc/api.
24
+ gem 'sdoc', '~> 0.4.0', group: :doc
34
25
 
35
26
  # Use ActiveModel has_secure_password
36
- # gem 'bcrypt-ruby', '~> 3.1.2'
27
+ # gem 'bcrypt', '~> 3.1.7'
37
28
 
38
- # Use unicorn as the app server
29
+ # Use Unicorn as the app server
39
30
  # gem 'unicorn'
40
31
 
41
32
  # Use Capistrano for deployment
42
- # gem 'capistrano', group: :development
33
+ # gem 'capistrano-rails', group: :development
34
+
35
+ group :development, :test do
36
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
37
+ gem 'byebug'
43
38
 
44
- # Use debugger
45
- # gem 'debugger', group: [:development, :test]
46
- gem 'blacklight_cql', :path => '/Users/jrochkind/code/blacklight_cql'
47
39
 
48
- if File.exists?("/Users/jrochkind/code/blacklight_cql/spec/test_app_templates/Gemfile.extra")
49
- eval File.read("/Users/jrochkind/code/blacklight_cql/spec/test_app_templates/Gemfile.extra"), nil, "/Users/jrochkind/code/blacklight_cql/spec/test_app_templates/Gemfile.extra"
50
- end
40
+
41
+ end
42
+
43
+ gem "web-console", group: :development
44
+ # extra gems to load into the test app go here
45
+ gem 'blacklight_cql', :path => '/Users/jrochkind/code/blacklight_cql'
@@ -1,157 +1,181 @@
1
1
  PATH
2
2
  remote: /Users/jrochkind/code/blacklight_cql
3
3
  specs:
4
- blacklight_cql (2.0.0)
5
- blacklight (>= 3.2.0, < 6.0.0)
4
+ blacklight_cql (2.0.1)
5
+ blacklight (>= 5.14.0, < 7.0.0)
6
6
  cql-ruby (>= 0.8.1)
7
7
  rails
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.0.2)
13
- actionpack (= 4.0.2)
14
- mail (~> 2.5.4)
15
- actionpack (4.0.2)
16
- activesupport (= 4.0.2)
17
- builder (~> 3.1.0)
18
- erubis (~> 2.7.0)
19
- rack (~> 1.5.2)
12
+ actionmailer (4.2.3)
13
+ actionpack (= 4.2.3)
14
+ actionview (= 4.2.3)
15
+ activejob (= 4.2.3)
16
+ mail (~> 2.5, >= 2.5.4)
17
+ rails-dom-testing (~> 1.0, >= 1.0.5)
18
+ actionpack (4.2.3)
19
+ actionview (= 4.2.3)
20
+ activesupport (= 4.2.3)
21
+ rack (~> 1.6)
20
22
  rack-test (~> 0.6.2)
21
- activemodel (4.0.2)
22
- activesupport (= 4.0.2)
23
- builder (~> 3.1.0)
24
- activerecord (4.0.2)
25
- activemodel (= 4.0.2)
26
- activerecord-deprecated_finders (~> 1.0.2)
27
- activesupport (= 4.0.2)
28
- arel (~> 4.0.0)
29
- activerecord-deprecated_finders (1.0.3)
30
- activesupport (4.0.2)
31
- i18n (~> 0.6, >= 0.6.4)
32
- minitest (~> 4.2)
33
- multi_json (~> 1.3)
34
- thread_safe (~> 0.1)
35
- tzinfo (~> 0.3.37)
36
- arel (4.0.2)
37
- atomic (1.1.14)
38
- blacklight (4.6.2)
39
- bootstrap-sass (>= 2.2.0, < 2.4)
23
+ rails-dom-testing (~> 1.0, >= 1.0.5)
24
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
+ actionview (4.2.3)
26
+ activesupport (= 4.2.3)
27
+ builder (~> 3.1)
28
+ erubis (~> 2.7.0)
29
+ rails-dom-testing (~> 1.0, >= 1.0.5)
30
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
+ activejob (4.2.3)
32
+ activesupport (= 4.2.3)
33
+ globalid (>= 0.3.0)
34
+ activemodel (4.2.3)
35
+ activesupport (= 4.2.3)
36
+ builder (~> 3.1)
37
+ activerecord (4.2.3)
38
+ activemodel (= 4.2.3)
39
+ activesupport (= 4.2.3)
40
+ arel (~> 6.0)
41
+ activesupport (4.2.3)
42
+ i18n (~> 0.7)
43
+ json (~> 1.7, >= 1.7.7)
44
+ minitest (~> 5.1)
45
+ thread_safe (~> 0.3, >= 0.3.4)
46
+ tzinfo (~> 1.1)
47
+ arel (6.0.3)
48
+ autoprefixer-rails (5.2.1.1)
49
+ execjs
50
+ json
51
+ binding_of_caller (0.7.2)
52
+ debug_inspector (>= 0.0.1)
53
+ blacklight (5.14.0)
54
+ bootstrap-sass (~> 3.2)
40
55
  deprecation
41
- kaminari (~> 0.13)
42
- marc (>= 0.4.3, < 1.1)
56
+ kaminari (>= 0.15)
43
57
  nokogiri (~> 1.6)
44
58
  rails (>= 3.2.6, < 5)
45
- rsolr (~> 1.0.6)
46
- sass-rails
47
- bootstrap-sass (2.3.2.2)
48
- sass (~> 3.2)
49
- builder (3.1.4)
50
- coffee-rails (4.0.1)
59
+ rsolr (~> 1.0.11)
60
+ bootstrap-sass (3.3.5.1)
61
+ autoprefixer-rails (>= 5.0.0.1)
62
+ sass (>= 3.3.0)
63
+ builder (3.2.2)
64
+ byebug (6.0.0)
65
+ coffee-rails (4.1.0)
51
66
  coffee-script (>= 2.2.0)
52
67
  railties (>= 4.0.0, < 5.0)
53
- coffee-script (2.2.0)
68
+ coffee-script (2.4.1)
54
69
  coffee-script-source
55
70
  execjs
56
- coffee-script-source (1.7.0)
71
+ coffee-script-source (1.9.1.1)
57
72
  cql-ruby (0.9.1)
58
- deprecation (0.1.0)
73
+ debug_inspector (0.0.2)
74
+ deprecation (0.2.2)
59
75
  activesupport
60
- ensure_valid_encoding (0.5.3)
61
76
  erubis (2.7.0)
62
- execjs (2.0.2)
63
- hike (1.2.3)
64
- i18n (0.6.9)
65
- jbuilder (1.5.3)
66
- activesupport (>= 3.0.0)
67
- multi_json (>= 1.2.0)
68
- jquery-rails (3.1.0)
69
- railties (>= 3.0, < 5.0)
77
+ execjs (2.6.0)
78
+ globalid (0.3.6)
79
+ activesupport (>= 4.1.0)
80
+ i18n (0.7.0)
81
+ jbuilder (2.3.1)
82
+ activesupport (>= 3.0.0, < 5)
83
+ multi_json (~> 1.2)
84
+ jquery-rails (4.0.4)
85
+ rails-dom-testing (~> 1.0)
86
+ railties (>= 4.2.0)
70
87
  thor (>= 0.14, < 2.0)
71
- json (1.8.1)
72
- kaminari (0.15.1)
88
+ json (1.8.3)
89
+ kaminari (0.16.3)
73
90
  actionpack (>= 3.0.0)
74
91
  activesupport (>= 3.0.0)
75
- mail (2.5.4)
76
- mime-types (~> 1.16)
77
- treetop (~> 1.4.8)
78
- marc (0.8.1)
79
- ensure_valid_encoding
80
- unf
81
- mime-types (1.25.1)
82
- mini_portile (0.5.2)
83
- minitest (4.7.5)
84
- multi_json (1.8.4)
85
- nokogiri (1.6.1)
86
- mini_portile (~> 0.5.0)
87
- polyglot (0.3.3)
88
- rack (1.5.2)
89
- rack-test (0.6.2)
92
+ loofah (2.0.3)
93
+ nokogiri (>= 1.5.9)
94
+ mail (2.6.3)
95
+ mime-types (>= 1.16, < 3)
96
+ mime-types (2.6.1)
97
+ mini_portile (0.6.2)
98
+ minitest (5.8.0)
99
+ multi_json (1.11.2)
100
+ nokogiri (1.6.6.2)
101
+ mini_portile (~> 0.6.0)
102
+ rack (1.6.4)
103
+ rack-test (0.6.3)
90
104
  rack (>= 1.0)
91
- rails (4.0.2)
92
- actionmailer (= 4.0.2)
93
- actionpack (= 4.0.2)
94
- activerecord (= 4.0.2)
95
- activesupport (= 4.0.2)
105
+ rails (4.2.3)
106
+ actionmailer (= 4.2.3)
107
+ actionpack (= 4.2.3)
108
+ actionview (= 4.2.3)
109
+ activejob (= 4.2.3)
110
+ activemodel (= 4.2.3)
111
+ activerecord (= 4.2.3)
112
+ activesupport (= 4.2.3)
96
113
  bundler (>= 1.3.0, < 2.0)
97
- railties (= 4.0.2)
98
- sprockets-rails (~> 2.0.0)
99
- railties (4.0.2)
100
- actionpack (= 4.0.2)
101
- activesupport (= 4.0.2)
114
+ railties (= 4.2.3)
115
+ sprockets-rails
116
+ rails-deprecated_sanitizer (1.0.3)
117
+ activesupport (>= 4.2.0.alpha)
118
+ rails-dom-testing (1.0.7)
119
+ activesupport (>= 4.2.0.beta, < 5.0)
120
+ nokogiri (~> 1.6.0)
121
+ rails-deprecated_sanitizer (>= 1.0.1)
122
+ rails-html-sanitizer (1.0.2)
123
+ loofah (~> 2.0)
124
+ railties (4.2.3)
125
+ actionpack (= 4.2.3)
126
+ activesupport (= 4.2.3)
102
127
  rake (>= 0.8.7)
103
128
  thor (>= 0.18.1, < 2.0)
104
- rake (10.1.1)
105
- rdoc (4.1.1)
106
- json (~> 1.4)
107
- rsolr (1.0.9)
129
+ rake (10.4.2)
130
+ rdoc (4.2.0)
131
+ rsolr (1.0.12)
108
132
  builder (>= 2.1.2)
109
- sass (3.2.14)
110
- sass-rails (4.0.1)
133
+ sass (3.4.16)
134
+ sass-rails (5.0.3)
111
135
  railties (>= 4.0.0, < 5.0)
112
- sass (>= 3.1.10)
113
- sprockets-rails (~> 2.0.0)
114
- sdoc (0.4.0)
115
- json (~> 1.8)
116
- rdoc (~> 4.0, < 5.0)
117
- sprockets (2.10.1)
118
- hike (~> 1.2)
119
- multi_json (~> 1.0)
136
+ sass (~> 3.1)
137
+ sprockets (>= 2.8, < 4.0)
138
+ sprockets-rails (>= 2.0, < 4.0)
139
+ tilt (~> 1.1)
140
+ sdoc (0.4.1)
141
+ json (~> 1.7, >= 1.7.7)
142
+ rdoc (~> 4.0)
143
+ sprockets (3.3.2)
120
144
  rack (~> 1.0)
121
- tilt (~> 1.1, != 1.3.0)
122
- sprockets-rails (2.0.1)
145
+ sprockets-rails (2.3.2)
123
146
  actionpack (>= 3.0)
124
147
  activesupport (>= 3.0)
125
- sprockets (~> 2.8)
126
- sqlite3 (1.3.8)
127
- thor (0.18.1)
128
- thread_safe (0.1.3)
129
- atomic
148
+ sprockets (>= 2.8, < 4.0)
149
+ sqlite3 (1.3.10)
150
+ thor (0.19.1)
151
+ thread_safe (0.3.5)
130
152
  tilt (1.4.1)
131
- treetop (1.4.15)
132
- polyglot
133
- polyglot (>= 0.3.1)
134
- turbolinks (2.2.1)
153
+ turbolinks (2.5.3)
135
154
  coffee-rails
136
- tzinfo (0.3.38)
137
- uglifier (2.4.0)
155
+ tzinfo (1.2.2)
156
+ thread_safe (~> 0.1)
157
+ uglifier (2.7.1)
138
158
  execjs (>= 0.3.0)
139
159
  json (>= 1.8.0)
140
- unf (0.1.3)
141
- unf_ext
142
- unf_ext (0.0.6)
160
+ web-console (2.2.1)
161
+ activemodel (>= 4.0)
162
+ binding_of_caller (>= 0.7.2)
163
+ railties (>= 4.0)
164
+ sprockets-rails (>= 2.0, < 4.0)
143
165
 
144
166
  PLATFORMS
145
167
  ruby
146
168
 
147
169
  DEPENDENCIES
148
170
  blacklight_cql!
149
- coffee-rails (~> 4.0.0)
150
- jbuilder (~> 1.2)
171
+ byebug
172
+ coffee-rails (~> 4.1.0)
173
+ jbuilder (~> 2.0)
151
174
  jquery-rails
152
- rails (= 4.0.2)
153
- sass-rails (~> 4.0.0)
154
- sdoc
175
+ rails (= 4.2.3)
176
+ sass-rails (~> 5.0)
177
+ sdoc (~> 0.4.0)
155
178
  sqlite3
156
179
  turbolinks
157
180
  uglifier (>= 1.3.0)
181
+ web-console
@@ -3,4 +3,4 @@
3
3
 
4
4
  require File.expand_path('../config/application', __FILE__)
5
5
 
6
- Internal::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -2,12 +2,12 @@
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.
9
9
  //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
13
  //= require jquery
@@ -3,11 +3,13 @@
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
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
10
12
  *
11
- *= require_self
12
13
  *= require_tree .
14
+ *= require_self
13
15
  */
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Internal</title>
5
- <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
- <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
@@ -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