seed_packet 0.0.5 → 0.0.6

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: 1bebadb2efb3e006f45dd1d18293459a933c28e8
4
- data.tar.gz: f06106a877c7d784b4daf3da44c82f765a93c3e5
3
+ metadata.gz: 0ed56631b5f965d13992e1cc9d615c637bb04d53
4
+ data.tar.gz: 6d43d060e5d34110ef2ed46e5cf653d69f836420
5
5
  SHA512:
6
- metadata.gz: f39eadefea2025d6542a2f395d9086de8a33ac3caa0766ef139447701f36d3d6b7d4f07209da0546d8083cf5639fc90c7d24a0a145111163f9dc71f3372cb953
7
- data.tar.gz: 5880d627b2abddc19f92e30d65d0f86a768d6b8b392560ad8f4d9521b1d9ad0d3efa08be33f722eda892a6ef14fa04878ec2b78418877c5068dc1c8e1419d0b5
6
+ metadata.gz: 7f42de3fbfaf98b2d139414eb5de93e5b42562d3f2fddb9467f64699dcdb07d50165a91a0de2e785628c074fed80d5dee46a3eb5d205f01b0ad5f012367a7fdf
7
+ data.tar.gz: 275fc5ae761d2c3725c2bce1bcb4233b2dc7e8747d9b50b7539dd248e5057a0cacb87d529f6bcfa9333efc0987c5e79dbdad6f1c0b09e685afe9d2079966f730
checksums.yaml.gz.sig ADDED
@@ -0,0 +1 @@
1
+ @g����fz���Gs�'�_�� P� 9�H�4P�pE+f�5�x�L{�@=)�͚�hi��m0#��'@qCmfpz��Z����"G�ڞ��5�w��"9z/V?��oőyk:z���?2k���eV��w5�|��V83]�A:��IQ�MNC�5 h�� �A����Jh$Bm�K5����Y��� &�PE,���Ǵ�����a>��]��2�`�XW� E�U$�!J�A]D=��>�k��L��Y���0�
@@ -1,3 +1,3 @@
1
1
  module SeedPacket
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'.freeze
3
3
  end
data/lib/seed_packet.rb CHANGED
@@ -7,7 +7,7 @@ module SeedPacket
7
7
  :factory_class
8
8
 
9
9
  def initialize(options = {})
10
- self.environment = options.key?(:environment) ? Environment.new(environment) : nil
10
+ self.environment = options.key?(:environment) ? Environment.new(environment) : nil
11
11
 
12
12
  if environment.samples_allowed?
13
13
  self.factory_class = Object.const_get(options.fetch(:factory_class, 'FactoryGirl'))
@@ -15,21 +15,15 @@ module SeedPacket
15
15
  end
16
16
 
17
17
  def seed
18
- if environment.seeding_allowed?
19
- yield
20
- end
18
+ yield if environment.seeding_allowed?
21
19
  end
22
20
 
23
21
  def sample
24
- if environment.samples_allowed?
25
- yield
26
- end
22
+ yield if environment.samples_allowed?
27
23
  end
28
24
 
29
25
  def scrub
30
- if environment.scrubbing_allowed?
31
- yield
32
- end
26
+ yield if environment.scrubbing_allowed?
33
27
  end
34
28
 
35
29
  private
@@ -39,6 +33,8 @@ module SeedPacket
39
33
  display_items = options.fetch(:display_items, false)
40
34
  count = options.fetch(:count, rand(20))
41
35
  overridden_values = options.fetch(:values, {})
36
+ additional_message = options.fetch(:message, '')
37
+
42
38
  sample_factory_name = "#{factory}_sample"
43
39
  sample_items = factory_class.create_list(sample_factory_name,
44
40
  count,
@@ -52,7 +48,13 @@ module SeedPacket
52
48
  end
53
49
 
54
50
  item_class_name = sample_items.first.class.name
55
- puts "%4s %s Created" % [count, item_class_name.underscore.titleize.pluralize]
51
+ log_message = '%4s %s Created %s' % [
52
+ count,
53
+ item_class_name.underscore.titleize.pluralize,
54
+ additional_message,
55
+ ]
56
+
57
+ print "#{' ' * 256}\r#{log_message}\r"
56
58
 
57
59
  sample_items
58
60
  end
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,25 +1,59 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seed_packet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfelchner
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2014-08-01 00:00:00.000000000 Z
12
- dependencies: []
13
- description:
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDrjCCApagAwIBAgIBATANBgkqhkiG9w0BAQUFADBOMRowGAYDVQQDDBFhY2Nv
14
+ dW50c19ydWJ5Z2VtczEbMBkGCgmSJomT8ixkARkWC3RoZWtvbXBhbmVlMRMwEQYK
15
+ CZImiZPyLGQBGRYDY29tMB4XDTE2MDQyNDAyNTEyM1oXDTE3MDQyNDAyNTEyM1ow
16
+ TjEaMBgGA1UEAwwRYWNjb3VudHNfcnVieWdlbXMxGzAZBgoJkiaJk/IsZAEZFgt0
17
+ aGVrb21wYW5lZTETMBEGCgmSJomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEB
18
+ BQADggEPADCCAQoCggEBANklzdaVeHtut6LTe/hrl6Krz2Z60InEbNb+TMG43tww
19
+ jBpWZrdU/SBkR3EYbTAQv/yGTuMHoVKGK2kDlFvdofW2hX0d14qPyYJUNYt+7VWE
20
+ 3UhPSxw1i6MxeU1QwfkIyaN8A5lj0225+rwI/mbplv+lSXPlJEroCQ9EfniZD4jL
21
+ URlrHWl/UejcQ32C1IzBwth3+nacrO1197v5nSdozFzQwm4groaggXn9F/WpThu+
22
+ MhcE4bfttwEjAfU3zAThyzOFoVPpACP+SwOuyPJSl02+9BiwzeAnFJDfge7+rsd5
23
+ 64W/VzBIklEKUZMmxZwr5DwpSXLrknBDtHLABG9Nr3cCAwEAAaOBljCBkzAJBgNV
24
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUP7v0f/qfa0LMrhkzHRI3l10X
25
+ LYIwLAYDVR0RBCUwI4EhYWNjb3VudHMrcnVieWdlbXNAdGhla29tcGFuZWUuY29t
26
+ MCwGA1UdEgQlMCOBIWFjY291bnRzK3J1YnlnZW1zQHRoZWtvbXBhbmVlLmNvbTAN
27
+ BgkqhkiG9w0BAQUFAAOCAQEASqdfJKMun1twosHfvdDH7Vgrb5VqX28qJ6MgnhjF
28
+ p+3HYTjYo/KMQqu78TegUFO5xQ4oumU0FTXADW0ryXZvUGV74M0zwqpFqeo8onII
29
+ lsVsWdMCLZS21M0uCQmcV+OQMNxL8jV3c0D3x9Srr9yO4oamW3seIdb+b9RfhmV2
30
+ ryr+NH8U/4xgzdJ4hWV4qk93nwigp4lwJ4u93XJ7Cdyw7itvaEPnn8HpCfzsiLcw
31
+ QwSfDGz6+zsImi5N3UT71+mk7YcviQSgvMRl3VkAv8MZ6wcJ5SQRpf9w0OeFH6Ln
32
+ nNbCoHiYeXX/lz/M6AIbxDIZZTwxcyvF7bdrQ2fbH5MsfQ==
33
+ -----END CERTIFICATE-----
34
+ date: 2016-08-06 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: rspec
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.5'
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '3.5'
50
+ description: ''
14
51
  email:
15
52
  - accounts+git@thekompanee.com
16
53
  executables: []
17
54
  extensions: []
18
- extra_rdoc_files:
19
- - README.md
55
+ extra_rdoc_files: []
20
56
  files:
21
- - README.md
22
- - Rakefile
23
57
  - lib/seed_packet.rb
24
58
  - lib/seed_packet/environment.rb
25
59
  - lib/seed_packet/version.rb
@@ -29,9 +63,7 @@ licenses:
29
63
  - MIT
30
64
  metadata: {}
31
65
  post_install_message:
32
- rdoc_options:
33
- - "--charset"
34
- - UTF-8
66
+ rdoc_options: []
35
67
  require_paths:
36
68
  - lib
37
69
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -46,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
78
  version: '0'
47
79
  requirements: []
48
80
  rubyforge_project:
49
- rubygems_version: 2.3.0
81
+ rubygems_version: 2.5.1
50
82
  signing_key:
51
83
  specification_version: 4
52
84
  summary: Easy creation of seed and sample data.
metadata.gz.sig ADDED
Binary file
data/README.md DELETED
@@ -1,29 +0,0 @@
1
- # SeedPacket
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'seed_packet'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install seed_packet
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it ( https://github.com/[my-github-username]/seed_packet/fork )
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create a new Pull Request
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
-