tabulatr2 0.9.14 → 0.9.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: 8bc8b3d34ed931fa24fe85981c1b2e5763248c6c
4
- data.tar.gz: 7752208548f494554ab70a4d754df3bfdaa329fd
3
+ metadata.gz: f23479a544dea98a12d51d712207eb073099c36a
4
+ data.tar.gz: 5bc9a22c42eb5682f397c2b2906dd78665f7868e
5
5
  SHA512:
6
- metadata.gz: b7cef62c4f02e49c3469a786e796d74fa5c3d32e65715c836b9ad63a87bd37b8f7f63199893bf799bd21a7711e1051624b8bfa85595b5df044d14c4630312307
7
- data.tar.gz: dbebfc21118fdac9f3b13deb6c077881d76ca48faa574d0e3757fd8c1b2ba711c7bb5cb1c124e1c85f3606b15605f25d52319a889a123984e21729d38574ed1b
6
+ metadata.gz: 1bebe6ba5bf5ae4472fb13b18f679a00f31e1a3f31062945e535037483a44ad03c8fc93503a0a40a991e97dde628927b955ace7fd7299973735414e16bee2569
7
+ data.tar.gz: 1c288d8b9da7f52c75689feb9eb4eafa32f876d6a46f9d86cc514909ad08ab9a83bb7dc64a418f6e461f90736f51700d2927d71e588eda2289c28a3de5c45fbc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.9.15
2
+ * Removes bootstrap2 CSS modifications
3
+
1
4
  ## 0.9.6
2
5
  * Adds localStorage persistency for tables. It's automatically turned on for paginated
3
6
  tables and you can adjust the setting in your template.
data/Gemfile CHANGED
@@ -12,10 +12,7 @@ end
12
12
 
13
13
  group :development, :test do
14
14
  gem 'sqlite3', :require => 'sqlite3'
15
- gem 'rspec', '~> 2.14.1'
16
- gem 'rspec-rails', '~> 2.14.0'
17
15
  gem 'minitest'
18
- gem 'capybara'
19
16
  gem 'launchy'
20
17
  gem 'database_cleaner', '< 1.1.0'
21
18
  gem 'poltergeist'
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.14"
25
+ VERSION = "0.9.15"
26
26
  end
@@ -1,6 +1,6 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
- describe "Tabulatr" do
3
+ feature "Tabulatr" do
4
4
 
5
5
  names = ["lorem", "ipsum", "dolor", "sit", "amet", "consectetur",
6
6
  "adipisicing", "elit", "sed", "eiusmod", "tempor", "incididunt", "labore",
@@ -19,9 +19,9 @@ describe "Tabulatr" do
19
19
  @tag3 = Tag.create!(:title => 'fubar')
20
20
  end
21
21
 
22
- describe "General data" do
22
+ feature "General data" do
23
23
 
24
- it "contains buttons" do
24
+ scenario "contains buttons" do
25
25
  visit simple_index_products_path
26
26
  ['.tabulatr-filter-menu-wrapper', '.tabulatr-batch-actions-menu-wrapper',
27
27
  '.tabulatr-paginator-wrapper'].each do |n|
@@ -29,102 +29,102 @@ describe "Tabulatr" do
29
29
  end
30
30
  end
31
31
 
32
- it "contains column headers" do
32
+ scenario "contains column headers" do
33
33
  visit simple_index_products_path
34
34
  ['Title','Price','Active','Updated at'].each do |n|
35
- find('.tabulatr_table thead').should have_content(n)
35
+ expect(page).to have_css('.tabulatr_table thead', text: n)
36
36
  end
37
37
  end
38
38
 
39
- it "contains the actual data", js: true do
39
+ scenario "contains the actual data", js: true do
40
40
  product = Product.create!(:title => names[0], :active => true, :price => 10.0)
41
41
  product.vendor = @vendor1
42
42
  product.save!
43
43
  visit simple_index_products_path
44
- page.should have_content("true")
45
- page.should have_content("10.0")
46
- product.vendor.name.should eq("ven d'or")
47
- find('.tabulatr_table tbody').should have_content(names[0])
48
- find('.tabulatr_table tbody').should have_content("ven d'or")
44
+ expect(page).to have_content("true")
45
+ expect(page).to have_content("10.0")
46
+ expect(product.vendor.name).to eq("ven d'or")
47
+ expect(page).to have_css('.tabulatr_table tbody', text: names[0])
48
+ expect(page).to have_css('.tabulatr_table tbody', text: "ven d'or")
49
49
  end
50
50
 
51
- it "correctly contains the association data", js: true do
51
+ scenario "correctly contains the association data", js: true do
52
52
  product = Product.create!(:title => names[0], :active => true, :price => 10.0)
53
53
  [@tag1, @tag2, @tag3].each_with_index do |tag, i|
54
54
  product.tags << tag
55
55
  product.save
56
56
  visit simple_index_products_path
57
- page.should have_content tag.title.upcase
57
+ expect(page).to have_content(tag.title.upcase)
58
58
  end
59
59
  end
60
60
 
61
- it "contains the actual data multiple times", js: true do
61
+ scenario "contains the actual data multiple times", js: true do
62
62
  9.times do |i|
63
63
  product = Product.create!(:title => names[i], :active => i.even?, :price => 11.0+i,
64
64
  :vendor => i.even? ? @vendor1 : @vendor2)
65
65
  visit simple_index_products_path
66
- page.should have_content(names[i])
67
- page.should have_content((11.0+i).to_s)
66
+ expect(page).to have_content(names[i])
67
+ expect(page).to have_content((11.0+i).to_s)
68
68
  end
69
69
  end
70
70
 
71
- it "contains the further data on the further pages" do
71
+ scenario "contains the further data on the further pages" do
72
72
  names[10..-1].each_with_index do |n,i|
73
73
  product = Product.create!(:title => n, :active => i.even?, :price => 20.0+i,
74
74
  :vendor => i.even? ? @vendor1 : @vendor2)
75
75
  visit simple_index_products_path
76
- page.should_not have_content(/\s+#{n}\s+/)
77
- page.should_not have_content((30.0+i).to_s)
76
+ expect(page).to have_no_content(/\s+#{n}\s+/)
77
+ expect(page).to have_no_content((30.0+i).to_s)
78
78
  end
79
79
  end
80
80
  end
81
81
 
82
- describe 'has_many' do
83
- it 'displays the count when called with :count', js: true do
82
+ feature 'has_many' do
83
+ scenario 'displays the count when called with :count', js: true do
84
84
  product = Product.create!(:title => names[0], :active => true, :price => 10.0)
85
85
  [@tag1, @tag2, @tag3].each do |tag|
86
86
  product.tags << tag
87
87
  end
88
88
  product.save
89
89
  visit count_tags_products_path
90
- page.find('tbody td[data-tabulatr-column-name="tags:count"]').should have_content 3
90
+ expect(page).to have_css('tbody td[data-tabulatr-column-name="tags:count"]', text: '3')
91
91
  end
92
92
  end
93
93
 
94
- describe "Pagination" do
94
+ feature "Pagination" do
95
95
 
96
96
 
97
97
  context 'pagination setting is true' do
98
- it 'has pages', js: true do
98
+ scenario 'has pages', js: true do
99
99
  5.times do |i|
100
100
  Product.create!(:title => "test #{i}")
101
101
  end
102
102
  visit one_item_per_page_with_pagination_products_path
103
- page.all('.pagination li a[data-page]').count.should eq 5
103
+ expect(page).to have_css('.pagination li a[data-page]', count: 5)
104
104
  end
105
105
 
106
- it 'shows some pages when there are 20', js: true do
106
+ scenario 'shows some pages when there are 20', js: true do
107
107
  20.times do |i|
108
108
  Product.create!
109
109
  end
110
110
  visit one_item_per_page_with_pagination_products_path
111
111
  pages = page.all('.pagination li a[data-page]').map{|a| a['data-page'].to_i}
112
- pages.should eq [1,2,3,10,20]
112
+ expect(pages).to match_array([1,2,3,10,20])
113
113
  end
114
114
  end
115
115
  context 'pagination setting is false' do
116
- it 'has no pages', js: true do
116
+ scenario 'has no pages', js: true do
117
117
  5.times do |i|
118
118
  Product.create!
119
119
  end
120
120
  visit one_item_per_page_without_pagination_products_path
121
- page.all('.pagination li a').count.should be 0
121
+ expect(page).to have_no_css('.pagination li a')
122
122
  end
123
123
  end
124
124
  end
125
125
 
126
- describe "Filters" do
127
- it "filters with like", js: true do
126
+ feature "Filters" do
127
+ scenario "filters with like", js: true do
128
128
  names.each do |n|
129
129
  Product.create!(:title => n, :active => true, :price => 10.0)
130
130
  end
@@ -145,7 +145,7 @@ describe "Tabulatr" do
145
145
  expect(page).not_to have_selector('td[data-tabulatr-column-name="products:title"]', text: 'dolore')
146
146
  end
147
147
 
148
- it "filters", js: true do
148
+ scenario "filters", js: true do
149
149
  Product.create!([{title: 'foo', vendor: @vendor1},
150
150
  {title: 'bar', vendor: @vendor2}])
151
151
  visit simple_index_products_path
@@ -156,7 +156,7 @@ describe "Tabulatr" do
156
156
  expect(page).to have_selector('td[data-tabulatr-column-name="vendor:name"]', text: @vendor2.name)
157
157
  end
158
158
 
159
- it "filters with range", js: true do
159
+ scenario "filters with range", js: true do
160
160
  n = names.length
161
161
  Product.create!([{title: 'foo', price: 5}, {title: 'bar', price: 17}])
162
162
  visit simple_index_products_path
@@ -167,18 +167,18 @@ describe "Tabulatr" do
167
167
  fill_in("product_filter[products:price][to]", :with => 10)
168
168
  find('.tabulatr-submit-table').click
169
169
  end
170
- page.find(".tabulatr_table tbody tr[data-id='#{Product.first.id}']").should have_content('foo')
171
- page.has_no_css?(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
170
+ expect(page).to have_css(".tabulatr_table tbody tr[data-id='#{Product.first.id}']", text: 'foo')
171
+ expect(page).to have_no_css(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
172
172
  within('.tabulatr_filter_form') do
173
173
  fill_in("product_filter[products:price][from]", :with => 12)
174
174
  fill_in("product_filter[products:price][to]", :with => 19)
175
175
  find('.tabulatr-submit-table').click
176
176
  end
177
- page.should have_selector(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
178
- page.should have_no_selector(".tabulatr_table tbody tr[data-id='#{Product.first.id}']")
177
+ expect(page).to have_css(".tabulatr_table tbody tr[data-id='#{Product.last.id}']")
178
+ expect(page).to have_no_css(".tabulatr_table tbody tr[data-id='#{Product.first.id}']")
179
179
  end
180
180
 
181
- it 'removes the filters', js: true do
181
+ scenario 'removes the filters', js: true do
182
182
  Product.create!([{title: 'foo', price: 5}, {title: 'bar', price: 5}])
183
183
  visit simple_index_products_path
184
184
  click_link 'Filter'
@@ -194,36 +194,35 @@ describe "Tabulatr" do
194
194
  end
195
195
  end
196
196
 
197
- describe "Sorting" do
198
- it "knows how to sort", js: true do
197
+ feature "Sorting" do
198
+ scenario "knows how to sort", js: true do
199
199
  names.each do |n|
200
200
  Product.create!(title: n, vendor: @vendor1, active: true, price: 10.0)
201
201
  end
202
- Product.count.should > 10
203
202
  visit simple_index_products_path
204
203
  l = names.count
205
204
  (1..10).each do |i|
206
- page.should have_content names[l-i]
205
+ expect(page).to have_content names[l-i]
207
206
  end
208
207
  within('.tabulatr_table thead') do
209
208
  find('th[data-tabulatr-column-name="products:title"]').click
210
209
  end
211
210
  snames = names.sort
212
211
  (1..10).each do |i|
213
- page.should have_content snames[i-1]
212
+ expect(page).to have_content snames[i-1]
214
213
  end
215
214
  within('.tabulatr_table thead') do
216
215
  find('th[data-tabulatr-column-name="products:title"]').click
217
216
  end
218
217
  (1..10).each do |i|
219
- page.should have_content snames[-i]
218
+ expect(page).to have_content snames[-i]
220
219
  end
221
220
  end
222
221
  end
223
222
 
224
- describe "Show simple records" do
223
+ feature "Show simple records" do
225
224
 
226
- it "contains the actual data", js: false do
225
+ scenario "contains the actual data", js: false do
227
226
  names.shuffle.each.with_index do |n,i|
228
227
  p = Product.new(:title => n, :active => true, :price => 10.0 + i)
229
228
  p.vendor = [@vendor1, @vendor2].shuffle.first
@@ -232,50 +231,50 @@ describe "Tabulatr" do
232
231
  end
233
232
  visit stupid_array_products_path
234
233
  Product.order('price asc').limit(11).each do |product|
235
- page.should have_content(product.title)
236
- page.should have_content(product.title.upcase)
237
- page.should have_content(product.price)
238
- page.should have_content(product.vendor.name)
239
- page.should have_content(product.title)
240
- page.should have_content("foo#{product.title}foo")
241
- page.should have_content("bar#{product.title}bar")
242
- page.should have_content("%08.4f" % product.price)
243
- page.should have_content(product.tags.count)
234
+ expect(page).to have_content(product.title)
235
+ expect(page).to have_content(product.title.upcase)
236
+ expect(page).to have_content(product.price)
237
+ expect(page).to have_content(product.vendor.name)
238
+ expect(page).to have_content(product.title)
239
+ expect(page).to have_content("foo#{product.title}foo")
240
+ expect(page).to have_content("bar#{product.title}bar")
241
+ expect(page).to have_content("%08.4f" % product.price)
242
+ expect(page).to have_content(product.tags.count)
244
243
  product.tags.each do |tag|
245
- page.should have_content(tag.title)
246
- page.should have_content("foo#{tag.title}foo")
247
- page.should have_content("bar#{tag.title}bar")
244
+ expect(page).to have_content(tag.title)
245
+ expect(page).to have_content("foo#{tag.title}foo")
246
+ expect(page).to have_content("bar#{tag.title}bar")
248
247
  end
249
248
  end
250
249
  end
251
250
  end
252
251
 
253
- describe "Batch actions", js: true do
252
+ feature "Batch actions", js: true do
254
253
 
255
- it "hides the actions if there are none" do
254
+ scenario "hides the actions if there are none" do
256
255
  visit one_item_per_page_with_pagination_products_path
257
- page.should have_no_selector('.tabulatr-batch-actions-menu-wrapper a')
256
+ expect(page).to have_no_selector('.tabulatr-batch-actions-menu-wrapper a')
258
257
  end
259
258
 
260
259
 
261
- it 'executes the action when clicked' do
260
+ scenario 'executes the action when clicked' do
262
261
  product1 = Product.create!(:title => names[0], :active => true, :price => 10.0)
263
262
  product2 = Product.create!(:title => names[1], :active => true, :price => 10.0)
264
263
  product3 = Product.create!(:title => names[2], :active => true, :price => 10.0)
265
- page.has_css?(".tabulatr_table tbody tr", :count => 3)
266
264
  visit with_batch_actions_products_path
265
+ expect(page).to have_css(".tabulatr_table tbody tr", count: 3)
267
266
  find(".tabulatr-checkbox[value='#{product1.id}']").trigger('click')
268
267
  find(".tabulatr-checkbox[value='#{product3.id}']").trigger('click')
269
268
  find('.tabulatr-batch-actions-menu-wrapper a').click
270
269
  within('.dropdown.open') do
271
270
  click_link 'Delete'
272
271
  end
273
- page.has_css?(".tabulatr_table tbody tr", :count => 1)
272
+ expect(page).to have_css(".tabulatr_table tbody tr", count: 1)
274
273
  end
275
274
  end
276
275
 
277
- describe "Column options", js: true do
278
- it 'applys the given style' do
276
+ feature "Column options", js: true do
277
+ scenario 'applys the given style' do
279
278
  p = Product.create!(:title => names[0], :active => true, :price => 10.0)
280
279
  visit with_styling_products_path
281
280
  cell = find(".tabulatr_table tbody td[data-tabulatr-column-name='products:title']")
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data do
4
4
 
@@ -11,7 +11,7 @@ describe Tabulatr::Data do
11
11
  filter_sql: "products.title",
12
12
  output: ->(record){record.send(:title)}
13
13
  )
14
- Tabulatr::Data.any_instance.stub(:table_columns).and_return([column])
14
+ allow_any_instance_of(Tabulatr::Data).to receive(:table_columns).and_return([column])
15
15
  end
16
16
 
17
17
  it 'prefilters the result' do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data::DSL do
4
4
  class DummySpecClass
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data::Filtering do
4
4
  class DummySpecClass
@@ -17,7 +17,7 @@ describe Tabulatr::Data::Filtering do
17
17
  @outside_last_thirty_days = Product.create!(publish_at: DateTime.new(2013, 12, 2, 23, 59))
18
18
  @this_month = Product.create!(publish_at: DateTime.new(2014, 1, 15, 0, 0))
19
19
  @next_year = Product.create!(publish_at: DateTime.new(2015, 1, 1, 12, 0))
20
- Date.stub(:today).and_return(Date.new(2014,1,1))
20
+ allow(Date).to receive(:today).and_return(Date.new(2014,1,1))
21
21
  end
22
22
  describe '.apply_date_condition' do
23
23
  it "filters for 'today'" do
@@ -1,8 +1,9 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data::Formatting do
4
4
  class DummySpecClass
5
5
  include Tabulatr::Data::Formatting
6
+ def table_columns; end
6
7
  end
7
8
 
8
9
  before(:each) do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data::Pagination do
4
4
  class DummySpecClass
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Data::Sorting do
4
4
  class DummySpecClass
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::JsonBuilder do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Renderer::Checkbox do
4
4
 
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Tabulatr::Renderer do
4
4
 
@@ -0,0 +1,23 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+
3
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
+ ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
5
+
6
+ require 'rspec/rails'
7
+ require 'capybara/rspec'
8
+ require 'capybara/poltergeist'
9
+ require 'spec_helper'
10
+
11
+ Capybara.javascript_driver = :poltergeist
12
+
13
+ Capybara.register_driver :poltergeist do |app|
14
+ Capybara::Poltergeist::Driver.new(app, {js_errors: true})
15
+ end
16
+
17
+ # Requires supporting ruby files with custom matchers and macros, etc,
18
+ # in spec/support/ and its subdirectories.
19
+ Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
20
+
21
+ RSpec.configure do |config|
22
+ config.use_transactional_fixtures = false
23
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,43 @@
1
- ENV["RAILS_ENV"] ||= 'test'
2
-
3
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
- ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
5
-
6
- require 'rspec/rails'
7
- require 'capybara/rspec'
8
- require 'capybara/poltergeist'
9
-
10
- Capybara.javascript_driver = :poltergeist
11
-
12
- Capybara.register_driver :poltergeist do |app|
13
- Capybara::Poltergeist::Driver.new(app, {js_errors: true})
14
- end
15
-
16
- # Requires supporting ruby files with custom matchers and macros, etc,
17
- # in spec/support/ and its subdirectories.
18
- Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
19
-
20
-
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 this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
21
17
  RSpec.configure do |config|
22
- config.use_transactional_fixtures = false
18
+ # rspec-expectations config goes here. You can use an alternate
19
+ # assertion/expectation library such as wrong or the stdlib/minitest
20
+ # assertions if you prefer.
21
+ config.expect_with :rspec do |expectations|
22
+ # This option will default to `true` in RSpec 4. It makes the `description`
23
+ # and `failure_message` of custom matchers include text for helper methods
24
+ # defined using `chain`, e.g.:
25
+ # be_bigger_than(2).and_smaller_than(4).description
26
+ # # => "be bigger than 2 and smaller than 4"
27
+ # ...rather than:
28
+ # # => "be bigger than 2"
29
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
+ end
31
+
32
+ # rspec-mocks config goes here. You can use an alternate test double
33
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
34
+ config.mock_with :rspec do |mocks|
35
+ # Prevents you from mocking or stubbing a method that does not exist on
36
+ # a real object. This is generally recommended, and will default to
37
+ # `true` in RSpec 4.
38
+ mocks.verify_partial_doubles = true
39
+ end
40
+ config.order = :random
23
41
 
24
42
  config.before(:suite) do
25
43
  DatabaseCleaner.clean_with(:truncation)
@@ -41,5 +59,44 @@ RSpec.configure do |config|
41
59
  DatabaseCleaner.clean
42
60
  end
43
61
 
62
+ # The settings below are suggested to provide a good initial experience
63
+ # with RSpec, but feel free to customize to your heart's content.
64
+ =begin
65
+ # These two settings work together to allow you to limit a spec run
66
+ # to individual examples or groups you care about by tagging them with
67
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
68
+ # get run.
69
+ config.filter_run :focus
70
+ config.run_all_when_everything_filtered = true
71
+
72
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
73
+ # For more details, see:
74
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
75
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
76
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
77
+ config.disable_monkey_patching!
78
+
79
+ # Many RSpec users commonly either run the entire suite or an individual
80
+ # file, and it's useful to allow more verbose output when running an
81
+ # individual spec file.
82
+ if config.files_to_run.one?
83
+ # Use the documentation formatter for detailed output,
84
+ # unless a formatter has already been configured
85
+ # (e.g. via a command-line flag).
86
+ config.default_formatter = 'doc'
87
+ end
88
+
89
+ # Print the 10 slowest examples and example groups at the
90
+ # end of the spec run, to help surface which specs are running
91
+ # particularly slow.
92
+ config.profile_examples = 10
93
+
94
+ # Seed global randomization in this process using the `--seed` CLI option.
95
+ # Setting this allows you to use `--seed` to deterministically reproduce
96
+ # test failures related to randomization by passing the same `--seed` value
97
+ # as the one that triggered the failure.
98
+ Kernel.srand config.seed
99
+ =end
100
+
44
101
 
45
102
  end
data/tabulatr.gemspec CHANGED
@@ -24,7 +24,9 @@ Gem::Specification.new do |s|
24
24
 
25
25
 
26
26
  s.add_runtime_dependency('rails', '~> 4.0')
27
- s.add_dependency('slim', '~> 2.0')
27
+ s.add_dependency('slim', '>= 2.0')
28
28
  s.add_dependency('tilt', '~> 1.4', '>= 1.4.1')
29
- s.add_dependency('font-awesome-rails', '~> 4.0')
29
+ s.add_dependency('font-awesome-rails', '>= 4.0')
30
+ s.add_development_dependency('rspec-rails', '~> 3.1.0')
31
+ s.add_development_dependency('capybara', '~> 2.4.1')
30
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabulatr2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.14
4
+ version: 0.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Horn
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-14 00:00:00.000000000 Z
13
+ date: 2014-12-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  name: slim
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - "~>"
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
35
  version: '2.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '2.0'
43
43
  - !ruby/object:Gem::Dependency
@@ -64,16 +64,44 @@ dependencies:
64
64
  name: font-awesome-rails
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '4.0'
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '4.0'
77
+ - !ruby/object:Gem::Dependency
78
+ name: rspec-rails
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 3.1.0
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 3.1.0
91
+ - !ruby/object:Gem::Dependency
92
+ name: capybara
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 2.4.1
98
+ type: :development
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: 2.4.1
77
105
  description: A tight DSL to build tables of ActiveRecord models with sorting, pagination,
78
106
  finding/filtering, selecting and batch actions. Tries to do for tables what formtastic
79
107
  and simple_form did for forms.
@@ -99,7 +127,6 @@ files:
99
127
  - app/assets/javascripts/tabulatr/jquery.inview.min.js
100
128
  - app/assets/stylesheets/tabulatr.css.scss
101
129
  - app/assets/stylesheets/tabulatr/application.css.scss
102
- - app/assets/stylesheets/tabulatr/bootstrap2_fixes.css.scss
103
130
  - app/views/tabulatr/_tabulatr_actual_table.html.slim
104
131
  - app/views/tabulatr/_tabulatr_batch_actions_menu.html.slim
105
132
  - app/views/tabulatr/_tabulatr_buttons.html.slim
@@ -215,6 +242,7 @@ files:
215
242
  - spec/lib/tabulatr/json_builder_spec.rb
216
243
  - spec/lib/tabulatr/renderer/checkbox_spec.rb
217
244
  - spec/lib/tabulatr/renderer/renderer_spec.rb
245
+ - spec/rails_helper.rb
218
246
  - spec/spec_helper.rb
219
247
  - tabulatr.gemspec
220
248
  homepage: http://github.com/metaminded/tabulatr2
@@ -314,4 +342,5 @@ test_files:
314
342
  - spec/lib/tabulatr/json_builder_spec.rb
315
343
  - spec/lib/tabulatr/renderer/checkbox_spec.rb
316
344
  - spec/lib/tabulatr/renderer/renderer_spec.rb
345
+ - spec/rails_helper.rb
317
346
  - spec/spec_helper.rb
@@ -1,24 +0,0 @@
1
- form.tabulatr_filter_form {
2
-
3
- .controls {
4
- margin-left: 180px;
5
-
6
- a, input, select { margin-left: 10px; }
7
-
8
- @for $i from 1 through 12 {
9
- .col-md-#{$i} {
10
- display: inline-block;
11
- .span.from_to {
12
- min-height: 1px !important;
13
- padding-top: 10px;
14
- margin-left: 10px;
15
- }
16
- }
17
- }
18
- }
19
- }
20
-
21
- .pagination {
22
- margin: 0 10px 0 0;
23
- padding: 0;
24
- }