handcuffs 1.0.0 → 1.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 +4 -4
- data/CODE_OF_CONDUCT.md +2 -2
- data/README.md +15 -6
- data/circle.yml +6 -0
- data/handcuffs.gemspec +3 -4
- data/lib/handcuffs/configuration.rb +3 -1
- data/lib/handcuffs/error.rb +3 -0
- data/lib/handcuffs/errors/configuration_block_missing_error.rb +11 -0
- data/lib/handcuffs/version.rb +1 -1
- data/lib/tasks/handcuffs.rake +0 -21
- metadata +9 -19
- data/Gemfile.lock +0 -148
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22aca03dd90cccb54f0135c4f00eff70ebd728d3
|
4
|
+
data.tar.gz: 1ca8aea58c36eec3e21315d76cf72780e7030541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f10df289f02a9a3a27ed1828356acae189943a8490c27dd18c11a4d8d58a0ff1b2f617a709f4bdf20a91d98dc1b005e04ae5fc9bc21f51dc9829dbdea75b4ba
|
7
|
+
data.tar.gz: a0495a8bd3c4ce350d9eae715b59854ef3a3ae2c3cc4530e18ea9299105e3d98ef3e3b88fab2451bedef56a80c1f546b1f754f84654cc1df36dd94bb65e8d911
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -35,7 +35,7 @@ This code of conduct applies both within project spaces and in public spaces
|
|
35
35
|
when an individual is representing the project or its community.
|
36
36
|
|
37
37
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting a project maintainer at
|
38
|
+
reported by contacting a project maintainer at opensource@procore.com All
|
39
39
|
complaints will be reviewed and investigated and will result in a response that
|
40
40
|
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
41
|
obligated to maintain confidentiality with regard to the reporter of an
|
@@ -46,4 +46,4 @@ version 1.3.0, available at
|
|
46
46
|
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
47
|
|
48
48
|
[homepage]: http://contributor-covenant.org
|
49
|
-
[version]: http://contributor-covenant.org/version/1/3/0/
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Handcuffs
|
2
2
|
|
3
|
+
[](https://circleci.com/gh/procore/handcuffs)
|
4
|
+
|
3
5
|
Handcuffs provides an easy way to run migrations in phases in your [Ruby on
|
4
6
|
Rails](https://rubyonrails.org/) application.
|
5
7
|
|
@@ -103,12 +105,6 @@ spec suite requires PostgreSQL. To run it you will have to set the environment
|
|
103
105
|
variables `POSTGRES_DB_USERNAME` and `POSTGRES_DB_PASSWORD`. You can then run
|
104
106
|
the suite using `rake spec`
|
105
107
|
|
106
|
-
## Development
|
107
|
-
|
108
|
-
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.
|
109
|
-
|
110
|
-
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).
|
111
|
-
|
112
108
|
## Contributing
|
113
109
|
|
114
110
|
Bug reports and pull requests are welcome on GitHub at https://github.com/procore/handcuffs. 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.
|
@@ -118,3 +114,16 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/procor
|
|
118
114
|
|
119
115
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
120
116
|
|
117
|
+
## About Procore
|
118
|
+
|
119
|
+
<img
|
120
|
+
src="https://www.procore.com/images/procore_logo.png"
|
121
|
+
alt="Procore Logo"
|
122
|
+
width="250px"
|
123
|
+
/>
|
124
|
+
|
125
|
+
Handcuffs is maintained by Procore Technologies.
|
126
|
+
|
127
|
+
Procore - building the software that builds the world.
|
128
|
+
|
129
|
+
Learn more about the #1 most widely used construction management software at [procore.com](https://www.procore.com/)
|
data/circle.yml
ADDED
data/handcuffs.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "handcuffs"
|
8
8
|
spec.version = Handcuffs::VERSION
|
9
9
|
spec.authors = ["Brad Urani"]
|
10
|
-
spec.email = ["bradurani@gmail.com"]
|
10
|
+
spec.email = ["bradurani@gmail.com", "opensource@procore.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{A Ruby gem for running Active Record migrations in
|
13
|
-
spec.description = %q{Allows you to define phase
|
12
|
+
spec.summary = %q{A Ruby gem for running Active Record migrations in phases}
|
13
|
+
spec.description = %q{Allows you to define a phase on Active Record migrations and provides rake tasks for running only migrations tagged with a certain phase}
|
14
14
|
spec.homepage = "https://github.com/procore/handcuffs/"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
|
-
spec.add_development_dependency "bundler", "~> 1.11"
|
31
30
|
spec.add_development_dependency "rspec-rails", "~> 3.0"
|
32
31
|
spec.add_development_dependency "pg"
|
33
32
|
spec.add_development_dependency "pry"
|
@@ -1,8 +1,10 @@
|
|
1
|
+
require "handcuffs/errors/configuration_block_missing_error"
|
2
|
+
|
1
3
|
module Handcuffs
|
2
4
|
mattr_accessor :config
|
3
5
|
|
4
6
|
def self.configure
|
5
|
-
raise
|
7
|
+
raise ConfigurationBlockMissingError unless block_given?
|
6
8
|
@@config = Configurator.new
|
7
9
|
yield @@config
|
8
10
|
end
|
data/lib/handcuffs/version.rb
CHANGED
data/lib/tasks/handcuffs.rake
CHANGED
@@ -3,23 +3,12 @@ namespace :handcuffs do
|
|
3
3
|
phase = setup(args, 'handcuffs:migrate')
|
4
4
|
patch_migrator!(phase)
|
5
5
|
run_task('db:migrate')
|
6
|
-
# load_config
|
7
|
-
|
8
|
-
#active_record/railties/databases.rake:44
|
9
|
-
# ActiveRecord::Tasks::DatabaseTasks.migrate
|
10
|
-
# dump_schema
|
11
6
|
end
|
12
7
|
|
13
8
|
task :rollback, [:phase] => :environment do |t,args|
|
14
9
|
phase = setup(args, 'handcuffs:rollback')
|
15
10
|
patch_migrator!(phase)
|
16
|
-
# load_config
|
17
11
|
run_task('db:rollback')
|
18
|
-
|
19
|
-
#active_record/railsties/databases.rake:142
|
20
|
-
# step = ENV['STEP'] ? ENV['STEP'].to_i : 1
|
21
|
-
# ActiveRecord::Migrator.rollback(ActiveRecord::Tasks::DatabaseTasks.migrations_paths, step)
|
22
|
-
# dump_schema
|
23
12
|
end
|
24
13
|
|
25
14
|
def setup(args, task)
|
@@ -46,16 +35,6 @@ namespace :handcuffs do
|
|
46
35
|
Rake::Task[name].invoke
|
47
36
|
end
|
48
37
|
|
49
|
-
# def load_config
|
50
|
-
# #active_record/railties/databases.rake:5
|
51
|
-
# ActiveRecord::Base.configurations = ActiveRecord::Tasks::DatabaseTasks.database_configuration || {}
|
52
|
-
# ActiveRecord::Migrator.migrations_paths = ActiveRecord::Tasks::DatabaseTasks.migrations_paths
|
53
|
-
# end
|
54
|
-
#
|
55
|
-
# def dump_schema
|
56
|
-
# rake['db:structure:dump'].invoke
|
57
|
-
# end
|
58
|
-
|
59
38
|
module PendingFilter
|
60
39
|
def runnable
|
61
40
|
attempted_phase = self.class.handcuffs_phase
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handcuffs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Urani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
12
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.11'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.11'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rspec-rails
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,9 +86,11 @@ dependencies:
|
|
100
86
|
- - "<"
|
101
87
|
- !ruby/object:Gem::Version
|
102
88
|
version: '5.0'
|
103
|
-
description: Allows you to define phase
|
89
|
+
description: Allows you to define a phase on Active Record migrations and provides
|
90
|
+
rake tasks for running only migrations tagged with a certain phase
|
104
91
|
email:
|
105
92
|
- bradurani@gmail.com
|
93
|
+
- opensource@procore.com
|
106
94
|
executables: []
|
107
95
|
extensions: []
|
108
96
|
extra_rdoc_files: []
|
@@ -110,16 +98,18 @@ files:
|
|
110
98
|
- ".gitignore"
|
111
99
|
- CODE_OF_CONDUCT.md
|
112
100
|
- Gemfile
|
113
|
-
- Gemfile.lock
|
114
101
|
- LICENSE.txt
|
115
102
|
- README.md
|
116
103
|
- Rakefile
|
117
104
|
- bin/console
|
118
105
|
- bin/setup
|
106
|
+
- circle.yml
|
119
107
|
- handcuffs.gemspec
|
120
108
|
- lib/handcuffs.rb
|
121
109
|
- lib/handcuffs/configuration.rb
|
110
|
+
- lib/handcuffs/error.rb
|
122
111
|
- lib/handcuffs/errors.rb
|
112
|
+
- lib/handcuffs/errors/configuration_block_missing_error.rb
|
123
113
|
- lib/handcuffs/extensions.rb
|
124
114
|
- lib/handcuffs/phase_filter.rb
|
125
115
|
- lib/handcuffs/railtie.rb
|
@@ -149,5 +139,5 @@ rubyforge_project:
|
|
149
139
|
rubygems_version: 2.4.5.1
|
150
140
|
signing_key:
|
151
141
|
specification_version: 4
|
152
|
-
summary: A Ruby gem for running Active Record migrations in
|
142
|
+
summary: A Ruby gem for running Active Record migrations in phases
|
153
143
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,148 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
handcuffs (0.1.11)
|
5
|
-
rails (>= 4.0, < 5.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actionmailer (4.2.6)
|
11
|
-
actionpack (= 4.2.6)
|
12
|
-
actionview (= 4.2.6)
|
13
|
-
activejob (= 4.2.6)
|
14
|
-
mail (~> 2.5, >= 2.5.4)
|
15
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
-
actionpack (4.2.6)
|
17
|
-
actionview (= 4.2.6)
|
18
|
-
activesupport (= 4.2.6)
|
19
|
-
rack (~> 1.6)
|
20
|
-
rack-test (~> 0.6.2)
|
21
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
23
|
-
actionview (4.2.6)
|
24
|
-
activesupport (= 4.2.6)
|
25
|
-
builder (~> 3.1)
|
26
|
-
erubis (~> 2.7.0)
|
27
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
activejob (4.2.6)
|
30
|
-
activesupport (= 4.2.6)
|
31
|
-
globalid (>= 0.3.0)
|
32
|
-
activemodel (4.2.6)
|
33
|
-
activesupport (= 4.2.6)
|
34
|
-
builder (~> 3.1)
|
35
|
-
activerecord (4.2.6)
|
36
|
-
activemodel (= 4.2.6)
|
37
|
-
activesupport (= 4.2.6)
|
38
|
-
arel (~> 6.0)
|
39
|
-
activesupport (4.2.6)
|
40
|
-
i18n (~> 0.7)
|
41
|
-
json (~> 1.7, >= 1.7.7)
|
42
|
-
minitest (~> 5.1)
|
43
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
44
|
-
tzinfo (~> 1.1)
|
45
|
-
arel (6.0.3)
|
46
|
-
builder (3.2.2)
|
47
|
-
byebug (5.0.0)
|
48
|
-
columnize (= 0.9.0)
|
49
|
-
coderay (1.1.0)
|
50
|
-
columnize (0.9.0)
|
51
|
-
concurrent-ruby (1.0.1)
|
52
|
-
diff-lcs (1.2.5)
|
53
|
-
erubis (2.7.0)
|
54
|
-
globalid (0.3.6)
|
55
|
-
activesupport (>= 4.1.0)
|
56
|
-
i18n (0.7.0)
|
57
|
-
json (1.8.3)
|
58
|
-
loofah (2.0.3)
|
59
|
-
nokogiri (>= 1.5.9)
|
60
|
-
mail (2.6.4)
|
61
|
-
mime-types (>= 1.16, < 4)
|
62
|
-
method_source (0.8.2)
|
63
|
-
mime-types (3.0)
|
64
|
-
mime-types-data (~> 3.2015)
|
65
|
-
mime-types-data (3.2016.0221)
|
66
|
-
mini_portile2 (2.0.0)
|
67
|
-
minitest (5.8.4)
|
68
|
-
nokogiri (1.6.7.2)
|
69
|
-
mini_portile2 (~> 2.0.0.rc2)
|
70
|
-
pg (0.18.2)
|
71
|
-
pry (0.10.3)
|
72
|
-
coderay (~> 1.1.0)
|
73
|
-
method_source (~> 0.8.1)
|
74
|
-
slop (~> 3.4)
|
75
|
-
pry-byebug (3.2.0)
|
76
|
-
byebug (~> 5.0)
|
77
|
-
pry (~> 0.10)
|
78
|
-
rack (1.6.4)
|
79
|
-
rack-test (0.6.3)
|
80
|
-
rack (>= 1.0)
|
81
|
-
rails (4.2.6)
|
82
|
-
actionmailer (= 4.2.6)
|
83
|
-
actionpack (= 4.2.6)
|
84
|
-
actionview (= 4.2.6)
|
85
|
-
activejob (= 4.2.6)
|
86
|
-
activemodel (= 4.2.6)
|
87
|
-
activerecord (= 4.2.6)
|
88
|
-
activesupport (= 4.2.6)
|
89
|
-
bundler (>= 1.3.0, < 2.0)
|
90
|
-
railties (= 4.2.6)
|
91
|
-
sprockets-rails
|
92
|
-
rails-deprecated_sanitizer (1.0.3)
|
93
|
-
activesupport (>= 4.2.0.alpha)
|
94
|
-
rails-dom-testing (1.0.7)
|
95
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
96
|
-
nokogiri (~> 1.6.0)
|
97
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
98
|
-
rails-html-sanitizer (1.0.3)
|
99
|
-
loofah (~> 2.0)
|
100
|
-
railties (4.2.6)
|
101
|
-
actionpack (= 4.2.6)
|
102
|
-
activesupport (= 4.2.6)
|
103
|
-
rake (>= 0.8.7)
|
104
|
-
thor (>= 0.18.1, < 2.0)
|
105
|
-
rake (11.1.2)
|
106
|
-
rspec-core (3.3.2)
|
107
|
-
rspec-support (~> 3.3.0)
|
108
|
-
rspec-expectations (3.3.1)
|
109
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
110
|
-
rspec-support (~> 3.3.0)
|
111
|
-
rspec-mocks (3.3.2)
|
112
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
113
|
-
rspec-support (~> 3.3.0)
|
114
|
-
rspec-rails (3.3.3)
|
115
|
-
actionpack (>= 3.0, < 4.3)
|
116
|
-
activesupport (>= 3.0, < 4.3)
|
117
|
-
railties (>= 3.0, < 4.3)
|
118
|
-
rspec-core (~> 3.3.0)
|
119
|
-
rspec-expectations (~> 3.3.0)
|
120
|
-
rspec-mocks (~> 3.3.0)
|
121
|
-
rspec-support (~> 3.3.0)
|
122
|
-
rspec-support (3.3.0)
|
123
|
-
slop (3.6.0)
|
124
|
-
sprockets (3.5.2)
|
125
|
-
concurrent-ruby (~> 1.0)
|
126
|
-
rack (> 1, < 3)
|
127
|
-
sprockets-rails (3.0.4)
|
128
|
-
actionpack (>= 4.0)
|
129
|
-
activesupport (>= 4.0)
|
130
|
-
sprockets (>= 3.0.0)
|
131
|
-
thor (0.19.1)
|
132
|
-
thread_safe (0.3.5)
|
133
|
-
tzinfo (1.2.2)
|
134
|
-
thread_safe (~> 0.1)
|
135
|
-
|
136
|
-
PLATFORMS
|
137
|
-
ruby
|
138
|
-
|
139
|
-
DEPENDENCIES
|
140
|
-
bundler (~> 1.11)
|
141
|
-
handcuffs!
|
142
|
-
pg
|
143
|
-
pry
|
144
|
-
pry-byebug
|
145
|
-
rspec-rails (~> 3.0)
|
146
|
-
|
147
|
-
BUNDLED WITH
|
148
|
-
1.11.2
|