handcuffs 1.1.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fad65d31075a71be8ae84c5d27c6f92c7b0cef64
4
- data.tar.gz: 3090970bf6d57882a3cd7573729c4a84a9e44ed4
2
+ SHA256:
3
+ metadata.gz: cf13d6b34f1b709c00645a72e1d3b0d4bb6274720f695c7ec8da88131ea7d2c0
4
+ data.tar.gz: e76e271559405079c933406cc5cf4b28f285938eeeffc71db926f69cb52da32a
5
5
  SHA512:
6
- metadata.gz: ba80cc8d9c509ef9e4b43f72bc745e2969f318e748927dc1927021f399c0d31963f9ebf2135a065d2836adb9385a8866d5bcbe832913f997e5068972ca90b289
7
- data.tar.gz: 632e11dfd992d24f71b8464e9a1f6a60b181351c88ea474ad18e8744a4516ecf7e268bdf2e7eb6f7407fc4e7824ff32d023c3053ffddab46105a4d82f6eff64b
6
+ metadata.gz: 775dad57c6e2b8fe5f8e16c8d468abc584e8acfacb5a7f5718f7b8e9275fcca12ac5776d45be12a76be239d5183a8df949ef52062a8d12b7a27df7c8a02be027
7
+ data.tar.gz: 29c06a3115a90f854b3b386d52094caed07de76b9dc9aa9b78654709168ea00514bebedf603f03cb5d4c0ba6980bf8e7468170a1b067851dc7588bee84107c05
@@ -0,0 +1,98 @@
1
+ version: 2
2
+
3
+ aliases:
4
+ database: &database
5
+ image: circleci/postgres:10-ram
6
+ environment:
7
+ POSTGRES_USER: ubuntu
8
+ POSTGRES_DB: handcuffs_test
9
+ POSTGRES_HOST_AUTH_METHOD: trust
10
+
11
+ test_env: &test_env
12
+ - PGHOST=localhost
13
+ - PGUSER=ubuntu
14
+ - RAILS_ENV=test
15
+ - BUNDLER_VERSION=1.17.3
16
+
17
+ run_tests: &run_tests
18
+ - checkout
19
+
20
+ - run:
21
+ name: Install Bundler
22
+ command: gem install bundler:1.17.3
23
+
24
+ - run:
25
+ name: Install Ruby Dependencies
26
+ command: bundle install && cd spec/dummy && bundle install
27
+
28
+ - run:
29
+ name: Install Apprasals Dependencies
30
+ command: bundle exec appraisal install
31
+
32
+ - run:
33
+ name: Setup Database
34
+ command: cd spec/dummy && bundle exec rake db:create db:migrate --trace
35
+
36
+ - run:
37
+ name: Run Appraisals Tests
38
+ command: bundle exec appraisal rspec
39
+
40
+ - run:
41
+ name: Run Dummy App Tests
42
+ command: cd spec/dummy && bin/rspec
43
+
44
+ jobs:
45
+ ruby_2_3:
46
+ docker:
47
+ - image: circleci/ruby:2.3
48
+ environment:
49
+ *test_env
50
+ - *database
51
+ steps:
52
+ *run_tests
53
+
54
+ ruby_2_4:
55
+ docker:
56
+ - image: circleci/ruby:2.4
57
+ environment:
58
+ *test_env
59
+ - *database
60
+ steps:
61
+ *run_tests
62
+
63
+ ruby_2_5:
64
+ docker:
65
+ - image: circleci/ruby:2.5
66
+ environment:
67
+ *test_env
68
+ - *database
69
+ steps:
70
+ *run_tests
71
+
72
+ ruby_2_6:
73
+ docker:
74
+ - image: circleci/ruby:2.6
75
+ environment:
76
+ *test_env
77
+ - *database
78
+ steps:
79
+ *run_tests
80
+
81
+ ruby_2_7:
82
+ docker:
83
+ - image: circleci/ruby:2.7
84
+ environment:
85
+ *test_env
86
+ - *database
87
+ steps:
88
+ *run_tests
89
+
90
+ workflows:
91
+ version: 2
92
+ test-all:
93
+ jobs:
94
+ - ruby_2_3
95
+ - ruby_2_4
96
+ - ruby_2_5
97
+ - ruby_2_6
98
+ - ruby_2_7
data/.gitignore CHANGED
@@ -8,3 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  handcuffs-*.gem
11
+ /gemfiles/*.gemfile.lock
12
+ .ruby-version
@@ -0,0 +1,32 @@
1
+ # Ruby 2.7 doesn't support BigDecimal.new, which Rails 4 uses
2
+ if RUBY_VERSION < "2.7"
3
+ appraise "rails-4" do
4
+ gem "rails", "~> 4.2.8"
5
+ gem 'pg', '~> 0.15'
6
+ end
7
+ end
8
+
9
+ appraise "rails-5" do
10
+ gem "rails", "~> 5.0.0.1"
11
+ gem 'pg', '~> 0.18'
12
+ end
13
+
14
+ appraise "rails-5.1" do
15
+ gem "rails", "~> 5.1.7"
16
+ gem 'pg', '~> 0.18'
17
+ end
18
+
19
+ appraise "rails-5.2" do
20
+ gem "rails", "~> 5.2.3"
21
+ end
22
+
23
+ # Rails >= 6 requires Ruby >= 2.5
24
+ if RUBY_VERSION >= "2.5"
25
+ appraise "rails-6" do
26
+ gem "rails", "~> 6.0.1"
27
+ end
28
+
29
+ appraise "rails-6.1" do
30
+ gem "rails", "~> 6.1"
31
+ end
32
+ end
data/README.md CHANGED
@@ -47,7 +47,7 @@ class AddOnSaleIndex < ActiveRecord::Migration
47
47
  end
48
48
 
49
49
  def down
50
- remove_column :products, :on_sale
50
+ remove_index :products, :on_sale
51
51
  end
52
52
 
53
53
  end
@@ -55,20 +55,20 @@ end
55
55
 
56
56
  You can then run your migrations in phases using
57
57
  ```bash
58
- rake handcuffs:migrate[pre_restart]
58
+ rake 'handcuffs:migrate[pre_restart]'
59
59
  ```
60
60
  or
61
61
  ```bash
62
- rake handcuffs:migrate[post_restart]
62
+ rake 'handcuffs:migrate[post_restart]'
63
63
  ```
64
64
 
65
65
  You can run all migrations using
66
66
  ```bash
67
- rake handcuffs:migrate[all]
67
+ rake 'handcuffs:migrate[all]'
68
68
  ```
69
69
 
70
- This differs from running `rake db:migrate` in that specs will be run in the
71
- _order that the phases are defined in the handcuffs config_.
70
+ This differs from running `rake db:migrate` in that migrations will be run in
71
+ the _order that the phases are defined in the handcuffs config_.
72
72
 
73
73
  If you run a handcuffs rake task and any migration does not have a phase
74
74
  defined, an error will be raised before any migrations are run. To prevent this
@@ -98,7 +98,7 @@ Or install it yourself as:
98
98
 
99
99
  $ gem install handcuffs
100
100
 
101
- ##Running specs
101
+ ## Running specs
102
102
 
103
103
  The specs for handcuffs are in the dummy application at `/spec/dummy/spec`. The
104
104
  spec suite requires PostgreSQL. To run it you will have to set the environment
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.8"
6
+ gem "pg", "~> 0.15"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.1.7"
6
+ gem "pg", "~> 0.18"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.2.3"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.0.0.1"
6
+ gem "pg", "~> 0.18"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.1"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.1"
6
+
7
+ gemspec path: "../"
@@ -27,10 +27,11 @@ 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 "rspec-rails", "~> 3.0"
30
+ spec.add_development_dependency "appraisal"
31
31
  spec.add_development_dependency "pg"
32
32
  spec.add_development_dependency "pry"
33
33
  spec.add_development_dependency "pry-byebug"
34
+ spec.add_development_dependency "rspec-rails", "~> 3.0"
34
35
 
35
- spec.add_runtime_dependency "rails", ">= 4.0", "< 5.0"
36
+ spec.add_runtime_dependency "rails", ">= 4.0"
36
37
  end
@@ -59,7 +59,7 @@ class Handcuffs::PhaseFilter
59
59
 
60
60
  def all_phases_by_configuration_order(by_phase, defined_phases)
61
61
  defined_phases.reduce([]) do |acc, phase|
62
- acc | by_phase[phase]
62
+ acc | Array(by_phase[phase])
63
63
  end.map { |mh| mh[:proxy] }
64
64
  end
65
65
 
@@ -1,3 +1,3 @@
1
1
  module Handcuffs
2
- VERSION = "1.1.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,91 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: handcuffs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.4.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-07-29 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec-rails
14
+ name: appraisal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry-byebug
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rails
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - '>='
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: '4.0'
76
- - - <
77
- - !ruby/object:Gem::Version
78
- version: '5.0'
79
90
  type: :runtime
80
91
  prerelease: false
81
92
  version_requirements: !ruby/object:Gem::Requirement
82
93
  requirements:
83
- - - '>='
94
+ - - ">="
84
95
  - !ruby/object:Gem::Version
85
96
  version: '4.0'
86
- - - <
87
- - !ruby/object:Gem::Version
88
- version: '5.0'
89
97
  description: Allows you to define a phase on Active Record migrations and provides
90
98
  rake tasks for running only migrations tagged with a certain phase
91
99
  email:
@@ -95,8 +103,9 @@ executables: []
95
103
  extensions: []
96
104
  extra_rdoc_files: []
97
105
  files:
98
- - .gitignore
99
- - .ruby-version
106
+ - ".circleci/config.yml"
107
+ - ".gitignore"
108
+ - Appraisals
100
109
  - CODE_OF_CONDUCT.md
101
110
  - Gemfile
102
111
  - LICENSE.txt
@@ -104,7 +113,13 @@ files:
104
113
  - Rakefile
105
114
  - bin/console
106
115
  - bin/setup
107
- - circle.yml
116
+ - gemfiles/.bundle/config
117
+ - gemfiles/rails_4.gemfile
118
+ - gemfiles/rails_5.1.gemfile
119
+ - gemfiles/rails_5.2.gemfile
120
+ - gemfiles/rails_5.gemfile
121
+ - gemfiles/rails_6.1.gemfile
122
+ - gemfiles/rails_6.gemfile
108
123
  - handcuffs.gemspec
109
124
  - lib/handcuffs.rb
110
125
  - lib/handcuffs/configuration.rb
@@ -127,17 +142,16 @@ require_paths:
127
142
  - lib
128
143
  required_ruby_version: !ruby/object:Gem::Requirement
129
144
  requirements:
130
- - - '>='
145
+ - - ">="
131
146
  - !ruby/object:Gem::Version
132
147
  version: '0'
133
148
  required_rubygems_version: !ruby/object:Gem::Requirement
134
149
  requirements:
135
- - - '>='
150
+ - - ">="
136
151
  - !ruby/object:Gem::Version
137
152
  version: '0'
138
153
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 2.0.14.1
154
+ rubygems_version: 3.0.3
141
155
  signing_key:
142
156
  specification_version: 4
143
157
  summary: A Ruby gem for running Active Record migrations in phases
File without changes
data/circle.yml DELETED
@@ -1,6 +0,0 @@
1
- machine:
2
- ruby:
3
- version: 2.2.3
4
-
5
- general:
6
- build_dir: spec/dummy