deep_freezer 0.4.2 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 757ca1be556d21ba64174bd0a31162d0032d0a95
4
- data.tar.gz: d0499d03070c894044b6f4147c9de99b68ec61a9
2
+ SHA256:
3
+ metadata.gz: 50a257a7231847fe4e8ec496a1e3e8acab76515aabeebecd26eb446546e9e47a
4
+ data.tar.gz: 2580a0adea1b0aee2365282d3e2405215042d84e3cad6d21c8c1f500ecbc71a3
5
5
  SHA512:
6
- metadata.gz: 8906f7a09cff6e5a6407d0af803f7add5fe59019645b577b645d115648aff6fb67b89ad02620ffcc4dd587321c6861fbf0bb4978b017ff6cd78babff6531f910
7
- data.tar.gz: fdd036f8df4813a98eb33d4a59a7e44d4b661dd7aecab17ed406ed7f91de79c3b55a3d5f0879027eb64f291ab6cbe76ec8be367c6afbd7939cf4f0c9ba94aed9
6
+ metadata.gz: d02448c1d24e08b91820ee4ddc3934df8ccf4c558f9f5e7f444afe8d7fd911bc1b8e0698eede3f1e07e7807beaf451fb68238c9a8dba2526beac394b31417e86
7
+ data.tar.gz: fa837c253f3c9758decce750239b86f698e8b1bb47e1adfb49994f7181a09384614300e4fe4624e6aa08376ecfc07a57e0d679dd0bdf1fe6c378eaa98f40912e
data/README.md CHANGED
@@ -1,7 +1,12 @@
1
- # Deep Freezer
2
- ## Freeze ActiveRecord models to Rails compatible fixtures.
1
+ ![Logo](https://s3.amazonaws.com/mp-github-files/logo.png)
3
2
 
4
- 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.
3
+ ## Freeze production like data for development
4
+ This gem allows you to 'freeze' your ActiveRecord models to create repeatable datasets for development.
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)
5
10
 
6
11
  ## Installation
7
12
 
@@ -31,7 +36,7 @@ end
31
36
 
32
37
  Create an initializer and set the path for fixtures to be saved
33
38
 
34
- `Freezer::Base.fixture_path = Rails.root.join("test", "fixtures")`
39
+ `Freezer::Base.fixture_path = Rails.root.join("db", "seeds")`
35
40
 
36
41
  ### Define Freezers
37
42
 
@@ -49,6 +54,26 @@ class PostFreezer < DeepFreezer::Base
49
54
  end
50
55
  ```
51
56
 
57
+ #### Overriding Attributes
58
+
59
+ Attributes can be overrode at time of freeze, similar to ActiveModel Serializers, by defining a method with the same name as the attribute name.
60
+
61
+ ```
62
+ class PostFreezer < DeepFreezer::Base
63
+
64
+ freeze :id,
65
+ :title,
66
+ :body,
67
+ :created_at,
68
+ :updated_at
69
+
70
+ def title
71
+ "Frozen Title"
72
+ end
73
+
74
+ end
75
+ ```
76
+
52
77
  ### Perform Freeze
53
78
 
54
79
  And then write a script to select and freeze the records you want:
@@ -58,7 +83,7 @@ And then write a script to select and freeze the records you want:
58
83
  posts.map { |p | PostFreezer.new(p).freeze }
59
84
  ```
60
85
 
61
- This will result in a `posts.yml` file in `test/fixtures` which can be loaded by running `rake db:fixtures:load`
86
+ This will result in a `posts.yml` file in `db/seeds` which can be loaded by adding `DeepFreezer::Defrost.load!` to your `seeds.rb` file.
62
87
 
63
88
  ### Reset Fixtures
64
89
 
@@ -68,11 +93,20 @@ Fixtures can be deleted manually in the directory, or by running `Freezers::Base
68
93
 
69
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.
70
95
 
71
- 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).
72
106
 
73
107
  ## Contributing
74
108
 
75
- 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.
76
110
 
77
111
  ## License
78
112
 
@@ -80,4 +114,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
80
114
 
81
115
  ## Code of Conduct
82
116
 
83
- 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.tableize}_#{freezable.id.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,40 +1,40 @@
1
- class DeepFreezer::Defrost
1
+ # frozen_string_literal: true
2
2
 
3
- def self.load!
3
+ module DeepFreezer
4
+ class Defrost
5
+ PERMITTED_YAML_CLASSES = [Date, Time, Symbol, BigDecimal].freeze
4
6
 
5
- path = DeepFreezer::Base.fixture_path.join("**/*.yml")
6
- Dir.glob(path).each do |file|
7
- objects = YAML.load(File.read(file))
8
- puts "Loading #{objects.first.keys.first}"
9
- objects.each do |o|
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?
10
11
 
11
- klass = o.keys.first
12
- attrs = o[klass]
13
- obj = klass.constantize.new
14
-
15
- attrs.keys.each do |a|
16
- obj.send("#{a}=", attrs[a])
12
+ puts "Loading #{objects.first.keys.first}"
13
+ objects.each do |object|
14
+ ActiveRecord::Base.connection.execute sql_for(hash_to_instance(object))
17
15
  end
18
-
19
- sql = self.sql_for(obj)
20
- ActiveRecord::Base.connection.execute sql
21
16
  end
22
17
  end
23
18
 
24
- end
19
+ def self.hash_to_instance(object)
20
+ klass, attrs = object.first
21
+ instance = klass.constantize.new
25
22
 
26
- def self.sql_for(record)
27
- values = record.send(:arel_attributes_with_values_for_create, record.attribute_names)
23
+ attrs.each { |name, value| instance.public_send("#{name}=", value) }
28
24
 
29
- model = record.class
30
- scope = model.unscoped
25
+ instance
26
+ end
27
+
28
+ def self.sql_for(record)
29
+ model = record.class
30
+ table = model.arel_table
31
31
 
32
- im = scope.arel.create_insert
33
- im.into model.arel_table
32
+ values = record.attributes_for_database.map { |name, value| [table[name], value] }
34
33
 
35
- substitutes, binds = scope.substitute_values(values)
36
- im.insert substitutes
34
+ insert = Arel::InsertManager.new(table)
35
+ insert.insert(values)
37
36
 
38
- record.class.connection.to_sql(im, binds)
37
+ model.connection.to_sql(insert)
38
+ end
39
39
  end
40
40
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DeepFreezer
2
- VERSION = "0.4.2"
4
+ VERSION = "2.0.0"
3
5
  end
data/lib/deep_freezer.rb CHANGED
@@ -1,7 +1,15 @@
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"
4
13
 
5
14
  module DeepFreezer
6
- # Your code goes here...
7
15
  end
metadata CHANGED
@@ -1,88 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_freezer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 2.0.0
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-05 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
- name: bundler
13
+ name: activerecord
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '7.1'
19
+ - - "<"
18
20
  - !ruby/object:Gem::Version
19
- version: '1.16'
21
+ version: '9.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '7.1'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '9.0'
32
+ - !ruby/object:Gem::Dependency
33
+ name: irb
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
20
39
  type: :development
21
40
  prerelease: false
22
41
  version_requirements: !ruby/object:Gem::Requirement
23
42
  requirements:
24
- - - "~>"
43
+ - - ">="
25
44
  - !ruby/object:Gem::Version
26
- version: '1.16'
45
+ version: '0'
27
46
  - !ruby/object:Gem::Dependency
28
47
  name: rake
29
48
  requirement: !ruby/object:Gem::Requirement
30
49
  requirements:
31
50
  - - "~>"
32
51
  - !ruby/object:Gem::Version
33
- version: '10.0'
52
+ version: '13.0'
34
53
  type: :development
35
54
  prerelease: false
36
55
  version_requirements: !ruby/object:Gem::Requirement
37
56
  requirements:
38
57
  - - "~>"
39
58
  - !ruby/object:Gem::Version
40
- version: '10.0'
59
+ version: '13.0'
41
60
  - !ruby/object:Gem::Dependency
42
61
  name: rspec
43
62
  requirement: !ruby/object:Gem::Requirement
44
63
  requirements:
45
64
  - - "~>"
46
65
  - !ruby/object:Gem::Version
47
- version: '3.0'
66
+ version: '3.13'
48
67
  type: :development
49
68
  prerelease: false
50
69
  version_requirements: !ruby/object:Gem::Requirement
51
70
  requirements:
52
71
  - - "~>"
53
72
  - !ruby/object:Gem::Version
54
- version: '3.0'
73
+ version: '3.13'
74
+ - !ruby/object:Gem::Dependency
75
+ name: rubocop
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '1.70'
81
+ type: :development
82
+ prerelease: false
83
+ version_requirements: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '1.70'
88
+ - !ruby/object:Gem::Dependency
89
+ name: sqlite3
90
+ requirement: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '2.1'
95
+ type: :development
96
+ prerelease: false
97
+ version_requirements: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '2.1'
55
102
  description: This gem allows you to 'freeze' your ActiveRecord models to Rails compatible
56
103
  fixture files. This allows you to store real data statically for quick start dev/staging
57
- evironments.
104
+ environments.
58
105
  email:
59
106
  - markgprovan@gmail.com
60
107
  executables: []
61
108
  extensions: []
62
109
  extra_rdoc_files: []
63
110
  files:
64
- - ".gitignore"
65
- - ".rspec"
66
- - ".travis.yml"
67
- - CODE_OF_CONDUCT.md
68
- - Gemfile
69
- - Gemfile.lock
70
111
  - LICENSE.txt
71
112
  - README.md
72
- - Rakefile
73
- - bin/console
74
- - bin/setup
75
- - deep_freezer.gemspec
76
113
  - lib/deep_freezer.rb
77
114
  - lib/deep_freezer/base.rb
78
115
  - lib/deep_freezer/defrost.rb
79
116
  - lib/deep_freezer/version.rb
80
- homepage: https://github.com/itison/deep_freezer
117
+ homepage: https://github.com/markprovan/deep_freezer
81
118
  licenses:
82
119
  - MIT
83
120
  metadata:
84
121
  allowed_push_host: https://rubygems.org
85
- 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'
86
125
  rdoc_options: []
87
126
  require_paths:
88
127
  - lib
@@ -90,16 +129,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
129
  requirements:
91
130
  - - ">="
92
131
  - !ruby/object:Gem::Version
93
- version: '0'
132
+ version: '3.1'
94
133
  required_rubygems_version: !ruby/object:Gem::Requirement
95
134
  requirements:
96
135
  - - ">="
97
136
  - !ruby/object:Gem::Version
98
137
  version: '0'
99
138
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 2.4.5.3
102
- signing_key:
139
+ rubygems_version: 3.6.9
103
140
  specification_version: 4
104
141
  summary: Freeze ActiveRecord models to Rails compatible fixtures.
105
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,35 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- deep_freezer (0.4.2)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- diff-lcs (1.3)
10
- rake (10.4.2)
11
- rspec (3.5.0)
12
- rspec-core (~> 3.5.0)
13
- rspec-expectations (~> 3.5.0)
14
- rspec-mocks (~> 3.5.0)
15
- rspec-core (3.5.4)
16
- rspec-support (~> 3.5.0)
17
- rspec-expectations (3.5.0)
18
- diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.5.0)
20
- rspec-mocks (3.5.0)
21
- diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.5.0)
23
- rspec-support (3.5.0)
24
-
25
- PLATFORMS
26
- ruby
27
-
28
- DEPENDENCIES
29
- bundler (~> 1.16)
30
- deep_freezer!
31
- rake (~> 10.0)
32
- rspec (~> 3.0)
33
-
34
- BUNDLED WITH
35
- 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,36 +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_development_dependency "bundler", "~> 1.16"
34
- spec.add_development_dependency "rake", "~> 10.0"
35
- spec.add_development_dependency "rspec", "~> 3.0"
36
- end