listings 0.1.10 → 0.1.15

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: 32776ce178fcb720c00b4934b817b1caf3074944
4
- data.tar.gz: 580d72bd4ab37f34a8e1547f25d0754bb296d429
3
+ metadata.gz: 22306e285b8f18877c6d47cc742bfa3cb284c4ac
4
+ data.tar.gz: f402374e22a72800dfef55e6a8d65fabc2c17a69
5
5
  SHA512:
6
- metadata.gz: 7206e2c4df8f2213ceab30455446de291e9cce3700b612e7e864fee6308cfb806456b0d4486d8735b51740991f7a987a449fea761338b073b3fe032df4a43665
7
- data.tar.gz: 568d4deb9319ff9dc18877b471f0e09a768445e529f804e5349ebf48a3b4cd255c5892573605b177a095fac1d69064bbabe01f56bc27ac39ff087bc5be6d9c10
6
+ metadata.gz: e0dac07fedd6ef74330151646a991720ded9b0ff2cdb8f7059cfcf0d0d3e62a8a44176a95a9abee7a37e2665662a071670aedf1e7358066fdcdc90858d9248a6
7
+ data.tar.gz: bf3482c5505d5bce1c903e65cb29dace7917f8fbf60f4629ded558e24cab4d2a2b14a352b8d29f9d9f2d624324254e9be50caf8c34424acf03f3107bdf2fbc80
data/README.md CHANGED
@@ -207,6 +207,14 @@ The block is evaluated in a view_context so any helper you will usually use in a
207
207
  column album: :name, title: 'Album'
208
208
  ```
209
209
 
210
+ > **computed columns**
211
+ >
212
+ > Listings will try to sort and filter by default using the `<table_name>.<column_name>` field of the query, on computed queries this will not work, you will need to use `column :my_computed_field, query_column: :my_computed_field` to allow sorting and filtering.
213
+ >
214
+ > Using computed columns might cause some issues depending on the Kaminari version used. If this is the case and you need to filter based on a computed filed, you will need to define a `custom_filter` to apply the filtering of the computed field.
215
+ >
216
+ > See example at [spec/dummy/app/listings/authors_listing.rb](spec/dummy/app/listings/authors_listing.rb)
217
+
210
218
  ### scope
211
219
 
212
220
  Declaring a `scope` with a symbol with allow user to show only records matching the scope in the ActiveRecord class
@@ -243,6 +251,18 @@ It supports `title:` and a block
243
251
  end
244
252
  ```
245
253
 
254
+ A `values: :method` can be specified to avoid the select distinct over the values.
255
+
256
+ ```ruby
257
+ filter album: :name, values: :all_album_names, title: 'Album' do |album_name|
258
+ album_name.titleize
259
+ end
260
+
261
+ def all_album_names
262
+ Album.order("name").pluck("distinct name").reject(&:nil?)
263
+ end
264
+ ```
265
+
246
266
  Also `render:` option can be used to suppress the rendering of the filter, but allowing the user to filter by it. For example to filter by the id:
247
267
 
248
268
  ```ruby
@@ -20,11 +20,8 @@ module Listings
20
20
  @listing = prepare_listing params, view_context, false
21
21
 
22
22
  respond_to do |format|
23
- format.csv { send_data @listing.to_csv, filename: @listing.export_filename(:csv) }
24
- format.xls do
25
- headers["Content-Disposition"] = "attachment; filename=\"#{@listing.export_filename(:xls)}\""
26
- render 'listings/export'
27
- end
23
+ format.csv { @listing.send_csv(self) }
24
+ format.xls { @listing.send_xls(self) }
28
25
  end
29
26
  ensure
30
27
  Kaminari::Helpers::Tag.paginate_with_listings(nil)
@@ -11,7 +11,7 @@
11
11
  <Cell><Data ss:Type="String"><%= col.human_name %></Data></Cell>
12
12
  <% end %>
13
13
  </Row>
14
- <% @listing.items.each do |item| %>
14
+ <% @listing.export_each do |item| %>
15
15
  <Row>
16
16
  <% @listing.columns.each do |col| %>
17
17
  <% col.value_for(item).tap do |value| %>
data/lib/listings/base.rb CHANGED
@@ -177,30 +177,40 @@ module Listings
177
177
  (params[:format] || :html).to_sym
178
178
  end
179
179
 
180
- def to_array
181
- data = []
182
-
183
- data << self.columns.map { |c| c.human_name }
184
-
180
+ def export_each
185
181
  self.items.each do |item|
186
- row = []
187
- self.columns.each do |col|
188
- row << col.value_for(item)
189
- end
190
- data << row
182
+ yield item
191
183
  end
192
-
193
- data
194
184
  end
195
185
 
196
- def to_csv
197
- CSV.generate do |csv|
198
- self.to_array.each do |row|
199
- csv << row
186
+ def send_csv(controller)
187
+ csv_filename = self.export_filename(:csv)
188
+
189
+ controller.headers["X-Accel-Buffering"] = "no"
190
+ controller.headers["Cache-Control"] = "no-cache"
191
+ controller.headers["Content-Type"] = "text/csv; charset=utf-8"
192
+ controller.headers["Content-Disposition"] = %(attachment; filename="#{csv_filename}")
193
+ controller.headers["Transfer-Encoding"] = "chunked"
194
+ controller.headers.delete("Content-Length")
195
+
196
+ controller.response_body = Enumerator.new do |lines|
197
+ lines << self.columns.map { |c| c.human_name }.to_csv
198
+
199
+ self.export_each do |item|
200
+ row = []
201
+ self.columns.each do |col|
202
+ row << col.value_for(item)
203
+ end
204
+ lines << row.to_csv
200
205
  end
201
206
  end
202
207
  end
203
208
 
209
+ def send_xls(controller)
210
+ controller.headers["Content-Disposition"] = %(attachment; filename="#{self.export_filename(:xls)}")
211
+ controller.render 'listings/export'
212
+ end
213
+
204
214
  def method_missing(m, *args, &block)
205
215
  view_context.send(m, *args, &block)
206
216
  end
@@ -11,7 +11,7 @@ module Listings
11
11
  end
12
12
 
13
13
  def build_field(listing)
14
- listing.data_source.build_field(path)
14
+ listing.data_source.build_field(path, props)
15
15
  end
16
16
 
17
17
  def is_field?
@@ -9,7 +9,13 @@ module Listings
9
9
  end
10
10
 
11
11
  def values
12
- @values ||= listing.data_source.values_for_filter(field)
12
+ @values ||= begin
13
+ if method = @field_description.props[:values]
14
+ listing.send(method)
15
+ else
16
+ listing.data_source.values_for_filter(field)
17
+ end
18
+ end
13
19
  end
14
20
 
15
21
  def value_for(value)
@@ -68,12 +68,12 @@ module Listings::Sources
68
68
  @items = @items.eager_load(relation)
69
69
  end
70
70
 
71
- def build_field(path)
71
+ def build_field(path, props)
72
72
  path = self.class.sanitaize_path(path)
73
73
  if path.is_a?(Array)
74
74
  ActiveRecordAssociationField.new(path, self)
75
75
  else
76
- ActiveRecordField.new(path, self)
76
+ ActiveRecordField.new(path, self, props[:query_column])
77
77
  end
78
78
  end
79
79
  end
@@ -113,9 +113,10 @@ module Listings::Sources
113
113
  end
114
114
 
115
115
  class ActiveRecordField < BaseActiveRecordField
116
- def initialize(attribute_name, data_source)
116
+ def initialize(attribute_name, data_source, query_column)
117
117
  super(data_source)
118
118
  @attribute_name = attribute_name
119
+ @query_column = query_column
119
120
  end
120
121
 
121
122
  def value_for(item)
@@ -123,7 +124,7 @@ module Listings::Sources
123
124
  end
124
125
 
125
126
  def query_column
126
- "#{quote_table_name(data_source.items.table_name)}.#{quote_column_name(@attribute_name)}"
127
+ @query_column || "#{quote_table_name(data_source.items.table_name)}.#{quote_column_name(@attribute_name)}"
127
128
  end
128
129
 
129
130
  def key
@@ -45,7 +45,7 @@ module Listings::Sources
45
45
  end
46
46
 
47
47
  # returns a +Field+ for the specified options
48
- def build_field(path)
48
+ def build_field(path, props)
49
49
  end
50
50
 
51
51
  def self.for(model)
@@ -47,7 +47,7 @@ module Listings::Sources
47
47
  end
48
48
  end
49
49
 
50
- def build_field(path)
50
+ def build_field(path, props)
51
51
  path = self.class.sanitaize_path(path)
52
52
  unless path.is_a?(Array)
53
53
  path = [path]
@@ -1,3 +1,3 @@
1
1
  module Listings
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.15"
3
3
  end
@@ -0,0 +1 @@
1
+ { }
@@ -23,9 +23,9 @@
23
23
  // });
24
24
  // });
25
25
 
26
- $(function(){
26
+ $(function () {
27
27
 
28
- $('.listing').on('change', '#date-filter', function(){
28
+ $('.listing').on('change', '#date-filter', function () {
29
29
  var listings = $(this).closest('.listing')
30
30
  var filter = $(this);
31
31
 
@@ -35,5 +35,17 @@ $(function(){
35
35
  listings.trigger("listings:filter:key:set", [filter.data('filter-key'), filter.val()])
36
36
  }
37
37
  });
38
+
39
+ $('.listing').on('click', '#posts-count-filter', function () {
40
+ var listings = $(this).closest('.listing')
41
+ var filter = $(this);
42
+ var value = filter.data('filter-value');
43
+
44
+ if (value == '') {
45
+ listings.trigger("listings:filter:key:clear", filter.data('filter-key'))
46
+ } else {
47
+ listings.trigger("listings:filter:key:set", [filter.data('filter-key'), value])
48
+ }
49
+ });
38
50
  });
39
51
 
@@ -10,4 +10,7 @@ class WelcomeController < ApplicationController
10
10
 
11
11
  def tracks
12
12
  end
13
+
14
+ def authors
15
+ end
13
16
  end
@@ -0,0 +1,26 @@
1
+ class AuthorsListing < Listings::Base
2
+ model do
3
+ Author
4
+ .select('authors.*, (select count(*) from posts where posts.author_id = authors.id) as posts_count')
5
+ end
6
+
7
+ paginates_per 7
8
+
9
+ filter :category, values: :categories
10
+
11
+ custom_filter :posts_count_eq, render: 'posts_count' do |items, value|
12
+ items.where("(select count(*) from posts where posts.author_id = authors.id) = ?", value.to_i)
13
+ end
14
+
15
+ def categories
16
+ Author.select('distinct category').pluck(:category).reject(&:nil?)
17
+ end
18
+
19
+ def query_counts
20
+ (1..30).to_a
21
+ end
22
+
23
+ column :name, seachable: true
24
+ column :posts_count, query_column: :posts_count
25
+ column :category
26
+ end
@@ -22,7 +22,7 @@ class PostsListing < Listings::Base
22
22
 
23
23
  column :id
24
24
  column :title, searchable: true
25
- column :author, searchable: true
25
+ column author: :name, searchable: true
26
26
  column :category
27
27
  column do |post|
28
28
  link_to 'Editar', edit_post_path(post)
@@ -2,11 +2,23 @@ class TracksListing < Listings::Base
2
2
 
3
3
  model Track
4
4
 
5
- filter album: :name
5
+ # filter album: :name # this also works but will do a distinct over the mode
6
+ filter album: :name, values: :album_names
6
7
  filter album: :id, title: 'The Album Id' do |value|
7
8
  "#{value}!"
8
9
  end
9
10
  filter :order, render: false
11
+ filter :label, values: :label_values
12
+
13
+ def album_names
14
+ Album.order("name").pluck("distinct name").reject(&:nil?)
15
+ end
16
+
17
+ def label_values
18
+ res = ["red", "blue"]
19
+ res << params[:l] if params[:l]
20
+ res
21
+ end
10
22
 
11
23
  custom_filter :order_lte do |items, value|
12
24
  items.where('"order" <= ?', value.to_i)
@@ -0,0 +1,5 @@
1
+ class Author < ActiveRecord::Base
2
+ attr_accessible :name, :category if Rails::VERSION::MAJOR == 3
3
+
4
+ has_many :posts
5
+ end
@@ -1,6 +1,8 @@
1
1
  class Post < ActiveRecord::Base
2
2
  attr_accessible :title, :author, :category if Rails::VERSION::MAJOR == 3
3
3
 
4
+ belongs_to :author
5
+
4
6
  scope :even, -> { where('id % 2 = 0') }
5
7
  scope :odd, -> { where('id % 2 = 1') }
6
8
  scope :greater_than, lambda { |gt_id| where('id > ?', gt_id) }
@@ -1,6 +1,6 @@
1
1
  class Track < ActiveRecord::Base
2
2
  belongs_to :album
3
- attr_accessible :order, :title if Rails::VERSION::MAJOR == 3
3
+ attr_accessible :order, :title, :label if Rails::VERSION::MAJOR == 3
4
4
 
5
5
  scope :even, -> { where("#{table_name}.id % 2 = 0") }
6
6
 
@@ -0,0 +1,5 @@
1
+ %ul.nav.nav-list.well
2
+ %li.nav-header
3
+ = "Filter by #{filter.key}"
4
+ - (1..20).each do |value|
5
+ %a#posts-count-filter{:'data-filter-key' => filter.key, :'data-filter-value' => value, :href => '#'}= value
@@ -0,0 +1,3 @@
1
+ %h1 Welcome#authors
2
+
3
+ = render_listing :authors
@@ -12,6 +12,12 @@
12
12
  %dd
13
13
  ActiveRecord based listing with scopes, deferred_scopes, styles and selectable
14
14
 
15
+ %dl
16
+ %dt
17
+ = link_to 'Authors', authors_path
18
+ %dd
19
+ ActiveRecord based listing with computed columns
20
+
15
21
  %dl
16
22
  %dt
17
23
  = link_to 'Filtered posts', filtered_posts_path
@@ -5,6 +5,7 @@ Rails.application.routes.draw do
5
5
  get 'filtered'
6
6
  end
7
7
  end
8
+ get 'authors', to: 'welcome#authors'
8
9
 
9
10
  get 'array', to: 'welcome#array'
10
11
  get 'hash', to: 'welcome#hash'
@@ -19,11 +19,18 @@ ActiveRecord::Schema.define(:version => 20150611185922) do
19
19
  t.datetime "updated_at", :null => false
20
20
  end
21
21
 
22
+ create_table "authors", :force => true do |t|
23
+ t.string "name"
24
+ t.string "category"
25
+ t.datetime "created_at", :null => false
26
+ t.datetime "updated_at", :null => false
27
+ end
28
+
22
29
  create_table "posts", :force => true do |t|
23
30
  t.string "title"
24
31
  t.datetime "created_at", :null => false
25
32
  t.datetime "updated_at", :null => false
26
- t.text "author"
33
+ t.integer "author_id"
27
34
  t.string "category"
28
35
  end
29
36
 
@@ -31,10 +38,12 @@ ActiveRecord::Schema.define(:version => 20150611185922) do
31
38
  t.string "title"
32
39
  t.integer "order"
33
40
  t.integer "album_id"
41
+ t.string "label"
34
42
  t.datetime "created_at", :null => false
35
43
  t.datetime "updated_at", :null => false
36
44
  end
37
45
 
38
46
  add_index "tracks", ["album_id"], :name => "index_tracks_on_album_id"
47
+ add_index "posts", ["author_id"], :name => "index_posts_on_author_id"
39
48
 
40
49
  end
@@ -1,14 +1,22 @@
1
1
  require 'factory_girl'
2
2
  # Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f}
3
3
 
4
+ AUTHORS = []
5
+
6
+ (1..20).each do |sn|
7
+ AUTHORS << Author.create!(name: "john-#{(sn % 20) + 1}", category: "category-#{(sn % 3) + 1}")
8
+ end
9
+
4
10
  (1..100).each do |sn|
5
- Post.create! title: "post n-#{sn}", author: "john-#{(sn % 4) + 1}", category: "category-#{(sn % 3) + 1}"
11
+ Post.create! title: "post n-#{sn}", author: AUTHORS[sn % (sn / 10 + 1)], category: "category-#{(sn % 3) + 1}"
6
12
  end
7
13
 
8
14
  (1..10).each do |sn|
9
15
  FactoryGirl.create :album
10
16
  end
11
17
 
18
+ LABELS = %w(Green Red Blue)
19
+
12
20
  (1..10).each do |sn|
13
- FactoryGirl.create :track, album: nil
21
+ FactoryGirl.create :track, album: nil, label: LABELS[sn % LABELS.size]
14
22
  end
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :author do
3
+ name
4
+ end
5
+ end
@@ -1,5 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :post do
3
3
  title
4
+ author
4
5
  end
5
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian J. Cardiff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-02 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -189,6 +189,7 @@ files:
189
189
  - lib/tasks/listings_tasks.rake
190
190
  - spec/dummy/README.rdoc
191
191
  - spec/dummy/Rakefile
192
+ - spec/dummy/app/assets/config/manifest.js
192
193
  - spec/dummy/app/assets/javascripts/application.js
193
194
  - spec/dummy/app/assets/stylesheets/application.css
194
195
  - spec/dummy/app/controllers/application_controller.rb
@@ -197,22 +198,26 @@ files:
197
198
  - spec/dummy/app/helpers/application_helper.rb
198
199
  - spec/dummy/app/helpers/posts_helper.rb
199
200
  - spec/dummy/app/listings/array_listing.rb
201
+ - spec/dummy/app/listings/authors_listing.rb
200
202
  - spec/dummy/app/listings/filtered_posts_listing.rb
201
203
  - spec/dummy/app/listings/hash_listing.rb
202
204
  - spec/dummy/app/listings/posts_listing.rb
203
205
  - spec/dummy/app/listings/tracks_fixed_order_listing.rb
204
206
  - spec/dummy/app/listings/tracks_listing.rb
205
207
  - spec/dummy/app/models/album.rb
208
+ - spec/dummy/app/models/author.rb
206
209
  - spec/dummy/app/models/object_album.rb
207
210
  - spec/dummy/app/models/object_track.rb
208
211
  - spec/dummy/app/models/post.rb
209
212
  - spec/dummy/app/models/track.rb
210
213
  - spec/dummy/app/views/layouts/application.html.erb
211
214
  - spec/dummy/app/views/listings/_date.html.haml
215
+ - spec/dummy/app/views/listings/_posts_count.html.haml
212
216
  - spec/dummy/app/views/posts/filtered.html.haml
213
217
  - spec/dummy/app/views/posts/index.html.haml
214
218
  - spec/dummy/app/views/shared/_post_partial.html.haml
215
219
  - spec/dummy/app/views/welcome/array.html.haml
220
+ - spec/dummy/app/views/welcome/authors.html.haml
216
221
  - spec/dummy/app/views/welcome/hash.html.haml
217
222
  - spec/dummy/app/views/welcome/index.html.haml
218
223
  - spec/dummy/app/views/welcome/tracks.html.haml
@@ -247,7 +252,8 @@ files:
247
252
  - spec/dummy/script/rails
248
253
  - spec/dummy/spec
249
254
  - spec/factories/albums.rb
250
- - spec/factories/post.rb
255
+ - spec/factories/authors.rb
256
+ - spec/factories/posts.rb
251
257
  - spec/factories/tracks.rb
252
258
  - spec/factories/traits.rb
253
259
  - spec/lib/filter_parser_spec.rb
@@ -285,77 +291,83 @@ signing_key:
285
291
  specification_version: 4
286
292
  summary: Simple creation of listings in rails applications.
287
293
  test_files:
288
- - spec/spec_helper.rb
289
- - spec/dummy/app/listings/filtered_posts_listing.rb
290
- - spec/dummy/app/listings/posts_listing.rb
294
+ - spec/dummy/README.rdoc
295
+ - spec/dummy/Rakefile
296
+ - spec/dummy/app/assets/config/manifest.js
297
+ - spec/dummy/app/assets/javascripts/application.js
298
+ - spec/dummy/app/assets/stylesheets/application.css
299
+ - spec/dummy/app/controllers/application_controller.rb
300
+ - spec/dummy/app/controllers/posts_controller.rb
301
+ - spec/dummy/app/controllers/welcome_controller.rb
302
+ - spec/dummy/app/helpers/application_helper.rb
303
+ - spec/dummy/app/helpers/posts_helper.rb
291
304
  - spec/dummy/app/listings/array_listing.rb
305
+ - spec/dummy/app/listings/authors_listing.rb
306
+ - spec/dummy/app/listings/filtered_posts_listing.rb
292
307
  - spec/dummy/app/listings/hash_listing.rb
293
- - spec/dummy/app/listings/tracks_listing.rb
308
+ - spec/dummy/app/listings/posts_listing.rb
294
309
  - spec/dummy/app/listings/tracks_fixed_order_listing.rb
295
- - spec/dummy/app/models/object_track.rb
310
+ - spec/dummy/app/listings/tracks_listing.rb
296
311
  - spec/dummy/app/models/album.rb
312
+ - spec/dummy/app/models/author.rb
297
313
  - spec/dummy/app/models/object_album.rb
298
- - spec/dummy/app/models/track.rb
314
+ - spec/dummy/app/models/object_track.rb
299
315
  - spec/dummy/app/models/post.rb
300
- - spec/dummy/app/controllers/application_controller.rb
301
- - spec/dummy/app/controllers/welcome_controller.rb
302
- - spec/dummy/app/controllers/posts_controller.rb
316
+ - spec/dummy/app/models/track.rb
317
+ - spec/dummy/app/views/layouts/application.html.erb
318
+ - spec/dummy/app/views/listings/_date.html.haml
319
+ - spec/dummy/app/views/listings/_posts_count.html.haml
303
320
  - spec/dummy/app/views/posts/filtered.html.haml
304
321
  - spec/dummy/app/views/posts/index.html.haml
305
- - spec/dummy/app/views/listings/_date.html.haml
306
322
  - spec/dummy/app/views/shared/_post_partial.html.haml
307
323
  - spec/dummy/app/views/welcome/array.html.haml
308
- - spec/dummy/app/views/welcome/index.html.haml
324
+ - spec/dummy/app/views/welcome/authors.html.haml
309
325
  - spec/dummy/app/views/welcome/hash.html.haml
326
+ - spec/dummy/app/views/welcome/index.html.haml
310
327
  - spec/dummy/app/views/welcome/tracks.html.haml
311
- - spec/dummy/app/views/layouts/application.html.erb
312
- - spec/dummy/app/assets/javascripts/application.js
313
- - spec/dummy/app/assets/stylesheets/application.css
314
- - spec/dummy/app/helpers/posts_helper.rb
315
- - spec/dummy/app/helpers/application_helper.rb
316
- - spec/dummy/config/routes.rb
317
- - spec/dummy/config/locales/en.yml
318
- - spec/dummy/config/environments/production.rb
319
- - spec/dummy/config/environments/development.rb
320
- - spec/dummy/config/environments/test.rb
321
- - spec/dummy/config/environment.rb
322
328
  - spec/dummy/config/application.rb
323
- - spec/dummy/config/database.yml
324
329
  - spec/dummy/config/boot.rb
330
+ - spec/dummy/config/database.yml
331
+ - spec/dummy/config/environment.rb
332
+ - spec/dummy/config/environments/development.rb
333
+ - spec/dummy/config/environments/production.rb
334
+ - spec/dummy/config/environments/test.rb
325
335
  - spec/dummy/config/initializers/backtrace_silencers.rb
336
+ - spec/dummy/config/initializers/inflections.rb
337
+ - spec/dummy/config/initializers/listings.rb
326
338
  - spec/dummy/config/initializers/mime_types.rb
339
+ - spec/dummy/config/initializers/secret_token.rb
327
340
  - spec/dummy/config/initializers/session_store.rb
328
341
  - spec/dummy/config/initializers/wrap_parameters.rb
329
- - spec/dummy/config/initializers/listings.rb
330
- - spec/dummy/config/initializers/secret_token.rb
331
- - spec/dummy/config/initializers/inflections.rb
342
+ - spec/dummy/config/locales/en.yml
343
+ - spec/dummy/config/routes.rb
332
344
  - spec/dummy/config.ru
333
- - spec/dummy/spec
334
- - spec/dummy/script/rails
335
- - spec/dummy/Rakefile
336
- - spec/dummy/public/favicon.ico
337
- - spec/dummy/public/422.html
338
- - spec/dummy/public/500.html
339
- - spec/dummy/public/404.html
340
- - spec/dummy/db/schema.rb
341
- - spec/dummy/db/seeds.rb
342
- - spec/dummy/db/migrate/20150611185922_create_tracks.rb
343
- - spec/dummy/db/migrate/20140728151246_add_category_to_post.rb
344
- - spec/dummy/db/migrate/20150611185824_create_albums.rb
345
345
  - spec/dummy/db/migrate/20130618143317_create_posts.rb
346
346
  - spec/dummy/db/migrate/20130618195559_add_author_to_posts.rb
347
- - spec/dummy/README.rdoc
348
- - spec/listings/tracks_listing_spec.rb
349
- - spec/listings/tracks_fixed_order_listing_spec.rb
350
- - spec/listings/posts_listing_spec.rb
351
- - spec/models/track_spec.rb
352
- - spec/models/post_spec.rb
353
- - spec/models/album_spec.rb
354
- - spec/support/query_counter.rb
347
+ - spec/dummy/db/migrate/20140728151246_add_category_to_post.rb
348
+ - spec/dummy/db/migrate/20150611185824_create_albums.rb
349
+ - spec/dummy/db/migrate/20150611185922_create_tracks.rb
350
+ - spec/dummy/db/schema.rb
351
+ - spec/dummy/db/seeds.rb
352
+ - spec/dummy/public/404.html
353
+ - spec/dummy/public/422.html
354
+ - spec/dummy/public/500.html
355
+ - spec/dummy/public/favicon.ico
356
+ - spec/dummy/script/rails
357
+ - spec/dummy/spec
355
358
  - spec/factories/albums.rb
356
- - spec/factories/traits.rb
359
+ - spec/factories/authors.rb
360
+ - spec/factories/posts.rb
357
361
  - spec/factories/tracks.rb
358
- - spec/factories/post.rb
362
+ - spec/factories/traits.rb
359
363
  - spec/lib/filter_parser_spec.rb
360
364
  - spec/lib/sources/active_record_data_source_spec.rb
361
365
  - spec/lib/sources/object_data_source_spec.rb
366
+ - spec/listings/posts_listing_spec.rb
367
+ - spec/listings/tracks_fixed_order_listing_spec.rb
368
+ - spec/listings/tracks_listing_spec.rb
369
+ - spec/models/album_spec.rb
370
+ - spec/models/post_spec.rb
371
+ - spec/models/track_spec.rb
372
+ - spec/spec_helper.rb
373
+ - spec/support/query_counter.rb