lentil 0.1.7 → 0.1.8

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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/app/assets/javascripts/lentil/addfancybox.js +3 -1
  4. data/app/assets/javascripts/lentil/iframe.js +117 -0
  5. data/app/assets/javascripts/lentil/thisorthat.js.erb +18 -20
  6. data/app/assets/stylesheets/lentil/iframe.css.scss +26 -0
  7. data/app/controllers/lentil/images_controller.rb +4 -0
  8. data/app/controllers/lentil/thisorthat_controller.rb +6 -4
  9. data/app/models/lentil/image.rb +16 -6
  10. data/app/views/layouts/lentil/iframe.html.erb +30 -0
  11. data/app/views/lentil/images/iframe.html.erb +9 -0
  12. data/config/routes.rb +1 -0
  13. data/lib/generators/lentil/install_generator.rb +18 -3
  14. data/lib/generators/lentil/templates/README.md +6 -0
  15. data/lib/lentil/instagram_harvester.rb +2 -2
  16. data/lib/lentil/version.rb +1 -1
  17. data/test/dummy/config/application.rb +6 -0
  18. data/test/fixtures/lentil/images.yml +84 -84
  19. data/test/functional/lentil/images_controller_test.rb +5 -0
  20. data/test/functional/lentil/photographers_controller_test.rb +1 -1
  21. data/test/integration/lentil/images_index_test.rb +2 -3
  22. data/test/integration/lentil/javascript/event_tracking_battle_test.rb +1 -2
  23. data/test/integration/lentil/javascript/image_modal_test.rb +2 -2
  24. data/test/vcr_cassettes/battle_images.yml +190 -135
  25. data/test/vcr_cassettes/battle_images_events.yml +123 -167
  26. data/test/vcr_cassettes/instagram_bad_image_check.yml +24 -21
  27. data/test/vcr_cassettes/instagram_good_image_check.yml +160 -15
  28. data/test/vcr_cassettes/instagram_image_harvest.yml +1990 -1950
  29. data/test/vcr_cassettes/instagram_oembed.yml +18 -9
  30. data/vendor/assets/javascripts/imagesloaded/jquery.imagesloaded.min.js +888 -3
  31. metadata +15 -12
  32. data/lib/generators/lentil/templates/devise.rb +0 -232
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.1.7
4
+ version: 0.1.8
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: 2014-01-07 00:00:00.000000000 Z
14
+ date: 2014-03-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 3.2.16
22
+ version: 3.2.17
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.16
29
+ version: 3.2.17
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: jquery-rails
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: 0.5.1
50
+ version: 0.6.3
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 0.5.1
57
+ version: 0.6.3
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: meta_search
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -117,14 +117,14 @@ dependencies:
117
117
  requirements:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: 0.2.1
120
+ version: 0.2.8
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - "~>"
126
126
  - !ruby/object:Gem::Version
127
- version: 0.2.1
127
+ version: 0.2.8
128
128
  - !ruby/object:Gem::Dependency
129
129
  name: whenever
130
130
  requirement: !ruby/object:Gem::Requirement
@@ -467,14 +467,14 @@ dependencies:
467
467
  requirements:
468
468
  - - "~>"
469
469
  - !ruby/object:Gem::Version
470
- version: 1.0.0
470
+ version: 1.1.0
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: 1.0.0
477
+ version: 1.1.0
478
478
  - !ruby/object:Gem::Dependency
479
479
  name: yard
480
480
  requirement: !ruby/object:Gem::Requirement
@@ -519,6 +519,7 @@ files:
519
519
  - app/assets/javascripts/lentil/addinfinitescroll.js.erb
520
520
  - app/assets/javascripts/lentil/buttonhandler.js
521
521
  - app/assets/javascripts/lentil/event_tracking.js.erb
522
+ - app/assets/javascripts/lentil/iframe.js
522
523
  - app/assets/javascripts/lentil/imageerrors.js
523
524
  - app/assets/javascripts/lentil/images.js
524
525
  - app/assets/javascripts/lentil/thisorthat.js.erb
@@ -536,6 +537,7 @@ files:
536
537
  - app/assets/stylesheets/lentil/breakpoint/sass/framework/_normalize.scss
537
538
  - app/assets/stylesheets/lentil/breakpoint/sass/framework/_print.scss
538
539
  - app/assets/stylesheets/lentil/breakpoint/sass/style.scss
540
+ - app/assets/stylesheets/lentil/iframe.css.scss
539
541
  - app/assets/stylesheets/lentil/image_animation.css.scss
540
542
  - app/assets/stylesheets/lentil/images.css.scss
541
543
  - app/assets/stylesheets/lentil/thisorthat.css.scss
@@ -574,9 +576,11 @@ files:
574
576
  - app/views/layouts/lentil/_secondary_navigation.html.erb
575
577
  - app/views/layouts/lentil/_top_navigation.html.erb
576
578
  - app/views/layouts/lentil/application.html.erb
579
+ - app/views/layouts/lentil/iframe.html.erb
577
580
  - app/views/lentil/images/_flagging_modal.html.erb
578
581
  - app/views/lentil/images/_image_tiles.erb
579
582
  - app/views/lentil/images/animate.html.erb
583
+ - app/views/lentil/images/iframe.html.erb
580
584
  - app/views/lentil/images/index.atom.builder
581
585
  - app/views/lentil/images/index.html.erb
582
586
  - app/views/lentil/images/index.rss.builder
@@ -648,7 +652,6 @@ files:
648
652
  - lib/generators/lentil/install_generator.rb
649
653
  - lib/generators/lentil/templates/README.md
650
654
  - lib/generators/lentil/templates/active_admin.rb
651
- - lib/generators/lentil/templates/devise.rb
652
655
  - lib/generators/lentil/templates/kaminari.rb
653
656
  - lib/generators/lentil/templates/lentil_config.yml
654
657
  - lib/lentil.rb
@@ -869,7 +872,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
869
872
  version: '0'
870
873
  requirements: []
871
874
  rubyforge_project:
872
- rubygems_version: 2.2.1
875
+ rubygems_version: 2.2.2
873
876
  signing_key:
874
877
  specification_version: 4
875
878
  summary: lentil supports the harvesting of images from Instagram.
@@ -1,232 +0,0 @@
1
- # Use this hook to configure devise mailer, warden hooks and so forth.
2
- # Many of these configuration options can be set straight in your model.
3
- Devise.setup do |config|
4
- # ==> Mailer Configuration
5
- # Configure the e-mail address which will be shown in Devise::Mailer,
6
- # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
- config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
8
-
9
- # Configure the class responsible to send e-mails.
10
- # config.mailer = "Devise::Mailer"
11
-
12
- # ==> ORM configuration
13
- # Load and configure the ORM. Supports :active_record (default) and
14
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
15
- # available as additional gems.
16
- require 'devise/orm/active_record'
17
-
18
- # ==> Configuration for any authentication mechanism
19
- # Configure which keys are used when authenticating a user. The default is
20
- # just :email. You can configure it to use [:username, :subdomain], so for
21
- # authenticating a user, both parameters are required. Remember that those
22
- # parameters are used only when authenticating and not when retrieving from
23
- # session. If you need permissions, you should implement that in a before filter.
24
- # You can also supply a hash where the value is a boolean determining whether
25
- # or not authentication should be aborted when the value is not present.
26
- # config.authentication_keys = [ :email ]
27
-
28
- # Configure parameters from the request object used for authentication. Each entry
29
- # given should be a request method and it will automatically be passed to the
30
- # find_for_authentication method and considered in your model lookup. For instance,
31
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
32
- # The same considerations mentioned for authentication_keys also apply to request_keys.
33
- # config.request_keys = []
34
-
35
- # Configure which authentication keys should be case-insensitive.
36
- # These keys will be downcased upon creating or modifying a user and when used
37
- # to authenticate or find a user. Default is :email.
38
- config.case_insensitive_keys = [ :email ]
39
-
40
- # Configure which authentication keys should have whitespace stripped.
41
- # These keys will have whitespace before and after removed upon creating or
42
- # modifying a user and when used to authenticate or find a user. Default is :email.
43
- config.strip_whitespace_keys = [ :email ]
44
-
45
- # Tell if authentication through request.params is enabled. True by default.
46
- # It can be set to an array that will enable params authentication only for the
47
- # given strategies, for example, `config.params_authenticatable = [:database]` will
48
- # enable it only for database (email + password) authentication.
49
- # config.params_authenticatable = true
50
-
51
- # Tell if authentication through HTTP Basic Auth is enabled. False by default.
52
- # It can be set to an array that will enable http authentication only for the
53
- # given strategies, for example, `config.http_authenticatable = [:token]` will
54
- # enable it only for token authentication.
55
- # config.http_authenticatable = false
56
-
57
- # If http headers should be returned for AJAX requests. True by default.
58
- # config.http_authenticatable_on_xhr = true
59
-
60
- # The realm used in Http Basic Authentication. "Application" by default.
61
- # config.http_authentication_realm = "Application"
62
-
63
- # It will change confirmation, password recovery and other workflows
64
- # to behave the same regardless if the e-mail provided was right or wrong.
65
- # Does not affect registerable.
66
- # config.paranoid = true
67
-
68
- # By default Devise will store the user in session. You can skip storage for
69
- # :http_auth and :token_auth by adding those symbols to the array below.
70
- # Notice that if you are skipping storage for all authentication paths, you
71
- # may want to disable generating routes to Devise's sessions controller by
72
- # passing :skip => :sessions to `devise_for` in your config/routes.rb
73
- config.skip_session_storage = [:http_auth]
74
-
75
- # ==> Configuration for :database_authenticatable
76
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
77
- # using other encryptors, it sets how many times you want the password re-encrypted.
78
- #
79
- # Limiting the stretches to just one in testing will increase the performance of
80
- # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
81
- # a value less than 10 in other environments.
82
- config.stretches = Rails.env.test? ? 1 : 10
83
-
84
- # Setup a pepper to generate the encrypted password.
85
- # config.pepper = "588d1185524f1bdac9283ece909b1789b9465813ffdae7ecccfaaf0986177eab39da09ef6198c62a213a97f5a83c2f90ce02a76138447de138c8220fc72d0a96"
86
-
87
- # ==> Configuration for :confirmable
88
- # A period that the user is allowed to access the website even without
89
- # confirming his account. For instance, if set to 2.days, the user will be
90
- # able to access the website for two days without confirming his account,
91
- # access will be blocked just in the third day. Default is 0.days, meaning
92
- # the user cannot access the website without confirming his account.
93
- # config.allow_unconfirmed_access_for = 2.days
94
-
95
- # If true, requires any email changes to be confirmed (exactly the same way as
96
- # initial account confirmation) to be applied. Requires additional unconfirmed_email
97
- # db field (see migrations). Until confirmed new email is stored in
98
- # unconfirmed email column, and copied to email column on successful confirmation.
99
- config.reconfirmable = true
100
-
101
- # Defines which key will be used when confirming an account
102
- # config.confirmation_keys = [ :email ]
103
-
104
- # ==> Configuration for :rememberable
105
- # The time the user will be remembered without asking for credentials again.
106
- # config.remember_for = 2.weeks
107
-
108
- # If true, extends the user's remember period when remembered via cookie.
109
- # config.extend_remember_period = false
110
-
111
- # Options to be passed to the created cookie. For instance, you can set
112
- # :secure => true in order to force SSL only cookies.
113
- # config.rememberable_options = {}
114
-
115
- # ==> Configuration for :validatable
116
- # Range for password length. Default is 6..128.
117
- # config.password_length = 6..128
118
-
119
- # Email regex used to validate email formats. It simply asserts that
120
- # an one (and only one) @ exists in the given string. This is mainly
121
- # to give user feedback and not to assert the e-mail validity.
122
- # config.email_regexp = /\A[^@]+@[^@]+\z/
123
-
124
- # ==> Configuration for :timeoutable
125
- # The time you want to timeout the user session without activity. After this
126
- # time the user will be asked for credentials again. Default is 30 minutes.
127
- # config.timeout_in = 30.minutes
128
-
129
- # If true, expires auth token on session timeout.
130
- # config.expire_auth_token_on_timeout = false
131
-
132
- # ==> Configuration for :lockable
133
- # Defines which strategy will be used to lock an account.
134
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
135
- # :none = No lock strategy. You should handle locking by yourself.
136
- # config.lock_strategy = :failed_attempts
137
-
138
- # Defines which key will be used when locking and unlocking an account
139
- # config.unlock_keys = [ :email ]
140
-
141
- # Defines which strategy will be used to unlock an account.
142
- # :email = Sends an unlock link to the user email
143
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
144
- # :both = Enables both strategies
145
- # :none = No unlock strategy. You should handle unlocking by yourself.
146
- # config.unlock_strategy = :both
147
-
148
- # Number of authentication tries before locking an account if lock_strategy
149
- # is failed attempts.
150
- # config.maximum_attempts = 20
151
-
152
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
153
- # config.unlock_in = 1.hour
154
-
155
- # ==> Configuration for :recoverable
156
- #
157
- # Defines which key will be used when recovering the password for an account
158
- # config.reset_password_keys = [ :email ]
159
-
160
- # Time interval you can reset your password with a reset password key.
161
- # Don't put a too small interval or your users won't have the time to
162
- # change their passwords.
163
- config.reset_password_within = 6.hours
164
-
165
- # ==> Configuration for :encryptable
166
- # Allow you to use another encryption algorithm besides bcrypt (default). You can use
167
- # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
168
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
169
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
170
- # REST_AUTH_SITE_KEY to pepper)
171
- # config.encryptor = :sha512
172
-
173
- # ==> Configuration for :token_authenticatable
174
- # Defines name of the authentication token params key
175
- # config.token_authentication_key = :auth_token
176
-
177
- # ==> Scopes configuration
178
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
179
- # "users/sessions/new". It's turned off by default because it's slower if you
180
- # are using only default views.
181
- # config.scoped_views = false
182
-
183
- # Configure the default scope given to Warden. By default it's the first
184
- # devise role declared in your routes (usually :user).
185
- # config.default_scope = :user
186
-
187
- # Set this configuration to false if you want /users/sign_out to sign out
188
- # only the current scope. By default, Devise signs out all scopes.
189
- # config.sign_out_all_scopes = true
190
-
191
- # ==> Navigation configuration
192
- # Lists the formats that should be treated as navigational. Formats like
193
- # :html, should redirect to the sign in page when the user does not have
194
- # access, but formats like :xml or :json, should return 401.
195
- #
196
- # If you have any extra navigational formats, like :iphone or :mobile, you
197
- # should add them to the navigational formats lists.
198
- #
199
- # The "*/*" below is required to match Internet Explorer requests.
200
- # config.navigational_formats = ["*/*", :html]
201
-
202
- # The default HTTP method used to sign out a resource. Default is :delete.
203
- config.sign_out_via = :delete
204
-
205
- # ==> OmniAuth
206
- # Add a new OmniAuth provider. Check the wiki for more information on setting
207
- # up on your models and hooks.
208
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
209
-
210
- # ==> Warden configuration
211
- # If you want to use other strategies, that are not supported by Devise, or
212
- # change the failure app, you can configure them inside the config.warden block.
213
- #
214
- # config.warden do |manager|
215
- # manager.intercept_401 = false
216
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
217
- # end
218
-
219
- # ==> Mountable engine configurations
220
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
221
- # is mountable, there are some extra configurations to be taken into account.
222
- # The following options are available, assuming the engine is mounted as:
223
- #
224
- # mount MyEngine, at: "/my_engine"
225
- #
226
- # The router that invoked `devise_for`, in the example above, would be:
227
- # config.router_name = :my_engine
228
- #
229
- # When using omniauth, Devise cannot automatically set Omniauth path,
230
- # so you need to do it manually. For the users scope, it would be:
231
- # config.omniauth_path_prefix = "/my_engine/users/auth"
232
- end