authtools 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,26 +1,13 @@
1
- ## Gemfile
2
- *.gem
3
-
4
- ## MAC OS
5
1
  .DS_Store
6
-
7
- ## TEXTMATE
8
2
  *.tmproj
9
3
  tmtags
10
-
11
- ## EMACS
12
4
  *~
13
5
  \#*
14
6
  .\#*
15
-
16
- ## VIM
17
7
  *.swp
18
-
19
- ## PROJECT::GENERAL
20
8
  coverage
21
9
  rdoc
22
10
  pkg
23
-
24
- ## PROJECT::SPECIFIC
25
- *.gem
26
11
  doc
12
+ *.gem
13
+
@@ -1,16 +1,21 @@
1
- Usefull stuff for tokens, passwords and authorization.
1
+ = Authtools
2
+
3
+ Usefull stuff for unique tokens and secured password hashes generation.
2
4
 
3
5
  == Examples
4
6
 
5
- # Generating unique token:
7
+ Generating an unique token:
8
+
6
9
  Authtools::Token.short
7
10
  Authtools::Token.medium
8
11
  Authtools::Token.new(Authtools::Token::LONG)
9
12
 
10
- # Hashing password
13
+ Hashing password:
14
+
11
15
  store = Authtools::Password.generate('secret')
12
16
 
13
- # Checking password
17
+ Validating password:
18
+
14
19
  Authtools::Password.check('secret', store)
15
20
 
16
21
  == Note on Patches/Pull Requests
@@ -26,4 +31,9 @@ self I can ignore when I pull)
26
31
 
27
32
  == Copyright
28
33
 
29
- Copyright (c) 2010 Kris Kowalik. See LICENSE for details.
34
+ Copyleft 2010 Chris Kowalik. WTFPL Baby!
35
+
36
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
37
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
38
+
39
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
data/Rakefile CHANGED
@@ -1,43 +1,39 @@
1
- require 'rubygems'
2
- require 'rake'
1
+ # -*- ruby -*-
2
+ $:.unshift(File.expand_path('../lib', __FILE__))
3
+ require 'authtools/version'
4
+ require 'rspec/core/rake_task'
5
+ require 'rake/rdoctask'
3
6
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gemspec|
7
- gemspec.name = "authtools"
8
- gemspec.summary = "Usefull staff for tokens, passwords and authorization"
9
- gemspec.description = "Thanks to authtools you can easy generate salted password has
10
- h or unique token and check if specified password string is valid for stored hash..."
11
- gemspec.email = "kriss.kowalik@gmail.com"
12
- gemspec.homepage = "http://github.com/kriss/authtools"
13
- gemspec.authors = ["Kris Kowalik"]
14
- end
15
- rescue LoadError
16
- puts "Jeweler not available. Install it with: gem install jeweler"
7
+ RSpec::Core::RakeTask.new(:spec) do |t|
8
+ t.pattern = 'spec/**/*_spec.rb'
9
+ t.rspec_opts = %q[-c -b]
17
10
  end
18
11
 
19
- require 'spec/rake/spectask'
20
- Spec::Rake::SpecTask.new(:spec) do |spec|
21
- spec.libs << 'lib' << 'spec'
22
- spec.spec_files = FileList['spec/**/*_spec.rb']
12
+ RSpec::Core::RakeTask.new(:rcov) do |t|
13
+ t.rcov = true
14
+ t.rspec_opts = %q[-c -b]
15
+ t.rcov_opts = %q[-T -x "spec"]
23
16
  end
24
17
 
25
- Spec::Rake::SpecTask.new(:rcov) do |spec|
26
- spec.libs << 'lib' << 'spec'
27
- spec.pattern = 'spec/**/*_spec.rb'
28
- spec.rcov = true
18
+ Rake::RDocTask.new do |rdoc|
19
+ rdoc.rdoc_dir = 'rdoc'
20
+ rdoc.title = "Authtools #{Authtools.version}"
21
+ rdoc.rdoc_files.include('README*')
22
+ rdoc.rdoc_files.include('lib/**/*.rb')
29
23
  end
30
24
 
31
- task :spec => :check_dependencies
32
-
33
25
  task :default => :spec
34
26
 
35
- require 'rake/rdoctask'
36
- Rake::RDocTask.new do |rdoc|
37
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
27
+ desc "Build current version as a rubygem"
28
+ task :build do
29
+ `gem build authtools.gemspec`
30
+ `mv authtools-*.gem pkg/`
31
+ end
38
32
 
39
- rdoc.rdoc_dir = 'rdoc'
40
- rdoc.title = "authtools2 #{version}"
41
- rdoc.rdoc_files.include('README*')
42
- rdoc.rdoc_files.include('lib/**/*.rb')
33
+ desc "Relase current version to rubygems.org"
34
+ task :release => :build do
35
+ `git tag -am "Version bump to #{Authtools.version}" v#{Authtools.version}`
36
+ `git push origin master`
37
+ `git push origin master --tags`
38
+ `gem push pkg/authtools-#{Authtools.version}.gem`
43
39
  end
@@ -1,56 +1,17 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
1
+ # -*- ruby -*-
2
+ $:.unshift(File.expand_path('../lib', __FILE__))
3
+ require 'authtools/version'
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{authtools}
8
- s.version = "0.3.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Kris Kowalik"]
12
- s.date = %q{2010-08-04}
13
- s.description = %q{Thanks to authtools you can easy generate salted password has
14
- h or unique token and check if specified password string is valid for stored hash...}
15
- s.email = %q{kriss.kowalik@gmail.com}
16
- s.extra_rdoc_files = [
17
- "LICENSE",
18
- "README.rdoc"
19
- ]
20
- s.files = [
21
- ".gitignore",
22
- "CHANGELOG",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "authtools.gemspec",
28
- "lib/authtools.rb",
29
- "lib/authtools/common.rb",
30
- "lib/authtools/password.rb",
31
- "lib/authtools/token.rb",
32
- "spec/authtools_spec.rb",
33
- "spec/spec.opts",
34
- "spec/spec_helper.rb"
35
- ]
36
- s.homepage = %q{http://github.com/kriss/authtools}
37
- s.rdoc_options = ["--charset=UTF-8"]
38
- s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.6}
40
- s.summary = %q{Usefull staff for tokens, passwords and authorization}
41
- s.test_files = [
42
- "spec/spec_helper.rb",
43
- "spec/authtools_spec.rb"
44
- ]
45
-
46
- if s.respond_to? :specification_version then
47
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
- s.specification_version = 3
49
-
50
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
51
- else
52
- end
53
- else
54
- end
6
+ s.name = 'authtools'
7
+ s.version = Authtools.version
8
+ s.homepage = 'http://github.com/nu7hatch/authtools'
9
+ s.email = ['chris@nu7hat.ch']
10
+ s.authors = ['Chris Kowalik']
11
+ s.summary = %q{Usefull stuff for unique tokens and secured password hashes generation.}
12
+ s.description = %q{Thanks to authtools you can easy generate salted password hash, validate it or generate unique token...}
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
15
+ s.require_paths = %w[lib]
16
+ s.extra_rdoc_files = %w[README.rdoc]
55
17
  end
56
-
@@ -0,0 +1,12 @@
1
+ module Authtools
2
+ module Version # :nodoc:
3
+ MAJOR = 0
4
+ MINOR = 4
5
+ PATCH = 0
6
+ STRING = [MAJOR, MINOR, PATCH].join('.')
7
+ end
8
+
9
+ def self.version # :nodoc:
10
+ Version::STRING
11
+ end
12
+ end # Authtools
@@ -1,8 +1,6 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
1
  require 'authtools'
4
- require 'spec'
5
- require 'spec/autorun'
2
+ require 'rspec'
6
3
 
7
- Spec::Runner.configure do |config|
4
+ RSpec.configure do |config|
8
5
  end
6
+
metadata CHANGED
@@ -1,79 +1,78 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authtools
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 15
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 3
8
+ - 4
8
9
  - 0
9
- version: 0.3.0
10
+ version: 0.4.0
10
11
  platform: ruby
11
12
  authors:
12
- - Kris Kowalik
13
+ - Chris Kowalik
13
14
  autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-08-04 00:00:00 +02:00
18
+ date: 2010-11-04 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
21
- description: |-
22
- Thanks to authtools you can easy generate salted password has
23
- h or unique token and check if specified password string is valid for stored hash...
24
- email: kriss.kowalik@gmail.com
22
+ description: Thanks to authtools you can easy generate salted password hash, validate it or generate unique token...
23
+ email:
24
+ - chris@nu7hat.ch
25
25
  executables: []
26
26
 
27
27
  extensions: []
28
28
 
29
29
  extra_rdoc_files:
30
- - LICENSE
31
30
  - README.rdoc
32
31
  files:
33
32
  - .gitignore
34
- - CHANGELOG
35
- - LICENSE
36
33
  - README.rdoc
37
34
  - Rakefile
38
- - VERSION
39
35
  - authtools.gemspec
40
36
  - lib/authtools.rb
41
37
  - lib/authtools/common.rb
42
38
  - lib/authtools/password.rb
43
39
  - lib/authtools/token.rb
40
+ - lib/authtools/version.rb
44
41
  - spec/authtools_spec.rb
45
- - spec/spec.opts
46
42
  - spec/spec_helper.rb
47
43
  has_rdoc: true
48
- homepage: http://github.com/kriss/authtools
44
+ homepage: http://github.com/nu7hatch/authtools
49
45
  licenses: []
50
46
 
51
47
  post_install_message:
52
- rdoc_options:
53
- - --charset=UTF-8
48
+ rdoc_options: []
49
+
54
50
  require_paths:
55
51
  - lib
56
52
  required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
57
54
  requirements:
58
55
  - - ">="
59
56
  - !ruby/object:Gem::Version
57
+ hash: 3
60
58
  segments:
61
59
  - 0
62
60
  version: "0"
63
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
+ none: false
64
63
  requirements:
65
64
  - - ">="
66
65
  - !ruby/object:Gem::Version
66
+ hash: 3
67
67
  segments:
68
68
  - 0
69
69
  version: "0"
70
70
  requirements: []
71
71
 
72
72
  rubyforge_project:
73
- rubygems_version: 1.3.6
73
+ rubygems_version: 1.3.7
74
74
  signing_key:
75
75
  specification_version: 3
76
- summary: Usefull staff for tokens, passwords and authorization
77
- test_files:
78
- - spec/spec_helper.rb
79
- - spec/authtools_spec.rb
76
+ summary: Usefull stuff for unique tokens and secured password hashes generation.
77
+ test_files: []
78
+
data/CHANGELOG DELETED
@@ -1,20 +0,0 @@
1
- Authtools changelog.
2
-
3
- v0.3.0 [4.07.2010]
4
- * Added specs
5
- * Added symbolic names for token sizes (:tiny, :short, :medium, :long)
6
- * Added tiny (128bit) md5-like token
7
- * Minor improvments
8
- * TODO empty
9
-
10
- v0.2.0 [4.07.2010]
11
- * Improvements in implementation
12
- * Minor bug fixes
13
- * Added main file: lib/authtools.rb
14
- * Added VERSION file
15
- * Created TODO list
16
-
17
- v0.1.0 [23.03.2010]
18
- * Generating password hash
19
- * Comparing password strings with stored hash
20
- * Generating unique tokens
data/LICENSE DELETED
@@ -1,4 +0,0 @@
1
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
3
-
4
- 0. You just DO WHAT THE FUCK YOU WANT TO.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.0
@@ -1 +0,0 @@
1
- --color