has_defaults 0.4.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/test.yml +108 -0
  3. data/.gitignore +1 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +32 -0
  6. data/Gemfile +1 -0
  7. data/Gemfile.3.2.mysql2 +16 -0
  8. data/Gemfile.3.2.mysql2.lock +75 -0
  9. data/Gemfile.4.2.mysql2 +15 -0
  10. data/Gemfile.4.2.mysql2.lock +73 -0
  11. data/Gemfile.4.2.pg +15 -0
  12. data/Gemfile.4.2.pg.lock +73 -0
  13. data/Gemfile.5.2.mysql2 +15 -0
  14. data/Gemfile.5.2.mysql2.lock +71 -0
  15. data/Gemfile.5.2.pg +16 -0
  16. data/Gemfile.5.2.pg.lock +77 -0
  17. data/Gemfile.6.1.pg +15 -0
  18. data/Gemfile.6.1.pg.lock +75 -0
  19. data/Gemfile.7.0.pg +15 -0
  20. data/Gemfile.7.0.pg.lock +73 -0
  21. data/Gemfile.lock +1 -0
  22. data/{MIT-LICENSE → LICENSE} +1 -1
  23. data/README.md +42 -18
  24. data/Rakefile +5 -29
  25. data/has_defaults.gemspec +24 -14
  26. data/lib/has_defaults/active_record_ext.rb +10 -3
  27. data/lib/has_defaults/version.rb +1 -1
  28. data/lib/has_defaults.rb +1 -3
  29. metadata +58 -129
  30. data/spec/rails-2.3/Gemfile +0 -8
  31. data/spec/rails-2.3/Gemfile.lock +0 -51
  32. data/spec/rails-2.3/Rakefile +0 -11
  33. data/spec/rails-2.3/app_root/config/boot.rb +0 -129
  34. data/spec/rails-2.3/app_root/config/database.yml +0 -4
  35. data/spec/rails-2.3/app_root/config/environment.rb +0 -14
  36. data/spec/rails-2.3/app_root/config/environments/test.rb +0 -28
  37. data/spec/rails-2.3/app_root/config/preinitializer.rb +0 -20
  38. data/spec/rails-2.3/app_root/config/routes.rb +0 -4
  39. data/spec/rails-2.3/app_root/lib/console_with_fixtures.rb +0 -4
  40. data/spec/rails-2.3/app_root/log/.gitignore +0 -1
  41. data/spec/rails-2.3/app_root/script/console +0 -7
  42. data/spec/rails-2.3/rcov.opts +0 -2
  43. data/spec/rails-2.3/spec.opts +0 -4
  44. data/spec/rails-2.3/spec_helper.rb +0 -24
  45. data/spec/rails-3.0/.rspec +0 -2
  46. data/spec/rails-3.0/Gemfile +0 -9
  47. data/spec/rails-3.0/Gemfile.lock +0 -101
  48. data/spec/rails-3.0/Rakefile +0 -10
  49. data/spec/rails-3.0/app_root/.gitignore +0 -4
  50. data/spec/rails-3.0/app_root/config/application.rb +0 -32
  51. data/spec/rails-3.0/app_root/config/boot.rb +0 -13
  52. data/spec/rails-3.0/app_root/config/database.yml +0 -4
  53. data/spec/rails-3.0/app_root/config/environment.rb +0 -5
  54. data/spec/rails-3.0/app_root/config/environments/test.rb +0 -35
  55. data/spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb +0 -7
  56. data/spec/rails-3.0/app_root/config/initializers/inflections.rb +0 -10
  57. data/spec/rails-3.0/app_root/config/initializers/mime_types.rb +0 -5
  58. data/spec/rails-3.0/app_root/config/initializers/secret_token.rb +0 -7
  59. data/spec/rails-3.0/app_root/config/initializers/session_store.rb +0 -8
  60. data/spec/rails-3.0/app_root/config/locales/en.yml +0 -5
  61. data/spec/rails-3.0/app_root/config/routes.rb +0 -58
  62. data/spec/rails-3.0/app_root/lib/tasks/.gitkeep +0 -0
  63. data/spec/rails-3.0/app_root/log/.gitkeep +0 -0
  64. data/spec/rails-3.0/app_root/script/rails +0 -6
  65. data/spec/rails-3.0/log/in_memory.log +0 -33
  66. data/spec/rails-3.0/rcov.opts +0 -2
  67. data/spec/rails-3.0/spec_helper.rb +0 -25
  68. data/spec/rails-3.2/.rspec +0 -2
  69. data/spec/rails-3.2/Gemfile +0 -9
  70. data/spec/rails-3.2/Gemfile.lock +0 -120
  71. data/spec/rails-3.2/Rakefile +0 -10
  72. data/spec/rails-3.2/app_root/.gitignore +0 -4
  73. data/spec/rails-3.2/app_root/config/application.rb +0 -32
  74. data/spec/rails-3.2/app_root/config/boot.rb +0 -13
  75. data/spec/rails-3.2/app_root/config/database.yml +0 -4
  76. data/spec/rails-3.2/app_root/config/environment.rb +0 -5
  77. data/spec/rails-3.2/app_root/config/environments/test.rb +0 -35
  78. data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +0 -7
  79. data/spec/rails-3.2/app_root/config/initializers/inflections.rb +0 -10
  80. data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +0 -5
  81. data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +0 -7
  82. data/spec/rails-3.2/app_root/config/initializers/session_store.rb +0 -8
  83. data/spec/rails-3.2/app_root/config/locales/en.yml +0 -5
  84. data/spec/rails-3.2/app_root/config/routes.rb +0 -58
  85. data/spec/rails-3.2/app_root/lib/tasks/.gitkeep +0 -0
  86. data/spec/rails-3.2/app_root/log/.gitkeep +0 -0
  87. data/spec/rails-3.2/app_root/script/rails +0 -6
  88. data/spec/rails-3.2/log/in_memory.log +0 -33
  89. data/spec/rails-3.2/rcov.opts +0 -2
  90. data/spec/rails-3.2/spec_helper.rb +0 -25
  91. data/spec/shared/app_root/app/controllers/application_controller.rb +0 -2
  92. data/spec/shared/app_root/app/models/donut.rb +0 -26
  93. data/spec/shared/app_root/app/models/model_without_defaults.rb +0 -2
  94. data/spec/shared/app_root/app/models/pastry.rb +0 -6
  95. data/spec/shared/app_root/db/migrate/001_create_pastries.rb +0 -19
  96. data/spec/shared/app_root/db/migrate/002_create_model_without_defaults.rb +0 -12
  97. data/spec/shared/has_defaults/active_record_ext_spec.rb +0 -105
data/Gemfile.7.0.pg ADDED
@@ -0,0 +1,15 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Runtime dependencies
4
+ gem 'activerecord', '~>7.0.1'
5
+ gem 'pg', '~>1.1'
6
+
7
+ # Development dependencies
8
+ gem 'rake'
9
+ gem 'database_cleaner'
10
+ gem 'rspec', '~>3.5'
11
+ gem 'gemika', '>= 0.2.0'
12
+ gem 'pry-byebug'
13
+
14
+ # Gem under test
15
+ gem 'has_defaults', path: '.'
@@ -0,0 +1,73 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ has_defaults (1.1.0)
5
+ activerecord
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (7.0.1)
11
+ activesupport (= 7.0.1)
12
+ activerecord (7.0.1)
13
+ activemodel (= 7.0.1)
14
+ activesupport (= 7.0.1)
15
+ activesupport (7.0.1)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ byebug (11.1.3)
21
+ coderay (1.1.3)
22
+ concurrent-ruby (1.1.9)
23
+ database_cleaner (2.0.1)
24
+ database_cleaner-active_record (~> 2.0.0)
25
+ database_cleaner-active_record (2.0.1)
26
+ activerecord (>= 5.a)
27
+ database_cleaner-core (~> 2.0.0)
28
+ database_cleaner-core (2.0.1)
29
+ diff-lcs (1.5.0)
30
+ gemika (0.6.1)
31
+ i18n (1.8.11)
32
+ concurrent-ruby (~> 1.0)
33
+ method_source (1.0.0)
34
+ minitest (5.15.0)
35
+ pg (1.2.3)
36
+ pry (0.13.1)
37
+ coderay (~> 1.1)
38
+ method_source (~> 1.0)
39
+ pry-byebug (3.9.0)
40
+ byebug (~> 11.0)
41
+ pry (~> 0.13.0)
42
+ rake (13.0.6)
43
+ rspec (3.10.0)
44
+ rspec-core (~> 3.10.0)
45
+ rspec-expectations (~> 3.10.0)
46
+ rspec-mocks (~> 3.10.0)
47
+ rspec-core (3.10.1)
48
+ rspec-support (~> 3.10.0)
49
+ rspec-expectations (3.10.2)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-mocks (3.10.2)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-support (3.10.3)
56
+ tzinfo (2.0.4)
57
+ concurrent-ruby (~> 1.0)
58
+
59
+ PLATFORMS
60
+ x86_64-linux
61
+
62
+ DEPENDENCIES
63
+ activerecord (~> 7.0.1)
64
+ database_cleaner
65
+ gemika (>= 0.2.0)
66
+ has_defaults!
67
+ pg (~> 1.1)
68
+ pry-byebug
69
+ rake
70
+ rspec (~> 3.5)
71
+
72
+ BUNDLED WITH
73
+ 2.2.26
data/Gemfile.lock ADDED
@@ -0,0 +1 @@
1
+ ./Gemfile.7.0.pg.lock
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008 Nando Vieira
1
+ Copyright (c) 2008-2016 Nando Vieira, with subsequent changes by makandra GmbH
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,46 +1,70 @@
1
- has_defaults
2
- ============
1
+ # has_defaults [![Build Status](https://travis-ci.org/makandra/has_defaults.svg?branch=master)](https://travis-ci.org/makandra/has_defaults)
3
2
 
4
3
  Default values for ActiveRecord models.
5
4
 
6
- Installation
7
- ------------
5
+ ## Installation
8
6
 
9
7
  In your `Gemfile`
10
8
 
11
- gem 'has_defaults'
9
+ ```
10
+ gem 'has_defaults'
11
+ ```
12
12
 
13
13
  Now run
14
14
 
15
- bundle install
15
+ ```
16
+ bundle install
17
+ ```
16
18
 
17
-
18
- Usage
19
- -----
19
+ ## Usage
20
20
 
21
21
  Add the method call `has_defaults` to your model.
22
22
 
23
- class Page < ActiveRecord::Base
24
- has_defaults :title => "New page", :body => "Put your text here"
25
- end
23
+ ```
24
+ class Page < ActiveRecord::Base
25
+ has_defaults :title => "New page", :body => "Put your text here"
26
+ end
27
+ ```
26
28
 
27
29
  Attributes will be set only if it's a new record and the attribute is blank.
28
30
 
29
31
  Retrieve the default attribute with the `default_for` instance method:
30
32
 
31
- @page.default_for(:title)
33
+ ```
34
+ @page.default_for(:title)
35
+ ```
32
36
 
33
37
  You can pass Proc as attribute:
34
38
 
35
- has_defaults :expires_at => proc { Time.now }
39
+ ```
40
+ has_defaults :expires_at => proc { Time.now }
41
+ ```
36
42
 
37
43
  You can override the default attributes as follow:
38
44
 
39
- Page.has_defaults_options = {:title => "Here's your new page", :body => "Write your page text"}
45
+ ```
46
+ Page.has_defaults_options = {:title => "Here's your new page", :body => "Write your page text"}
47
+ ```
48
+
49
+ ## Development
50
+
51
+ There are tests in `spec`. We only accept PRs with tests. To run tests:
52
+
53
+ - Install Ruby 2.5.7
54
+ - Create a local test database `has_defaults_test` in both MySQL and PostgreSQL
55
+ - Copy `spec/support/database.sample.yml` to `spec/support/database.yml` and enter your local credentials for the test databases
56
+ - Install development dependencies using `bundle install`
57
+ - Run tests using `bundle exec rspec`
58
+
59
+ We recommend to test large changes against multiple versions of Ruby and multiple dependency sets. We provide some rake tasks to help with this:
60
+
61
+ - Install development dependencies using `rake matrix:install`
62
+ - Run tests using `rake matrix:spec`
63
+
64
+ Note that we have configured Github Actions to automatically run tests in all supported Ruby versions and dependency sets after each push. We will only merge pull requests with successful test runs.
40
65
 
41
66
 
42
- Maintainer
43
- ----------
67
+ ## Credits
44
68
 
45
69
  * Original version by Nando Vieira (<http://simplesideias.com.br>)
46
- * Patches in this fork by Henning Koch of makandra (<http://www.makandra.de/>)
70
+ * Patches in this fork by makandra (<http://makandra.com/>)
data/Rakefile CHANGED
@@ -1,33 +1,9 @@
1
1
  require 'rake'
2
- require 'spec/rake/spectask'
3
2
  require 'bundler/gem_tasks'
4
-
5
- desc 'Default: Run all specs.'
6
- task :default => 'all:spec'
7
-
8
- namespace :all do
9
-
10
- desc "Run specs on all spec apps"
11
- task :spec do
12
- for_each_directory_of('spec/**/Rakefile') do |directory|
13
- env = "SPEC=../../#{ENV['SPEC']} " if ENV['SPEC']
14
- system("cd #{directory} && #{env} bundle exec rake spec")
15
- end
16
- end
17
-
18
- desc "Bundle all spec apps"
19
- task :bundle do
20
- for_each_directory_of('spec/**/Gemfile') do |directory|
21
- system("cd #{directory} && bundle install")
22
- end
23
- end
24
-
3
+ begin
4
+ require 'gemika/tasks'
5
+ rescue LoadError
6
+ puts 'Run `gem install gemika` for additional tasks'
25
7
  end
26
8
 
27
- def for_each_directory_of(path, &block)
28
- Dir[path].sort.each do |rakefile|
29
- directory = File.dirname(rakefile)
30
- puts '', "\033[44m#{directory}\033[0m", ''
31
- block.call(directory)
32
- end
33
- end
9
+ task :default => 'matrix:spec'
data/has_defaults.gemspec CHANGED
@@ -1,19 +1,29 @@
1
- $:.push File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
2
3
  require "has_defaults/version"
3
4
 
4
- Gem::Specification.new do |s|
5
- s.name = 'has_defaults'
6
- s.version = HasDefaults::VERSION
7
- s.authors = ["Henning Koch"]
8
- s.email = 'henning.koch@makandra.de'
9
- s.homepage = 'https://github.com/makandra/has_defaults'
10
- s.summary = 'Default values for ActiveRecord models.'
11
- s.description = s.summary
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'has_defaults'
7
+ spec.version = HasDefaults::VERSION
8
+ spec.required_ruby_version = '>= 2.3.0'
9
+ spec.authors = ['Henning Koch']
10
+ spec.email = ['henning.koch@makandra.de']
12
11
 
13
- s.files = `git ls-files`.split("\n")
14
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
- s.require_paths = ["lib"]
12
+ spec.summary = 'Default values for ActiveRecord models'
13
+ spec.description = 'Default values for ActiveRecord models'
14
+ spec.homepage = 'https://github.com/makandra/has_defaults'
15
+ spec.license = 'MIT'
17
16
 
18
- s.add_dependency('activerecord')
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
+ end
22
+ spec.bindir = 'exe'
23
+ spec.executables = spec.files.grep(%r(^exe/)) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_dependency('activerecord')
27
+
28
+ # Development dependencies are defined in the Gemfile (therefore no `spec.add_development_dependency` directives)
19
29
  end
@@ -1,10 +1,13 @@
1
1
  module HasDefaults
2
+
3
+ class Error < StandardError; end
4
+
2
5
  module ActiveRecordExt
3
6
 
4
7
  module ClassMethods
5
8
 
6
9
  def has_defaults(attrs)
7
- raise "Hash expected; #{attrs.class} given." unless attrs.is_a?(Hash)
10
+ raise Error, "Hash expected; #{attrs.class} given." unless attrs.is_a?(Hash)
8
11
 
9
12
  include InstanceMethods
10
13
 
@@ -27,7 +30,7 @@ module HasDefaults
27
30
  self.has_defaults_options ||= {}
28
31
  self.has_defaults_options.merge!(attrs)
29
32
 
30
- if Rails.version < '3'
33
+ if ActiveRecord::VERSION::MAJOR < 3
31
34
  # ActiveRecord only calls after_initialize callbacks only if is
32
35
  # explicit defined in a class. We should however only define that
33
36
  # callback if a default has been set, as it really slow downs Rails.
@@ -63,7 +66,7 @@ module HasDefaults
63
66
  def evaluate_raw_default_value(raw_value)
64
67
  value = raw_value
65
68
  if value.respond_to?(:call)
66
- value = instance_eval(&value)
69
+ value = instance_exec(&value)
67
70
  end
68
71
  value
69
72
  end
@@ -72,3 +75,7 @@ module HasDefaults
72
75
 
73
76
  end
74
77
  end
78
+
79
+ ActiveRecord::Base.extend(HasDefaults::ActiveRecordExt::ClassMethods)
80
+
81
+
@@ -1,5 +1,5 @@
1
1
  module HasDefaults
2
2
 
3
- VERSION = '0.4.1'
3
+ VERSION = '1.1.0'
4
4
 
5
5
  end
data/lib/has_defaults.rb CHANGED
@@ -1,4 +1,2 @@
1
+ require 'active_record'
1
2
  require 'has_defaults/active_record_ext'
2
-
3
- ActiveRecord::Base.__send__(:extend, HasDefaults::ActiveRecordExt::ClassMethods)
4
-
metadata CHANGED
@@ -1,155 +1,84 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: has_defaults
3
- version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
6
- segments:
7
- - 0
8
- - 4
9
- - 1
10
- version: 0.4.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Henning Koch
14
8
  autorequire:
15
- bindir: bin
9
+ bindir: exe
16
10
  cert_chain: []
17
-
18
- date: 2013-05-03 00:00:00 +02:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2022-01-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: activerecord
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
27
17
  - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
33
20
  type: :runtime
34
- version_requirements: *id001
35
- description: Default values for ActiveRecord models.
36
- email: henning.koch@makandra.de
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Default values for ActiveRecord models
28
+ email:
29
+ - henning.koch@makandra.de
37
30
  executables: []
38
-
39
31
  extensions: []
40
-
41
32
  extra_rdoc_files: []
42
-
43
- files:
44
- - .gitignore
45
- - MIT-LICENSE
33
+ files:
34
+ - ".github/workflows/test.yml"
35
+ - ".gitignore"
36
+ - ".ruby-version"
37
+ - CHANGELOG.md
38
+ - Gemfile
39
+ - Gemfile.3.2.mysql2
40
+ - Gemfile.3.2.mysql2.lock
41
+ - Gemfile.4.2.mysql2
42
+ - Gemfile.4.2.mysql2.lock
43
+ - Gemfile.4.2.pg
44
+ - Gemfile.4.2.pg.lock
45
+ - Gemfile.5.2.mysql2
46
+ - Gemfile.5.2.mysql2.lock
47
+ - Gemfile.5.2.pg
48
+ - Gemfile.5.2.pg.lock
49
+ - Gemfile.6.1.pg
50
+ - Gemfile.6.1.pg.lock
51
+ - Gemfile.7.0.pg
52
+ - Gemfile.7.0.pg.lock
53
+ - Gemfile.lock
54
+ - LICENSE
46
55
  - README.md
47
56
  - Rakefile
48
57
  - has_defaults.gemspec
49
58
  - lib/has_defaults.rb
50
59
  - lib/has_defaults/active_record_ext.rb
51
60
  - lib/has_defaults/version.rb
52
- - spec/rails-2.3/Gemfile
53
- - spec/rails-2.3/Gemfile.lock
54
- - spec/rails-2.3/Rakefile
55
- - spec/rails-2.3/app_root/config/boot.rb
56
- - spec/rails-2.3/app_root/config/database.yml
57
- - spec/rails-2.3/app_root/config/environment.rb
58
- - spec/rails-2.3/app_root/config/environments/test.rb
59
- - spec/rails-2.3/app_root/config/preinitializer.rb
60
- - spec/rails-2.3/app_root/config/routes.rb
61
- - spec/rails-2.3/app_root/lib/console_with_fixtures.rb
62
- - spec/rails-2.3/app_root/log/.gitignore
63
- - spec/rails-2.3/app_root/script/console
64
- - spec/rails-2.3/rcov.opts
65
- - spec/rails-2.3/spec.opts
66
- - spec/rails-2.3/spec_helper.rb
67
- - spec/rails-3.0/.rspec
68
- - spec/rails-3.0/Gemfile
69
- - spec/rails-3.0/Gemfile.lock
70
- - spec/rails-3.0/Rakefile
71
- - spec/rails-3.0/app_root/.gitignore
72
- - spec/rails-3.0/app_root/config/application.rb
73
- - spec/rails-3.0/app_root/config/boot.rb
74
- - spec/rails-3.0/app_root/config/database.yml
75
- - spec/rails-3.0/app_root/config/environment.rb
76
- - spec/rails-3.0/app_root/config/environments/test.rb
77
- - spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb
78
- - spec/rails-3.0/app_root/config/initializers/inflections.rb
79
- - spec/rails-3.0/app_root/config/initializers/mime_types.rb
80
- - spec/rails-3.0/app_root/config/initializers/secret_token.rb
81
- - spec/rails-3.0/app_root/config/initializers/session_store.rb
82
- - spec/rails-3.0/app_root/config/locales/en.yml
83
- - spec/rails-3.0/app_root/config/routes.rb
84
- - spec/rails-3.0/app_root/lib/tasks/.gitkeep
85
- - spec/rails-3.0/app_root/log/.gitkeep
86
- - spec/rails-3.0/app_root/script/rails
87
- - spec/rails-3.0/log/in_memory.log
88
- - spec/rails-3.0/rcov.opts
89
- - spec/rails-3.0/spec_helper.rb
90
- - spec/rails-3.2/.rspec
91
- - spec/rails-3.2/Gemfile
92
- - spec/rails-3.2/Gemfile.lock
93
- - spec/rails-3.2/Rakefile
94
- - spec/rails-3.2/app_root/.gitignore
95
- - spec/rails-3.2/app_root/config/application.rb
96
- - spec/rails-3.2/app_root/config/boot.rb
97
- - spec/rails-3.2/app_root/config/database.yml
98
- - spec/rails-3.2/app_root/config/environment.rb
99
- - spec/rails-3.2/app_root/config/environments/test.rb
100
- - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
101
- - spec/rails-3.2/app_root/config/initializers/inflections.rb
102
- - spec/rails-3.2/app_root/config/initializers/mime_types.rb
103
- - spec/rails-3.2/app_root/config/initializers/secret_token.rb
104
- - spec/rails-3.2/app_root/config/initializers/session_store.rb
105
- - spec/rails-3.2/app_root/config/locales/en.yml
106
- - spec/rails-3.2/app_root/config/routes.rb
107
- - spec/rails-3.2/app_root/lib/tasks/.gitkeep
108
- - spec/rails-3.2/app_root/log/.gitkeep
109
- - spec/rails-3.2/app_root/script/rails
110
- - spec/rails-3.2/log/in_memory.log
111
- - spec/rails-3.2/rcov.opts
112
- - spec/rails-3.2/spec_helper.rb
113
- - spec/shared/app_root/app/controllers/application_controller.rb
114
- - spec/shared/app_root/app/models/donut.rb
115
- - spec/shared/app_root/app/models/model_without_defaults.rb
116
- - spec/shared/app_root/app/models/pastry.rb
117
- - spec/shared/app_root/db/migrate/001_create_pastries.rb
118
- - spec/shared/app_root/db/migrate/002_create_model_without_defaults.rb
119
- - spec/shared/has_defaults/active_record_ext_spec.rb
120
- has_rdoc: true
121
61
  homepage: https://github.com/makandra/has_defaults
122
- licenses: []
123
-
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
124
65
  post_install_message:
125
66
  rdoc_options: []
126
-
127
- require_paths:
67
+ require_paths:
128
68
  - lib
129
- required_ruby_version: !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
132
71
  - - ">="
133
- - !ruby/object:Gem::Version
134
- hash: 3
135
- segments:
136
- - 0
137
- version: "0"
138
- required_rubygems_version: !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
72
+ - !ruby/object:Gem::Version
73
+ version: 2.3.0
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
141
76
  - - ">="
142
- - !ruby/object:Gem::Version
143
- hash: 3
144
- segments:
145
- - 0
146
- version: "0"
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
147
79
  requirements: []
148
-
149
- rubyforge_project:
150
- rubygems_version: 1.3.9.5
80
+ rubygems_version: 3.1.6
151
81
  signing_key:
152
- specification_version: 3
153
- summary: Default values for ActiveRecord models.
82
+ specification_version: 4
83
+ summary: Default values for ActiveRecord models
154
84
  test_files: []
155
-
@@ -1,8 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'sqlite3'
4
- gem 'rails', '=2.3.10'
5
- gem 'rspec', '<2'
6
- gem 'rspec-rails', '<2'
7
- gem 'ruby-debug'
8
- gem 'has_defaults', :path => '../..'
@@ -1,51 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- has_defaults (0.4.0)
5
- activerecord
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (2.3.10)
11
- actionpack (= 2.3.10)
12
- actionpack (2.3.10)
13
- activesupport (= 2.3.10)
14
- rack (~> 1.1.0)
15
- activerecord (2.3.10)
16
- activesupport (= 2.3.10)
17
- activeresource (2.3.10)
18
- activesupport (= 2.3.10)
19
- activesupport (2.3.10)
20
- columnize (0.3.2)
21
- linecache (0.43)
22
- rack (1.1.0)
23
- rails (2.3.10)
24
- actionmailer (= 2.3.10)
25
- actionpack (= 2.3.10)
26
- activerecord (= 2.3.10)
27
- activeresource (= 2.3.10)
28
- activesupport (= 2.3.10)
29
- rake (>= 0.8.3)
30
- rake (0.8.7)
31
- rspec (1.3.1)
32
- rspec-rails (1.3.3)
33
- rack (>= 1.0.0)
34
- rspec (= 1.3.1)
35
- ruby-debug (0.10.4)
36
- columnize (>= 0.1)
37
- ruby-debug-base (~> 0.10.4.0)
38
- ruby-debug-base (0.10.4)
39
- linecache (>= 0.3)
40
- sqlite3 (1.3.6)
41
-
42
- PLATFORMS
43
- ruby
44
-
45
- DEPENDENCIES
46
- has_defaults!
47
- rails (= 2.3.10)
48
- rspec (< 2)
49
- rspec-rails (< 2)
50
- ruby-debug
51
- sqlite3
@@ -1,11 +0,0 @@
1
- require 'rake'
2
- require 'spec/rake/spectask'
3
-
4
- desc 'Default: Run all specs for a specific rails version.'
5
- task :default => :spec
6
-
7
- desc "Run all specs for a specific rails version"
8
- Spec::Rake::SpecTask.new() do |t|
9
- t.spec_opts = ['--options', "\"spec.opts\""]
10
- t.spec_files = defined?(SPEC) ? SPEC : FileList['**/*_spec.rb', '../shared/**/*_spec.rb']
11
- end