replication 0.1.1 → 0.1.2

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: 39169fcebc5ffe91a3c3763cc67598dcade62c0c
4
- data.tar.gz: 8fa18740473b65b6b44bf2f13fc3d26e2bd63bc0
3
+ metadata.gz: f806ca18d9e7fba9d5e807ab8e6e116c9c9cbeb0
4
+ data.tar.gz: 438097738f11ebb9cd1a17479567ed95bfaf005b
5
5
  SHA512:
6
- metadata.gz: 1c9379d4150d56f3fca0869a9dbf80e74173bf686fb97eb3defe006cc5f6d78426e3f0a2f893881573b0aed7a58e715d1617a80fe9da34f6c7551ffdfef27212
7
- data.tar.gz: fb4506acd903e9515b83f7027c8a3a44b14cb50769884b9d2e33d9526433fa2f5542bebf5ee4bac80dcd662bb23a46a4a8b4f9cdfae8237857ba596c35907003
6
+ metadata.gz: 6b55b5077da9447e8b36132215ecfaad70d3668942019c7eabac58ad8f3697134724d0f42d5169f20ed1a4c0fa541e437a291f25129db9d60e08bd52e62ebfb0
7
+ data.tar.gz: 4bfb05a38b7713e250ec5dc83cd39502acac12144cb027c691a9edb7177594bdeaa3dffdef64ccdffcc3a83131408ec9aee89e0bf4e83dcb872dc5b0a2206feb
data/.gitignore CHANGED
@@ -20,3 +20,5 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+
24
+ *.log
@@ -10,7 +10,7 @@ module Replication
10
10
 
11
11
  def with(modules)
12
12
  modules.each do |m|
13
- model_class.send :extend, Replication::Modules.const_get(m.to_s.classify)
13
+ model_class.send :include, Replication::Modules.const_get(m.to_s.classify)
14
14
  end
15
15
  end
16
16
 
@@ -2,24 +2,15 @@ module Replication
2
2
  module Modules
3
3
  module Proofreading
4
4
 
5
- def self.extended(model_class)
6
- model_class.class_eval do
7
- include Model
8
- end
5
+ def unwound(**options)
6
+ super if valid?
9
7
  end
10
8
 
11
- module Model
12
-
13
- def unwound(**options)
14
- super if valid?
15
- end
16
-
17
- def replicate(**options)
18
- if valid?
19
- super
20
- else
21
- raise Replication::UnwoundError, 'The origin must be valid!'
22
- end
9
+ def replicate(**options)
10
+ if valid?
11
+ super
12
+ else
13
+ raise Replication::UnwoundError, 'The origin must be valid!'
23
14
  end
24
15
  end
25
16
  end
@@ -2,33 +2,24 @@ module Replication
2
2
  module Modules
3
3
  module SemiConservative
4
4
 
5
- def self.extended(model_class)
6
- model_class.class_eval do
7
- include Model
8
- end
5
+ def unwound(**options)
6
+ strand_class.new({
7
+ name: options[:name],
8
+ pairs: strand_attributes,
9
+ origin: self
10
+ })
9
11
  end
10
12
 
11
- module Model
12
-
13
- def unwound(**options)
14
- strand_class.new({
15
- name: options[:name],
16
- pairs: strand_attributes,
17
- origin: self
18
- })
19
- end
20
-
21
- def replicate(**options)
22
- strand_class.to_adapter.create!({
23
- name: options[:name],
24
- pairs: strand_attributes,
25
- origin: self
26
- })
27
- end
13
+ def replicate(**options)
14
+ strand_class.to_adapter.create!({
15
+ name: options[:name],
16
+ pairs: strand_attributes,
17
+ origin: self
18
+ })
19
+ end
28
20
 
29
- def strand_attributes
30
- _strand_attributes.except(*replication_config.except)
31
- end
21
+ def strand_attributes
22
+ _strand_attributes.except(*replication_config.except)
32
23
  end
33
24
  end
34
25
  end
@@ -1,3 +1,3 @@
1
1
  module Replication
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo DeAlmeida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,7 +82,6 @@ files:
82
82
  - test/rails_app/config/routes.rb
83
83
  - test/rails_app/config/secrets.yml
84
84
  - test/rails_app/db/migrate/830335961_organism_migration.rb
85
- - test/rails_app/log/test.log
86
85
  - test/replication/modules/proofreading_test.rb
87
86
  - test/replication/modules/semi_conservative_test.rb
88
87
  - test/replication/process_test.rb
@@ -134,7 +133,6 @@ test_files:
134
133
  - test/rails_app/config/routes.rb
135
134
  - test/rails_app/config/secrets.yml
136
135
  - test/rails_app/db/migrate/830335961_organism_migration.rb
137
- - test/rails_app/log/test.log
138
136
  - test/replication/modules/proofreading_test.rb
139
137
  - test/replication/modules/semi_conservative_test.rb
140
138
  - test/replication/process_test.rb