mr_common 1.0.4 → 1.0.5

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
2
  SHA256:
3
- metadata.gz: b6b615b9bbce71ee9cf5bb2797a95c475a1358774f2aba9a3635131d65ce146a
4
- data.tar.gz: b6a89b368cf4b590451313e5b7ba44cbbdd43329269d82c710f3a4f61f748e5c
3
+ metadata.gz: 7e1538111cda9e8ccd06735902be3b7c9ae49f62b60bdc0255d0d03bae774a18
4
+ data.tar.gz: a3ad001848e52d06f356908af852e0bd38bf2736840757bbaf89eee3872abd4f
5
5
  SHA512:
6
- metadata.gz: 41e6e4cdc599ccdeaa5e35b510d84f3363ae680a1656d2dfe98fb247c9eeb3c256219fb3cef02ee9862597fcd496dcaa0e32860860cf8d7c65528d13c0aed10a
7
- data.tar.gz: c4cd707e3a46a1b0ea5479d6e80114d47a9425a402b9b185c3ceeeb7feb4013c71ad50f08129b8773b259403dab6162b594f484ee11ea4fcfc0946827f078b3a
6
+ metadata.gz: 5f0a2a1385dfa1be6567296dbe45bf59d51b39429cad207876efcd2045052826f7afcb4325b9dcf4223bae098473dc9466a44f48612516ad0487260024fa3e86
7
+ data.tar.gz: a0d5eb0fa49a08bb4932e45ea397d28daf4eb354e0e9e04bda8c576cb8b0bb2f4eca3433bbdae7cd17a451e5beb073d881eaa38f55b25f47797751b33feb422c
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MrCommon
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5"
5
5
  end
@@ -3,7 +3,7 @@
3
3
  namespace :mr_common do
4
4
  desc "dump reminders"
5
5
  task dump_reminders: :environment do
6
- reminders = Reminder.all.map do |r|
6
+ reminders = MrCommon::Reminder.all.map do |r|
7
7
  r.attributes
8
8
  end
9
9
 
@@ -13,18 +13,18 @@ namespace :mr_common do
13
13
  end
14
14
 
15
15
  yml = reminders.to_yaml
16
- file = File.open("reminders.yml", "w")
16
+ file = File.open("mr_common_reminders.yml", "w")
17
17
  file.write(yml)
18
18
  file.close
19
19
  end
20
20
 
21
21
  desc "load reminders"
22
22
  task load_reminders: :environment do
23
- unless Dir["reminders.yml"].any?
23
+ unless Dir["mr_common_reminders.yml"].any?
24
24
  puts "No reminders to load yet..."
25
25
  exit
26
26
  end
27
- reminders = YAML.load(File.read("reminders.yml"))
27
+ reminders = YAML.load(File.read("mr_common_reminders.yml"))
28
28
 
29
29
  if reminders.any?
30
30
  reminder_fields = %i[
@@ -39,7 +39,7 @@ namespace :mr_common do
39
39
  ]
40
40
 
41
41
  reminders.each do |reminder|
42
- r = Reminder.find_or_initialize_by(slug: reminder["slug"])
42
+ r = MrCommon::Reminder.find_or_initialize_by(slug: reminder["slug"])
43
43
  attrs = {}
44
44
  reminder_fields.each { |attr| attrs[attr.to_s] = reminder[attr.to_s] }
45
45
  r.update(attrs)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mr_common
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Smedstad