rake_migrations 1.0.7 → 1.0.8

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
2
  SHA1:
3
- metadata.gz: 415354789dd81e11b3e3738f0adc484a55840307
4
- data.tar.gz: 81d05e85b588602e58f0b71dbb22b9ae2016b227
3
+ metadata.gz: 2b2674843e0d04ad4ed802931586a2d7b673e0b5
4
+ data.tar.gz: 169f48cd05126580f22959d5e66933ec075b7e56
5
5
  SHA512:
6
- metadata.gz: a8c00b006ee46780485cac1f751fad76cca915ef4adfe3e56e9d4606eb8123653b0c86183a5a1884dde15170281f2412e567a7450018a3ab02f439732d27345b
7
- data.tar.gz: c6f1a56b9c47121ade66fafa0502bb4e0adca7d9c610273cdefc4239ce3f5d6fd08ab143e7534045b503e984f538c11cfe303fea58f97ca98822808b602739ee
6
+ metadata.gz: e17a87999e4de49e343a12a6499700aab37d85fbd9ae5ac29f41d945a929350d3b51b011396db72cad7ca5f0b1563925bd5dfef32d720e149065ccfef7b2b51d
7
+ data.tar.gz: 4988a035ce299d1e0b02931fc3d640847457e6e0a71a07ddb847999e47dd77962c6cfc09163c3b7fa04e038420016b6ba4698b1934a9718e1690c257ac27c336
data/README.md CHANGED
@@ -68,15 +68,17 @@ This will generate a file under 'lib/tasks/rake_migrations' with a timestamp and
68
68
  namespace :users do
69
69
  desc "update run_at field to get value as in start_time"
70
70
  task update_some_field: [:environment] do
71
- # EXAMPLE
71
+ # EXAMPLE
72
72
  User.update_all({role_id: 1}, {role_id: 2})
73
-
73
+
74
74
  # DO NOT REMOVE THIS PART
75
75
  RakeMigration.find_or_create_by_version(__FILE__[/\d+/])
76
76
  end
77
77
  end
78
78
  ```
79
79
 
80
+ Update: If you are using Rails 4 or greater, the find_or_create_by_version has been changed to find_or_create_by(version: __FILE__[/\d+/]).
81
+
80
82
  Simply insert your code above the "DO NOT REMOVE THIS PART" line. The checklist is there to help you and the person who is code-reviewing your code to think of problems that might occur from your rake task. Afterwards you can run the rake task normally:
81
83
 
82
84
  ```ruby
@@ -1,3 +1,3 @@
1
1
  module RakeMigrations
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eyal Eizenberg