remove_db_drop_task 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d86d880ba9cc84470210e7cf313ec743a44281af14cf60510d50b7b46497daa5
4
+ data.tar.gz: d16bf1bb67e474e903c6658f2d5d11713b8373e7da2d086d91a9fb25755703a9
5
+ SHA512:
6
+ metadata.gz: c1ecaa61eee692660798121471bf33bfe21efccbb0b9d398a54d159077d5244565794963dc1159b1009d8f3f6b43b5fd785e16659782d8ebffffe911c8d88e59
7
+ data.tar.gz: b9539d04c309056c0f446ab8f9d5e6be58b85c3b8caae378860a3aa232c424bb30adde8da9ce71b1a7d31061bacff7062464113f7ec7af75b631c2acfac5dd0c
data/.gitignore ADDED
@@ -0,0 +1,14 @@
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
12
+
13
+ vendor/
14
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.3
7
+ before_install: gem install bundler -v 2.0.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in remove_db_drop_task.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # RemoveDbDropTask
2
+
3
+ Remove DB drop task.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'remove_db_drop_task'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install remove_db_drop_task
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ 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.
28
+
29
+ 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).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/taka0125/remove_db_drop_task.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
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 ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "remove_db_drop_task"
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 ADDED
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,7 @@
1
+ require "remove_db_drop_task/version"
2
+
3
+ module RemoveDbDropTask
4
+ class Error < StandardError; end
5
+ end
6
+
7
+ require "remove_db_drop_task/railtie" if defined?(::Rails::Railtie)
@@ -0,0 +1,5 @@
1
+ module RemoveDbDropTask
2
+ class Railtie < ::Rails::Railtie
3
+ rake_tasks { load 'tasks/remove_db_drop_task.rake' }
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module RemoveDbDropTask
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,23 @@
1
+ raise if ActiveRecord::Base.protected_environments.empty?
2
+
3
+ namespace :remove_db_drop_task do
4
+ desc 'check remove_db_drop_task status.'
5
+ task :check do
6
+ if ActiveRecord::Base.protected_environments.include?(ENV['RAILS_ENV'])
7
+ puts 'Enabled'
8
+ else
9
+ puts 'Disabled'
10
+ end
11
+ end
12
+ end
13
+
14
+ if ActiveRecord::Base.protected_environments.include?(ENV['RAILS_ENV'])
15
+ Rake::Task.tasks.each do |t|
16
+ next unless %w(db:drop db:drop:all db:purge db:purge:all).include?(t.name)
17
+
18
+ task_name = t.name
19
+ t.clear
20
+ t.add_description 'Disabled; Please see https://github.com/taka0125/remove_db_drop_task/README.md'
21
+ t.actions << proc { raise "#{task_name} is disabled. Please see https://github.com/taka0125/remove_db_drop_task/README.md" }
22
+ end
23
+ end
@@ -0,0 +1,28 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "remove_db_drop_task/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "remove_db_drop_task"
8
+ spec.version = RemoveDbDropTask::VERSION
9
+ spec.authors = ["Takahiro Ooishi"]
10
+ spec.email = ["taka0125@gmail.com"]
11
+
12
+ spec.summary = %q{Remove db drop task}
13
+ spec.description = %q{Remove db drop task}
14
+ spec.homepage = "https://github.com/taka0125/remove_db_drop_task"
15
+
16
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency "railties", ">= 5.0"
24
+
25
+ spec.add_development_dependency "bundler", "~> 2.0"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: remove_db_drop_task
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Takahiro Ooishi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-08-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ description: Remove db drop task
70
+ email:
71
+ - taka0125@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - README.md
81
+ - Rakefile
82
+ - bin/console
83
+ - bin/setup
84
+ - lib/remove_db_drop_task.rb
85
+ - lib/remove_db_drop_task/railtie.rb
86
+ - lib/remove_db_drop_task/version.rb
87
+ - lib/tasks/remove_db_drop_task.rake
88
+ - remove_db_drop_task.gemspec
89
+ homepage: https://github.com/taka0125/remove_db_drop_task
90
+ licenses: []
91
+ metadata: {}
92
+ post_install_message:
93
+ rdoc_options: []
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubygems_version: 3.0.3
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Remove db drop task
111
+ test_files: []