prepro 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/prepro/processor.rb +2 -4
- data/lib/prepro/version.rb +1 -1
- data/prepro-0.0.2.gem +0 -0
- data/prepro.gemspec +19 -0
- metadata +5 -3
data/lib/prepro/processor.rb
CHANGED
@@ -15,8 +15,7 @@ module Prepro
|
|
15
15
|
model_instance = model_class.new
|
16
16
|
enforce_permissions(model_instance.creatable_by?(actor))
|
17
17
|
before_assign_attributes_on_create(model_instance, processor_attrs)
|
18
|
-
|
19
|
-
model_instance.attributes = model_attrs
|
18
|
+
model_instance.assign_attributes(model_attrs, :as => options[:as])
|
20
19
|
before_save_on_create(model_instance, processor_attrs)
|
21
20
|
success = model_instance.save
|
22
21
|
[model_instance, success]
|
@@ -32,8 +31,7 @@ module Prepro
|
|
32
31
|
model_instance = model_class.find(model_attrs[:id])
|
33
32
|
enforce_permissions(model_instance.updatable_by?(actor))
|
34
33
|
before_assign_attributes_on_update(model_instance, processor_attrs)
|
35
|
-
|
36
|
-
model_instance.attributes = model_attrs
|
34
|
+
model_instance.assign_attributes(model_attrs, :as => options[:as])
|
37
35
|
before_save_on_update(model_instance, processor_attrs)
|
38
36
|
success = model_instance.save
|
39
37
|
[model_instance, success]
|
data/lib/prepro/version.rb
CHANGED
data/prepro-0.0.2.gem
ADDED
Binary file
|
data/prepro.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "prepro/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'prepro'
|
7
|
+
s.version = Prepro::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Jo Hund"]
|
10
|
+
s.email = 'jhund@clearcove.ca'
|
11
|
+
s.homepage = 'http://rubygems.org/gems/prepro'
|
12
|
+
s.summary = "Presenters and Processors for clean Rails apps."
|
13
|
+
s.description = "Presenters and Processors for clean Rails apps."
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prepro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jo Hund
|
@@ -32,6 +32,8 @@ files:
|
|
32
32
|
- lib/prepro/presenter.rb
|
33
33
|
- lib/prepro/processor.rb
|
34
34
|
- lib/prepro/version.rb
|
35
|
+
- prepro-0.0.2.gem
|
36
|
+
- prepro.gemspec
|
35
37
|
- readme.textile
|
36
38
|
has_rdoc: true
|
37
39
|
homepage: http://rubygems.org/gems/prepro
|