copy 0.0.4 → 0.0.41
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/copy/generators/site/Gemfile +2 -0
- data/lib/copy/generators/site/config.ru +2 -2
- data/lib/copy/server.rb +2 -2
- data/lib/copy/version.rb +1 -1
- data/test/test_helper.rb +2 -2
- metadata +3 -3
@@ -16,8 +16,8 @@ Copy::Server.config do
|
|
16
16
|
# to use or set them as environment variables.
|
17
17
|
# Heroku friendly: http://devcenter.heroku.com/articles/config-vars
|
18
18
|
#
|
19
|
-
# set :
|
20
|
-
# set :
|
19
|
+
# set :copy_username, ENV['COPY_USERNAME']
|
20
|
+
# set :copy_password, ENV['COPY_PASSWORD']
|
21
21
|
|
22
22
|
# Enter the URL to your data store.
|
23
23
|
# "redis://", "mongodb://", "mysql://", "postgres://", and "sqlite://" are supported.
|
data/lib/copy/server.rb
CHANGED
@@ -17,9 +17,9 @@ module Copy
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def authorized?
|
20
|
-
return false unless settings.respond_to?(:
|
20
|
+
return false unless settings.respond_to?(:copy_username) && settings.respond_to?(:copy_password)
|
21
21
|
@auth ||= Rack::Auth::Basic::Request.new(request.env)
|
22
|
-
@auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.
|
22
|
+
@auth.provided? && @auth.basic? && @auth.credentials && @auth.credentials == [settings.copy_username, settings.copy_password]
|
23
23
|
end
|
24
24
|
|
25
25
|
def set_cache_control_header
|
data/lib/copy/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 77
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 41
|
10
|
+
version: 0.0.41
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Javan Makhmali
|