dm-is-authenticatable 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 0.1.1 / 2011-08-03
2
+
3
+ * Require bcrypt-ruby ~> 2.1.
4
+ * Require dm-core ~> 1.0.
5
+ * Require dm-types ~> 1.0.
6
+ * Require dm-validations ~> 1.0.
7
+
1
8
  ### 0.1.0 / 2010-09-04
2
9
 
3
10
  * Initial release.
data/Gemfile CHANGED
@@ -83,38 +83,24 @@
83
83
  source :rubygems
84
84
 
85
85
  DATAMAPPER = 'http://github.com/datamapper'
86
- DM_VERSION = '~> 1.0.0'
86
+ DM_VERSION = '~> 1.0'
87
87
  DO_VERSION = '~> 0.10.2'
88
88
  DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
89
89
  RAILS = 'http://github.com/rails/rails.git'
90
90
 
91
- if ENV['EXTLIB']
92
- gem 'extlib', '~> 0.9.15', :git => '#{DATAMAPPER}/extlib.git'
93
- else
94
- gem 'activesupport', '~> 3.0.0', :git => RAILS,
95
- :branch => '3-0-stable',
96
- :require => nil
97
- end
98
-
99
- gem 'bcrypt-ruby', '~> 2.1.0'
91
+ gem 'bcrypt-ruby', '~> 2.1'
100
92
 
101
- gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git"
102
- gem 'dm-types', DM_VERSION, :git => "#{DATAMAPPER}/dm-types.git"
93
+ gem 'dm-core', DM_VERSION, :git => "#{DATAMAPPER}/dm-core.git"
94
+ gem 'dm-types', DM_VERSION, :git => "#{DATAMAPPER}/dm-types.git"
103
95
  gem 'dm-validations', DM_VERSION, :git => "#{DATAMAPPER}/dm-validations.git"
104
96
 
105
97
  group :development do
106
- case RUBY_PLATFORM
107
- when 'java'
108
- gem 'maruku', '~> 0.6.0'
109
- else
110
- gem 'rdiscount', '~> 1.6.3'
111
- end
98
+ gem 'rake', '~> 0.8'
99
+ gem 'ore-tasks', '~> 0.4'
100
+ gem 'rspec', '~> 2.4'
112
101
 
113
- gem 'rake', '~> 0.8.7'
114
- gem 'ore', '~> 0.2.0'
115
- gem 'ore-tasks', '~> 0.1.2'
116
- gem 'rspec', '~> 2.0.0'
117
- gem 'yard', '~> 0.6.0'
102
+ gem 'kramdown', '~> 0.12'
103
+ gem 'yard', '~> 0.7'
118
104
  end
119
105
 
120
106
  group :datamapper do
data/LICENSE.txt CHANGED
@@ -1,6 +1,4 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2010 Hal Brodigan
1
+ Copyright (c) 2010-2011 Hal Brodigan
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining
6
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # dm-is-authenticatable
2
2
 
3
- * [github.com/postmodern/dm-is-authenticatable](http://github.com/postmodern/dm-is-authenticatable)
4
- * [github.com/postmodern/dm-is-authenticatable/issues](http://github.com/postmodern/dm-is-authenticatable/issues)
5
- * Postmodern (postmodern.mod3 at gmail.com)
3
+ * [Source](http://github.com/postmodern/dm-is-authenticatable)
4
+ * [Issues](http://github.com/postmodern/dm-is-authenticatable/issues)
5
+ * [Documentation](http://rubydoc.info/gems/dm-is-authenticatable/frames)
6
+ * [Email](mailto:postmodern.mod3 at gmail.com)
6
7
 
7
8
  ## Description
8
9
 
@@ -57,13 +58,17 @@ Handles finding and authenticating resources in the database:
57
58
 
58
59
  ## Requirements
59
60
 
60
- * [dm-core](http://github.com/datamapper/dm-core/) ~> 1.0.0
61
+ * [bcrypt-ruby](http://rubygems.org/gems/bcrypt-ruby) ~> 2.1
62
+ * [dm-core](http://github.com/datamapper/dm-core/) ~> 1.0
63
+ * [dm-types](http://github.com/datamapper/dm-types/) ~> 1.0
64
+ * [dm-validations](http://github.com/datamapper/dm-validations/) ~> 1.0
61
65
 
62
66
  ## Install
63
67
 
64
- $ sudo gem install dm-is-authenticatable
68
+ $ gem install dm-is-authenticatable
65
69
 
66
70
  ## License
67
71
 
68
- See {file:LICENSE.txt} for license information.
72
+ Copyright (c) 2010-2011 Hal Brodigan
69
73
 
74
+ See {file:LICENSE.txt} for license information.
data/Rakefile CHANGED
@@ -3,16 +3,16 @@ require 'rubygems'
3
3
  begin
4
4
  require 'bundler'
5
5
  rescue LoadError => e
6
- STDERR.puts e.message
7
- STDERR.puts "Run `gem install bundler` to install Bundler."
6
+ warn e.message
7
+ warn "Run `gem install bundler` to install Bundler."
8
8
  exit e.status_code
9
9
  end
10
10
 
11
11
  begin
12
12
  Bundler.setup(:development)
13
13
  rescue Bundler::BundlerError => e
14
- STDERR.puts e.message
15
- STDERR.puts "Run `bundle install` to install missing gems"
14
+ warn e.message
15
+ warn "Run `bundle install` to install missing gems"
16
16
  exit e.status_code
17
17
  end
18
18
 
@@ -1,10 +1,127 @@
1
- # -*- encoding: utf-8 -*-
1
+ # encoding: utf-8
2
2
 
3
- begin
4
- Ore::Specification.new do |gemspec|
5
- # custom logic here
3
+ require 'yaml'
4
+
5
+ Gem::Specification.new do |gemspec|
6
+ files = if File.directory?('.git')
7
+ `git ls-files`.split($/)
8
+ elsif File.directory?('.hg')
9
+ `hg manifest`.split($/)
10
+ elsif File.directory?('.svn')
11
+ `svn ls -R`.split($/).select { |path| File.file?(path) }
12
+ else
13
+ Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
14
+ end
15
+
16
+ filter_files = lambda { |paths|
17
+ case paths
18
+ when Array
19
+ (files & paths)
20
+ when String
21
+ (files & Dir[paths])
22
+ end
23
+ }
24
+
25
+ version = {
26
+ :file => 'lib/dm-is-authenticatable/version.rb',
27
+ :constant => 'DataMapper::Is::Authenticatable::VERSION'
28
+ }
29
+
30
+ defaults = {
31
+ 'name' => File.basename(File.dirname(__FILE__)),
32
+ 'files' => files,
33
+ 'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
34
+ 'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
35
+ 'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
36
+ }
37
+
38
+ metadata = defaults.merge(YAML.load_file('gemspec.yml'))
39
+
40
+ gemspec.name = metadata.fetch('name',defaults[:name])
41
+ gemspec.version = if metadata['version']
42
+ metadata['version']
43
+ elsif File.file?(version[:file])
44
+ require File.join('.',version[:file])
45
+ eval(version[:constant])
46
+ end
47
+
48
+ gemspec.summary = metadata.fetch('summary',metadata['description'])
49
+ gemspec.description = metadata.fetch('description',metadata['summary'])
50
+
51
+ case metadata['license']
52
+ when Array
53
+ gemspec.licenses = metadata['license']
54
+ when String
55
+ gemspec.license = metadata['license']
56
+ end
57
+
58
+ case metadata['authors']
59
+ when Array
60
+ gemspec.authors = metadata['authors']
61
+ when String
62
+ gemspec.author = metadata['authors']
63
+ end
64
+
65
+ gemspec.email = metadata['email']
66
+ gemspec.homepage = metadata['homepage']
67
+
68
+ case metadata['require_paths']
69
+ when Array
70
+ gemspec.require_paths = metadata['require_paths']
71
+ when String
72
+ gemspec.require_path = metadata['require_paths']
73
+ end
74
+
75
+ gemspec.files = filter_files[metadata['files']]
76
+
77
+ gemspec.executables = metadata['executables']
78
+ gemspec.extensions = metadata['extensions']
79
+
80
+ if Gem::VERSION < '1.7.'
81
+ gemspec.default_executable = gemspec.executables.first
82
+ end
83
+
84
+ gemspec.test_files = filter_files[metadata['test_files']]
85
+
86
+ unless gemspec.files.include?('.document')
87
+ gemspec.extra_rdoc_files = metadata['extra_doc_files']
88
+ end
89
+
90
+ gemspec.post_install_message = metadata['post_install_message']
91
+ gemspec.requirements = metadata['requirements']
92
+
93
+ if gemspec.respond_to?(:required_ruby_version=)
94
+ gemspec.required_ruby_version = metadata['required_ruby_version']
95
+ end
96
+
97
+ if gemspec.respond_to?(:required_rubygems_version=)
98
+ gemspec.required_rubygems_version = metadata['required_ruby_version']
99
+ end
100
+
101
+ parse_versions = lambda { |versions|
102
+ case versions
103
+ when Array
104
+ versions.map { |v| v.to_s }
105
+ when String
106
+ versions.split(/,\s*/)
107
+ end
108
+ }
109
+
110
+ if metadata['dependencies']
111
+ metadata['dependencies'].each do |name,versions|
112
+ gemspec.add_dependency(name,parse_versions[versions])
113
+ end
114
+ end
115
+
116
+ if metadata['runtime_dependencies']
117
+ metadata['runtime_dependencies'].each do |name,versions|
118
+ gemspec.add_runtime_dependency(name,parse_versions[versions])
119
+ end
120
+ end
121
+
122
+ if metadata['development_dependencies']
123
+ metadata['development_dependencies'].each do |name,versions|
124
+ gemspec.add_development_dependency(name,parse_versions[versions])
125
+ end
6
126
  end
7
- rescue NameError
8
- STDERR.puts "The 'dm-is-authenticatable.gemspec' file requires Ore."
9
- STDERR.puts "Run `gem install ore` to install Ore."
10
127
  end
data/gemspec.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: dm-is-authenticatable
2
- version: 0.1.0
2
+ version: 0.1.1
3
3
  summary: DataMapper plugin for adding authentication to models.
4
4
  description:
5
5
  A DataMapper plugin for adding authentication and encrypted passwords to
@@ -12,11 +12,11 @@ homepage: http://github.com/postmodern/dm-is-authenticatable
12
12
  has_yard: true
13
13
 
14
14
  dependencies:
15
- bcrypt-ruby: ~> 2.1.0
16
- dm-core: ~> 1.0.0
17
- dm-types: ~> 1.0.0
18
- dm-validations: ~> 1.0.0
15
+ bcrypt-ruby: ~> 2.1
16
+ dm-core: ~> 1.0
17
+ dm-types: ~> 1.0
18
+ dm-validations: ~> 1.0
19
19
 
20
20
  development_dependencies:
21
- bundler: ~> 1.0.0
22
- yard: ~> 0.6.0
21
+ bundler: ~> 1.0
22
+ yard: ~> 0.7
metadata CHANGED
@@ -1,121 +1,92 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dm-is-authenticatable
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 0
9
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Postmodern
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-11-05 00:00:00 -07:00
12
+ date: 2011-08-03 00:00:00.000000000 -07:00
18
13
  default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: bcrypt-ruby
22
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &26002620 !ruby/object:Gem::Requirement
23
18
  none: false
24
- requirements:
19
+ requirements:
25
20
  - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 1
30
- - 0
31
- version: 2.1.0
21
+ - !ruby/object:Gem::Version
22
+ version: '2.1'
32
23
  type: :runtime
33
24
  prerelease: false
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *26002620
26
+ - !ruby/object:Gem::Dependency
36
27
  name: dm-core
37
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ requirement: &26000580 !ruby/object:Gem::Requirement
38
29
  none: false
39
- requirements:
30
+ requirements:
40
31
  - - ~>
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 1
44
- - 0
45
- - 0
46
- version: 1.0.0
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
47
34
  type: :runtime
48
35
  prerelease: false
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *26000580
37
+ - !ruby/object:Gem::Dependency
51
38
  name: dm-types
52
- requirement: &id003 !ruby/object:Gem::Requirement
39
+ requirement: &26000040 !ruby/object:Gem::Requirement
53
40
  none: false
54
- requirements:
41
+ requirements:
55
42
  - - ~>
56
- - !ruby/object:Gem::Version
57
- segments:
58
- - 1
59
- - 0
60
- - 0
61
- version: 1.0.0
43
+ - !ruby/object:Gem::Version
44
+ version: '1.0'
62
45
  type: :runtime
63
46
  prerelease: false
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *26000040
48
+ - !ruby/object:Gem::Dependency
66
49
  name: dm-validations
67
- requirement: &id004 !ruby/object:Gem::Requirement
50
+ requirement: &25999420 !ruby/object:Gem::Requirement
68
51
  none: false
69
- requirements:
52
+ requirements:
70
53
  - - ~>
71
- - !ruby/object:Gem::Version
72
- segments:
73
- - 1
74
- - 0
75
- - 0
76
- version: 1.0.0
54
+ - !ruby/object:Gem::Version
55
+ version: '1.0'
77
56
  type: :runtime
78
57
  prerelease: false
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *25999420
59
+ - !ruby/object:Gem::Dependency
81
60
  name: bundler
82
- requirement: &id005 !ruby/object:Gem::Requirement
61
+ requirement: &25998860 !ruby/object:Gem::Requirement
83
62
  none: false
84
- requirements:
63
+ requirements:
85
64
  - - ~>
86
- - !ruby/object:Gem::Version
87
- segments:
88
- - 1
89
- - 0
90
- - 0
91
- version: 1.0.0
65
+ - !ruby/object:Gem::Version
66
+ version: '1.0'
92
67
  type: :development
93
68
  prerelease: false
94
- version_requirements: *id005
95
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *25998860
70
+ - !ruby/object:Gem::Dependency
96
71
  name: yard
97
- requirement: &id006 !ruby/object:Gem::Requirement
72
+ requirement: &25911000 !ruby/object:Gem::Requirement
98
73
  none: false
99
- requirements:
74
+ requirements:
100
75
  - - ~>
101
- - !ruby/object:Gem::Version
102
- segments:
103
- - 0
104
- - 6
105
- - 0
106
- version: 0.6.0
76
+ - !ruby/object:Gem::Version
77
+ version: '0.7'
107
78
  type: :development
108
79
  prerelease: false
109
- version_requirements: *id006
110
- description: A DataMapper plugin for adding authentication and encrypted passwords to your DataMapper models.
111
- email: postmodern.mod3@gmail.com
80
+ version_requirements: *25911000
81
+ description: A DataMapper plugin for adding authentication and encrypted passwords
82
+ to your DataMapper models.
83
+ email:
84
+ - postmodern.mod3@gmail.com
112
85
  executables: []
113
-
114
86
  extensions: []
115
-
116
- extra_rdoc_files:
87
+ extra_rdoc_files:
117
88
  - README.md
118
- files:
89
+ files:
119
90
  - .rspec
120
91
  - .yardopts
121
92
  - ChangeLog.md
@@ -132,37 +103,29 @@ files:
132
103
  - spec/spec_helper.rb
133
104
  has_rdoc: yard
134
105
  homepage: http://github.com/postmodern/dm-is-authenticatable
135
- licenses:
106
+ licenses:
136
107
  - MIT
137
108
  post_install_message:
138
109
  rdoc_options: []
139
-
140
- require_paths:
110
+ require_paths:
141
111
  - lib
142
- required_ruby_version: !ruby/object:Gem::Requirement
112
+ required_ruby_version: !ruby/object:Gem::Requirement
143
113
  none: false
144
- requirements:
145
- - - ">="
146
- - !ruby/object:Gem::Version
147
- segments:
148
- - 0
149
- version: "0"
150
- required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
151
119
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- segments:
156
- - 1
157
- - 3
158
- - 6
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
159
123
  version: 1.3.6
160
124
  requirements: []
161
-
162
125
  rubyforge_project: dm-is-authenticatable
163
- rubygems_version: 1.3.7
126
+ rubygems_version: 1.6.2
164
127
  signing_key:
165
128
  specification_version: 3
166
129
  summary: DataMapper plugin for adding authentication to models.
167
- test_files:
130
+ test_files:
168
131
  - spec/integration/authenticatable_spec.rb