rails3_artifactor 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/rails3_artifactor/namespaces.rb +0 -1
- data/lib/rails3_artifactor/rspec/configure.rb +2 -2
- data/lib/rails3_artifactor/rspec/macro.rb +28 -11
- data/lib/rails3_artifactor.rb +2 -1
- data/rails3_artifactor.gemspec +7 -5
- metadata +8 -8
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ begin
|
|
10
10
|
gem.add_development_dependency "rspec", "~> 2.0.0.beta.19"
|
11
11
|
gem.add_dependency "require_all", "~> 1.1.0"
|
12
12
|
gem.add_dependency "sugar-high", "~> 0.2.3"
|
13
|
-
gem.add_dependency 'rails3_assist', "~> 0.
|
13
|
+
gem.add_dependency 'rails3_assist', "~> 0.2.4"
|
14
14
|
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
16
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -1,30 +1,47 @@
|
|
1
1
|
module Rails3::Assist
|
2
2
|
module UseMacro
|
3
|
-
def
|
4
|
-
|
3
|
+
def use_orm orm
|
4
|
+
class_eval do
|
5
|
+
begin
|
6
|
+
include "Rails3::Assist::Orm::#{orm.to_s.camelize}".constantize
|
7
|
+
rescue
|
8
|
+
raise ArgumentError, "Unregistered ORM library: #{orm}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def assist_with *types
|
14
|
+
types.each{|type| use_helper type}
|
5
15
|
end
|
6
16
|
alias_method :load_helpers, :assist_with
|
7
17
|
alias_method :use_helpers, :assist_with
|
8
18
|
|
9
|
-
def
|
19
|
+
def rails_assist type
|
10
20
|
class_eval do
|
11
21
|
begin
|
12
|
-
|
22
|
+
module_name = "Rails3::Assist::#{type.to_s.camelize}"
|
23
|
+
include module_name.constantize
|
13
24
|
rescue
|
14
|
-
raise ArgumentError, "Unregistered Rails3
|
25
|
+
raise ArgumentError, "Unregistered Rails3 assist library: #{type}, #{module_name}"
|
15
26
|
end
|
16
27
|
end
|
17
|
-
end
|
18
|
-
alias_method :load_helper, :use_helper
|
28
|
+
end
|
19
29
|
|
20
|
-
def
|
30
|
+
def artifact_assist type
|
21
31
|
class_eval do
|
22
32
|
begin
|
23
|
-
|
33
|
+
module_name = "Rails3::Assist::Artifact::#{type.to_s.camelize}"
|
34
|
+
include module_name.constantize
|
24
35
|
rescue
|
25
|
-
raise ArgumentError, "Unregistered
|
36
|
+
raise ArgumentError, "Unregistered Rails3 Artifact assist library: #{type}, #{module_name}"
|
26
37
|
end
|
27
38
|
end
|
28
39
|
end
|
29
|
-
|
40
|
+
|
41
|
+
def use_helper type
|
42
|
+
return rails_assist(type) if [:file, :files, :directory].include?(type)
|
43
|
+
artifact_assist(type)
|
44
|
+
end
|
45
|
+
alias_method :load_helper, :use_helper
|
46
|
+
end
|
30
47
|
end
|
data/lib/rails3_artifactor.rb
CHANGED
@@ -2,7 +2,8 @@ require 'require_all'
|
|
2
2
|
require 'sugar-high/file'
|
3
3
|
require 'sugar-high/alias'
|
4
4
|
require 'sugar-high/regexp'
|
5
|
-
require '
|
5
|
+
require 'sugar-high/module'
|
6
6
|
|
7
|
+
require 'rails3_artifactor/namespaces'
|
7
8
|
require 'rails3_artifactor/artifact/base'
|
8
9
|
require_all File.dirname(__FILE__) + '/rails3_artifactor'
|
data/rails3_artifactor.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rails3_artifactor}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-13}
|
13
13
|
s.description = %q{Helpers for handling Rails 3 artifacts in general, such as CRUD operations etc.}
|
14
14
|
s.email = %q{kmandrup@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -53,6 +53,7 @@ Gem::Specification.new do |s|
|
|
53
53
|
"spec/fixtures.rb",
|
54
54
|
"spec/fixtures/app/controllers/account_controller.rb",
|
55
55
|
"spec/fixtures/app/helpers/account_helper.rb",
|
56
|
+
"spec/fixtures/app/mailers/account_mailer.rb",
|
56
57
|
"spec/fixtures/app/models/account.rb",
|
57
58
|
"spec/fixtures/app/views/account/edit.html.erb",
|
58
59
|
"spec/fixtures/app/views/account/show.html.erb",
|
@@ -60,6 +61,7 @@ Gem::Specification.new do |s|
|
|
60
61
|
"spec/rails3_artifactor/artifact/base_spec.rb",
|
61
62
|
"spec/rails3_artifactor/artifact/crud/controller_spec.rb",
|
62
63
|
"spec/rails3_artifactor/artifact/crud/helper_spec.rb",
|
64
|
+
"spec/rails3_artifactor/artifact/crud/mailer_spec.rb",
|
63
65
|
"spec/rails3_artifactor/artifact/crud/migration_spec.rb",
|
64
66
|
"spec/rails3_artifactor/artifact/crud/model_spec.rb",
|
65
67
|
"spec/rails3_artifactor/artifact/crud/observer_spec.rb",
|
@@ -129,18 +131,18 @@ Gem::Specification.new do |s|
|
|
129
131
|
s.add_development_dependency(%q<rspec>, ["~> 2.0.0.beta.19"])
|
130
132
|
s.add_runtime_dependency(%q<require_all>, ["~> 1.1.0"])
|
131
133
|
s.add_runtime_dependency(%q<sugar-high>, ["~> 0.2.3"])
|
132
|
-
s.add_runtime_dependency(%q<rails3_assist>, ["~> 0.
|
134
|
+
s.add_runtime_dependency(%q<rails3_assist>, ["~> 0.2.4"])
|
133
135
|
else
|
134
136
|
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.19"])
|
135
137
|
s.add_dependency(%q<require_all>, ["~> 1.1.0"])
|
136
138
|
s.add_dependency(%q<sugar-high>, ["~> 0.2.3"])
|
137
|
-
s.add_dependency(%q<rails3_assist>, ["~> 0.
|
139
|
+
s.add_dependency(%q<rails3_assist>, ["~> 0.2.4"])
|
138
140
|
end
|
139
141
|
else
|
140
142
|
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.19"])
|
141
143
|
s.add_dependency(%q<require_all>, ["~> 1.1.0"])
|
142
144
|
s.add_dependency(%q<sugar-high>, ["~> 0.2.3"])
|
143
|
-
s.add_dependency(%q<rails3_assist>, ["~> 0.
|
145
|
+
s.add_dependency(%q<rails3_assist>, ["~> 0.2.4"])
|
144
146
|
end
|
145
147
|
end
|
146
148
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kristian Mandrup
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-13 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -74,9 +74,9 @@ dependencies:
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
-
|
78
|
-
-
|
79
|
-
version: 0.
|
77
|
+
- 2
|
78
|
+
- 4
|
79
|
+
version: 0.2.4
|
80
80
|
type: :runtime
|
81
81
|
version_requirements: *id004
|
82
82
|
description: Helpers for handling Rails 3 artifacts in general, such as CRUD operations etc.
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- spec/fixtures.rb
|
126
126
|
- spec/fixtures/app/controllers/account_controller.rb
|
127
127
|
- spec/fixtures/app/helpers/account_helper.rb
|
128
|
+
- spec/fixtures/app/mailers/account_mailer.rb
|
128
129
|
- spec/fixtures/app/models/account.rb
|
129
130
|
- spec/fixtures/app/views/account/edit.html.erb
|
130
131
|
- spec/fixtures/app/views/account/show.html.erb
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- spec/rails3_artifactor/artifact/base_spec.rb
|
133
134
|
- spec/rails3_artifactor/artifact/crud/controller_spec.rb
|
134
135
|
- spec/rails3_artifactor/artifact/crud/helper_spec.rb
|
136
|
+
- spec/rails3_artifactor/artifact/crud/mailer_spec.rb
|
135
137
|
- spec/rails3_artifactor/artifact/crud/migration_spec.rb
|
136
138
|
- spec/rails3_artifactor/artifact/crud/model_spec.rb
|
137
139
|
- spec/rails3_artifactor/artifact/crud/observer_spec.rb
|
@@ -153,8 +155,6 @@ files:
|
|
153
155
|
- spec/rails3_artifactor/base/crud/update_spec.rb
|
154
156
|
- spec/rails3_artifactor/base/file_name_spec.rb
|
155
157
|
- spec/spec_helper.rb
|
156
|
-
- spec/fixtures/app/mailers/account_mailer.rb
|
157
|
-
- spec/rails3_artifactor/artifact/crud/mailer_spec.rb
|
158
158
|
has_rdoc: true
|
159
159
|
homepage: http://github.com/kristianmandrup/rails3_artifact_helper
|
160
160
|
licenses: []
|