lentil 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/lentil/version.rb +1 -1
- data/test/dummy/config/database.yml +25 -18
- data/test/fixtures/lentil/admin_users.yml +3 -3
- data/test/fixtures/lentil/images.yml +16 -13
- data/test/integration/lentil/images_show_test.rb +1 -2
- data/test/integration/lentil/javascript/image_modal_test.rb +2 -1
- data/test/test_helper.rb +5 -0
- metadata +7 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 910075a2b670d64085b65204d9a906be3a70005d
|
|
4
|
+
data.tar.gz: d094dc6d8f5634aabf35453bf36bd2f5bf6a33a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfdaf546ef32c38d2301909ed60f79d06226473c0bccdc14612058c9f4ed461b2b7d4a68c980d7acc5fb5df8221855b9d5ec48324a11f6264ae47b9f2af3a3d0
|
|
7
|
+
data.tar.gz: 5629e8500152774c381a4efb5c78a3c0c6821641d7427b0d9803e793819932a02a9295fd7e15effda8fc192284c76e5b4a36bb3c8588d826b0bffd086893e567
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Although we are using this gem in production, **this gem should be considered an
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
-
lentil has been tested under Ruby 1.9.3
|
|
18
|
+
lentil has been tested under Ruby 1.9.3 through 2.2.0.
|
|
19
19
|
|
|
20
20
|
### Create a new Rails app with Rails 3.2.x
|
|
21
21
|
|
|
@@ -215,6 +215,10 @@ Edit `config/lentil_config.yml` and set `instagram_client_id` to the client ID a
|
|
|
215
215
|
bundle exec rake image_services:instagram:fetch_by_tag
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
+
## Heroku
|
|
219
|
+
|
|
220
|
+
Documentation for deploying lentil to Heroku may be found in the [doc directory](doc/heroku.md).
|
|
221
|
+
|
|
218
222
|
## License
|
|
219
223
|
|
|
220
224
|
See MIT-LICENSE
|
data/lib/lentil/version.rb
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
# gem install sqlite3
|
|
3
|
-
#
|
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
-
# gem 'sqlite3'
|
|
6
|
-
development:
|
|
1
|
+
sqlite: &sqlite
|
|
7
2
|
adapter: sqlite3
|
|
8
|
-
database: db
|
|
3
|
+
database: db/<%= Rails.env %>.sqlite3
|
|
4
|
+
|
|
5
|
+
mysql: &mysql
|
|
6
|
+
adapter: mysql2
|
|
7
|
+
encoding: utf8
|
|
8
|
+
username: travis
|
|
9
|
+
password:
|
|
10
|
+
database: lentil_<%= Rails.env %>
|
|
11
|
+
|
|
12
|
+
postgresql: &postgresql
|
|
13
|
+
adapter: postgresql
|
|
14
|
+
username: postgres
|
|
15
|
+
password:
|
|
16
|
+
database: lentil_<%= Rails.env %>
|
|
17
|
+
min_messages: ERROR
|
|
18
|
+
|
|
19
|
+
defaults: &defaults
|
|
9
20
|
pool: 5
|
|
10
21
|
timeout: 5000
|
|
22
|
+
host: 127.0.0.1
|
|
23
|
+
<<: *<%= ENV['DB'] || "sqlite" %>
|
|
24
|
+
|
|
25
|
+
development:
|
|
26
|
+
<<: *defaults
|
|
11
27
|
|
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
|
13
|
-
# re-generated from your development database when you run "rake".
|
|
14
|
-
# Do not set this db to the same as development or production.
|
|
15
28
|
test:
|
|
16
|
-
|
|
17
|
-
database: db/test.sqlite3
|
|
18
|
-
pool: 5
|
|
19
|
-
timeout: 5000
|
|
29
|
+
<<: *defaults
|
|
20
30
|
|
|
21
31
|
production:
|
|
22
|
-
|
|
23
|
-
database: db/production.sqlite3
|
|
24
|
-
pool: 5
|
|
25
|
-
timeout: 5000
|
|
32
|
+
<<: *defaults
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
# model remove the '{}' from the fixture names and add the columns immediately
|
|
24
24
|
# below each fixture, per the syntax in the comments below
|
|
25
25
|
#
|
|
26
|
-
one:
|
|
26
|
+
one:
|
|
27
27
|
email: admin@example.com
|
|
28
28
|
encrypted_password: $2a$10$Jln3fQjXhb6Tqecn29ZSZei7lHspu22aVlYTDOKEn.dmio4cJGrh.
|
|
29
|
-
created_at: <%= DateTime.now.strftime('%
|
|
30
|
-
updated_at: <%= DateTime.now.strftime('%
|
|
29
|
+
created_at: <%= DateTime.now.strftime('%Y-%m-%d %H:%M:%S') %>
|
|
30
|
+
updated_at: <%= DateTime.now.strftime('%Y-%m-%d %H:%M:%S') %>
|
|
31
31
|
|
|
32
32
|
# column: value
|
|
33
33
|
#
|
|
@@ -44,6 +44,7 @@ uno:
|
|
|
44
44
|
wins_count: 5
|
|
45
45
|
losses_count: 5
|
|
46
46
|
win_pct: 50
|
|
47
|
+
original_datetime: 2013-04-12 15:58:34.000000000 Z
|
|
47
48
|
|
|
48
49
|
dos:
|
|
49
50
|
description: "Love the new @snohetta_design #HuntLibrary at #NCState @CentCampus #nofilter"
|
|
@@ -54,6 +55,7 @@ dos:
|
|
|
54
55
|
user: cl
|
|
55
56
|
state: 1
|
|
56
57
|
staff_like: false
|
|
58
|
+
original_datetime: 2013-04-13 15:58:34.000000000 Z
|
|
57
59
|
|
|
58
60
|
tres:
|
|
59
61
|
description: "This is a bad image"
|
|
@@ -67,6 +69,7 @@ tres:
|
|
|
67
69
|
wins_count: 5
|
|
68
70
|
losses_count: 5
|
|
69
71
|
win_pct: 50
|
|
72
|
+
original_datetime: 2013-04-14 15:58:34.000000000 Z
|
|
70
73
|
|
|
71
74
|
one:
|
|
72
75
|
description: 'six #hunttesting'
|
|
@@ -284,17 +287,17 @@ three:
|
|
|
284
287
|
file_last_checked:
|
|
285
288
|
|
|
286
289
|
video:
|
|
287
|
-
description: '
|
|
288
|
-
created_at: 2013-04-
|
|
289
|
-
updated_at: 2013-04-
|
|
290
|
+
description: 'video #hunttesting'
|
|
291
|
+
created_at: 2013-04-10 16:16:16.273698000 Z
|
|
292
|
+
updated_at: 2013-04-10 16:16:16.481430000 Z
|
|
290
293
|
like_votes_count: 0
|
|
291
|
-
url:
|
|
294
|
+
url: https://instagram.com/p/vYx78PoxRf/
|
|
292
295
|
user: bd
|
|
293
296
|
state: 1
|
|
294
297
|
external_identifier: '853651752801735775_3292244'
|
|
295
298
|
long_url: http://scontent-b.cdninstagram.com/hphotos-xfa1/t51.2885-15/915706_724481087621112_1586087020_n.jpg
|
|
296
|
-
original_datetime: 2013-04-
|
|
297
|
-
staff_like:
|
|
299
|
+
original_datetime: 2013-04-10 15:58:34.000000000 Z
|
|
300
|
+
staff_like: false
|
|
298
301
|
moderator_id:
|
|
299
302
|
moderated_at:
|
|
300
303
|
second_moderation: false
|
|
@@ -317,27 +320,27 @@ video:
|
|
|
317
320
|
count: 0
|
|
318
321
|
data: []
|
|
319
322
|
filter: Amaro
|
|
320
|
-
created_time: '
|
|
321
|
-
link:
|
|
323
|
+
created_time: '1415983240'
|
|
324
|
+
link: https://instagram.com/p/vYx78PoxRf/
|
|
322
325
|
likes:
|
|
323
326
|
count: 0
|
|
324
327
|
data: []
|
|
325
328
|
images:
|
|
326
329
|
low_resolution:
|
|
327
|
-
url:
|
|
330
|
+
url: https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s320x320/e15/915706_724481087621112_1586087020_n.jpg
|
|
328
331
|
width: 306
|
|
329
332
|
height: 306
|
|
330
333
|
thumbnail:
|
|
331
|
-
url:
|
|
334
|
+
url: https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/s150x150/e15/915706_724481087621112_1586087020_n.jpg
|
|
332
335
|
width: 150
|
|
333
336
|
height: 150
|
|
334
337
|
standard_resolution:
|
|
335
|
-
url:
|
|
338
|
+
url: https://scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/e15/915706_724481087621112_1586087020_n.jpg
|
|
336
339
|
width: 612
|
|
337
340
|
height: 612
|
|
338
341
|
caption:
|
|
339
|
-
created_time: '
|
|
340
|
-
text: ! '
|
|
342
|
+
created_time: '1415983240'
|
|
343
|
+
text: ! 'video #hunttesting'
|
|
341
344
|
from:
|
|
342
345
|
username: bddnc
|
|
343
346
|
profile_picture: http://images.ak.instagram.com/profiles/anonymousUser.jpg
|
|
@@ -7,10 +7,9 @@ class ImagesShowIndexTest < ActionDispatch::IntegrationTest
|
|
|
7
7
|
visit(lentil.image_path lentil_images(:one))
|
|
8
8
|
assert page.has_selector?('body.lentil-images_show')
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
test "video should have a video tag" do
|
|
12
12
|
visit(lentil.image_path lentil_images(:video))
|
|
13
13
|
assert page.has_selector?('video')
|
|
14
14
|
end
|
|
15
|
-
|
|
16
15
|
end
|
|
@@ -13,7 +13,8 @@ class ImageModalTest < ActionDispatch::IntegrationTest
|
|
|
13
13
|
visit lentil.images_path
|
|
14
14
|
assert page.has_no_content?('six #hunttesting')
|
|
15
15
|
assert page.has_no_selector?('.fancybox-image')
|
|
16
|
-
all('.fancybox').first.click
|
|
16
|
+
# all('.fancybox').first.click
|
|
17
|
+
find('.fancybox', match: :first).click
|
|
17
18
|
assert page.has_content?('six #hunttesting')
|
|
18
19
|
assert page.has_selector?('.fancybox-image')
|
|
19
20
|
end
|
data/test/test_helper.rb
CHANGED
|
@@ -39,6 +39,10 @@ class ActionDispatch::IntegrationTest
|
|
|
39
39
|
# Stop ActiveRecord from wrapping tests in transactions
|
|
40
40
|
self.use_transactional_fixtures = false
|
|
41
41
|
|
|
42
|
+
def setup
|
|
43
|
+
DatabaseCleaner.start
|
|
44
|
+
end
|
|
45
|
+
|
|
42
46
|
def login_admin_user
|
|
43
47
|
user = lentil_admin_users(:one)
|
|
44
48
|
visit admin_root_path
|
|
@@ -49,6 +53,7 @@ class ActionDispatch::IntegrationTest
|
|
|
49
53
|
|
|
50
54
|
def browser_start
|
|
51
55
|
Capybara.current_driver = :webkit #_with_long_timeout
|
|
56
|
+
Capybara.default_wait_time = 30
|
|
52
57
|
end
|
|
53
58
|
|
|
54
59
|
def browser_end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lentil
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Casden
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2015-
|
|
14
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: rails
|
|
@@ -383,14 +383,14 @@ dependencies:
|
|
|
383
383
|
requirements:
|
|
384
384
|
- - "~>"
|
|
385
385
|
- !ruby/object:Gem::Version
|
|
386
|
-
version: 1.
|
|
386
|
+
version: 1.4.1
|
|
387
387
|
type: :development
|
|
388
388
|
prerelease: false
|
|
389
389
|
version_requirements: !ruby/object:Gem::Requirement
|
|
390
390
|
requirements:
|
|
391
391
|
- - "~>"
|
|
392
392
|
- !ruby/object:Gem::Version
|
|
393
|
-
version: 1.
|
|
393
|
+
version: 1.4.1
|
|
394
394
|
- !ruby/object:Gem::Dependency
|
|
395
395
|
name: launchy
|
|
396
396
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -467,14 +467,14 @@ dependencies:
|
|
|
467
467
|
requirements:
|
|
468
468
|
- - "~>"
|
|
469
469
|
- !ruby/object:Gem::Version
|
|
470
|
-
version: 3.
|
|
470
|
+
version: 3.1.2
|
|
471
471
|
type: :development
|
|
472
472
|
prerelease: false
|
|
473
473
|
version_requirements: !ruby/object:Gem::Requirement
|
|
474
474
|
requirements:
|
|
475
475
|
- - "~>"
|
|
476
476
|
- !ruby/object:Gem::Version
|
|
477
|
-
version: 3.
|
|
477
|
+
version: 3.1.2
|
|
478
478
|
- !ruby/object:Gem::Dependency
|
|
479
479
|
name: mocha
|
|
480
480
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -911,9 +911,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
911
911
|
- - ">="
|
|
912
912
|
- !ruby/object:Gem::Version
|
|
913
913
|
version: 1.9.3
|
|
914
|
-
- - "<"
|
|
915
|
-
- !ruby/object:Gem::Version
|
|
916
|
-
version: 2.2.0
|
|
917
914
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
918
915
|
requirements:
|
|
919
916
|
- - ">="
|
|
@@ -921,7 +918,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
921
918
|
version: '0'
|
|
922
919
|
requirements: []
|
|
923
920
|
rubyforge_project:
|
|
924
|
-
rubygems_version: 2.4.
|
|
921
|
+
rubygems_version: 2.4.8
|
|
925
922
|
signing_key:
|
|
926
923
|
specification_version: 4
|
|
927
924
|
summary: lentil supports the harvesting of images from Instagram.
|