deep_freezer 1.0.0 → 2.0.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.
- checksums.yaml +5 -5
- data/README.md +19 -5
- data/lib/deep_freezer/base.rb +38 -36
- data/lib/deep_freezer/defrost.rb +29 -31
- data/lib/deep_freezer/version.rb +3 -1
- data/lib/deep_freezer.rb +9 -0
- metadata +35 -46
- data/.gitignore +0 -11
- data/.rspec +0 -3
- data/.travis.yml +0 -5
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -64
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/deep_freezer.gemspec +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 50a257a7231847fe4e8ec496a1e3e8acab76515aabeebecd26eb446546e9e47a
|
|
4
|
+
data.tar.gz: 2580a0adea1b0aee2365282d3e2405215042d84e3cad6d21c8c1f500ecbc71a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d02448c1d24e08b91820ee4ddc3934df8ccf4c558f9f5e7f444afe8d7fd911bc1b8e0698eede3f1e07e7807beaf451fb68238c9a8dba2526beac394b31417e86
|
|
7
|
+
data.tar.gz: fa837c253f3c9758decce750239b86f698e8b1bb47e1adfb49994f7181a09384614300e4fe4624e6aa08376ecfc07a57e0d679dd0bdf1fe6c378eaa98f40912e
|
data/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
## Freeze ActiveRecord models to Rails compatible fixtures.
|
|
1
|
+

|
|
3
2
|
|
|
3
|
+
## Freeze production like data for development
|
|
4
4
|
This gem allows you to 'freeze' your ActiveRecord models to create repeatable datasets for development.
|
|
5
5
|
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
[](https://codeclimate.com/github/markprovan/deep_freezer/maintainability)
|
|
9
|
+
[](https://github.com/markprovan/deep_freezer/actions/workflows/ci.yml)
|
|
10
|
+
|
|
6
11
|
## Installation
|
|
7
12
|
|
|
8
13
|
Add this line to your application's Gemfile:
|
|
@@ -88,11 +93,20 @@ Fixtures can be deleted manually in the directory, or by running `Freezers::Base
|
|
|
88
93
|
|
|
89
94
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
90
95
|
|
|
91
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
96
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
97
|
+
|
|
98
|
+
### Releasing
|
|
99
|
+
|
|
100
|
+
Releases are published by GitHub Actions using RubyGems [trusted publishing](https://guides.rubygems.org/trusted-publishing/), so no API key is needed.
|
|
101
|
+
|
|
102
|
+
1. Update `VERSION` in `lib/deep_freezer/version.rb` and add an entry to `CHANGELOG.md`.
|
|
103
|
+
2. Merge to `master`, then create a release in the GitHub UI with a new tag (e.g. `v2.0.0`) targeting `master`.
|
|
104
|
+
|
|
105
|
+
The `Release` workflow checks the tag matches the version, runs the specs and RuboCop, and pushes the gem to [rubygems.org](https://rubygems.org).
|
|
92
106
|
|
|
93
107
|
## Contributing
|
|
94
108
|
|
|
95
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
109
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/markprovan/deep_freezer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
96
110
|
|
|
97
111
|
## License
|
|
98
112
|
|
|
@@ -100,4 +114,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
100
114
|
|
|
101
115
|
## Code of Conduct
|
|
102
116
|
|
|
103
|
-
Everyone interacting in the Freezer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
117
|
+
Everyone interacting in the Freezer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/markprovan/deep_freezer/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/deep_freezer/base.rb
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
module DeepFreezer
|
|
4
|
+
class Base
|
|
5
|
+
class << self
|
|
6
|
+
attr_reader :attrs, :fixture_path
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
def fixture_path=(path)
|
|
9
|
+
@fixture_path = path && Pathname.new(path)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
def self.freeze(*attrs)
|
|
14
|
+
@attrs = attrs
|
|
15
|
+
end
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
# With an argument, sets the model; without, returns it.
|
|
18
|
+
def self.model(model = nil)
|
|
19
|
+
@model = model if model
|
|
20
|
+
@model
|
|
21
|
+
end
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
self.class.attrs.each do |attr|
|
|
22
|
-
if self.respond_to?(attr)
|
|
23
|
-
freezable.send("#{attr}=", self.send(attr))
|
|
24
|
-
else
|
|
25
|
-
freezable.send("#{attr}=", @obj.send(attr))
|
|
26
|
-
end
|
|
23
|
+
def self.reset!
|
|
24
|
+
Dir.glob(DeepFreezer::Base.fixture_path.join("*.yml")).each { |file| File.delete(file) }
|
|
27
25
|
end
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
def initialize(obj)
|
|
28
|
+
@obj = obj
|
|
29
|
+
end
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
def freeze
|
|
32
|
+
freezable = @obj.class.new
|
|
33
|
+
self.class.attrs.each do |attr|
|
|
34
|
+
value = respond_to?(attr) ? public_send(attr) : @obj.public_send(attr)
|
|
35
|
+
freezable.public_send("#{attr}=", value)
|
|
36
|
+
end
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Dir.glob(path).each { |file| File.delete(file) }
|
|
37
|
-
end
|
|
38
|
+
# Drop only the leading document marker, so values containing "---" survive.
|
|
39
|
+
yaml = [{ freezable.class.to_s => freezable.attributes }].to_yaml.delete_prefix("---")
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
write_to_file yaml, freezable.class.to_s.tableize
|
|
42
|
+
end
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
path = DeepFreezer::Base.fixture_path.to_s + "/#{file_name.pluralize}.yml"
|
|
43
|
-
dirname = File.dirname(path)
|
|
44
|
-
unless File.directory?(dirname)
|
|
45
|
-
FileUtils.mkdir_p(dirname)
|
|
46
|
-
end
|
|
44
|
+
private
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
def write_to_file(yaml, file_name)
|
|
47
|
+
path = DeepFreezer::Base.fixture_path.join("#{file_name.pluralize}.yml")
|
|
48
|
+
FileUtils.mkdir_p(path.dirname)
|
|
49
|
+
File.open(path, "a") { |file| file << yaml }
|
|
49
50
|
end
|
|
51
|
+
end
|
|
50
52
|
end
|
data/lib/deep_freezer/defrost.rb
CHANGED
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DeepFreezer
|
|
4
|
+
class Defrost
|
|
5
|
+
PERMITTED_YAML_CLASSES = [Date, Time, Symbol, BigDecimal].freeze
|
|
6
|
+
|
|
7
|
+
def self.load!
|
|
8
|
+
Dir.glob(DeepFreezer::Base.fixture_path.join("**/*.yml")).each do |file|
|
|
9
|
+
objects = YAML.safe_load_file(file, permitted_classes: PERMITTED_YAML_CLASSES, aliases: true)
|
|
10
|
+
next if objects.blank?
|
|
11
|
+
|
|
12
|
+
puts "Loading #{objects.first.keys.first}"
|
|
13
|
+
objects.each do |object|
|
|
14
|
+
ActiveRecord::Base.connection.execute sql_for(hash_to_instance(object))
|
|
15
|
+
end
|
|
12
16
|
end
|
|
13
17
|
end
|
|
14
|
-
end
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
instance = klass.constantize.new
|
|
19
|
+
def self.hash_to_instance(object)
|
|
20
|
+
klass, attrs = object.first
|
|
21
|
+
instance = klass.constantize.new
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
instance.send("#{a}=", attrs[a])
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
instance
|
|
26
|
-
end
|
|
23
|
+
attrs.each { |name, value| instance.public_send("#{name}=", value) }
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
instance
|
|
26
|
+
end
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
def self.sql_for(record)
|
|
29
|
+
model = record.class
|
|
30
|
+
table = model.arel_table
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
im.into model.arel_table
|
|
32
|
+
values = record.attributes_for_database.map { |name, value| [table[name], value] }
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
insert = Arel::InsertManager.new(table)
|
|
35
|
+
insert.insert(values)
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
model.connection.to_sql(insert)
|
|
38
|
+
end
|
|
41
39
|
end
|
|
42
40
|
end
|
data/lib/deep_freezer/version.rb
CHANGED
data/lib/deep_freezer.rb
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "active_record"
|
|
4
|
+
require "bigdecimal"
|
|
5
|
+
require "date"
|
|
6
|
+
require "fileutils"
|
|
7
|
+
require "pathname"
|
|
8
|
+
require "yaml"
|
|
9
|
+
|
|
1
10
|
require "deep_freezer/version"
|
|
2
11
|
require "deep_freezer/base"
|
|
3
12
|
require "deep_freezer/defrost"
|
metadata
CHANGED
|
@@ -1,136 +1,127 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deep_freezer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mark Provan
|
|
8
|
-
|
|
9
|
-
bindir: exe
|
|
8
|
+
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: '7.1'
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
|
-
version:
|
|
21
|
+
version: '9.0'
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
25
|
requirements:
|
|
27
|
-
- - "
|
|
26
|
+
- - ">="
|
|
28
27
|
- !ruby/object:Gem::Version
|
|
29
|
-
version:
|
|
28
|
+
version: '7.1'
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
31
|
+
version: '9.0'
|
|
33
32
|
- !ruby/object:Gem::Dependency
|
|
34
|
-
name:
|
|
33
|
+
name: irb
|
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
|
36
35
|
requirements:
|
|
37
|
-
- - "
|
|
36
|
+
- - ">="
|
|
38
37
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
38
|
+
version: '0'
|
|
40
39
|
type: :development
|
|
41
40
|
prerelease: false
|
|
42
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
42
|
requirements:
|
|
44
|
-
- - "
|
|
43
|
+
- - ">="
|
|
45
44
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
45
|
+
version: '0'
|
|
47
46
|
- !ruby/object:Gem::Dependency
|
|
48
|
-
name:
|
|
47
|
+
name: rake
|
|
49
48
|
requirement: !ruby/object:Gem::Requirement
|
|
50
49
|
requirements:
|
|
51
|
-
- - "
|
|
50
|
+
- - "~>"
|
|
52
51
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0'
|
|
52
|
+
version: '13.0'
|
|
54
53
|
type: :development
|
|
55
54
|
prerelease: false
|
|
56
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
56
|
requirements:
|
|
58
|
-
- - "
|
|
57
|
+
- - "~>"
|
|
59
58
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
59
|
+
version: '13.0'
|
|
61
60
|
- !ruby/object:Gem::Dependency
|
|
62
|
-
name:
|
|
61
|
+
name: rspec
|
|
63
62
|
requirement: !ruby/object:Gem::Requirement
|
|
64
63
|
requirements:
|
|
65
64
|
- - "~>"
|
|
66
65
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '
|
|
66
|
+
version: '3.13'
|
|
68
67
|
type: :development
|
|
69
68
|
prerelease: false
|
|
70
69
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
70
|
requirements:
|
|
72
71
|
- - "~>"
|
|
73
72
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '
|
|
73
|
+
version: '3.13'
|
|
75
74
|
- !ruby/object:Gem::Dependency
|
|
76
|
-
name:
|
|
75
|
+
name: rubocop
|
|
77
76
|
requirement: !ruby/object:Gem::Requirement
|
|
78
77
|
requirements:
|
|
79
78
|
- - "~>"
|
|
80
79
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '
|
|
80
|
+
version: '1.70'
|
|
82
81
|
type: :development
|
|
83
82
|
prerelease: false
|
|
84
83
|
version_requirements: !ruby/object:Gem::Requirement
|
|
85
84
|
requirements:
|
|
86
85
|
- - "~>"
|
|
87
86
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: '
|
|
87
|
+
version: '1.70'
|
|
89
88
|
- !ruby/object:Gem::Dependency
|
|
90
|
-
name:
|
|
89
|
+
name: sqlite3
|
|
91
90
|
requirement: !ruby/object:Gem::Requirement
|
|
92
91
|
requirements:
|
|
93
92
|
- - ">="
|
|
94
93
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
94
|
+
version: '2.1'
|
|
96
95
|
type: :development
|
|
97
96
|
prerelease: false
|
|
98
97
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
98
|
requirements:
|
|
100
99
|
- - ">="
|
|
101
100
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: '
|
|
101
|
+
version: '2.1'
|
|
103
102
|
description: This gem allows you to 'freeze' your ActiveRecord models to Rails compatible
|
|
104
103
|
fixture files. This allows you to store real data statically for quick start dev/staging
|
|
105
|
-
|
|
104
|
+
environments.
|
|
106
105
|
email:
|
|
107
106
|
- markgprovan@gmail.com
|
|
108
107
|
executables: []
|
|
109
108
|
extensions: []
|
|
110
109
|
extra_rdoc_files: []
|
|
111
110
|
files:
|
|
112
|
-
- ".gitignore"
|
|
113
|
-
- ".rspec"
|
|
114
|
-
- ".travis.yml"
|
|
115
|
-
- CODE_OF_CONDUCT.md
|
|
116
|
-
- Gemfile
|
|
117
|
-
- Gemfile.lock
|
|
118
111
|
- LICENSE.txt
|
|
119
112
|
- README.md
|
|
120
|
-
- Rakefile
|
|
121
|
-
- bin/console
|
|
122
|
-
- bin/setup
|
|
123
|
-
- deep_freezer.gemspec
|
|
124
113
|
- lib/deep_freezer.rb
|
|
125
114
|
- lib/deep_freezer/base.rb
|
|
126
115
|
- lib/deep_freezer/defrost.rb
|
|
127
116
|
- lib/deep_freezer/version.rb
|
|
128
|
-
homepage: https://github.com/
|
|
117
|
+
homepage: https://github.com/markprovan/deep_freezer
|
|
129
118
|
licenses:
|
|
130
119
|
- MIT
|
|
131
120
|
metadata:
|
|
132
121
|
allowed_push_host: https://rubygems.org
|
|
133
|
-
|
|
122
|
+
homepage_uri: https://github.com/markprovan/deep_freezer
|
|
123
|
+
source_code_uri: https://github.com/markprovan/deep_freezer
|
|
124
|
+
rubygems_mfa_required: 'true'
|
|
134
125
|
rdoc_options: []
|
|
135
126
|
require_paths:
|
|
136
127
|
- lib
|
|
@@ -138,16 +129,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
129
|
requirements:
|
|
139
130
|
- - ">="
|
|
140
131
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: '
|
|
132
|
+
version: '3.1'
|
|
142
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
134
|
requirements:
|
|
144
135
|
- - ">="
|
|
145
136
|
- !ruby/object:Gem::Version
|
|
146
137
|
version: '0'
|
|
147
138
|
requirements: []
|
|
148
|
-
|
|
149
|
-
rubygems_version: 2.4.5.3
|
|
150
|
-
signing_key:
|
|
139
|
+
rubygems_version: 3.6.9
|
|
151
140
|
specification_version: 4
|
|
152
141
|
summary: Freeze ActiveRecord models to Rails compatible fixtures.
|
|
153
142
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
-
orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at mark.provan@itison.com. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
-
|
|
73
|
-
[homepage]: http://contributor-covenant.org
|
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
deep_freezer (1.0.0)
|
|
5
|
-
activerecord (> 4.2.10, < 6.0.0)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
activemodel (5.1.5)
|
|
11
|
-
activesupport (= 5.1.5)
|
|
12
|
-
activerecord (5.1.5)
|
|
13
|
-
activemodel (= 5.1.5)
|
|
14
|
-
activesupport (= 5.1.5)
|
|
15
|
-
arel (~> 8.0)
|
|
16
|
-
activerecord-nulldb-adapter (0.3.8)
|
|
17
|
-
activerecord (>= 2.0.0)
|
|
18
|
-
activesupport (5.1.5)
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
-
i18n (~> 0.7)
|
|
21
|
-
minitest (~> 5.1)
|
|
22
|
-
tzinfo (~> 1.1)
|
|
23
|
-
arel (8.0.0)
|
|
24
|
-
coderay (1.1.2)
|
|
25
|
-
concurrent-ruby (1.0.5)
|
|
26
|
-
diff-lcs (1.3)
|
|
27
|
-
i18n (0.9.5)
|
|
28
|
-
concurrent-ruby (~> 1.0)
|
|
29
|
-
method_source (0.9.0)
|
|
30
|
-
minitest (5.11.3)
|
|
31
|
-
pry (0.11.3)
|
|
32
|
-
coderay (~> 1.1.0)
|
|
33
|
-
method_source (~> 0.9.0)
|
|
34
|
-
rake (10.4.2)
|
|
35
|
-
rspec (3.5.0)
|
|
36
|
-
rspec-core (~> 3.5.0)
|
|
37
|
-
rspec-expectations (~> 3.5.0)
|
|
38
|
-
rspec-mocks (~> 3.5.0)
|
|
39
|
-
rspec-core (3.5.4)
|
|
40
|
-
rspec-support (~> 3.5.0)
|
|
41
|
-
rspec-expectations (3.5.0)
|
|
42
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.5.0)
|
|
44
|
-
rspec-mocks (3.5.0)
|
|
45
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.5.0)
|
|
47
|
-
rspec-support (3.5.0)
|
|
48
|
-
thread_safe (0.3.6)
|
|
49
|
-
tzinfo (1.2.5)
|
|
50
|
-
thread_safe (~> 0.1)
|
|
51
|
-
|
|
52
|
-
PLATFORMS
|
|
53
|
-
ruby
|
|
54
|
-
|
|
55
|
-
DEPENDENCIES
|
|
56
|
-
activerecord-nulldb-adapter
|
|
57
|
-
bundler (~> 1.16)
|
|
58
|
-
deep_freezer!
|
|
59
|
-
pry
|
|
60
|
-
rake (~> 10.0)
|
|
61
|
-
rspec (~> 3.0)
|
|
62
|
-
|
|
63
|
-
BUNDLED WITH
|
|
64
|
-
1.16.1
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "deep_freezer"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/deep_freezer.gemspec
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require "deep_freezer/version"
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = "deep_freezer"
|
|
8
|
-
spec.version = DeepFreezer::VERSION
|
|
9
|
-
spec.authors = ["Mark Provan"]
|
|
10
|
-
spec.email = ["markgprovan@gmail.com"]
|
|
11
|
-
|
|
12
|
-
spec.summary = %q{Freeze ActiveRecord models to Rails compatible fixtures.}
|
|
13
|
-
spec.description = %q{This gem allows you to 'freeze' your ActiveRecord models to Rails compatible fixture files. This allows you to store real data statically for quick start dev/staging evironments.}
|
|
14
|
-
spec.homepage = "https://github.com/itison/deep_freezer"
|
|
15
|
-
spec.license = "MIT"
|
|
16
|
-
|
|
17
|
-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
18
|
-
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
19
|
-
if spec.respond_to?(:metadata)
|
|
20
|
-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
21
|
-
else
|
|
22
|
-
raise "RubyGems 2.0 or newer is required to protect against " \
|
|
23
|
-
"public gem pushes."
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
27
|
-
f.match(%r{^(test|spec|features)/})
|
|
28
|
-
end
|
|
29
|
-
spec.bindir = "exe"
|
|
30
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
31
|
-
spec.require_paths = ["lib"]
|
|
32
|
-
|
|
33
|
-
spec.add_dependency "activerecord", "> 4.2.10", "< 6.0.0"
|
|
34
|
-
|
|
35
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
|
36
|
-
spec.add_development_dependency "pry"
|
|
37
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
|
38
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
|
39
|
-
spec.add_development_dependency "activerecord-nulldb-adapter"
|
|
40
|
-
end
|