scaffoldhub 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +28 -28
- data/lib/scaffoldhub.rb +1 -1
- data/lib/scaffoldhub/helper.rb +8 -0
- data/scaffoldhub.gemspec +3 -3
- data/spec/helper_spec.rb +16 -0
- metadata +7 -7
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
scaffoldhub (0.1.
|
4
|
+
scaffoldhub (0.1.3)
|
5
5
|
rails
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
10
|
abstract (1.0.0)
|
11
|
-
actionmailer (3.0.
|
12
|
-
actionpack (= 3.0.
|
13
|
-
mail (~> 2.2.
|
14
|
-
actionpack (3.0.
|
15
|
-
activemodel (= 3.0.
|
16
|
-
activesupport (= 3.0.
|
11
|
+
actionmailer (3.0.8)
|
12
|
+
actionpack (= 3.0.8)
|
13
|
+
mail (~> 2.2.19)
|
14
|
+
actionpack (3.0.8)
|
15
|
+
activemodel (= 3.0.8)
|
16
|
+
activesupport (= 3.0.8)
|
17
17
|
builder (~> 2.1.2)
|
18
18
|
erubis (~> 2.6.6)
|
19
19
|
i18n (~> 0.5.0)
|
@@ -21,19 +21,19 @@ GEM
|
|
21
21
|
rack-mount (~> 0.6.14)
|
22
22
|
rack-test (~> 0.5.7)
|
23
23
|
tzinfo (~> 0.3.23)
|
24
|
-
activemodel (3.0.
|
25
|
-
activesupport (= 3.0.
|
24
|
+
activemodel (3.0.8)
|
25
|
+
activesupport (= 3.0.8)
|
26
26
|
builder (~> 2.1.2)
|
27
27
|
i18n (~> 0.5.0)
|
28
|
-
activerecord (3.0.
|
29
|
-
activemodel (= 3.0.
|
30
|
-
activesupport (= 3.0.
|
31
|
-
arel (~> 2.0.
|
28
|
+
activerecord (3.0.8)
|
29
|
+
activemodel (= 3.0.8)
|
30
|
+
activesupport (= 3.0.8)
|
31
|
+
arel (~> 2.0.10)
|
32
32
|
tzinfo (~> 0.3.23)
|
33
|
-
activeresource (3.0.
|
34
|
-
activemodel (= 3.0.
|
35
|
-
activesupport (= 3.0.
|
36
|
-
activesupport (3.0.
|
33
|
+
activeresource (3.0.8)
|
34
|
+
activemodel (= 3.0.8)
|
35
|
+
activesupport (= 3.0.8)
|
36
|
+
activesupport (3.0.8)
|
37
37
|
arel (2.0.10)
|
38
38
|
builder (2.1.2)
|
39
39
|
diff-lcs (1.1.2)
|
@@ -53,17 +53,17 @@ GEM
|
|
53
53
|
rack (>= 1.0.0)
|
54
54
|
rack-test (0.5.7)
|
55
55
|
rack (>= 1.0)
|
56
|
-
rails (3.0.
|
57
|
-
actionmailer (= 3.0.
|
58
|
-
actionpack (= 3.0.
|
59
|
-
activerecord (= 3.0.
|
60
|
-
activeresource (= 3.0.
|
61
|
-
activesupport (= 3.0.
|
56
|
+
rails (3.0.8)
|
57
|
+
actionmailer (= 3.0.8)
|
58
|
+
actionpack (= 3.0.8)
|
59
|
+
activerecord (= 3.0.8)
|
60
|
+
activeresource (= 3.0.8)
|
61
|
+
activesupport (= 3.0.8)
|
62
62
|
bundler (~> 1.0)
|
63
|
-
railties (= 3.0.
|
64
|
-
railties (3.0.
|
65
|
-
actionpack (= 3.0.
|
66
|
-
activesupport (= 3.0.
|
63
|
+
railties (= 3.0.8)
|
64
|
+
railties (3.0.8)
|
65
|
+
actionpack (= 3.0.8)
|
66
|
+
activesupport (= 3.0.8)
|
67
67
|
rake (>= 0.8.7)
|
68
68
|
thor (~> 0.14.4)
|
69
69
|
rake (0.8.7)
|
@@ -78,7 +78,7 @@ GEM
|
|
78
78
|
thor (0.14.6)
|
79
79
|
treetop (1.4.9)
|
80
80
|
polyglot (>= 0.3.1)
|
81
|
-
tzinfo (0.3.
|
81
|
+
tzinfo (0.3.28)
|
82
82
|
|
83
83
|
PLATFORMS
|
84
84
|
ruby
|
data/lib/scaffoldhub.rb
CHANGED
data/lib/scaffoldhub/helper.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
|
+
require 'tmpdir'
|
2
|
+
|
1
3
|
module Scaffoldhub
|
2
4
|
module Helper
|
3
5
|
|
4
6
|
class ScaffoldParameterMissing < RuntimeError
|
5
7
|
end
|
6
8
|
|
9
|
+
def self.included(base)
|
10
|
+
base.class_eval do
|
11
|
+
source_root Dir.tmpdir
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
7
15
|
class << self
|
8
16
|
def scaffold_spec
|
9
17
|
@scaffold_spec
|
data/scaffoldhub.gemspec
CHANGED
@@ -9,9 +9,9 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.authors = ['Pat Shaughnessy']
|
11
11
|
s.email = ['pat@patshaughnessy.net']
|
12
|
-
s.homepage = "http://scaffoldhub.org"
|
13
|
-
s.summary = %q{
|
14
|
-
s.description = %q{Run
|
12
|
+
s.homepage = "http://www.scaffoldhub.org"
|
13
|
+
s.summary = %q{Run a scaffold from www.scaffoldhub.org, or push a new scaffold to www.scaffoldhub.org.}
|
14
|
+
s.description = %q{Run a scaffold from www.scaffoldhub.org, or push a new scaffold to www.scaffoldhub.org.}
|
15
15
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/spec/helper_spec.rb
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
2
|
|
3
3
|
class FakeGenerator
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def source_root(value)
|
7
|
+
@sr = value
|
8
|
+
end
|
9
|
+
def source_root_value
|
10
|
+
@sr
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
4
14
|
include Scaffoldhub::Helper
|
5
15
|
|
6
16
|
attr_accessor :files
|
@@ -158,4 +168,10 @@ describe Scaffoldhub::Helper do
|
|
158
168
|
subject.replace_name_tokens('blah blah SCAFFOLD_PARAMETER blah blah blah').should == 'blah blah some_field blah blah blah'
|
159
169
|
end
|
160
170
|
end
|
171
|
+
|
172
|
+
describe 'calling source root' do
|
173
|
+
it 'should call source_root when included in each generator class' do
|
174
|
+
FakeGenerator.source_root_value.should == Dir.tmpdir
|
175
|
+
end
|
176
|
+
end
|
161
177
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffoldhub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Shaughnessy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-18 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
version: 0.9.10
|
81
81
|
type: :development
|
82
82
|
version_requirements: *id004
|
83
|
-
description: Run
|
83
|
+
description: Run a scaffold from www.scaffoldhub.org, or push a new scaffold to www.scaffoldhub.org.
|
84
84
|
email:
|
85
85
|
- pat@patshaughnessy.net
|
86
86
|
executables:
|
@@ -121,7 +121,7 @@ files:
|
|
121
121
|
- spec/spec_helper.rb
|
122
122
|
- spec/template_file_spec.rb
|
123
123
|
has_rdoc: true
|
124
|
-
homepage: http://scaffoldhub.org
|
124
|
+
homepage: http://www.scaffoldhub.org
|
125
125
|
licenses: []
|
126
126
|
|
127
127
|
post_install_message:
|
@@ -153,7 +153,7 @@ rubyforge_project:
|
|
153
153
|
rubygems_version: 1.4.2
|
154
154
|
signing_key:
|
155
155
|
specification_version: 3
|
156
|
-
summary:
|
156
|
+
summary: Run a scaffold from www.scaffoldhub.org, or push a new scaffold to www.scaffoldhub.org.
|
157
157
|
test_files:
|
158
158
|
- spec/fixtures/local_template_file.txt
|
159
159
|
- spec/fixtures/test_scaffold.rb
|