rapid 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +9 -69
- data/lib/rad.rb +2 -11
- data/lib/rad/gems.rb +10 -0
- data/lib/rad/paperclip.rb +0 -1
- data/lib/rad/spec/controller.rb +2 -2
- data/lib/rad/spec/model.rb +4 -4
- data/spec/controller/authorization_spec.rb +1 -1
- data/spec/controller/{helper.rb → spec_helper.rb} +4 -1
- data/spec/lib/{helper.rb → spec_helper.rb} +3 -1
- data/spec/lib/text_utils_spec.rb +1 -1
- data/spec/models/authorization_spec.rb +1 -1
- data/spec/models/authorized_object_spec.rb +1 -1
- data/spec/models/file_audit_spec.rb +1 -1
- data/spec/models/space_key_spec.rb +1 -1
- data/spec/models/{helper.rb → spec_helper.rb} +4 -1
- data/spec/models/user_spec.rb +1 -1
- data/spec/mongo_mapper/basic_spec.rb +1 -1
- data/spec/mongo_mapper/{helper.rb → spec_helper.rb} +5 -4
- metadata +52 -27
- data/spec/spec.opts +0 -4
data/Rakefile
CHANGED
@@ -1,71 +1,11 @@
|
|
1
|
-
require '
|
2
|
-
require 'fileutils'
|
3
|
-
current_dir = File.expand_path(File.dirname(__FILE__))
|
4
|
-
Dir.chdir current_dir
|
1
|
+
require 'rake_ext'
|
5
2
|
|
3
|
+
project(
|
4
|
+
:name => "rad",
|
5
|
+
:gem_name => "rapid",
|
6
|
+
:version => "0.0.3",
|
7
|
+
:summary => "Rapid Application Development platform for Crystal Framework",
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
require 'spec/rake/spectask'
|
11
|
-
|
12
|
-
task :default => :spec
|
13
|
-
|
14
|
-
Spec::Rake::SpecTask.new('spec') do |t|
|
15
|
-
t.spec_files = FileList["spec/**/*_spec.rb"].select{|f| f !~ /\/_/}
|
16
|
-
t.libs = ["#{current_dir}/lib"]
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
# Gem
|
22
|
-
#
|
23
|
-
require 'rake/clean'
|
24
|
-
require 'rake/gempackagetask'
|
25
|
-
|
26
|
-
gem_options = {
|
27
|
-
:name => "rapid",
|
28
|
-
:version => "0.0.2",
|
29
|
-
:summary => "Rapid Application Development platform for Crystal Framework",
|
30
|
-
:dependencies => %w(
|
31
|
-
crystal
|
32
|
-
crystal_ext
|
33
|
-
mongo_mapper_ext
|
34
|
-
jquery_client
|
35
|
-
)
|
36
|
-
}
|
37
|
-
|
38
|
-
gem_name = gem_options[:name]
|
39
|
-
spec = Gem::Specification.new do |s|
|
40
|
-
gem_options.delete(:dependencies).each{|d| s.add_dependency d}
|
41
|
-
gem_options.each{|k, v| s.send "#{k}=", v}
|
42
|
-
|
43
|
-
s.name = gem_name
|
44
|
-
s.author = "Alexey Petrushin"
|
45
|
-
s.homepage = "http://github.com/alexeypetrushin/#{gem_options[:name]}"
|
46
|
-
s.require_path = "lib"
|
47
|
-
s.files = (%w{Rakefile readme.md} + Dir.glob("{lib,spec}/**/*"))
|
48
|
-
|
49
|
-
s.platform = Gem::Platform::RUBY
|
50
|
-
s.has_rdoc = true
|
51
|
-
end
|
52
|
-
|
53
|
-
package_dir = "#{current_dir}/build"
|
54
|
-
Rake::GemPackageTask.new(spec) do |p|
|
55
|
-
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
|
56
|
-
p.need_zip = true
|
57
|
-
p.package_dir = package_dir
|
58
|
-
end
|
59
|
-
|
60
|
-
task :push do
|
61
|
-
# dir = Dir.chdir package_dir do
|
62
|
-
gem_file = Dir.glob("#{package_dir}/#{gem_name}*.gem").first
|
63
|
-
system "gem push #{gem_file}"
|
64
|
-
# end
|
65
|
-
end
|
66
|
-
|
67
|
-
task :clean do
|
68
|
-
system "rm -r #{package_dir}"
|
69
|
-
end
|
70
|
-
|
71
|
-
task :release => [:gem, :push, :clean]
|
9
|
+
:author => "Alexey Petrushin",
|
10
|
+
:homepage => "http://github.com/alexeypetrushin/rapid"
|
11
|
+
)
|
data/lib/rad.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'rad/gems'
|
2
|
+
|
1
3
|
# crystal
|
2
4
|
require 'crystal_ext/profiles/web_ext'
|
3
5
|
|
@@ -5,17 +7,6 @@ require 'crystal_ext/profiles/web_ext'
|
|
5
7
|
require 'crystal_jquery'
|
6
8
|
require 'common_interface'
|
7
9
|
|
8
|
-
# gems
|
9
|
-
%w(
|
10
|
-
mongo_mapper
|
11
|
-
nokogiri
|
12
|
-
bluecloth
|
13
|
-
sanitize
|
14
|
-
state_machine
|
15
|
-
rack
|
16
|
-
).each{|n| gem n}
|
17
|
-
# paperclip
|
18
|
-
|
19
10
|
#
|
20
11
|
# rad
|
21
12
|
#
|
data/lib/rad/gems.rb
ADDED
data/lib/rad/paperclip.rb
CHANGED
data/lib/rad/spec/controller.rb
CHANGED
@@ -3,7 +3,7 @@ require 'crystal/spec/controller'
|
|
3
3
|
#
|
4
4
|
# User
|
5
5
|
#
|
6
|
-
|
6
|
+
RSpec::Core::ExampleGroup.class_eval do
|
7
7
|
def self.with_user_controller
|
8
8
|
return if @with_user_controller
|
9
9
|
@with_user_controller = true
|
@@ -28,7 +28,7 @@ end
|
|
28
28
|
#
|
29
29
|
# Miltitenancy
|
30
30
|
#
|
31
|
-
|
31
|
+
RSpec::Core::ExampleGroup.class_eval do
|
32
32
|
def self.with_multitenancy
|
33
33
|
return if @with_multitenancy
|
34
34
|
@with_multitenancy = true
|
data/lib/rad/spec/model.rb
CHANGED
@@ -4,7 +4,7 @@ require 'crystal/environment'
|
|
4
4
|
#
|
5
5
|
# User
|
6
6
|
#
|
7
|
-
|
7
|
+
RSpec::Core::ExampleGroup.class_eval do
|
8
8
|
def with_user
|
9
9
|
return if @with_user
|
10
10
|
@with_user = true
|
@@ -26,7 +26,7 @@ end
|
|
26
26
|
#
|
27
27
|
# Miltitenancy
|
28
28
|
#
|
29
|
-
|
29
|
+
RSpec::Core::ExampleGroup.class_eval do
|
30
30
|
def set_default_space
|
31
31
|
account = Factory.create :account
|
32
32
|
|
@@ -49,7 +49,7 @@ end
|
|
49
49
|
#
|
50
50
|
# Database
|
51
51
|
#
|
52
|
-
|
52
|
+
RSpec::Core::ExampleGroup.class_eval do
|
53
53
|
def self.with_test_database
|
54
54
|
before :all do
|
55
55
|
MongoMapper.db_config = {
|
@@ -67,7 +67,7 @@ end
|
|
67
67
|
#
|
68
68
|
# Rad
|
69
69
|
#
|
70
|
-
|
70
|
+
RSpec::Core::ExampleGroup.class_eval do
|
71
71
|
def self.with_rad_model
|
72
72
|
# with_mail
|
73
73
|
with_mongo_mapper
|
@@ -1,9 +1,12 @@
|
|
1
|
+
require 'rspec_ext'
|
2
|
+
|
1
3
|
dir = File.expand_path(File.dirname(__FILE__))
|
2
4
|
lib_dir = File.expand_path("#{dir}/../../../lib")
|
3
5
|
$LOAD_PATH << lib_dir unless $LOAD_PATH.include? lib_dir
|
4
6
|
|
5
|
-
require '
|
7
|
+
require 'rad/gems'
|
6
8
|
|
9
|
+
require 'crystal_ext/profiles/web_ext_require'
|
7
10
|
|
8
11
|
require 'mongo_mapper'
|
9
12
|
require 'mongo_mapper_ext'
|
data/spec/lib/text_utils_spec.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
+
require 'rspec_ext'
|
2
|
+
|
1
3
|
dir = File.expand_path(File.dirname(__FILE__))
|
2
4
|
lib_dir = File.expand_path("#{dir}/../../../../lib")
|
3
5
|
$LOAD_PATH << lib_dir unless $LOAD_PATH.include? lib_dir
|
4
6
|
|
7
|
+
require 'rad/gems'
|
8
|
+
|
5
9
|
# models
|
6
10
|
require 'mongo_mapper'
|
7
11
|
require 'mongo_mapper_ext'
|
8
12
|
|
9
13
|
# spec & helpers
|
10
|
-
require 'spec_ext'
|
11
14
|
require 'rad/spec/model'
|
data/spec/models/user_spec.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
+
require 'rspec_ext'
|
2
|
+
|
1
3
|
dir = File.expand_path(File.dirname(__FILE__))
|
2
4
|
lib_dir = File.expand_path("#{dir}/../../../lib")
|
3
5
|
$LOAD_PATH << lib_dir unless $LOAD_PATH.include? lib_dir
|
4
6
|
|
7
|
+
require 'rad/gems'
|
8
|
+
|
5
9
|
require 'crystal/support'
|
6
10
|
require 'mongo_mapper'
|
7
|
-
require 'rad/mongo_mapper/rad_micelaneous'
|
8
|
-
|
9
|
-
# spec & helpers
|
10
|
-
require 'spec_ext'
|
11
|
+
require 'rad/mongo_mapper/rad_micelaneous'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rapid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
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
|
- Alexey Petrushin
|
@@ -15,65 +15,90 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-15 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: bluecloth
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - "="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 1
|
30
30
|
segments:
|
31
|
+
- 2
|
31
32
|
- 0
|
32
|
-
|
33
|
+
- 7
|
34
|
+
version: 2.0.7
|
33
35
|
type: :runtime
|
34
36
|
version_requirements: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
38
|
+
name: sanitize
|
37
39
|
prerelease: false
|
38
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
42
|
requirements:
|
41
|
-
- - "
|
43
|
+
- - "="
|
42
44
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
45
|
+
hash: 29
|
44
46
|
segments:
|
45
|
-
-
|
46
|
-
|
47
|
+
- 1
|
48
|
+
- 2
|
49
|
+
- 1
|
50
|
+
version: 1.2.1
|
47
51
|
type: :runtime
|
48
52
|
version_requirements: *id002
|
49
53
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
54
|
+
name: state_machine
|
51
55
|
prerelease: false
|
52
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
57
|
none: false
|
54
58
|
requirements:
|
55
|
-
- - "
|
59
|
+
- - "="
|
56
60
|
- !ruby/object:Gem::Version
|
57
|
-
hash:
|
61
|
+
hash: 51
|
58
62
|
segments:
|
59
63
|
- 0
|
60
|
-
|
64
|
+
- 9
|
65
|
+
- 4
|
66
|
+
version: 0.9.4
|
61
67
|
type: :runtime
|
62
68
|
version_requirements: *id003
|
63
69
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
70
|
+
name: paperclip
|
65
71
|
prerelease: false
|
66
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
73
|
none: false
|
68
74
|
requirements:
|
69
|
-
- - "
|
75
|
+
- - "="
|
70
76
|
- !ruby/object:Gem::Version
|
71
|
-
hash:
|
77
|
+
hash: 113
|
72
78
|
segments:
|
73
|
-
-
|
74
|
-
|
79
|
+
- 2
|
80
|
+
- 3
|
81
|
+
- 1
|
82
|
+
- 1
|
83
|
+
version: 2.3.1.1
|
75
84
|
type: :runtime
|
76
85
|
version_requirements: *id004
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: factory_girl
|
88
|
+
prerelease: false
|
89
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - "="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
hash: 31
|
95
|
+
segments:
|
96
|
+
- 1
|
97
|
+
- 3
|
98
|
+
- 2
|
99
|
+
version: 1.3.2
|
100
|
+
type: :runtime
|
101
|
+
version_requirements: *id005
|
77
102
|
description:
|
78
103
|
email:
|
79
104
|
executables: []
|
@@ -85,6 +110,7 @@ extra_rdoc_files: []
|
|
85
110
|
files:
|
86
111
|
- Rakefile
|
87
112
|
- readme.md
|
113
|
+
- lib/rad/gems.rb
|
88
114
|
- lib/rad/http_controller/acts_as/authenticated.rb
|
89
115
|
- lib/rad/http_controller/acts_as/authenticated_master_domain.rb
|
90
116
|
- lib/rad/http_controller/acts_as/authorized.rb
|
@@ -128,20 +154,19 @@ files:
|
|
128
154
|
- lib/rad/tasks/initialize.rake
|
129
155
|
- lib/rad.rb
|
130
156
|
- spec/controller/authorization_spec.rb
|
131
|
-
- spec/controller/
|
132
|
-
- spec/lib/
|
157
|
+
- spec/controller/spec_helper.rb
|
158
|
+
- spec/lib/spec_helper.rb
|
133
159
|
- spec/lib/text_utils_spec.rb
|
134
160
|
- spec/models/authorization_spec.rb
|
135
161
|
- spec/models/authorized_object_spec.rb
|
136
162
|
- spec/models/file_audit_spec/100.txt
|
137
163
|
- spec/models/file_audit_spec/302.txt
|
138
164
|
- spec/models/file_audit_spec.rb
|
139
|
-
- spec/models/helper.rb
|
140
165
|
- spec/models/space_key_spec.rb
|
166
|
+
- spec/models/spec_helper.rb
|
141
167
|
- spec/models/user_spec.rb
|
142
168
|
- spec/mongo_mapper/basic_spec.rb
|
143
|
-
- spec/mongo_mapper/
|
144
|
-
- spec/spec.opts
|
169
|
+
- spec/mongo_mapper/spec_helper.rb
|
145
170
|
has_rdoc: true
|
146
171
|
homepage: http://github.com/alexeypetrushin/rapid
|
147
172
|
licenses: []
|
data/spec/spec.opts
DELETED