best_in_place 3.1.1 → 4.0.0

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
- SHA1:
3
- metadata.gz: f42b596132f7b09be9241f0d8b0c51af70ddfc08
4
- data.tar.gz: de11ecdc29b0213492b844b18f20325eecdd931a
2
+ SHA256:
3
+ metadata.gz: bbdae997fd9415d9a651576e8793d828c11ce6dd0cc65aaa2430dde3e43b61d2
4
+ data.tar.gz: 51a853b0123110bfd6bf5808f6f3317bc319e4740726843874b30933b91e09db
5
5
  SHA512:
6
- metadata.gz: 39a699e70e97bd086678ff33d4831116258de870b3666292de2b1dd3d95a672f4239fcac73521a525faa5d1ae897b6174efee1ea7c990cac6c0d794d52de8d34
7
- data.tar.gz: 76e249d89a3376deb3d6a8ad4caeb9c387016ea28fa89d933459c741725ce1b5ecf6f4aebf22fce915a71809bca5e652736da633cc4bf53f52d8af97b1c7da4b
6
+ metadata.gz: 265f777bfee7c4148e2cd51021d6d7900abccff976c764980f90e9817262ba00360f3bd85749b16ca1a2664e05c3eaa62ae25f722c0148caf2dc9c2127c10909
7
+ data.tar.gz: 1b1bc9e112f87d80ba388636ba2138b06bf49de87cb9923bceaae654c8f2f4bf8a0409b2b14980d17e41d820a8244b22e81d0ca16a1a9442efad7b9fbabf5977
@@ -0,0 +1,50 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ test:
16
+ name: Ruby ${{ matrix.ruby }} - ${{ matrix.rails }}
17
+ runs-on: ubuntu-latest
18
+
19
+ strategy:
20
+ matrix:
21
+ ruby: [3.1, 3.2, 3.3]
22
+ rails:
23
+ - rails_7.0
24
+ - rails_7.1
25
+ - rails_7.2
26
+ - rails_edge
27
+ env:
28
+ RAILS_ENV: test
29
+ DISPLAY: ":99.0"
30
+ BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - name: Set up Ruby
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+
40
+ - name: Set up PhantomJS
41
+ run: |
42
+ mkdir -p travis-phantomjs
43
+ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
44
+ tar -xvf travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C travis-phantomjs
45
+ echo "$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin" >> $GITHUB_PATH
46
+
47
+ - name: Run tests
48
+ run: bundle exec rspec
49
+ env:
50
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
data/.gitignore CHANGED
@@ -8,7 +8,9 @@ spec/internal/.bundle
8
8
  spec/internal/db/*.sqlite3
9
9
  spec/internal/log/*.log
10
10
  spec/internal/tmp/**/*
11
+ spec/internal/local
11
12
 
12
13
  .rvmrc
13
14
  coverage
14
- tmp
15
+ tmp
16
+ failifier.txt
data/Appraisals CHANGED
@@ -1,31 +1,19 @@
1
- appraise "rails-3.2" do
2
- gem 'rails', github: "rails/rails", branch: '3-2-stable'
3
- gem 'strong_parameters'
4
- gem 'test-unit'
1
+ appraise "rails-7.0" do
2
+ gem 'sqlite3', '~> 1.4'
3
+ gem "rails", github: "rails/rails", branch: '7-0-stable'
5
4
  end
6
5
 
7
- appraise "rails-4.0" do
8
- gem "rails", github: "rails/rails", branch: '4-0-stable'
9
- gem 'test-unit'
6
+ appraise "rails-7.1" do
7
+ gem 'sqlite3', '~> 1.4'
8
+ gem "rails", '7.1.0' # issue with 7-1-stable
10
9
  end
11
10
 
12
- appraise "rails-4.1" do
13
- gem "rails", github: "rails/rails", branch: '4-1-stable'
14
- end
15
-
16
- appraise "rails-4.2" do
17
- gem "rails", github: "rails/rails", branch: '4-2-stable'
18
- end
19
-
20
- appraise "rails-5.0" do
21
- gem "rails", github: "rails/rails", branch: '5-0-stable'
22
- end
23
-
24
- appraise "rails-5.1" do
25
- gem "rails", github: "rails/rails", branch: '5-1-stable'
11
+ appraise "rails-7.2" do
12
+ gem 'sqlite3', '~> 1.4'
13
+ gem "rails", github: "rails/rails", branch: '7-2-stable'
26
14
  end
27
15
 
28
16
  appraise "rails-edge" do
29
- gem "rails", github: "rails/rails"
30
- gem 'arel', github: 'rails/arel'
17
+ gem 'sqlite3', '~> 1.4'
18
+ gem "rails", github: "rails/rails", branch: 'main'
31
19
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
1
  #Changelog
2
- - unreleased
2
+ - v.6.1.0
3
+ - Version set to the version of rails it matches to (given that is the usecase)
3
4
 
4
5
  - v.3.1.1
5
6
  - Chore/improve readme
data/Gemfile CHANGED
@@ -1,12 +1,11 @@
1
1
  source 'https://rubygems.org'
2
- source 'https://rails-assets.org'
3
2
 
4
3
  # Specify your gem's dependencies in best_in_place.gemspec
5
4
  gemspec
6
-
7
- gem 'activerecord'
8
- gem 'rails-assets-jquery', '1.11.1'
9
- gem 'rails-assets-jquery-ui', '1.10.4'
5
+ source 'https://rails-assets.org' do
6
+ gem 'rails-assets-jquery', '1.11.1'
7
+ gem 'rails-assets-jquery-ui', '1.10.4'
8
+ end
10
9
  gem 'rdiscount'
11
10
  gem 'rspec-rails'
12
11
  gem 'nokogiri'
@@ -18,6 +17,9 @@ gem 'sqlite3'
18
17
  gem 'appraisal'
19
18
  gem 'launchy'
20
19
 
20
+ gem 'puma'
21
+ gem 'phantomjs', :require => 'phantomjs/poltergeist'
22
+
21
23
  platforms :mri_21 do
22
24
  gem 'byebug'
23
25
  end
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
  [![Build Status](https://secure.travis-ci.org/bernat/best_in_place.png)](http://travis-ci.org/bernat/best_in_place)
3
3
  **The Unobtrusive in Place editing solution**
4
4
 
5
-
6
5
  ## Description
7
6
 
8
7
  **Best in Place** is a jQuery based AJAX Inplace-Editor that takes profit of RESTful server-side controllers to allow users to edit stuff with
@@ -20,27 +19,31 @@ The editor works by PUTting the updated value to the server and GETting the upda
20
19
  Installing *best_in_place* is very easy and straight-forward.
21
20
  Just begin including the gem in your Gemfile:
22
21
 
23
- gem 'best_in_place', '~> 3.0.1'
22
+ gem 'best_in_place', '~> 4.0'
24
23
 
25
24
  After that, specify the use of the jquery and best in place
26
25
  javascripts in your application.js, and optionally specify jquery-ui if
27
26
  you want to use jQuery UI datepickers:
28
27
 
29
- //= require jquery
30
- //= require best_in_place
28
+ ```javascript
29
+ //= require jquery
30
+ //= require best_in_place
31
31
 
32
- //= require jquery-ui
33
- //= require best_in_place.jquery-ui
32
+ //= require jquery-ui
33
+ //= require best_in_place.jquery-ui
34
+ ```
34
35
 
35
36
  If you want to use jQuery UI datepickers, you should also install and
36
37
  load your preferred jquery-ui CSS file and associated assets.
37
38
 
38
39
  Then, just add a binding to prepare all best in place fields when the document is ready:
39
40
 
40
- $(document).ready(function() {
41
- /* Activating Best In Place */
42
- jQuery(".best_in_place").best_in_place();
43
- });
41
+ ```javascript
42
+ $(document).ready(function() {
43
+ /* Activating Best In Place */
44
+ jQuery(".best_in_place").best_in_place();
45
+ });
46
+ ```
44
47
 
45
48
  You are done!
46
49
 
@@ -104,7 +107,9 @@ If you provide an option that is not explicitly a best_in_place option it will b
104
107
 
105
108
  So, for instance, if you want to add an HTML tab index to the best_in_place span just add it to your method call:
106
109
 
107
- <%= best_in_place @user, :name, tabindex: "1" %>
110
+ ```erb
111
+ <%= best_in_place @user, :name, tabindex: "1" %>
112
+ ```
108
113
 
109
114
  ### best_in_place_if
110
115
  **best_in_place_if condition, object, field, OPTIONS**
@@ -118,15 +123,21 @@ condition, is satisfied. Specifically:
118
123
 
119
124
  Say we have something like
120
125
 
121
- <%= best_in_place_if condition, @user, :name, :as => :input %>
126
+ ```erb
127
+ <%= best_in_place_if condition, @user, :name, :as => :input %>
128
+ ```
122
129
 
123
130
  In case *condition* is satisfied, the outcome will be just the same as:
124
131
 
125
- <%= best_in_place @user, :name, :as => :input %>
132
+ ```erb
133
+ <%= best_in_place @user, :name, :as => :input %>
134
+ ```
126
135
 
127
136
  Otherwise, we will have the same outcome as:
128
137
 
129
- <%= @user.name %>
138
+ ```erb
139
+ <%= @user.name %>
140
+ ```
130
141
 
131
142
  It is a very useful feature to use with, for example, [Ryan Bates](https://github.com/ryanb)' [CanCan](https://github.com/ryanb/cancan), so we only allow BIP edition if the current user has permission to do it.
132
143
 
@@ -138,41 +149,53 @@ Examples (code in the views):
138
149
 
139
150
  ### Input
140
151
 
141
- <%= best_in_place @user, :name, :as => :input %>
152
+ ```erb
153
+ <%= best_in_place @user, :name, :as => :input %>
142
154
 
143
- <%= best_in_place @user, :name, :as => :input, :place_holder => "Click me to add content!" %>
155
+ <%= best_in_place @user, :name, :as => :input, :place_holder => "Click me to add content!" %>
156
+ ```
144
157
 
145
158
  ### Textarea
146
159
 
147
- <%= best_in_place @user, :description, :as => :textarea %>
160
+ ```erb
161
+ <%= best_in_place @user, :description, :as => :textarea %>
148
162
 
149
- <%= best_in_place @user, :favorite_books, :as => :textarea, :ok_button => 'Save', :cancel_button => 'Cancel' %>
163
+ <%= best_in_place @user, :favorite_books, :as => :textarea, :ok_button => 'Save', :cancel_button => 'Cancel' %>
164
+ ```
150
165
 
151
166
  ### Select
152
167
 
153
- <%= best_in_place @user, :country, :as => :select, :collection => {"1" => "Spain", "2" => "Italy", "3" => "Germany", "4" => "France"} %>
154
- <%= best_in_place @user, :country, :as => :select, :collection => { es: 'Spain', it: 'Italy', de: 'Germany', fr: 'France' } %>
155
- <%= best_in_place @user, :country, :as => :select, :collection => %w(Spain Italy Germany France) %>
156
- <%= best_in_place @user, :country, :as => :select, :collection => [[1, 'Spain'], [3, 'Germany'], [2, 'Italy'], [4, 'France']] %>
168
+ ```erb
169
+ <%= best_in_place @user, :country, :as => :select, :collection => {"1" => "Spain", "2" => "Italy", "3" => "Germany", "4" => "France"} %>
170
+ <%= best_in_place @user, :country, :as => :select, :collection => { es: 'Spain', it: 'Italy', de: 'Germany', fr: 'France' } %>
171
+ <%= best_in_place @user, :country, :as => :select, :collection => %w(Spain Italy Germany France) %>
172
+ <%= best_in_place @user, :country, :as => :select, :collection => [[1, 'Spain'], [3, 'Germany'], [2, 'Italy'], [4, 'France']] %>
173
+ ```
157
174
 
158
175
  Of course it can take an instance or global variable for the collection, just remember the structure is a hash.
159
176
  The value will always be converted to a string for display.
160
177
 
161
178
  ### Checkbox
162
179
 
163
- <%= best_in_place @user, :receive_emails, as: :checkbox, collection: ["No, thanks", "Yes, of course!"] %>
164
- <%= best_in_place @user, :receive_emails, as: :checkbox, collection: {false: "Nope", true: "Yep"} %>
180
+ ```erb
181
+ <%= best_in_place @user, :receive_emails, as: :checkbox, collection: ["No, thanks", "Yes, of course!"] %>
182
+ <%= best_in_place @user, :receive_emails, as: :checkbox, collection: {false: "Nope", true: "Yep"} %>
183
+ ```
165
184
 
166
185
  If you use array as a collection, the first value is always the negative boolean value and the second the positive. Structure: `["false value", "true value"]`.
167
186
  If not defined, it will default to *Yes* and *No* options.
168
187
  Default true and false values are stored in locales
169
188
 
170
- t(:'best_in_place.yes', default: 'Yes')
171
- t(:'best_in_place.no', default: 'No')
189
+ ```ruby
190
+ t(:'best_in_place.yes', default: 'Yes')
191
+ t(:'best_in_place.no', default: 'No')
192
+ ```
172
193
 
173
194
  ### Date
174
195
 
175
- <%= best_in_place @user, :birth_date, :as => :date %>
196
+ ```erb
197
+ <%= best_in_place @user, :birth_date, :as => :date %>
198
+ ```
176
199
 
177
200
  With the :date type the input field will be initialized as a datepicker input.
178
201
  In order to provide custom options to the datepicker initialization you must
@@ -187,20 +210,21 @@ Best in place provides a utility method you should use in your controller in
187
210
  order to provide the response that is expected by the javascript side, using
188
211
  the :json format. This is a simple example showing an update action using it:
189
212
 
190
- def update
191
- @user = User.find params[:id]
192
-
193
- respond_to do |format|
194
- if @user.update_attributes(params[:user])
195
- format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
196
- format.json { respond_with_bip(@user) }
197
- else
198
- format.html { render :action => "edit" }
199
- format.json { respond_with_bip(@user) }
200
- end
201
- end
213
+ ```ruby
214
+ def update
215
+ @user = User.find params[:id]
216
+
217
+ respond_to do |format|
218
+ if @user.update_attributes(params[:user])
219
+ format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
220
+ format.json { respond_with_bip(@user) }
221
+ else
222
+ format.html { render :action => "edit" }
223
+ format.json { respond_with_bip(@user) }
202
224
  end
203
-
225
+ end
226
+ end
227
+ ```
204
228
 
205
229
  ## Custom display methods
206
230
 
@@ -209,7 +233,9 @@ the :json format. This is a simple example showing an update action using it:
209
233
  As of best in place 1.0.3 you can use custom methods in your model in order to
210
234
  decide how a certain field has to be displayed. You can write something like:
211
235
 
212
- = best_in_place @user, :description, :as => :textarea, :display_as => :mk_description
236
+ ```
237
+ = best_in_place @user, :description, :as => :textarea, :display_as => :mk_description
238
+ ```
213
239
 
214
240
  Then instead of using `@user.description` to show the actual value, best in
215
241
  place will call `@user.mk_description`. This can be used for any kind of
@@ -222,16 +248,22 @@ helper to render the attribute, like `number_to_currency` or `simple_format`.
222
248
  As of version 1.0.4 best in place provides this feature using the
223
249
  `display_with` option. You can use it like this:
224
250
 
225
- = best_in_place @user, :money, :display_with => :number_to_currency
251
+ ```
252
+ = best_in_place @user, :money, :display_with => :number_to_currency
253
+ ```
226
254
 
227
255
  If you want to pass further arguments to the helper you can do it providing an
228
256
  additional `helper_options` hash:
229
257
 
230
- = best_in_place @user, :money, :display_with => :number_to_currency, :helper_options => {:unit => "€"}
258
+ ```
259
+ = best_in_place @user, :money, :display_with => :number_to_currency, :helper_options => {:unit => "€"}
260
+ ```
231
261
 
232
262
  You can also pass in a proc or lambda like this:
233
263
 
234
- = best_in_place @post, :body, :display_with => lambda { |v| textilize(v).html_safe }
264
+ ```
265
+ = best_in_place @post, :body, :display_with => lambda { |v| textilize(v).html_safe }
266
+ ```
235
267
 
236
268
  ## Ajax success callback
237
269
 
@@ -239,26 +271,35 @@ You can also pass in a proc or lambda like this:
239
271
 
240
272
  The 'ajax:success' event is triggered upon success. Use bind:
241
273
 
242
- $('.best_in_place').bind("ajax:success", function () {$(this).closest('tr').effect('highlight'); });
274
+ ```javascript
275
+ $('.best_in_place').bind("ajax:success", function () {$(this).closest('tr').effect('highlight'); });
276
+ ```
243
277
 
244
278
  To bind a callback that is specific to a particular field, use the 'classes' option in the helper method and
245
279
  then bind to that class.
246
280
 
247
- <%= best_in_place @user, :name, :classes => 'highlight_on_success' %>
248
- <%= best_in_place @user, :mail, :classes => 'bounce_on_success' %>
249
-
250
- $('.highlight_on_success').bind("ajax:success", function(){$(this).closest('tr').effect('highlight');});
251
- $('.bounce_on_success').bind("ajax:success", function(){$(this).closest('tr').effect('bounce');});
281
+ ```erb
282
+ <%= best_in_place @user, :name, :classes => 'highlight_on_success' %>
283
+ <%= best_in_place @user, :mail, :classes => 'bounce_on_success' %>
284
+ ```
285
+ ```javascript
286
+ $('.highlight_on_success').bind("ajax:success", function(){$(this).closest('tr').effect('highlight');});
287
+ $('.bounce_on_success').bind("ajax:success", function(){$(this).closest('tr').effect('bounce');});
288
+ ```
252
289
 
253
290
  ### Providing data to the callback
254
291
 
255
292
  Use the :data option to add HTML5 data attributes to the best_in_place span. For example, in your view:
256
293
 
257
- <%= best_in_place @user, :name, :data => {:user_name => @user.name} %>
294
+ ```erb
295
+ <%= best_in_place @user, :name, :data => {:user_name => @user.name} %>
296
+ ```
258
297
 
259
298
  And in your javascript:
260
299
 
261
- $('.best_in_place').bind("ajax:success", function(){ alert('Name updated for '+$(this).data('userName')); });
300
+ ```javascript
301
+ $('.best_in_place').bind("ajax:success", function(){ alert('Name updated for '+$(this).data('userName')); });
302
+ ```
262
303
 
263
304
  ## Non Active Record environments
264
305
  We are not planning to support other ORMs apart from Active Record, at least for now. So, you can perfectly consider the following workaround as *the right way* until a specific implementation is done for your ORM.
@@ -267,68 +308,75 @@ Best In Place automatically assumes that Active Record is the ORM you are using.
267
308
 
268
309
  Let's setup an example so we can illustrate how to use Best In Place too in a non-ORM case. Imagine you have an awesome ice cream shop, and you have a model representing a single type of ice cream. The IceCream model has a name, a description, a... nevermind. The thing is that it also has a stock, which is a combination of flavour and size. A big chocolate ice cream (yummy!), a small paella ice cream (...really?), and so on. Shall we see some code?
269
310
 
270
- class IceCream < ActiveRecord::Base
271
- serialize :stock, Hash
311
+ ```ruby
312
+ class IceCream < ActiveRecord::Base
313
+ serialize :stock, Hash
272
314
 
273
- # consider the get_stock and set_stock methods are already defined
274
- end
315
+ # consider the get_stock and set_stock methods are already defined
316
+ end
317
+ ```
275
318
 
276
319
  Imagine we want to have a grid showing all the combinations of flavour and size and, for each combination, an editable stock. Since the stock for a flavour and a size is not a single and complete model attribute, we cannot use Best In Place *directly*. But we can set it up with an easy workaround.
277
320
 
278
321
  In the view, we'd do:
279
322
 
280
- // @ice_cream is already available
281
- - flavours = ... // get them somewhere
282
- - sizes = ... // get them somewhere
283
- table
284
- tr
285
- - flavours.each do |flavour|
286
- th= flavour
287
- - sizes.each do |size|
288
- tr
289
- th= size
290
- - flavours.each do |flavour|
291
- - v = @ice_cream.get_stock(flavour: flavour, size: size)
292
- td= best_in_place v, :to_i, as: :input, url: set_stock_ice_cream_path(flavour: flavour, size: size)
323
+ ```slim
324
+ // @ice_cream is already available
325
+ - flavours = ... // get them somewhere
326
+ - sizes = ... // get them somewhere
327
+ table
328
+ tr
329
+ - flavours.each do |flavour|
330
+ th= flavour
331
+ - sizes.each do |size|
332
+ tr
333
+ th= size
334
+ - flavours.each do |flavour|
335
+ - v = @ice_cream.get_stock(flavour: flavour, size: size)
336
+ td= best_in_place v, :to_i, as: :input, url: set_stock_ice_cream_path(flavour: flavour, size: size)
337
+ ```
293
338
 
294
339
  Now we need a route to which send the stock updates:
295
340
 
296
- TheAwesomeIceCreamShop::Application.routes.draw do
297
- ...
298
-
299
- resources :ice_creams, :only => :none do
300
- member do
301
- put :set_stock
302
- end
303
- end
341
+ ```ruby
342
+ TheAwesomeIceCreamShop::Application.routes.draw do
343
+ ...
304
344
 
305
- ...
345
+ resources :ice_creams, :only => :none do
346
+ member do
347
+ put :set_stock
306
348
  end
349
+ end
307
350
 
308
- And finally we need a controller:
351
+ ...
352
+ end
353
+ ```
309
354
 
355
+ And finally we need a controller:
310
356
 
311
- class IceCreamsController < ApplicationController::Base
312
- respond_to :html, :json
357
+ ```ruby
358
+ class IceCreamsController < ApplicationController::Base
359
+ respond_to :html, :json
313
360
 
314
- ...
361
+ ...
315
362
 
316
- def set_stock
317
- flavour = params[:flavour]
318
- size = params[:size]
319
- new_stock = (params["fixnum"] || {})["to_i"]
363
+ def set_stock
364
+ flavour = params[:flavour]
365
+ size = params[:size]
366
+ new_stock = (params["fixnum"] || {})["to_i"]
320
367
 
321
- @ice_cream.set_stock(new_stock, { :flavour => flavour, :size => size })
322
- if @ice_cream.save
323
- head :ok
324
- else
325
- render :json => @ice_cream.errors.full_messages, :status => :unprocessable_entity
326
- end
327
- end
368
+ @ice_cream.set_stock(new_stock, { :flavour => flavour, :size => size })
369
+ if @ice_cream.save
370
+ head :ok
371
+ else
372
+ render :json => @ice_cream.errors.full_messages, :status => :unprocessable_entity
373
+ end
374
+ end
328
375
 
329
- ...
376
+ ...
330
377
 
331
- end
378
+ end
379
+ ```
332
380
 
333
381
  And this is how it is done!
334
382
 
@@ -336,11 +384,12 @@ And this is how it is done!
336
384
 
337
385
  You can configure some global options for best_in_place. Currently these options are available:
338
386
 
339
- BestInPlace.configure do |config|
340
- config.container = :div
341
- config.skip_blur = true
342
- end
343
-
387
+ ```ruby
388
+ BestInPlace.configure do |config|
389
+ config.container = :div
390
+ config.skip_blur = true
391
+ end
392
+ ```
344
393
 
345
394
  ## Notification
346
395
 
@@ -348,8 +397,10 @@ Sometimes your in-place updates will fail due to validation or for some other re
348
397
 
349
398
  To opt into the jquery.purr error notification, just add best_in_place.purr to your javascripts, as described below.
350
399
 
351
- //= require jquery.purr
352
- //= require best_in_place.purr
400
+ ```javascript
401
+ //= require jquery.purr
402
+ //= require best_in_place.purr
403
+ ```
353
404
 
354
405
  If you'd like to develop your own custom form of error notification, you can use best_in_place.purr as an example to guide you.
355
406
 
@@ -357,8 +408,10 @@ If you'd like to develop your own custom form of error notification, you can use
357
408
 
358
409
  If the script is used with the Rails Gem no html tags will be allowed unless the sanitize option is set to true, in that case only the tags [*b i u s a strong em p h1 h2 h3 h4 h5 ul li ol hr pre span img*] will be allowed. If the script is used without the gem and with frameworks other than Rails, then you should make sure you are providing the csrf authenticity params as meta tags and you should always escape undesired html tags such as script, object and so forth.
359
410
 
360
- <meta name="csrf-param" content="authenticity_token"/>
361
- <meta name="csrf-token" content="YOUR UNIQUE TOKEN HERE"/>
411
+ ```html
412
+ <meta name="csrf-param" content="authenticity_token"/>
413
+ <meta name="csrf-token" content="YOUR UNIQUE TOKEN HERE"/>
414
+ ```
362
415
 
363
416
  ---
364
417
 
@@ -1,6 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require 'best_in_place/version'
1
+ require_relative 'lib/best_in_place/version'
4
2
 
5
3
  Gem::Specification.new do |s|
6
4
  s.name = "best_in_place"
@@ -8,7 +6,7 @@ Gem::Specification.new do |s|
8
6
  s.platform = Gem::Platform::RUBY
9
7
  s.authors = ["Bernat Farrero"]
10
8
  s.email = ["bernat@itnig.net"]
11
- s.homepage = "http://github.com/bernat/best_in_place"
9
+ s.homepage = "https://github.com/bernat/best_in_place"
12
10
  s.summary = <<SUM
13
11
  It makes any field in place editable by clicking on it, it works for inputs,
14
12
  textareas, select dropdowns and checkboxes
@@ -24,7 +22,8 @@ DESC
24
22
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
23
  s.require_paths = ["lib"]
26
24
 
27
- s.add_runtime_dependency 'actionpack', '>= 3.2'
28
- s.add_runtime_dependency 'railties', '>= 3.2'
25
+ s.required_ruby_version = '>= 3.1.0'
29
26
 
27
+ s.add_runtime_dependency 'actionpack', '>= 7.0'
28
+ s.add_runtime_dependency 'railties', '>= 7.0'
30
29
  end
@@ -16,12 +16,15 @@ gem "poltergeist"
16
16
  gem "sqlite3"
17
17
  gem "appraisal"
18
18
  gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "3-2-stable"
20
- gem "strong_parameters"
21
- gem "test-unit"
19
+ gem "rails", github: "rails/rails", branch: "6-1-stable"
22
20
 
23
21
  platforms :mri_21 do
24
22
  gem "byebug"
25
23
  end
26
24
 
25
+
26
+ gem 'puma'
27
+ gem 'phantomjs', :require => 'phantomjs/poltergeist'
28
+
29
+
27
30
  gemspec path: "../"
@@ -3,7 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
  source "https://rails-assets.org"
5
5
 
6
- gem "activerecord"
7
6
  gem "rails-assets-jquery", "1.11.1"
8
7
  gem "rails-assets-jquery-ui", "1.10.4"
9
8
  gem "rdiscount"
@@ -13,11 +12,12 @@ gem "combustion"
13
12
  gem "sprockets-rails"
14
13
  gem "capybara"
15
14
  gem "poltergeist"
16
- gem "sqlite3"
15
+ gem "sqlite3", "~> 1.4"
17
16
  gem "appraisal"
18
17
  gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "4-0-stable"
20
- gem "test-unit"
18
+ gem "puma"
19
+ gem "phantomjs", require: "phantomjs/poltergeist"
20
+ gem "rails", github: "rails/rails", branch: "7-0-stable"
21
21
 
22
22
  platforms :mri_21 do
23
23
  gem "byebug"
@@ -3,7 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
  source "https://rails-assets.org"
5
5
 
6
- gem "activerecord"
7
6
  gem "rails-assets-jquery", "1.11.1"
8
7
  gem "rails-assets-jquery-ui", "1.10.4"
9
8
  gem "rdiscount"
@@ -13,10 +12,12 @@ gem "combustion"
13
12
  gem "sprockets-rails"
14
13
  gem "capybara"
15
14
  gem "poltergeist"
16
- gem "sqlite3"
15
+ gem "sqlite3", "~> 1.4"
17
16
  gem "appraisal"
18
17
  gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "4-2-stable"
18
+ gem "puma"
19
+ gem "phantomjs", require: "phantomjs/poltergeist"
20
+ gem "rails", "7.1.0"
20
21
 
21
22
  platforms :mri_21 do
22
23
  gem "byebug"
@@ -3,7 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
  source "https://rails-assets.org"
5
5
 
6
- gem "activerecord"
7
6
  gem "rails-assets-jquery", "1.11.1"
8
7
  gem "rails-assets-jquery-ui", "1.10.4"
9
8
  gem "rdiscount"
@@ -13,10 +12,12 @@ gem "combustion"
13
12
  gem "sprockets-rails"
14
13
  gem "capybara"
15
14
  gem "poltergeist"
16
- gem "sqlite3"
15
+ gem "sqlite3", "~> 1.4"
17
16
  gem "appraisal"
18
17
  gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "4-1-stable"
18
+ gem "puma"
19
+ gem "phantomjs", require: "phantomjs/poltergeist"
20
+ gem "rails", github: "rails/rails", branch: "7-2-stable"
20
21
 
21
22
  platforms :mri_21 do
22
23
  gem "byebug"
@@ -3,7 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
  source "https://rails-assets.org"
5
5
 
6
- gem "activerecord"
7
6
  gem "rails-assets-jquery", "1.11.1"
8
7
  gem "rails-assets-jquery-ui", "1.10.4"
9
8
  gem "rdiscount"
@@ -13,11 +12,12 @@ gem "combustion"
13
12
  gem "sprockets-rails"
14
13
  gem "capybara"
15
14
  gem "poltergeist"
16
- gem "sqlite3"
15
+ gem "sqlite3", "~> 1.4"
17
16
  gem "appraisal"
18
17
  gem "launchy"
19
- gem "rails", github: "rails/rails"
20
- gem "arel", github: "rails/arel"
18
+ gem "puma"
19
+ gem "phantomjs", require: "phantomjs/poltergeist"
20
+ gem "rails", github: "rails/rails", branch: "main"
21
21
 
22
22
  platforms :mri_21 do
23
23
  gem "byebug"
@@ -30,15 +30,15 @@ module BestInPlace
30
30
  end
31
31
 
32
32
  def add_model_method(klass, attr, display_as)
33
- model_attributes(klass)[attr.to_s] = Renderer.new method: display_as.to_sym, type: :model
33
+ model_attributes(klass)[attr.to_s] = Renderer.new({ method: display_as.to_sym, type: :model })
34
34
  end
35
35
 
36
36
  def add_helper_method(klass, attr, helper_method, helper_options = nil)
37
- model_attributes(klass)[attr.to_s] = Renderer.new method: helper_method.to_sym, type: :helper, attr: attr, helper_options: helper_options
37
+ model_attributes(klass)[attr.to_s] = Renderer.new({ method: helper_method.to_sym, type: :helper, attr: attr, helper_options: helper_options })
38
38
  end
39
39
 
40
40
  def add_helper_proc(klass, attr, helper_proc)
41
- model_attributes(klass)[attr.to_s] = Renderer.new type: :proc, attr: attr, proc: helper_proc
41
+ model_attributes(klass)[attr.to_s] = Renderer.new({ type: :proc, attr: attr, proc: helper_proc })
42
42
  end
43
43
 
44
44
  def model_attributes(klass)
@@ -1,8 +1,8 @@
1
1
  module BestInPlace
2
2
  class Engine < Rails::Engine
3
3
  initializer 'best_in_place' do
4
- ActionView::Base.send(:include, BestInPlace::Helper)
5
- ActionController::Base.send(:include, BestInPlace::ControllerExtensions)
4
+ ActiveSupport.on_load(:action_view) { include BestInPlace::Helper }
5
+ ActiveSupport.on_load(:action_controller_base) { include BestInPlace::ControllerExtensions }
6
6
  end
7
7
  end
8
8
  end
@@ -149,10 +149,11 @@ module BestInPlace
149
149
  {from: :sanitize, to: :raw}
150
150
  ]
151
151
 
152
+ deprecator = ActiveSupport::Deprecation.new
152
153
  deprecations.each do |deprecation|
153
154
  if deprecated_option = opts.delete(deprecation[:from])
154
155
  opts[deprecation[:from]] = deprecated_option
155
- ActiveSupport::Deprecation.warn("[Best_in_place] :#{deprecation[:from]} is deprecated in favor of :#{deprecation[:to]} ")
156
+ deprecator.warn("[Best_in_place] :#{deprecation[:from]} is deprecated in favor of :#{deprecation[:to]} ")
156
157
  end
157
158
  end
158
159
  end
@@ -4,7 +4,7 @@ require 'action_view/base'
4
4
  module BestInPlace
5
5
  class Railtie < ::Rails::Railtie #:nodoc:
6
6
  config.after_initialize do
7
- BestInPlace::ViewHelpers = ActionView::Base.new
7
+ BestInPlace::ViewHelpers = ActionView::Base.empty
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module BestInPlace
4
4
 
5
5
  def bip_area(model, attr, new_value)
6
6
  id = BestInPlace::Utils.build_best_in_place_id model, attr
7
- find("##{id}").trigger('click')
7
+ page.find("##{id}").click
8
8
  execute_script <<-JS
9
9
  $("##{id} form textarea").val('#{escape_javascript new_value.to_s}');
10
10
  $("##{id} form textarea").blur();
@@ -24,13 +24,13 @@ module BestInPlace
24
24
 
25
25
  def bip_bool(model, attr)
26
26
  id = BestInPlace::Utils.build_best_in_place_id model, attr
27
- find("##{id}").trigger('click')
27
+ find("##{id}").click
28
28
  wait_for_ajax
29
29
  end
30
30
 
31
31
  def bip_select(model, attr, name)
32
32
  id = BestInPlace::Utils.build_best_in_place_id model, attr
33
- find("##{id}").trigger('click')
33
+ find("##{id}").click
34
34
  find("##{id}").select(name)
35
35
  wait_for_ajax
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module BestInPlace
2
- VERSION = '3.1.1'
2
+ VERSION = '4.0.0'
3
3
  end
data/spec/helper_spec.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  describe BestInPlace::Helper, type: :helper do
4
4
  describe "#best_in_place" do
5
5
  before do
6
-
7
6
  @user = User.new :name => "Lucia",
8
7
  :last_name => "Napoli",
9
8
  :email => "lucianapoli@gmail.com",
@@ -32,7 +31,7 @@ describe BestInPlace::Helper, type: :helper do
32
31
  end
33
32
 
34
33
  it "should show deprecation warning" do
35
- expect(ActiveSupport::Deprecation).to receive(:warn).with("[Best_in_place] :path is deprecated in favor of :url ")
34
+ expect_any_instance_of(ActiveSupport::Deprecation).to receive(:warn).with("[Best_in_place] :path is deprecated in favor of :url ")
36
35
 
37
36
  helper.best_in_place @user, :name, path: "http://example.com"
38
37
  end
@@ -94,7 +93,6 @@ describe BestInPlace::Helper, type: :helper do
94
93
  expect(@span.attribute("data-bip-inner-class")).to be_nil
95
94
  end
96
95
 
97
-
98
96
  it "should have be sanitized by default" do
99
97
  expect(@span.attribute("data-bip-raw")).to be_nil
100
98
  end
@@ -336,7 +334,7 @@ describe BestInPlace::Helper, type: :helper do
336
334
  end
337
335
 
338
336
  it "should render the date as text" do
339
- expect(@span.text).to eq(@user.birth_date.to_date.to_s)
337
+ expect(@span.text).to eq(@user.birth_date.utc.to_s)
340
338
  end
341
339
 
342
340
  it "should have a date data-bip-type" do
@@ -16,13 +16,12 @@ describe "JS behaviour", :js => true do
16
16
  it "should be able to use bip_text to update a text area" do
17
17
  @user.save!
18
18
  visit user_path(@user)
19
- expect(find('#description')).to have_content('User description')
19
+ expect(page.find('#description')).to have_content('User description')
20
20
 
21
21
  bip_area @user, :description, "A new description"
22
22
 
23
23
  visit user_path(@user)
24
-
25
- expect(find('#description')).to have_content('A new description')
24
+ expect(page.find('#description')).to have_content('A new description')
26
25
  end
27
26
 
28
27
  it "should be able to use a bip_text with :display_with option" do
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
3
+ //= link_directory ../javascripts .js
@@ -8,7 +8,7 @@ class Admin::TestResultsController < ApplicationController
8
8
 
9
9
  def update
10
10
  @test_result = TestResult.find(params[:id])
11
- @test_result.update_attributes(test_result_params)
11
+ @test_result.update(test_result_params)
12
12
  respond_to do |format|
13
13
  format.json { respond_with_bip(@test_result) }
14
14
  end
@@ -6,7 +6,7 @@ class Admin::UsersController < ApplicationController
6
6
  def update
7
7
  @user = User.find(params[:id])
8
8
  respond_to do |format|
9
- @user.update_attributes(user_params)
9
+ @user.update(user_params)
10
10
  format.json { respond_with_bip(@user, param: :admin) }
11
11
  end
12
12
  end
@@ -8,7 +8,7 @@ module Cuca
8
8
  @car = Car.find params[:id]
9
9
 
10
10
  respond_to do |format|
11
- @car.update_attributes params[:cuca_car]
11
+ @car.update params[:cuca_car]
12
12
  format.json { respond_with_bip(@car) }
13
13
  end
14
14
  end
@@ -46,9 +46,10 @@ class UsersController < ApplicationController
46
46
  # PUT /users/1.xml
47
47
  def update
48
48
  @user = User.find(params[:id])
49
+ # puts "RUNNING UPDATE: #{user_params.inspect}"
49
50
 
50
51
  respond_to do |format|
51
- if @user.update_attributes(user_params)
52
+ if @user.update(user_params)
52
53
  format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
53
54
  format.json { respond_with_bip(@user) }
54
55
  else
@@ -96,13 +96,13 @@
96
96
  <tr>
97
97
  <td>User description</td>
98
98
  <td id="description">
99
- <%= best_in_place @user, :description, :display_as => :markdown_desc, as: :textarea, :raw => true %>
99
+ <%= best_in_place @user, :description, as: :textarea, raw: true %>
100
100
  </td>
101
101
  </tr>
102
102
  <tr>
103
103
  <td>Simple-formatted user description</td>
104
104
  <td id="dw_description">
105
- <%= best_in_place @user, :description_simple, :display_with => :simple_format, as: :textarea %>
105
+ <%= best_in_place @user, :description_simple, display_with: :simple_format, as: :textarea %>
106
106
  </td>
107
107
  </tr>
108
108
  <tr>
@@ -1,8 +1,9 @@
1
1
  if ENV['dev']
2
2
  Rails.application.configure do
3
+ config.assets.enabled = true
3
4
  config.cache_classes = false
4
5
  config.eager_load = false
5
- config.assets.debug = true
6
+ config.assets.debug = false
6
7
  end
7
8
  end
8
- I18n.enforce_available_locales = true
9
+ I18n.enforce_available_locales = true
data/spec/rails_helper.rb CHANGED
@@ -1,9 +1,7 @@
1
- ENV['RAILS_ENV'] ||= 'test'
2
-
3
1
  require 'combustion'
4
2
  require 'capybara/rspec'
5
-
6
3
  require 'capybara/poltergeist'
4
+
7
5
  require_relative 'support/screenshot'
8
6
  Capybara.register_driver :poltergeist do |app|
9
7
  Capybara::Poltergeist::Driver.new(app, {js_errors: false, inspector: true})
@@ -25,11 +23,11 @@ require 'capybara/rails'
25
23
  require 'best_in_place/test_helpers'
26
24
  require_relative 'support/retry_on_timeout'
27
25
 
28
-
29
26
  RSpec.configure do |config|
30
27
  config.include BestInPlace::TestHelpers
31
28
  config.use_transactional_fixtures = false
32
29
  config.raise_errors_for_deprecations!
30
+ config.example_status_persistence_file_path = "failifier.txt"
33
31
 
34
32
  config.filter_run focus: true
35
33
  config.run_all_when_everything_filtered = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: best_in_place
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernat Farrero
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '7.0'
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: '3.2'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '7.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.2'
40
+ version: '7.0'
41
41
  description: |2
42
42
  BestInPlace is a jQuery script and a Rails helper that provide the method best_in_place to display
43
43
  any object field easily editable for the user by just clicking on it. It supports input data,
@@ -48,9 +48,9 @@ executables: []
48
48
  extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
+ - ".github/workflows/rspec.yml"
51
52
  - ".gitignore"
52
53
  - ".rspec"
53
- - ".travis.yml"
54
54
  - Appraisals
55
55
  - CHANGELOG.md
56
56
  - Gemfile
@@ -58,12 +58,10 @@ files:
58
58
  - Rakefile
59
59
  - best_in_place.gemspec
60
60
  - config.ru
61
- - gemfiles/rails_3.2.gemfile
62
- - gemfiles/rails_4.0.gemfile
63
- - gemfiles/rails_4.1.gemfile
64
- - gemfiles/rails_4.2.gemfile
65
- - gemfiles/rails_5.0.gemfile
66
- - gemfiles/rails_5.1.gemfile
61
+ - gemfiles/rails_6.1.gemfile
62
+ - gemfiles/rails_7.0.gemfile
63
+ - gemfiles/rails_7.1.gemfile
64
+ - gemfiles/rails_7.2.gemfile
67
65
  - gemfiles/rails_edge.gemfile
68
66
  - lib/assets/javascripts/best_in_place.jquery-ui.js
69
67
  - lib/assets/javascripts/best_in_place.js
@@ -84,6 +82,7 @@ files:
84
82
  - spec/integration/new_record_spec.rb
85
83
  - spec/integration/placeholder_spec.rb
86
84
  - spec/integration/text_area_spec.rb
85
+ - spec/internal/app/assets/config/manifest.js
87
86
  - spec/internal/app/assets/images/info.png
88
87
  - spec/internal/app/assets/images/no.png
89
88
  - spec/internal/app/assets/images/purrBottom.png
@@ -145,10 +144,10 @@ files:
145
144
  - spec/utils_spec.rb
146
145
  - vendor/assets/javascripts/jquery.autosize.js
147
146
  - vendor/assets/javascripts/jquery.purr.js
148
- homepage: http://github.com/bernat/best_in_place
147
+ homepage: https://github.com/bernat/best_in_place
149
148
  licenses: []
150
149
  metadata: {}
151
- post_install_message:
150
+ post_install_message:
152
151
  rdoc_options: []
153
152
  require_paths:
154
153
  - lib
@@ -156,16 +155,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
155
  requirements:
157
156
  - - ">="
158
157
  - !ruby/object:Gem::Version
159
- version: '0'
158
+ version: 3.1.0
160
159
  required_rubygems_version: !ruby/object:Gem::Requirement
161
160
  requirements:
162
161
  - - ">="
163
162
  - !ruby/object:Gem::Version
164
163
  version: '0'
165
164
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.6.8
168
- signing_key:
165
+ rubygems_version: 3.5.11
166
+ signing_key:
169
167
  specification_version: 4
170
168
  summary: It makes any field in place editable by clicking on it, it works for inputs,
171
169
  textareas, select dropdowns and checkboxes
data/.travis.yml DELETED
@@ -1,34 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- rvm:
5
- - 2.4.1
6
- - 2.3.3
7
- - 2.2.7
8
-
9
- env: "RAILS_ENV=test DISPLAY=:99.0"
10
- gemfile:
11
- - gemfiles/rails_3.2.gemfile
12
- - gemfiles/rails_4.0.gemfile
13
- - gemfiles/rails_4.1.gemfile
14
- - gemfiles/rails_4.2.gemfile
15
- - gemfiles/rails_5.0.gemfile
16
- - gemfiles/rails_5.1.gemfile
17
- - gemfiles/rails_edge.gemfile
18
-
19
- matrix:
20
- allow_failures:
21
- - gemfile: gemfiles/rails_edge.gemfile
22
- exclude:
23
- - rvm: 2.4.1
24
- gemfile: gemfiles/rails_3.2.gemfile
25
- - rvm: 2.4.1
26
- gemfile: gemfiles/rails_4.0.gemfile
27
- - rvm: 2.4.1
28
- gemfile: gemfiles/rails_4.1.gemfile
29
-
30
- before_install:
31
- - mkdir travis-phantomjs
32
- - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
33
- - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
34
- - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
@@ -1,25 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
- source "https://rails-assets.org"
5
-
6
- gem "activerecord"
7
- gem "rails-assets-jquery", "1.11.1"
8
- gem "rails-assets-jquery-ui", "1.10.4"
9
- gem "rdiscount"
10
- gem "rspec-rails"
11
- gem "nokogiri"
12
- gem "combustion"
13
- gem "sprockets-rails"
14
- gem "capybara"
15
- gem "poltergeist"
16
- gem "sqlite3"
17
- gem "appraisal"
18
- gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "5-0-stable"
20
-
21
- platforms :mri_21 do
22
- gem "byebug"
23
- end
24
-
25
- gemspec path: "../"
@@ -1,25 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
- source "https://rails-assets.org"
5
-
6
- gem "activerecord"
7
- gem "rails-assets-jquery", "1.11.1"
8
- gem "rails-assets-jquery-ui", "1.10.4"
9
- gem "rdiscount"
10
- gem "rspec-rails"
11
- gem "nokogiri"
12
- gem "combustion"
13
- gem "sprockets-rails"
14
- gem "capybara"
15
- gem "poltergeist"
16
- gem "sqlite3"
17
- gem "appraisal"
18
- gem "launchy"
19
- gem "rails", github: "rails/rails", branch: "5-1-stable"
20
-
21
- platforms :mri_21 do
22
- gem "byebug"
23
- end
24
-
25
- gemspec path: "../"