rails_model_stacker 0.0.6 → 0.0.7

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
  SHA1:
3
- metadata.gz: d5e04a9c2241866c5e23662daba91ce4019e9e9a
4
- data.tar.gz: dd24dcdae9ae908ac1d55b910f18b4fd8273509d
3
+ metadata.gz: b1a6fe6ecdb20cfecc6e873393aadc3bf5a0e9e2
4
+ data.tar.gz: 30c6e265a2f040b9fe358dadbec669e98d1ee90a
5
5
  SHA512:
6
- metadata.gz: c1c8b6758eaa07ef22fe3d9094f113a18b2fcd562aff286444782e1dafaeeb7fbe2ecee3637acb49237866ed98110c820d74a85cdcd2b5e91763a0d4d8059722
7
- data.tar.gz: f6481c1b6d7b5434ffe407ee7e215991ec19ebf94ed13389454af56393eada19d35e71885ac46d45bf5fd2d681ba926f1680d93764b5c272c169e8bdb636cd0e
6
+ metadata.gz: 65908a837a525098b68a6c377b43ddf94c47fc7fee3e7877cda4f4dd55cd0cbc2bcb020e3841e92aee00f60e2bb5bfe96647dcef1fae049cc930627712dfc745
7
+ data.tar.gz: 5a8d6e6156e215c0d7880708d33529c3b3a60e16224a54fc9331aec3ba30d820e4c0881a55b9f9c1cf0fcb5a007f17ca67debfafd63785517ed5983e71639be8
@@ -35,6 +35,18 @@ module FactoryGirl
35
35
  auto_sequencer columns, :money
36
36
  end
37
37
 
38
+ ##
39
+ #integer sequence
40
+ def auto_number_sequence column
41
+ auto_sequence column, :number
42
+ end
43
+
44
+ ##
45
+ #multiple integer sequences
46
+ def auto_number_sequencer columns
47
+ auto_sequencer columns, :number
48
+ end
49
+
38
50
  private
39
51
  ##
40
52
  #makes the text for auto_sequence
@@ -45,6 +57,8 @@ module FactoryGirl
45
57
  case type
46
58
  when :money
47
59
  "#{index}.#{rand(99)}"
60
+ when :number
61
+ index.to_s
48
62
  else
49
63
  "#{template} #{index}"
50
64
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rails_model_stacker"
6
- s.version = "0.0.6"
6
+ s.version = "0.0.7"
7
7
  s.date = "2017-07-13"
8
8
  s.summary = "Rails Model Stacker"
9
9
  s.description = "Shorter Active Record validations and associations with RSpec and shoulda support"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_model_stacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Petricone