deep_freezer 1.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e1efc00f291e048d002a8a4c8e3fbec16550e2d4
4
- data.tar.gz: 2c0e6124cb1fbdac3fcb56d48824203d5ce9c377
2
+ SHA256:
3
+ metadata.gz: 634689567ca196953f2b6a1d45d00d1c1cb71877a973f1396584424ae4278719
4
+ data.tar.gz: 69c5ec1368df575495821a55034500a86bf461483df18c5edda9cf5ef35761eb
5
5
  SHA512:
6
- metadata.gz: fc16fed0eff7cdc4715518d1ad7de7dc9fd1e5e4e6befa4ed415b70f6fbd24a11715ae637da53b4e7245d12f74f603359cd422e22b006fec7f675282407fd793
7
- data.tar.gz: a198b857b8fd00f1f7787ad3715765f45526cb23fef2d77b3a0e822501f17a84962392c609990e7ca3bdd94a7c731d503ca32e60f51cc4cb959b47ca19a362ef
6
+ metadata.gz: b58d13ef0aa7c7082ebbd5ccb428afe9b246077b77c8882620d2c49f9e5624228c76589017b2ce2dde6a63de7fd31a89a8e66ec46c180c36af940389618d92eb
7
+ data.tar.gz: 1606d95af4b5dbccfd2c719d9231c5d056d5468fa238ea536db1c74500fe75204cdc2ec924fed2e1c5cf656181f45d4f58631e00b925833ba44c26be1c6c05b4
data/README.md CHANGED
@@ -1,8 +1,13 @@
1
- # Deep Freezer v1.0.0
2
- ## Freeze ActiveRecord models to Rails compatible fixtures.
1
+ ![Logo](https://s3.amazonaws.com/mp-github-files/logo.png)
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
+ [![Maintainability](https://api.codeclimate.com/v1/badges/48d23870f47ee5a40404/maintainability)](https://codeclimate.com/github/markprovan/deep_freezer/maintainability)
9
+ [![CI](https://github.com/markprovan/deep_freezer/actions/workflows/ci.yml/badge.svg)](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`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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/itison/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.
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/[USERNAME]/freezer/blob/master/CODE_OF_CONDUCT.md).
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).
@@ -1,50 +1,52 @@
1
- class DeepFreezer::Base
1
+ # frozen_string_literal: true
2
2
 
3
- class << self
4
- attr_accessor :attrs, :model, :fixture_path
5
- end
3
+ module DeepFreezer
4
+ class Base
5
+ class << self
6
+ attr_reader :attrs, :fixture_path
6
7
 
7
- def initialize(obj)
8
- @obj = obj
9
- end
8
+ def fixture_path=(path)
9
+ @fixture_path = path && Pathname.new(path)
10
+ end
11
+ end
10
12
 
11
- def self.freeze(*attrs)
12
- @attrs = attrs
13
- end
13
+ def self.freeze(*attrs)
14
+ @attrs = attrs
15
+ end
14
16
 
15
- def self.model(model)
16
- @model = model
17
- end
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
- def freeze
20
- freezable = @obj.class.new
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
- yaml = ([{ "#{freezable.class.to_s}" => freezable.attributes }].to_yaml).gsub("---", "")
27
+ def initialize(obj)
28
+ @obj = obj
29
+ end
30
30
 
31
- write_to_file yaml, freezable.class.to_s.tableize
32
- end
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
- def self.reset!
35
- path = DeepFreezer::Base.fixture_path.to_s + "/*.yml"
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
- private
41
+ write_to_file yaml, freezable.class.to_s.tableize
42
+ end
40
43
 
41
- def write_to_file(yaml, file_name)
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
- open(path, 'a+') { |file| file << yaml }
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
@@ -1,42 +1,40 @@
1
- class DeepFreezer::Defrost
2
-
3
- def self.load!
4
- path = DeepFreezer::Base.fixture_path.join("**/*.yml")
5
- Dir.glob(path).each do |file|
6
- objects = YAML.load(File.read(file))
7
- puts "Loading #{objects.first.keys.first}"
8
- objects.each do |object|
9
- instance = self.hash_to_instance(object)
10
- sql = self.sql_for(instance)
11
- ActiveRecord::Base.connection.execute sql
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
- def self.hash_to_instance(object)
17
- klass = object.keys.first
18
- attrs = object[klass]
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
- attrs.keys.each do |a|
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
- def self.sql_for(record)
29
- values = record.send(:arel_attributes_with_values_for_create, record.attribute_names)
25
+ instance
26
+ end
30
27
 
31
- model = record.class
32
- scope = model.unscoped
28
+ def self.sql_for(record)
29
+ model = record.class
30
+ table = model.arel_table
33
31
 
34
- im = scope.arel.create_insert
35
- im.into model.arel_table
32
+ values = record.attributes_for_database.map { |name, value| [table[name], value] }
36
33
 
37
- substitutes, binds = scope.substitute_values(values)
38
- im.insert substitutes
34
+ insert = Arel::InsertManager.new(table)
35
+ insert.insert(values)
39
36
 
40
- record.class.connection.to_sql(im, binds)
37
+ model.connection.to_sql(insert)
38
+ end
41
39
  end
42
40
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepFreezer
2
- VERSION = "1.0.0"
4
+ VERSION = "2.0.1"
3
5
  end
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: 1.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Provan
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2018-03-06 00:00:00.000000000 Z
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: 4.2.10
18
+ version: '7.1'
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: 6.0.0
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: 4.2.10
28
+ version: '7.1'
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: 6.0.0
31
+ version: '9.0'
33
32
  - !ruby/object:Gem::Dependency
34
- name: bundler
33
+ name: irb
35
34
  requirement: !ruby/object:Gem::Requirement
36
35
  requirements:
37
- - - "~>"
36
+ - - ">="
38
37
  - !ruby/object:Gem::Version
39
- version: '1.16'
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: '1.16'
45
+ version: '0'
47
46
  - !ruby/object:Gem::Dependency
48
- name: pry
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: rake
61
+ name: rspec
63
62
  requirement: !ruby/object:Gem::Requirement
64
63
  requirements:
65
64
  - - "~>"
66
65
  - !ruby/object:Gem::Version
67
- version: '10.0'
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: '10.0'
73
+ version: '3.13'
75
74
  - !ruby/object:Gem::Dependency
76
- name: rspec
75
+ name: rubocop
77
76
  requirement: !ruby/object:Gem::Requirement
78
77
  requirements:
79
78
  - - "~>"
80
79
  - !ruby/object:Gem::Version
81
- version: '3.0'
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: '3.0'
87
+ version: '1.70'
89
88
  - !ruby/object:Gem::Dependency
90
- name: activerecord-nulldb-adapter
89
+ name: sqlite3
91
90
  requirement: !ruby/object:Gem::Requirement
92
91
  requirements:
93
92
  - - ">="
94
93
  - !ruby/object:Gem::Version
95
- version: '0'
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: '0'
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
- evironments.
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/itison/deep_freezer
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
- post_install_message:
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: '0'
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
- rubyforge_project:
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
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.8
5
- before_install: gem install bundler -v 1.16.1
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
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in deep_freezer.gemspec
6
- gemspec
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
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
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
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
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