htauth 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTUyZDQ3ZjdhODM0ZGI2ODZkMjA2NzQ3MGVlMzEyN2RlNGQzZjZmOA==
5
- data.tar.gz: !binary |-
6
- M2I1NTRmMmRhMzE4NzVlMTY2MjI1OGNhMmExNzUzNzE0YjY2MWI1Yw==
2
+ SHA1:
3
+ metadata.gz: 68e39a2811eb3436eb1de8ceac4bf0fd4ad458b9
4
+ data.tar.gz: 3c432666f3fabec0d5b0ef6e3fc4720bfcf2dcb8
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MjBiNzk5NmE4NGM5MGY5OGM1MjU1YWJiMjdiZmZmYTVmYTkyOGY2MDE2OTQ2
10
- YmI0ZmU1MGZiNDdiMjE1MzQzZWJmNjY1YWM2OGYxY2EzNWVlZmM1MzE5ZjRj
11
- ZWU4NWRmNmVkYWRkYmRhMDgzMjA2MTJjMGM0ZGViMjBmYWQzZTA=
12
- data.tar.gz: !binary |-
13
- OGY5MTIyMTQxYzM1MGVkODk0OGNjMDdiZDkxNWYyMTI1Y2E3NjNhMTZlMTcy
14
- MmIyN2FjZDMyMjA0YjIxYmQ0MzE4ZTgzNDI4ZjAxNzk5YWYxMGUyNmJjZGIz
15
- NWZjMmM4ZTAzNzYxMTk4NjNiY2Y0Y2U3MDgwNmQ0Y2I2ZDY3YTQ=
6
+ metadata.gz: 3139d1a21b6e3ccd5a31fc6cb27d1f39ef1d898fc50e078b154f90659fbdc9fb8f119d56fb9c182e1af95422d9e308fb9632a4a9fc8f47781c1837a28d3bb8da
7
+ data.tar.gz: 8bb24b28ce66741222787a1c965e27e5d6c3f5d43aae96699e6d95f1f671d59876ccb2f3476e5db4154dbb39e4dbe272649f1245432fc38962be0bf98cd5a179
@@ -27,7 +27,8 @@ easiest way to contribute.
27
27
  * Fork the [repo][].
28
28
  * Create a new branch for your issue: `git checkout -b issue/my-issue`
29
29
  * Lovingly craft your contribution:
30
- * `rake develop` to get started, or if you prefer bundler `rake develop:using_bundler && bundle`.
30
+ * `rake develop` to bootstrap development. (skip if you already have bundler installed)
31
+ * `bundle install` to install dependencies.
31
32
  * `rake test` to run tests
32
33
  * Make sure that `rake test` passes. It's important, I said it twice.
33
34
  * Add yourself to the contributors section below.
@@ -36,7 +37,7 @@ easiest way to contribute.
36
37
  # Contributors
37
38
 
38
39
  * [Jeremy Hinegardner](https://github.com/copiousfreetime)
39
- * [Kevin Barnes](https://github.com/vinbarnes)
40
+ * [Chulki Lee](https://github.com/chulkilee)
40
41
 
41
42
  [GitHub Account]: https://github.com/signup/free "GitHub Signup"
42
43
  [GitHub Issues]: https://github.com/copiousfreetime/htauth/issues "Htauth Issues"
data/HISTORY.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.2.0 2015-07-18
4
+
5
+ * Clarify project license (its MIT) - [#7](https://github.com/copiousfreetime/htauth/issues/7)
6
+ * Cleanup travis ci config - [#8](https://github.com/copiousfreetime/htauth/issues/8)
7
+ * performance improvement in large passwd files - [#4](https://github.com/copiousfreetime/htauth/pull/4)
8
+ * Update dependencies
9
+ * Update project layout/tooling
10
+ * Official notation that this project uses [Semantic Versioning](http://semver.org/)
11
+ * Add [Chulki Lee](https://github.com/chulkilee) as contributor.
12
+
3
13
  ## Version 1.1.0 2014-03-10
4
14
 
5
15
  * Update highline dependency
data/LICENSE CHANGED
@@ -1,3 +1,5 @@
1
+ MIT LICENSE - http://opensource.org/licenses/MIT
2
+
1
3
  Copyright (c) 2008 Jeremy Hinegardner
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
data/README.md CHANGED
@@ -71,7 +71,7 @@ Additionally, you can access all the functionality of *htdigest-ruby* and
71
71
  * [The Apache Software Foundation](http://www.apache.org/)
72
72
  * all the folks who contributed to htdigest and htpassword
73
73
 
74
- ## LICENSE
74
+ ## MIT LICENSE
75
75
 
76
76
  Copyright (c) 2008 Jeremy Hinegardner
77
77
 
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ This.ruby_gemspec do |spec|
10
10
  spec.add_development_dependency( 'rake' , '~> 10.1')
11
11
  spec.add_development_dependency( 'minitest' , '~> 5.0' )
12
12
  spec.add_development_dependency( 'rdoc' , '~> 4.0' )
13
+ spec.add_development_dependency( 'simplecov', '~> 0.9' )
13
14
 
14
15
  spec.add_dependency("highline", "~> 1.6")
15
16
  end
@@ -141,7 +141,7 @@ EOB
141
141
  passwd_file.delete(options.username)
142
142
  else
143
143
  unless options.batch_mode
144
- # initialize here so that if $stdin is overwritten it gest picked up
144
+ # initialize here so that if $stdin is overwritten it gets picked up
145
145
  hl = ::HighLine.new
146
146
 
147
147
  action = passwd_file.has_entry?(options.username) ? "Changing" : "Adding"
@@ -42,11 +42,11 @@ module HTAuth
42
42
  end
43
43
  end
44
44
 
45
- def initialize(user, password = "", alg = Algorithm::DEFAULT, alg_params = {} )
45
+ def initialize(user, password = nil, alg = Algorithm::DEFAULT, alg_params = {} )
46
46
  @user = user
47
47
  alg = Algorithm::DEFAULT if alg == Algorithm::EXISTING
48
48
  @algorithm = Algorithm.algorithm_from_name(alg, alg_params)
49
- @digest = algorithm.encode(password)
49
+ @digest = algorithm.encode(password) if password
50
50
  end
51
51
 
52
52
  def algorithm=(alg)
@@ -1,5 +1,5 @@
1
1
  module HTAuth
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  module Version
4
4
  STRING = HTAuth::VERSION
5
5
  def to_a
@@ -10,21 +10,12 @@ namespace :develop do
10
10
 
11
11
  # Install all the development and runtime dependencies of this gem using the
12
12
  # gemspec.
13
- task :default do
13
+ task :default => 'Gemfile' do
14
14
  require 'rubygems/dependency_installer'
15
15
  installer = ::Gem::DependencyInstaller.new
16
-
17
- This.set_coverage_gem
18
-
19
- puts "Installing gem depedencies needed for development"
20
- This.platform_gemspec.dependencies.each do |dep|
21
- if dep.matching_specs.empty? then
22
- puts "Installing : #{dep}"
23
- installer.install dep
24
- else
25
- puts "Skipping : #{dep} -> already installed #{dep.matching_specs.first.full_name}"
26
- end
27
- end
16
+ puts "Installing bundler..."
17
+ installer.install 'bundler'
18
+ sh 'bundle install'
28
19
  puts "\n\nNow run 'rake test'"
29
20
  end
30
21
 
@@ -33,20 +24,12 @@ namespace :develop do
33
24
  File.open( "Gemfile", "w+" ) do |f|
34
25
  f.puts "# DO NOT EDIT - This file is automatically generated"
35
26
  f.puts "# Make changes to Manifest.txt and/or Rakefile and regenerate"
36
- f.puts 'source "https://rubygems.org/"'
27
+ f.puts 'source "https://rubygems.org"'
37
28
  f.puts 'gemspec'
38
29
  end
39
30
  end
40
-
41
- desc "Create a bundler Gemfile"
42
- task :using_bundler => 'Gemfile' do
43
- puts "Now you can 'bundle'"
44
- end
45
-
46
- # Gemfiles are build artifacts
47
- CLOBBER << FileList['Gemfile*']
48
31
  end
49
- desc "Boostrap development"
32
+ desc "Bootstrap development"
50
33
  task :develop => "develop:default"
51
34
 
52
35
  #------------------------------------------------------------------------------
@@ -90,31 +73,16 @@ end
90
73
  # Coverage - optional code coverage, rcov for 1.8 and simplecov for 1.9, so
91
74
  # for the moment only rcov is listed.
92
75
  #------------------------------------------------------------------------------
93
- if RUBY_VERSION < "1.9.0"
94
- begin
95
- require 'rcov/rcovtask'
96
- Rcov::RcovTask.new( 'coverage' ) do |t|
97
- t.libs << 'spec'
98
- t.pattern = 'spec/**/*_spec.rb'
99
- t.verbose = true
100
- t.rcov_opts << "-x ^/" # remove all the global files
101
- t.rcov_opts << "--sort coverage" # so we see the worst files at the top
102
- end
103
- rescue LoadError
104
- This.task_warning( 'rcov' )
105
- end
106
- else
107
- begin
108
- require 'simplecov'
109
- desc 'Run tests with code coverage'
110
- task :coverage do
111
- ENV['COVERAGE'] = 'true'
112
- Rake::Task[:test].execute
113
- end
114
- CLOBBER << FileList["coverage"]
115
- rescue LoadError
116
- This.task_warning( 'simplecov' )
76
+ begin
77
+ require 'simplecov'
78
+ desc 'Run tests with code coverage'
79
+ task :coverage do
80
+ ENV['COVERAGE'] = 'true'
81
+ Rake::Task[:test].execute
117
82
  end
83
+ CLOBBER << 'coverage' if File.directory?( 'coverage' )
84
+ rescue LoadError
85
+ This.task_warning( 'simplecov' )
118
86
  end
119
87
 
120
88
  #------------------------------------------------------------------------------
@@ -179,9 +147,10 @@ namespace :fixme do
179
147
  end
180
148
 
181
149
  def outdated_fixme_files
182
- local_fixme_files.reject do |local|
150
+ local_fixme_files.select do |local|
183
151
  upstream = fixme_project_path( local )
184
- Digest::SHA256.file( local ) == Digest::SHA256.file( upstream )
152
+ upstream.exist? &&
153
+ ( Digest::SHA256.file( local ) != Digest::SHA256.file( upstream ) )
185
154
  end
186
155
  end
187
156
 
@@ -231,9 +200,6 @@ task :gemspec do
231
200
  end
232
201
  end
233
202
 
234
- # the gemspec is also a dev artifact and should not be kept around.
235
- CLOBBER << This.gemspec_file.to_s
236
-
237
203
  # .rbc files from ruby 2.0
238
204
  CLOBBER << FileList["**/*.rbc"]
239
205
 
@@ -13,7 +13,7 @@ class ThisProject
13
13
  attr_accessor :email
14
14
 
15
15
  # The homepage of this project
16
- attr_accessor :homepage
16
+ attr_accessor :homepage
17
17
 
18
18
  # The regex of files to exclude from the manifest
19
19
  attr_accessor :exclude_from_manifest
@@ -25,7 +25,11 @@ class ThisProject
25
25
  #
26
26
  # Yields self
27
27
  def initialize(&block)
28
- @exclude_from_manifest = %r/\.(git|DS_Store)|^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)|^[^\/]+\.gemspec|\.(swp|jar|bundle|so|rvmrc)$|~$/
28
+ @exclude_from_manifest = Regexp.union(/\.(git|DS_Store)/,
29
+ /^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)/,
30
+ /^[^\/]+\.gemspec/,
31
+ /\.(swp|jar|bundle|so|rvmrc|travis.yml)$/,
32
+ /~$/)
29
33
  @gemspecs = Hash.new
30
34
  yield self if block_given?
31
35
  end
@@ -119,7 +123,7 @@ class ThisProject
119
123
 
120
124
  # Internal: Returns the gemspace associated with the current ruby platform
121
125
  def platform_gemspec
122
- gemspecs[platform]
126
+ gemspecs.fetch(platform) { This.ruby_gemspec }
123
127
  end
124
128
 
125
129
  def core_gemspec
@@ -141,6 +145,8 @@ class ThisProject
141
145
  spec.extra_rdoc_files += spec.files.grep(/(txt|rdoc|md)$/)
142
146
  spec.rdoc_options = [ "--main" , 'README.md',
143
147
  "--markup", "tomdoc" ]
148
+
149
+ spec.required_ruby_version = '>= 1.9.3'
144
150
  end
145
151
  end
146
152
 
@@ -167,20 +173,6 @@ class ThisProject
167
173
  return spec
168
174
  end
169
175
 
170
- # Internal: Set the recovery gem development dependency
171
- #
172
- # These are dynamically set since they cannot be hard coded as there is
173
- # no way to ship them correctly in the gemspec
174
- #
175
- # Returns nothing.
176
- def set_coverage_gem
177
- if RUBY_VERSION < "1.9.0"
178
- platform_gemspec.add_development_dependency( 'rcov', '~> 1.0.0' )
179
- else
180
- platform_gemspec.add_development_dependency( 'simplecov', '~> 0.8.2' )
181
- end
182
- end
183
-
184
176
  # Internal: Return the platform of ThisProject at the current moment in time.
185
177
  def platform
186
178
  (RUBY_PLATFORM == "java") ? 'java' : Gem::Platform::RUBY
@@ -190,19 +182,21 @@ class ThisProject
190
182
  def description_section
191
183
  section_of( 'README.md', 'DESCRIPTION')
192
184
  end
193
-
194
- # Internal: Return the summary text from the README
185
+
186
+ # Internal: Return the summary text from the README
195
187
  def summary
196
188
  description_section.first
197
189
  end
198
190
 
199
- # Internal: Return the full description text from the READEM
191
+ # Internal: Return the full description text from the README
200
192
  def description
201
193
  description_section.join(" ").tr("\n", ' ').gsub(/[{}]/,'').gsub(/\[[^\]]+\]/,'') # strip rdoc
202
194
  end
203
195
 
204
196
  def license
205
- "ISC"
197
+ license_file = project_path("LICENSE")
198
+ line = license_file.readlines.first
199
+ line.split(/\s+/).first
206
200
  end
207
201
 
208
202
  # Internal: The path to the gemspec file
metadata CHANGED
@@ -1,69 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.9'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.9'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: highline
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ~>
73
+ - - "~>"
60
74
  - !ruby/object:Gem::Version
61
75
  version: '1.6'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ~>
80
+ - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: '1.6'
69
83
  description: HTAuth is a pure ruby replacement for the Apache support programs htdigest
@@ -127,29 +141,29 @@ files:
127
141
  - tasks/this.rb
128
142
  homepage: http://github.com/copiousfreetime/htauth
129
143
  licenses:
130
- - ISC
144
+ - MIT
131
145
  metadata: {}
132
146
  post_install_message:
133
147
  rdoc_options:
134
- - --main
148
+ - "--main"
135
149
  - README.md
136
- - --markup
150
+ - "--markup"
137
151
  - tomdoc
138
152
  require_paths:
139
153
  - lib
140
154
  required_ruby_version: !ruby/object:Gem::Requirement
141
155
  requirements:
142
- - - ! '>='
156
+ - - ">="
143
157
  - !ruby/object:Gem::Version
144
- version: '0'
158
+ version: 1.9.3
145
159
  required_rubygems_version: !ruby/object:Gem::Requirement
146
160
  requirements:
147
- - - ! '>='
161
+ - - ">="
148
162
  - !ruby/object:Gem::Version
149
163
  version: '0'
150
164
  requirements: []
151
165
  rubyforge_project:
152
- rubygems_version: 2.2.2
166
+ rubygems_version: 2.4.5
153
167
  signing_key:
154
168
  specification_version: 4
155
169
  summary: HTAuth is a pure ruby replacement for the Apache support programs htdigest