Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Commit

Permalink
Use bundler.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Mar 31, 2014
1 parent 2680c49 commit b6593c6
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 119 deletions.
2 changes: 2 additions & 0 deletions Gemfile
@@ -0,0 +1,2 @@
source "http://rubygems.org"
gemspec
80 changes: 80 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,80 @@
PATH
remote: .
specs:
password_strength (0.3.2)
activerecord

GEM
remote: http://rubygems.org/
specs:
activemodel (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
activerecord (4.0.4)
activemodel (= 4.0.4)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.4)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.4)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
atomic (1.1.16)
awesome_print (1.2.0)
builder (3.1.4)
coderay (1.1.0)
columnize (0.3.6)
debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.2)
diff-lcs (1.2.5)
i18n (0.6.9)
method_source (0.8.2)
minitest (4.7.5)
multi_json (1.9.2)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
pry-meta (0.0.6)
awesome_print
pry
pry-debugger
pry-remote
pry-remote (0.1.8)
pry (~> 0.9)
slop (~> 3.0)
rake (10.2.2)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
slop (3.5.0)
sqlite3 (1.3.9)
thread_safe (0.3.1)
atomic (>= 1.1.7, < 2)
tzinfo (0.3.39)

PLATFORMS
ruby

DEPENDENCIES
password_strength!
pry-meta
rake
rspec
sqlite3
43 changes: 1 addition & 42 deletions Rakefile
@@ -1,16 +1,5 @@
require "rcov/rcovtask"
require "rake/testtask"
require "rake/rdoctask"
require "lib/password_strength/version"

Rcov::RcovTask.new do |t|
t.test_files = FileList["test/**/*_test.rb"]
t.rcov_opts = ["--sort coverage", "--exclude .renv,.bundle,helper,errors.rb"]

t.output_dir = "coverage"
t.libs << "test"
t.verbose = true
end
require "rdoc/task"

Rake::TestTask.new do |t|
t.libs += %w[test lib]
Expand All @@ -27,33 +16,3 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include("README.rdoc", "CHANGELOG.rdoc")
rdoc.rdoc_files.include("lib/**/*.rb")
end

begin
require "jeweler"

JEWEL = Jeweler::Tasks.new do |gem|
gem.name = "password_strength"
gem.email = "fnando.vieira@gmail.com"
gem.homepage = "http://github.com/fnando/password_strength"
gem.authors = ["Nando Vieira"]
gem.version = PasswordStrength::Version::STRING
gem.summary = "Check password strength against several rules. Includes ActiveRecord support."
gem.description = <<-TXT
Validates the strength of a password according to several rules:
* size
* 3+ numbers
* 2+ special characters
* uppercased and downcased letters
* combination of numbers, letters and symbols
* password contains username
* sequences (123, abc, aaa)
TXT
gem.files = FileList["{README,CHANGELOG}.rdoc", "{lib,test,javascripts,locales}/**/*"]
gem.add_dependency "activesupport", ">= 2.3.5"
end

Jeweler::GemcutterTasks.new
rescue LoadError
puts "[JEWELER] You need to install Jeweler - `gem install jeweler` - to build this gem"
end
94 changes: 19 additions & 75 deletions password_strength.gemspec
@@ -1,82 +1,26 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
require "./lib/password_strength/version"

Gem::Specification.new do |s|
s.name = %q{password_strength}
s.version = "0.3.2"
s.name = "password_strength"
s.version = PasswordStrength::Version::STRING
s.platform = Gem::Platform::RUBY
s.required_ruby_version = ">= 1.9"
s.authors = ["Nando Vieira"]
s.email = ["fnando.vieira@gmail.com"]
s.homepage = "http://github.com/fnando/password_strength"
s.summary = "Check password strength against several rules. Includes ActiveRecord support."
s.description = s.summary
s.license = "MIT"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nando Vieira"]
s.date = %q{2010-09-17}
s.description = %q{Validates the strength of a password according to several rules:
* size
* 3+ numbers
* 2+ special characters
* uppercased and downcased letters
* combination of numbers, letters and symbols
* password contains username
* sequences (123, abc, aaa)
}
s.email = %q{fnando.vieira@gmail.com}
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = [
"CHANGELOG.rdoc",
"README.rdoc",
"javascripts/jquery.strength.js",
"javascripts/password_strength.js",
"lib/password_strength.rb",
"lib/password_strength/active_record.rb",
"lib/password_strength/active_record/ar2.rb",
"lib/password_strength/active_record/ar3.rb",
"lib/password_strength/base.rb",
"lib/password_strength/validators/windows2008.rb",
"lib/password_strength/version.rb",
"locales/en.yml",
"locales/pt.yml",
"test/active_record_test.rb",
"test/jquery-1.4.2.js",
"test/jquery_strength_test.html",
"test/jquery_strength_test.js",
"test/jsunittest/jsunittest.js",
"test/jsunittest/unittest.css",
"test/password_strength_test.html",
"test/password_strength_test.js",
"test/password_strength_test.rb",
"test/schema.rb",
"test/test_helper.rb",
"test/user.rb",
"test/validators/windows2008_test.rb"
]
s.homepage = %q{http://github.com/fnando/password_strength}
s.rdoc_options = ["--charset=UTF-8"]
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{Check password strength against several rules. Includes ActiveRecord support.}
s.test_files = [
"test/active_record_test.rb",
"test/password_strength_test.rb",
"test/schema.rb",
"test/test_helper.rb",
"test/user.rb",
"test/validators/windows2008_test.rb"
]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
s.add_dependency "activerecord"

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
else
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
end
else
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
end
s.add_development_dependency "rspec"
s.add_development_dependency "rake"
s.add_development_dependency "pry-meta"
s.add_development_dependency "sqlite3"
end

5 changes: 3 additions & 2 deletions test/test_helper.rb
@@ -1,9 +1,10 @@
$KCODE = "utf8" if RUBY_VERSION < "1.9"

require "bundler/setup"
require "test/unit"
require "ostruct"
require "active_record"

I18n.enforce_available_locales = false

Rails = OpenStruct.new(:version => ActiveRecord::VERSION::STRING)
require "password_strength"

Expand Down

0 comments on commit b6593c6

Please sign in to comment.