rails_assist 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
 
5
5
  gem "require_all", "~> 1.2.0"
6
- gem "sugar-high", "~> 0.3.7"
6
+ gem "sugar-high", "~> 0.4.0"
7
7
  gem "activesupport", ">= 3.0.4"
8
8
  # gem "migration_assist", "~> 0.1.7"
9
9
 
data/Rakefile CHANGED
@@ -18,6 +18,11 @@ Jeweler::Tasks.new do |gem|
18
18
  gem.email = "kmandrup@gmail.com"
19
19
  gem.homepage = "http://github.com/kristianmandrup/rails3-assist"
20
20
  gem.authors = ["Kristian Mandrup"]
21
+
22
+ gem.add_dependency "require_all", "~> 1.2.0"
23
+ gem.add_dependency "sugar-high", "~> 0.4.0"
24
+ gem.add_dependency "activesupport", ">= 3.0.4"
25
+
21
26
  # Include your dependencies below. Runtime dependencies are required when using your gem,
22
27
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
23
28
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -32,7 +32,9 @@ module RailsAssist
32
32
  RailsAssist::Directory::Root.root_directories.each do |name|
33
33
  class_eval %{
34
34
  def #{name}_dir options={}
35
- ::File.join(RailsAssist::Directory::Root.root_dir(options), '#{name}')
35
+ _root_dir = RailsAssist::Directory::Root.root_dir(options)
36
+ raise "Rails Root dir not defined" if _root_dir.nil?
37
+ ::File.join(_root_dir, '#{name}')
36
38
  end
37
39
  }
38
40
  end
data/rails_assist.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails_assist}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
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{2011-03-02}
12
+ s.date = %q{2011-03-04}
13
13
  s.description = %q{Basic file operation helpers for working with Rails 3 artifacts}
14
14
  s.email = %q{kmandrup@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
50
50
  "rails_assist.gemspec",
51
51
  "sandbox/test.rb",
52
52
  "sandbox/test.txt",
53
+ "spec/dir_spec_helper.rb",
53
54
  "spec/fixtures.rb",
54
55
  "spec/fixtures/.gitignore",
55
56
  "spec/fixtures/Gemfile",
@@ -134,9 +135,10 @@ Gem::Specification.new do |s|
134
135
  ]
135
136
  s.homepage = %q{http://github.com/kristianmandrup/rails3-assist}
136
137
  s.require_paths = ["lib"]
137
- s.rubygems_version = %q{1.5.3}
138
+ s.rubygems_version = %q{1.6.1}
138
139
  s.summary = %q{File operation helpers for Rails 3 artifacts}
139
140
  s.test_files = [
141
+ "spec/dir_spec_helper.rb",
140
142
  "spec/fixtures.rb",
141
143
  "spec/fixtures/app/controllers/application_controller.rb",
142
144
  "spec/fixtures/app/controllers/users_controller.rb",
@@ -193,29 +195,38 @@ Gem::Specification.new do |s|
193
195
 
194
196
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
195
197
  s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
196
- s.add_runtime_dependency(%q<sugar-high>, ["~> 0.3.7"])
198
+ s.add_runtime_dependency(%q<sugar-high>, ["~> 0.4.0"])
197
199
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.4"])
198
200
  s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
199
201
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
200
202
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
201
203
  s.add_development_dependency(%q<rcov>, [">= 0"])
204
+ s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
205
+ s.add_runtime_dependency(%q<sugar-high>, ["~> 0.4.0"])
206
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.4"])
202
207
  else
203
208
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
204
- s.add_dependency(%q<sugar-high>, ["~> 0.3.7"])
209
+ s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
205
210
  s.add_dependency(%q<activesupport>, [">= 3.0.4"])
206
211
  s.add_dependency(%q<rspec>, [">= 2.3.0"])
207
212
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
208
213
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
209
214
  s.add_dependency(%q<rcov>, [">= 0"])
215
+ s.add_dependency(%q<require_all>, ["~> 1.2.0"])
216
+ s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
217
+ s.add_dependency(%q<activesupport>, [">= 3.0.4"])
210
218
  end
211
219
  else
212
220
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
213
- s.add_dependency(%q<sugar-high>, ["~> 0.3.7"])
221
+ s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
214
222
  s.add_dependency(%q<activesupport>, [">= 3.0.4"])
215
223
  s.add_dependency(%q<rspec>, [">= 2.3.0"])
216
224
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
217
225
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
218
226
  s.add_dependency(%q<rcov>, [">= 0"])
227
+ s.add_dependency(%q<require_all>, ["~> 1.2.0"])
228
+ s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
229
+ s.add_dependency(%q<activesupport>, [">= 3.0.4"])
219
230
  end
220
231
  end
221
232
 
@@ -0,0 +1,53 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rails_assist'
4
+ require 'rails_assist/rspec'
5
+ # require 'rails-app-spec'
6
+ require 'tmpdir'
7
+
8
+ # Requires supporting files with custom matchers and macros, etc,
9
+ # in ./support/ and its subdirectories.
10
+ # Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
11
+
12
+ # require 'generator-spec'
13
+
14
+ # RSpec::Generator.configure do |config|
15
+ # config.debug = false
16
+ # config.remove_temp_dir = false # true
17
+ # config.default_rails_root(__FILE__)
18
+ # config.lib = File.dirname(__FILE__) + '/../lib'
19
+ # config.logger = :stdout
20
+ # end
21
+
22
+ require 'fixtures'
23
+
24
+ def project_dir
25
+ File.dirname(__FILE__) + '/..'
26
+ end
27
+
28
+ def temp_dir name
29
+ File.join(project_dir, name)
30
+ end
31
+
32
+ def make_temp_dir name
33
+ FileUtils.mkdir_p temp_dir(name)
34
+ end
35
+
36
+ def remove_temp_dir name
37
+ FileUtils.rm_rf temp_dir(name)
38
+ end
39
+
40
+ RailsAssist::Directory.rails_root = temp_dir('tmp_rails')
41
+
42
+ # puts "Rails root: #{RailsAssist::Directory.rails_root}"
43
+
44
+ RSpec.configure do |config|
45
+ config.mock_with :mocha
46
+ # config.before do
47
+ # make_temp_dir 'tmp_rails'
48
+ # end
49
+ # config.after do
50
+ # remove_temp_dir 'tmp_rails'
51
+ # end
52
+ end
53
+
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'dir_spec_helper'
2
2
 
3
3
  CLASS = RailsAssist::Artifact::Directory
4
4
 
@@ -37,9 +37,7 @@ describe RailsAssist::Artifact::Directory do
37
37
  CLASS.migration_dir.path.should match /db\/migrate/
38
38
  @test.migration_dirpath.should match /db\/migrate/
39
39
  end
40
- end
41
-
42
-
40
+ end
43
41
 
44
42
  [:initializer, :locale].each do |name|
45
43
  eval %{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_assist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-03-02 00:00:00.000000000 +01:00
12
+ date: 2011-03-04 00:00:00.000000000 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: require_all
17
- requirement: &2157241880 !ruby/object:Gem::Requirement
17
+ requirement: &2154099680 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,21 +22,21 @@ dependencies:
22
22
  version: 1.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2157241880
25
+ version_requirements: *2154099680
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: sugar-high
28
- requirement: &2157240560 !ruby/object:Gem::Requirement
28
+ requirement: &2154098260 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.7
33
+ version: 0.4.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2157240560
36
+ version_requirements: *2154098260
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activesupport
39
- requirement: &2157239320 !ruby/object:Gem::Requirement
39
+ requirement: &2154096900 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.0.4
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2157239320
47
+ version_requirements: *2154096900
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2157238500 !ruby/object:Gem::Requirement
50
+ requirement: &2154095440 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.3.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2157238500
58
+ version_requirements: *2154095440
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
- requirement: &2157237380 !ruby/object:Gem::Requirement
61
+ requirement: &2154093980 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.0.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2157237380
69
+ version_requirements: *2154093980
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jeweler
72
- requirement: &2157236040 !ruby/object:Gem::Requirement
72
+ requirement: &2154092960 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.5.2
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2157236040
80
+ version_requirements: *2154092960
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rcov
83
- requirement: &2157234880 !ruby/object:Gem::Requirement
83
+ requirement: &2154091500 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,7 +88,40 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2157234880
91
+ version_requirements: *2154091500
92
+ - !ruby/object:Gem::Dependency
93
+ name: require_all
94
+ requirement: &2154089240 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ version: 1.2.0
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: *2154089240
103
+ - !ruby/object:Gem::Dependency
104
+ name: sugar-high
105
+ requirement: &2154082420 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 0.4.0
111
+ type: :runtime
112
+ prerelease: false
113
+ version_requirements: *2154082420
114
+ - !ruby/object:Gem::Dependency
115
+ name: activesupport
116
+ requirement: &2154081700 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: 3.0.4
122
+ type: :runtime
123
+ prerelease: false
124
+ version_requirements: *2154081700
92
125
  description: Basic file operation helpers for working with Rails 3 artifacts
93
126
  email: kmandrup@gmail.com
94
127
  executables: []
@@ -130,6 +163,7 @@ files:
130
163
  - rails_assist.gemspec
131
164
  - sandbox/test.rb
132
165
  - sandbox/test.txt
166
+ - spec/dir_spec_helper.rb
133
167
  - spec/fixtures.rb
134
168
  - spec/fixtures/.gitignore
135
169
  - spec/fixtures/Gemfile
@@ -226,7 +260,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
260
  version: '0'
227
261
  segments:
228
262
  - 0
229
- hash: -4497221865388944741
263
+ hash: -72940984132446014
230
264
  required_rubygems_version: !ruby/object:Gem::Requirement
231
265
  none: false
232
266
  requirements:
@@ -235,11 +269,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
269
  version: '0'
236
270
  requirements: []
237
271
  rubyforge_project:
238
- rubygems_version: 1.5.3
272
+ rubygems_version: 1.6.1
239
273
  signing_key:
240
274
  specification_version: 3
241
275
  summary: File operation helpers for Rails 3 artifacts
242
276
  test_files:
277
+ - spec/dir_spec_helper.rb
243
278
  - spec/fixtures.rb
244
279
  - spec/fixtures/app/controllers/application_controller.rb
245
280
  - spec/fixtures/app/controllers/users_controller.rb