activepesel 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -18
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +176 -0
  5. data/CHANGELOG.md +7 -0
  6. data/Gemfile +8 -2
  7. data/MIT-LICENSE +1 -1
  8. data/README.md +30 -18
  9. data/Rakefile +1 -38
  10. data/activepesel.gemspec +15 -15
  11. data/lib/active_model/validations/pesel_validator.rb +5 -3
  12. data/lib/activepesel/personal_data.rb +23 -18
  13. data/lib/activepesel/pesel.rb +22 -19
  14. data/lib/activepesel/pesel_attr.rb +5 -8
  15. data/lib/activepesel/pesel_generator.rb +47 -28
  16. data/lib/activepesel/version.rb +3 -1
  17. data/lib/activepesel.rb +8 -1
  18. data/media/id.jpg +0 -0
  19. data/spec/activepesel/pesel_attr_spec.rb +28 -0
  20. data/spec/activepesel/pesel_generator_spec.rb +70 -0
  21. data/spec/activepesel/pesel_spec.rb +98 -0
  22. data/spec/spec_helper.rb +23 -0
  23. metadata +27 -135
  24. data/.rvmrc +0 -1
  25. data/Gemfile.lock +0 -94
  26. data/lib/tasks/activepesel_tasks.rake +0 -4
  27. data/test/activepesel_test.rb +0 -7
  28. data/test/dummy/README.rdoc +0 -261
  29. data/test/dummy/Rakefile +0 -7
  30. data/test/dummy/app/assets/javascripts/application.js +0 -13
  31. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  32. data/test/dummy/app/controllers/application_controller.rb +0 -3
  33. data/test/dummy/app/helpers/application_helper.rb +0 -2
  34. data/test/dummy/app/mailers/.gitkeep +0 -0
  35. data/test/dummy/app/models/#user.rb# +0 -9
  36. data/test/dummy/app/models/.gitkeep +0 -0
  37. data/test/dummy/app/models/user.rb +0 -9
  38. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  39. data/test/dummy/config/application.rb +0 -65
  40. data/test/dummy/config/boot.rb +0 -10
  41. data/test/dummy/config/database.yml +0 -25
  42. data/test/dummy/config/environment.rb +0 -5
  43. data/test/dummy/config/environments/development.rb +0 -37
  44. data/test/dummy/config/environments/production.rb +0 -67
  45. data/test/dummy/config/environments/test.rb +0 -37
  46. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  47. data/test/dummy/config/initializers/inflections.rb +0 -15
  48. data/test/dummy/config/initializers/mime_types.rb +0 -5
  49. data/test/dummy/config/initializers/secret_token.rb +0 -7
  50. data/test/dummy/config/initializers/session_store.rb +0 -8
  51. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  52. data/test/dummy/config/locales/en.yml +0 -5
  53. data/test/dummy/config/routes.rb +0 -58
  54. data/test/dummy/config.ru +0 -4
  55. data/test/dummy/db/development.sqlite3 +0 -0
  56. data/test/dummy/db/migrate/20121114223156_create_users.rb +0 -10
  57. data/test/dummy/db/schema.rb +0 -23
  58. data/test/dummy/db/test.sqlite3 +0 -0
  59. data/test/dummy/lib/assets/.gitkeep +0 -0
  60. data/test/dummy/log/.gitkeep +0 -0
  61. data/test/dummy/log/development.log +0 -96
  62. data/test/dummy/log/test.log +0 -12541
  63. data/test/dummy/public/404.html +0 -26
  64. data/test/dummy/public/422.html +0 -26
  65. data/test/dummy/public/500.html +0 -25
  66. data/test/dummy/public/favicon.ico +0 -0
  67. data/test/dummy/script/rails +0 -6
  68. data/test/dummy/test/fixtures/users.yml +0 -37
  69. data/test/dummy/test/unit/user_test.rb +0 -7
  70. data/test/pesel_attr_test.rb +0 -62
  71. data/test/pesel_generator_test.rb +0 -46
  72. data/test/pesel_test.rb +0 -66
  73. data/test/pesel_validator_test.rb +0 -29
  74. data/test/test_helper.rb +0 -15
@@ -1,33 +1,46 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Activepesel
2
4
  class PeselGenerator
3
-
5
+ DATE_RANGE = (Date.new(1800, 1, 1)..Date.new(2299, 12, 31)).freeze
4
6
  SEX_CODES = {
5
7
  1 => [1, 3, 5, 7, 9],
6
- 2 => [0, 2, 4, 6, 8]
8
+ 2 => [0, 2, 4, 6, 8],
7
9
  }.freeze
8
-
10
+
9
11
  class << self
10
-
11
- def generate(*args)
12
- raise(::ArgumentError, "Bad argument! You can pass :all or :one") unless [:all, :one].include?(args[0])
13
- options = args.extract_options!
14
- raise(::ArgumentError, "Date of birth can only be from range: (1800-01-01..2299-12-31)") if !options[:date_of_birth].respond_to?(:to_date) || !(Date.new(1800,1,1)..Date.new(2299,12,31)).include?(options[:date_of_birth].to_date)
15
- raise(::ArgumentError, "Sex can only be set to 1 - males and 2 - females") if !options[:sex].respond_to?(:to_i) || ![1,2].include?(options[:sex].to_i)
16
- send(args.first, options)
12
+ def generate_one(date_of_birth:, sex:)
13
+ validate_params(date_of_birth, sex)
14
+ one(date_of_birth, sex)
15
+ end
16
+
17
+ def generate_all(date_of_birth:, sex:)
18
+ validate_params(date_of_birth, sex)
19
+ all(date_of_birth, sex)
17
20
  end
18
-
21
+
19
22
  private
20
23
 
21
- def one(options)
22
- incomplete_pesel = "#{date_of_birth_code(options[:date_of_birth])}#{varying_codes[rand(998)]}#{sex_codes(options[:sex])[rand(4)]}"
24
+ def validate_params(date_of_birth, sex)
25
+ if !date_of_birth.respond_to?(:to_date) || !DATE_RANGE.cover?(date_of_birth.to_date)
26
+ raise(::ArgumentError, 'Date of birth can only be from range: (1800-01-01..2299-12-31)')
27
+ end
28
+
29
+ return unless !sex.respond_to?(:to_i) || ![1, 2].include?(sex.to_i)
30
+
31
+ raise(::ArgumentError, 'Sex can only be set to 1 - males and 2 - females')
32
+ end
33
+
34
+ def one(date_of_birth, sex)
35
+ incomplete_pesel = "#{date_of_birth_code(date_of_birth)}#{varying_codes[rand(998)]}#{sex_codes(sex)[rand(4)]}"
23
36
  Pesel.new("#{incomplete_pesel}#{control_digit(incomplete_pesel)}")
24
37
  end
25
38
 
26
- def all(options)
39
+ def all(date_of_birth, sex)
27
40
  [].tap do |pesels|
28
41
  varying_codes.each do |varying_code|
29
- sex_codes(options[:sex]).each do |sex_code|
30
- incomplete_pesel = "#{date_of_birth_code(options[:date_of_birth])}#{varying_code}#{sex_code}"
42
+ sex_codes(sex).each do |sex_code|
43
+ incomplete_pesel = "#{date_of_birth_code(date_of_birth)}#{varying_code}#{sex_code}"
31
44
  pesels << Pesel.new("#{incomplete_pesel}#{control_digit(incomplete_pesel)}")
32
45
  end
33
46
  end
@@ -35,38 +48,44 @@ module Activepesel
35
48
  end
36
49
 
37
50
  def control_digit(incomplete_pesel)
38
- digits = incomplete_pesel.split("").map(&:to_i)
39
- (10 - Pesel::DIGIT_WEIGHTS[0..-2].each_with_index.inject(0){|sum, (factor, idx)| sum + factor * digits[idx]})%10
51
+ digits = incomplete_pesel.chars.map(&:to_i)
52
+
53
+ (10 - Pesel::DIGIT_WEIGHTS[0..-2].each_with_index.reduce(0) do |sum, (factor, idx)|
54
+ sum + (factor * digits[idx])
55
+ end) % 10
40
56
  end
41
-
57
+
42
58
  def sex_codes(sex)
43
59
  SEX_CODES[sex.to_i]
44
60
  end
45
-
61
+
46
62
  def varying_codes
47
- (0..999).to_a.map{|code| sprintf("%03d", code)}
63
+ (0..999).to_a.map { |code| format('%03d', code) }
48
64
  end
49
-
65
+
50
66
  def date_of_birth_code(date_of_birth)
51
- [year_code(date_of_birth.to_date.year), month_code(date_of_birth.to_date.year, date_of_birth.to_date.month), day_code(date_of_birth.to_date.day)].join
67
+ [
68
+ year_code(date_of_birth.to_date.year),
69
+ month_code(date_of_birth.to_date.year, date_of_birth.to_date.month),
70
+ day_code(date_of_birth.to_date.day),
71
+ ].join
52
72
  end
53
-
73
+
54
74
  def century(year)
55
75
  year / 100
56
76
  end
57
77
 
58
78
  def year_code(year)
59
- sprintf("%02d", year - 100 * century(year))
79
+ format('%02d', year - (100 * century(year)))
60
80
  end
61
81
 
62
82
  def month_code(year, month)
63
- sprintf("%02d", month + PersonalData::DELTA[century(year)])
83
+ format('%02d', month + PersonalData::DELTA[century(year)])
64
84
  end
65
85
 
66
86
  def day_code(day)
67
- sprintf("%02d", day)
87
+ format('%02d', day)
68
88
  end
69
-
70
89
  end
71
90
  end
72
91
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Activepesel
2
- VERSION = "0.1.1"
4
+ VERSION = '0.2.0'
3
5
  end
data/lib/activepesel.rb CHANGED
@@ -1,8 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (C) 2023
4
+ # Author: Wojciech Pasternak / voytee
5
+ # Email: wpasternak@gmail.com
6
+ # License: MIT
7
+
1
8
  require 'activepesel/pesel'
2
9
  require 'activepesel/pesel_attr'
3
10
  require 'activepesel/personal_data'
4
11
  require 'activepesel/pesel_generator'
5
- require 'active_model/validations/pesel_validator'
12
+ require 'active_model/validations/pesel_validator' if defined?(ActiveModel)
6
13
 
7
14
  module Activepesel
8
15
  end
data/media/id.jpg ADDED
Binary file
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Activepesel::PeselAttr do
4
+ let(:dummy) do
5
+ Class.new do
6
+ include Activepesel::PeselAttr
7
+
8
+ pesel_attr :pesel_a, :pesel_b
9
+
10
+ attr_reader :pesel_a, :pesel_b
11
+
12
+ def initialize(pesel_a, pesel_b)
13
+ @pesel_a = pesel_a
14
+ @pesel_b = pesel_b
15
+ end
16
+ end
17
+ end
18
+
19
+ subject(:dummy_obj) { dummy.new(pesel_a, pesel_b) }
20
+
21
+ let(:pesel_a) { '88061654752' }
22
+ let(:pesel_b) { '88061654752' }
23
+
24
+ it 'returns extracted personal data' do
25
+ expect(dummy_obj.pesel_a_personal_data).to be_kind_of(Activepesel::PersonalData)
26
+ expect(dummy_obj.pesel_b_personal_data).to be_kind_of(Activepesel::PersonalData)
27
+ end
28
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Activepesel::PeselGenerator do
4
+ describe '.generate_one' do
5
+ subject(:pesel) { described_class.generate_one(**options) }
6
+
7
+ context 'with date_of_birth not covered by PESEL system' do
8
+ let(:options) { { sex: 1, date_of_birth: '3033-01-01' } }
9
+
10
+ specify { expect { pesel }.to raise_exception(ArgumentError) }
11
+ end
12
+
13
+ context 'with sex not covered by PESEL system' do
14
+ let(:options) { { sex: 3, date_of_birth: '1982-06-01' } }
15
+
16
+ specify { expect { pesel }.to raise_exception(ArgumentError) }
17
+ end
18
+
19
+ let(:options) { { sex: sex, date_of_birth: date_of_birth } }
20
+ { 1 => 'men', 2 => 'women' }.each do |sex_code, sex_name|
21
+ context "for #{sex_name}" do
22
+ let(:sex) { sex_code }
23
+
24
+ context 'for year 18XX' do
25
+ let(:date_of_birth) { '1801-12-12' }
26
+ specify { expect(pesel.valid?).to be_truthy }
27
+ specify { expect(pesel.date_of_birth.to_s).to eq(date_of_birth) }
28
+ specify { expect(pesel.sex).to eq(sex) }
29
+ end
30
+
31
+ context 'for year 19XX' do
32
+ let(:date_of_birth) { '1901-12-12' }
33
+ specify { expect(pesel.valid?).to be_truthy }
34
+ specify { expect(pesel.date_of_birth.to_s).to eq(date_of_birth) }
35
+ specify { expect(pesel.sex).to eq(sex) }
36
+ end
37
+
38
+ context 'for year 20XX' do
39
+ let(:date_of_birth) { '2001-12-12' }
40
+ specify { expect(pesel.valid?).to be_truthy }
41
+ specify { expect(pesel.date_of_birth.to_s).to eq(date_of_birth) }
42
+ specify { expect(pesel.sex).to eq(sex) }
43
+ end
44
+
45
+ context 'for year 21XX' do
46
+ let(:date_of_birth) { '2101-12-12' }
47
+ specify { expect(pesel.valid?).to be_truthy }
48
+ specify { expect(pesel.date_of_birth.to_s).to eq(date_of_birth) }
49
+ specify { expect(pesel.sex).to eq(sex) }
50
+ end
51
+
52
+ context 'for year 22XX' do
53
+ let(:date_of_birth) { '2201-12-12' }
54
+ specify { expect(pesel.valid?).to be_truthy }
55
+ specify { expect(pesel.date_of_birth.to_s).to eq(date_of_birth) }
56
+ specify { expect(pesel.sex).to eq(sex) }
57
+ end
58
+ end
59
+ end
60
+ end
61
+
62
+ describe '.generate_all' do
63
+ subject(:pesels) { described_class.generate_all(sex: 1, date_of_birth: '1983-06-04') }
64
+
65
+ specify { expect(pesels.count).to eq(5000) }
66
+ specify { expect(pesels.map(&:valid?).uniq.first).to be_truthy }
67
+ specify { expect(pesels.map(&:date_of_birth).uniq.first.to_s).to eq('1983-06-04') }
68
+ specify { expect(pesels.map(&:sex).uniq.first).to eq(1) }
69
+ end
70
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.describe Activepesel::Pesel do
4
+ subject(:pesel) { described_class.new(pesel_number) }
5
+ describe '#valid?' do
6
+ context 'with valid pesel number' do
7
+ let(:pesel_number) { '88061654752' }
8
+ it 'returns true' do
9
+ expect(pesel.valid?).to be_truthy
10
+ end
11
+ end
12
+
13
+ context 'with invalid pesel number' do
14
+ let(:pesel_number) { '88061654751' }
15
+ it 'returns false' do
16
+ expect(pesel.valid?).to be_falsey
17
+ end
18
+ end
19
+
20
+ context 'with completely gibberish pesel number' do
21
+ let(:pesel_number) { 'sdfljklsrtbr' }
22
+ it 'returns false' do
23
+ expect(pesel.valid?).to be_falsey
24
+ end
25
+ end
26
+ end
27
+
28
+ describe '.generate_all' do
29
+ it 'responds to the generate method' do
30
+ expect(described_class).to respond_to :generate_all
31
+ end
32
+ end
33
+
34
+ describe '.generate_one' do
35
+ it 'responds to the generate method' do
36
+ expect(described_class).to respond_to :generate_one
37
+ end
38
+ end
39
+
40
+ describe '#sex' do
41
+ subject { pesel.sex }
42
+
43
+ context 'with invalid pesel' do
44
+ let(:pesel_number) { '88061654751' }
45
+ it { is_expected.to eq(9) }
46
+ end
47
+
48
+ context 'with valid pesel' do
49
+ context 'with male sex' do
50
+ let(:pesel_number) { '10240474019' }
51
+
52
+ it { is_expected.to eq(1) }
53
+ end
54
+
55
+ context 'with female sex' do
56
+ let(:pesel_number) { '10240428209' }
57
+
58
+ it { is_expected.to eq(2) }
59
+ end
60
+ end
61
+ end
62
+
63
+ describe '#date_of_birth' do
64
+ subject { pesel.date_of_birth }
65
+
66
+ context 'with invalid pesel' do
67
+ let(:pesel_number) { '88061654751' }
68
+ it { is_expected.to be_nil }
69
+ end
70
+
71
+ context 'with valid pesel' do
72
+ context 'with year 18XX' do
73
+ let(:pesel_number) { '01852014407' }
74
+ it { is_expected.to eq(Date.new(1801, 5, 20)) }
75
+ end
76
+
77
+ context 'with year 19XX' do
78
+ let(:pesel_number) { '88061654752' }
79
+ it { is_expected.to eq(Date.new(1988, 6, 16)) }
80
+ end
81
+
82
+ context 'with year 20XX' do
83
+ let(:pesel_number) { '10240428209' }
84
+ it { is_expected.to eq(Date.new(2010, 4, 4)) }
85
+ end
86
+
87
+ context 'with year 21XX' do
88
+ let(:pesel_number) { '34433088405' }
89
+ it { is_expected.to eq(Date.new(2134, 3, 30)) }
90
+ end
91
+
92
+ context 'with year 22XX' do
93
+ let(:pesel_number) { '22682152604' }
94
+ it { is_expected.to eq(Date.new(2222, 8, 21)) }
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'activepesel'
4
+ Bundler.setup
5
+
6
+ RSpec.configure do |config|
7
+ config.expect_with :rspec do |expectations|
8
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
9
+ end
10
+ config.mock_with :rspec do |mocks|
11
+ mocks.verify_partial_doubles = true
12
+ end
13
+
14
+ config.shared_context_metadata_behavior = :apply_to_host_groups
15
+
16
+ config.default_formatter = 'doc' if config.files_to_run.one?
17
+
18
+ config.profile_examples = 10
19
+
20
+ config.order = :random
21
+
22
+ Kernel.srand config.seed
23
+ end
metadata CHANGED
@@ -1,60 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activepesel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - voytee
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-03 00:00:00.000000000 Z
11
+ date: 2023-01-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: rails
14
+ name: activesupport
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: 3.0.0
19
+ version: '3.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 3.0.0
30
- - !ruby/object:Gem::Dependency
31
- name: sqlite3
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- description: A simple, ORM agnostic, Ruby 1.9 compatible PESEL (polish personal id
47
- number) validator and personal data extractor for Rails 3, based on ActiveModel.
26
+ version: '3.0'
27
+ description: A simple, ORM agnostic, PESEL (polish personal id number) validator and
28
+ personal data extractor
48
29
  email:
49
30
  - wpasternak@gmail.com
50
31
  executables: []
51
32
  extensions: []
52
33
  extra_rdoc_files: []
53
34
  files:
54
- - .gitignore
55
- - .rvmrc
35
+ - ".gitignore"
36
+ - ".rspec"
37
+ - ".rubocop.yml"
38
+ - CHANGELOG.md
56
39
  - Gemfile
57
- - Gemfile.lock
58
40
  - MIT-LICENSE
59
41
  - README.md
60
42
  - Rakefile
@@ -66,122 +48,32 @@ files:
66
48
  - lib/activepesel/pesel_attr.rb
67
49
  - lib/activepesel/pesel_generator.rb
68
50
  - lib/activepesel/version.rb
69
- - lib/tasks/activepesel_tasks.rake
70
- - test/activepesel_test.rb
71
- - test/dummy/README.rdoc
72
- - test/dummy/Rakefile
73
- - test/dummy/app/assets/javascripts/application.js
74
- - test/dummy/app/assets/stylesheets/application.css
75
- - test/dummy/app/controllers/application_controller.rb
76
- - test/dummy/app/helpers/application_helper.rb
77
- - test/dummy/app/mailers/.gitkeep
78
- - test/dummy/app/models/.gitkeep
79
- - test/dummy/app/models/user.rb
80
- - test/dummy/app/views/layouts/application.html.erb
81
- - test/dummy/config.ru
82
- - test/dummy/config/application.rb
83
- - test/dummy/config/boot.rb
84
- - test/dummy/config/database.yml
85
- - test/dummy/config/environment.rb
86
- - test/dummy/config/environments/development.rb
87
- - test/dummy/config/environments/production.rb
88
- - test/dummy/config/environments/test.rb
89
- - test/dummy/config/initializers/backtrace_silencers.rb
90
- - test/dummy/config/initializers/inflections.rb
91
- - test/dummy/config/initializers/mime_types.rb
92
- - test/dummy/config/initializers/secret_token.rb
93
- - test/dummy/config/initializers/session_store.rb
94
- - test/dummy/config/initializers/wrap_parameters.rb
95
- - test/dummy/config/locales/en.yml
96
- - test/dummy/config/routes.rb
97
- - test/dummy/db/migrate/20121114223156_create_users.rb
98
- - test/dummy/db/schema.rb
99
- - test/dummy/lib/assets/.gitkeep
100
- - test/dummy/log/.gitkeep
101
- - test/dummy/public/404.html
102
- - test/dummy/public/422.html
103
- - test/dummy/public/500.html
104
- - test/dummy/public/favicon.ico
105
- - test/dummy/script/rails
106
- - test/dummy/test/fixtures/users.yml
107
- - test/dummy/test/unit/user_test.rb
108
- - test/pesel_attr_test.rb
109
- - test/pesel_generator_test.rb
110
- - test/pesel_test.rb
111
- - test/pesel_validator_test.rb
112
- - test/test_helper.rb
113
- - test/dummy/app/models/#user.rb#
114
- - test/dummy/db/development.sqlite3
115
- - test/dummy/db/test.sqlite3
116
- - test/dummy/log/development.log
117
- - test/dummy/log/test.log
51
+ - media/id.jpg
52
+ - spec/activepesel/pesel_attr_spec.rb
53
+ - spec/activepesel/pesel_generator_spec.rb
54
+ - spec/activepesel/pesel_spec.rb
55
+ - spec/spec_helper.rb
118
56
  homepage: http://github.com/voytee/activepesel
119
57
  licenses: []
58
+ metadata:
59
+ rubygems_mfa_required: 'true'
120
60
  post_install_message:
121
61
  rdoc_options: []
122
62
  require_paths:
123
63
  - lib
124
64
  required_ruby_version: !ruby/object:Gem::Requirement
125
- none: false
126
65
  requirements:
127
- - - ! '>='
66
+ - - ">="
128
67
  - !ruby/object:Gem::Version
129
- version: '0'
68
+ version: 2.7.5
130
69
  required_rubygems_version: !ruby/object:Gem::Requirement
131
- none: false
132
70
  requirements:
133
- - - ! '>='
71
+ - - ">="
134
72
  - !ruby/object:Gem::Version
135
73
  version: '0'
136
74
  requirements: []
137
- rubyforge_project:
138
- rubygems_version: 1.8.24
75
+ rubygems_version: 3.1.6
139
76
  signing_key:
140
- specification_version: 3
141
- summary: A simple, ORM agnostic, Ruby 1.9 compatible PESEL validator and personal
142
- data extractor for Rails 3, based on ActiveModel.
143
- test_files:
144
- - test/activepesel_test.rb
145
- - test/dummy/app/assets/javascripts/application.js
146
- - test/dummy/app/assets/stylesheets/application.css
147
- - test/dummy/app/controllers/application_controller.rb
148
- - test/dummy/app/helpers/application_helper.rb
149
- - test/dummy/app/models/#user.rb#
150
- - test/dummy/app/models/user.rb
151
- - test/dummy/app/views/layouts/application.html.erb
152
- - test/dummy/config/application.rb
153
- - test/dummy/config/boot.rb
154
- - test/dummy/config/database.yml
155
- - test/dummy/config/environment.rb
156
- - test/dummy/config/environments/development.rb
157
- - test/dummy/config/environments/production.rb
158
- - test/dummy/config/environments/test.rb
159
- - test/dummy/config/initializers/backtrace_silencers.rb
160
- - test/dummy/config/initializers/inflections.rb
161
- - test/dummy/config/initializers/mime_types.rb
162
- - test/dummy/config/initializers/secret_token.rb
163
- - test/dummy/config/initializers/session_store.rb
164
- - test/dummy/config/initializers/wrap_parameters.rb
165
- - test/dummy/config/locales/en.yml
166
- - test/dummy/config/routes.rb
167
- - test/dummy/config.ru
168
- - test/dummy/db/development.sqlite3
169
- - test/dummy/db/migrate/20121114223156_create_users.rb
170
- - test/dummy/db/schema.rb
171
- - test/dummy/db/test.sqlite3
172
- - test/dummy/log/development.log
173
- - test/dummy/log/test.log
174
- - test/dummy/public/404.html
175
- - test/dummy/public/422.html
176
- - test/dummy/public/500.html
177
- - test/dummy/public/favicon.ico
178
- - test/dummy/Rakefile
179
- - test/dummy/README.rdoc
180
- - test/dummy/script/rails
181
- - test/dummy/test/fixtures/users.yml
182
- - test/dummy/test/unit/user_test.rb
183
- - test/pesel_attr_test.rb
184
- - test/pesel_generator_test.rb
185
- - test/pesel_test.rb
186
- - test/pesel_validator_test.rb
187
- - test/test_helper.rb
77
+ specification_version: 4
78
+ summary: A simple, ORM agnostic, PESEL validator and personal data extractor
79
+ test_files: []
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.3@activepesel --create
data/Gemfile.lock DELETED
@@ -1,94 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- activepesel (0.1.0)
5
- rails (>= 3.0.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (3.2.9)
11
- actionpack (= 3.2.9)
12
- mail (~> 2.4.4)
13
- actionpack (3.2.9)
14
- activemodel (= 3.2.9)
15
- activesupport (= 3.2.9)
16
- builder (~> 3.0.0)
17
- erubis (~> 2.7.0)
18
- journey (~> 1.0.4)
19
- rack (~> 1.4.0)
20
- rack-cache (~> 1.2)
21
- rack-test (~> 0.6.1)
22
- sprockets (~> 2.2.1)
23
- activemodel (3.2.9)
24
- activesupport (= 3.2.9)
25
- builder (~> 3.0.0)
26
- activerecord (3.2.9)
27
- activemodel (= 3.2.9)
28
- activesupport (= 3.2.9)
29
- arel (~> 3.0.2)
30
- tzinfo (~> 0.3.29)
31
- activeresource (3.2.9)
32
- activemodel (= 3.2.9)
33
- activesupport (= 3.2.9)
34
- activesupport (3.2.9)
35
- i18n (~> 0.6)
36
- multi_json (~> 1.0)
37
- arel (3.0.2)
38
- builder (3.0.4)
39
- erubis (2.7.0)
40
- hike (1.2.1)
41
- i18n (0.6.1)
42
- journey (1.0.4)
43
- json (1.7.5)
44
- mail (2.4.4)
45
- i18n (>= 0.4.0)
46
- mime-types (~> 1.16)
47
- treetop (~> 1.4.8)
48
- mime-types (1.19)
49
- multi_json (1.3.7)
50
- polyglot (0.3.3)
51
- rack (1.4.1)
52
- rack-cache (1.2)
53
- rack (>= 0.4)
54
- rack-ssl (1.3.2)
55
- rack
56
- rack-test (0.6.2)
57
- rack (>= 1.0)
58
- rails (3.2.9)
59
- actionmailer (= 3.2.9)
60
- actionpack (= 3.2.9)
61
- activerecord (= 3.2.9)
62
- activeresource (= 3.2.9)
63
- activesupport (= 3.2.9)
64
- bundler (~> 1.0)
65
- railties (= 3.2.9)
66
- railties (3.2.9)
67
- actionpack (= 3.2.9)
68
- activesupport (= 3.2.9)
69
- rack-ssl (~> 1.3.2)
70
- rake (>= 0.8.7)
71
- rdoc (~> 3.4)
72
- thor (>= 0.14.6, < 2.0)
73
- rake (10.0.0)
74
- rdoc (3.12)
75
- json (~> 1.4)
76
- sprockets (2.2.1)
77
- hike (~> 1.2)
78
- multi_json (~> 1.0)
79
- rack (~> 1.0)
80
- tilt (~> 1.1, != 1.3.0)
81
- sqlite3 (1.3.6)
82
- thor (0.16.0)
83
- tilt (1.3.3)
84
- treetop (1.4.12)
85
- polyglot
86
- polyglot (>= 0.3.1)
87
- tzinfo (0.3.35)
88
-
89
- PLATFORMS
90
- ruby
91
-
92
- DEPENDENCIES
93
- activepesel!
94
- sqlite3
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :activepesel do
3
- # # Task goes here
4
- # end