penmig 0.2.4
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 +7 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/generators/penmig/penmig_generator.rb +9 -0
- data/lib/generators/penmig/templates/penmig_config.rb +11 -0
- data/lib/penmig/copy_config.rb +37 -0
- data/lib/penmig/version.rb +3 -0
- data/lib/penmig.rb +2 -0
- metadata +108 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 20edb0eabc23ef3ffe547197de4ace1a829fd29f
|
4
|
+
data.tar.gz: 9e9b879fed90ae2f1b48c1aaa40e6e1120bea2fd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 83c16571aadae8d540de2bea154f5f4b55a3ddd05679b978eebfbe4fcdf6af6dc7a3e16c568b5319dc22653e828031853373cb79fdad3d68a89e058310fa681e
|
7
|
+
data.tar.gz: 120caa1079f26cc926c5117ab6fd082956a4f639917e4e8fadf14fc308f7403be8049ca082389dae81b65ffdbddeedb9d03acdd4e5eb4bc76981385dafb92503
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "pend_migration"
|
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
|
data/bin/setup
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# this file is the core file for running the migrations related to the
|
2
|
+
#database
|
3
|
+
#IMPORTANT: DO NOT CHANGE THE RAILS_ENV TO production or test
|
4
|
+
# please keep this file as it is
|
5
|
+
# if you want to remove the file then run rails d pen-mig
|
6
|
+
if ENV['RAILS_ENV'] =='development'
|
7
|
+
Rails.application.load_tasks
|
8
|
+
Rake::Task['db:migrate'].invoke
|
9
|
+
end
|
10
|
+
|
11
|
+
##########
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'pry'
|
3
|
+
require 'optparse'
|
4
|
+
require 'rails'
|
5
|
+
module Penmig
|
6
|
+
# this class responsible for copying the intializer to rails path
|
7
|
+
class CopyConfig
|
8
|
+
# < Rails::Generators::NamedBase
|
9
|
+
|
10
|
+
# @options = {:action => nil }
|
11
|
+
# parser = OptionParser.new do|opts|
|
12
|
+
# opts.banner = "Usage: file_name [options]"
|
13
|
+
# opts.on('-i', '--install', 'will install penmig') do
|
14
|
+
# @options[:action] = 'install'
|
15
|
+
# end
|
16
|
+
|
17
|
+
# opts.on('-u', '--uninstall', 'will unistall penmig') do
|
18
|
+
# @options[:action] = 'uninstall'
|
19
|
+
# end
|
20
|
+
|
21
|
+
# opts.on('-h', '--help', 'Displays Help') do
|
22
|
+
# puts opts
|
23
|
+
# exit
|
24
|
+
# end
|
25
|
+
# end
|
26
|
+
# parser.parse!
|
27
|
+
# # if @options[:action] == 'install'
|
28
|
+
# # puts 'install success'
|
29
|
+
# # source_root File.expand_path("../config", __FILE__)
|
30
|
+
# # # destination_file = "#{Dir.pwd}/spec/"
|
31
|
+
# # copy_file "pend_migration_config.rb", "#{Dir.pwd}/spec/pend_migration_config.rb"
|
32
|
+
# # puts 'success'
|
33
|
+
# # elsif @options[:action] == 'uninstall'
|
34
|
+
# # puts 'uninstall success'
|
35
|
+
# # end
|
36
|
+
end
|
37
|
+
end
|
data/lib/penmig.rb
ADDED
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: penmig
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anoob Bava
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.2.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.2.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: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: " This gem do all the pending migrations when starts your rails server
|
70
|
+
\n Dev mode."
|
71
|
+
email:
|
72
|
+
- anoob.bava@gmail.com
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- bin/console
|
78
|
+
- bin/setup
|
79
|
+
- lib/generators/penmig/penmig_generator.rb
|
80
|
+
- lib/generators/penmig/templates/penmig_config.rb
|
81
|
+
- lib/penmig.rb
|
82
|
+
- lib/penmig/copy_config.rb
|
83
|
+
- lib/penmig/version.rb
|
84
|
+
homepage: ''
|
85
|
+
licenses:
|
86
|
+
- MIT
|
87
|
+
metadata: {}
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.9.3
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 2.4.8
|
105
|
+
signing_key:
|
106
|
+
specification_version: 4
|
107
|
+
summary: Dont Worry About Pending migrations any more.
|
108
|
+
test_files: []
|