rails_assist 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md ADDED
@@ -0,0 +1,4 @@
1
+ ### 0.4.2
2
+
3
+ Fixed various bugs related to _dir and _dirpath issues
4
+ Also a bugfix for #root_dir due to Rails.root being a Pathname and not a String.
data/Gemfile CHANGED
@@ -5,12 +5,13 @@ source "http://rubygems.org"
5
5
  gem "require_all", "~> 1.2.0"
6
6
  gem "sugar-high", "~> 0.4.0"
7
7
  gem "activesupport", ">= 3.0.4"
8
+
8
9
  # gem "migration_assist", "~> 0.1.7"
9
10
 
10
11
  # Add dependencies to develop your gem here.
11
12
  # Include everything needed to run rake, tests, features, etc.
12
13
  group :development do
13
- gem "rspec", ">= 2.3.0"
14
+ gem "rspec", ">= 2.4.1"
14
15
  gem "bundler", "~> 1.0.0"
15
16
  gem "jeweler", "~> 1.5.2"
16
17
  gem "rcov", ">= 0"
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ Jeweler::Tasks.new do |gem|
16
16
  gem.summary = %Q{File operation helpers for Rails 3 artifacts}
17
17
  gem.description = %Q{Basic file operation helpers for working with Rails 3 artifacts}
18
18
  gem.email = "kmandrup@gmail.com"
19
- gem.homepage = "http://github.com/kristianmandrup/rails3-assist"
19
+ gem.homepage = "http://github.com/kristianmandrup/rails-assist"
20
20
  gem.authors = ["Kristian Mandrup"]
21
21
 
22
22
  gem.add_dependency "require_all", "~> 1.2.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -10,7 +10,8 @@ module RailsAssist::Artifact
10
10
  RailsAssist::Artifact.app_artifacts.each do |name|
11
11
  class_eval %{
12
12
  def #{name}_dirpath options={}
13
- [APP_DIR.app_dirpath(options), '#{name.to_s.pluralize}'].file_join
13
+ _app_dirpath = APP_DIR.app_dirpath(options)
14
+ [_app_dirpath, '#{name.to_s.pluralize}'].file_join
14
15
  end
15
16
 
16
17
  def #{name}_dir options={}
@@ -36,6 +36,12 @@ module RailsAssist
36
36
  raise "Rails Root dir not defined" if _root_dir.nil?
37
37
  ::File.join(_root_dir, '#{name}')
38
38
  end
39
+
40
+ def #{name}_dirpath options={}
41
+ _root_dir = RailsAssist::Directory::Root.root_dirpath(options)
42
+ raise "Rails Root dir not defined" if _root_dir.nil?
43
+ ::File.join(_root_dir, '#{name}')
44
+ end
39
45
  }
40
46
  end
41
47
 
@@ -47,15 +53,15 @@ module RailsAssist
47
53
  end
48
54
 
49
55
  def app_dir_for type, options={}
50
- ::File.join(app_dir(options), type.to_s.pluralize)
56
+ ::File.join(app_dirpath(options), type.to_s.pluralize)
51
57
  end
52
58
 
53
59
  def config_dir_for type, options={}
54
- ::File.join(config_dir(options), type.to_s.pluralize)
60
+ ::File.join(config_dirpath(options), type.to_s.pluralize)
55
61
  end
56
62
 
57
63
  def public_dir_for type, options={}
58
- ::File.join(public_dir(options), type.to_s.pluralize)
64
+ ::File.join(public_dirpath(options), type.to_s.pluralize)
59
65
  end
60
66
  end
61
67
 
@@ -6,8 +6,8 @@ module RailsAssist::Directory
6
6
  end
7
7
 
8
8
  def app_dirpath options={}
9
- rails_root_dir = RailsAssist::Directory::Root.root_dir(options)
10
- [rails_root_dir, 'app'].file_join
9
+ rails_root_dirpath = RailsAssist::Directory::Root.root_dirpath(options)
10
+ [rails_root_dirpath, 'app'].file_join
11
11
  end
12
12
 
13
13
  def app_dir options={}
@@ -10,7 +10,7 @@ module RailsAssist::Directory
10
10
  dir = options[:root_path] if options
11
11
  dir ||= RailsAssist::Directory.rails_root || Rails.root
12
12
  raise "You must set the Rails app root dir: RailsAssist::App.root_dir = '/my/root/dir'" if !dir
13
- dir.path
13
+ dir.to_s.path
14
14
  end
15
15
 
16
16
  def root_dir options={}
data/rails_assist.gemspec CHANGED
@@ -5,25 +5,24 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails_assist}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Kristian Mandrup"]
12
- s.date = %q{2011-03-04}
11
+ s.authors = [%q{Kristian Mandrup}]
12
+ s.date = %q{2011-05-06}
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 = [
16
16
  "LICENSE.txt",
17
- "README.markdown",
18
- "README.rdoc"
17
+ "README.markdown"
19
18
  ]
20
19
  s.files = [
21
20
  ".document",
22
21
  ".rspec",
22
+ "Changelog.md",
23
23
  "Gemfile",
24
24
  "LICENSE.txt",
25
25
  "README.markdown",
26
- "README.rdoc",
27
26
  "Rakefile",
28
27
  "VERSION",
29
28
  "lib/rails_assist.rb",
@@ -133,9 +132,9 @@ Gem::Specification.new do |s|
133
132
  "spec/rails_assist_spec.rb",
134
133
  "spec/spec_helper.rb"
135
134
  ]
136
- s.homepage = %q{http://github.com/kristianmandrup/rails3-assist}
137
- s.require_paths = ["lib"]
138
- s.rubygems_version = %q{1.6.1}
135
+ s.homepage = %q{http://github.com/kristianmandrup/rails-assist}
136
+ s.require_paths = [%q{lib}]
137
+ s.rubygems_version = %q{1.8.0}
139
138
  s.summary = %q{File operation helpers for Rails 3 artifacts}
140
139
  s.test_files = [
141
140
  "spec/dir_spec_helper.rb",
@@ -197,7 +196,7 @@ Gem::Specification.new do |s|
197
196
  s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
198
197
  s.add_runtime_dependency(%q<sugar-high>, ["~> 0.4.0"])
199
198
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.4"])
200
- s.add_development_dependency(%q<rspec>, [">= 2.3.0"])
199
+ s.add_development_dependency(%q<rspec>, [">= 2.4.1"])
201
200
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
202
201
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
203
202
  s.add_development_dependency(%q<rcov>, [">= 0"])
@@ -208,7 +207,7 @@ Gem::Specification.new do |s|
208
207
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
209
208
  s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
210
209
  s.add_dependency(%q<activesupport>, [">= 3.0.4"])
211
- s.add_dependency(%q<rspec>, [">= 2.3.0"])
210
+ s.add_dependency(%q<rspec>, [">= 2.4.1"])
212
211
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
213
212
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
214
213
  s.add_dependency(%q<rcov>, [">= 0"])
@@ -220,7 +219,7 @@ Gem::Specification.new do |s|
220
219
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
221
220
  s.add_dependency(%q<sugar-high>, ["~> 0.4.0"])
222
221
  s.add_dependency(%q<activesupport>, [">= 3.0.4"])
223
- s.add_dependency(%q<rspec>, [">= 2.3.0"])
222
+ s.add_dependency(%q<rspec>, [">= 2.4.1"])
224
223
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
225
224
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
226
225
  s.add_dependency(%q<rcov>, [">= 0"])
@@ -18,6 +18,7 @@ describe RailsAssist::Artifact::Directory do
18
18
  eval %{
19
19
  describe '##{name}_dir' do
20
20
  it "should return #{name} directory name" do
21
+ CLASS.#{name}_dirpath.should match /app\/\#{name}/
21
22
  CLASS.#{name}_dir.path.should match /app\/\#{name}/
22
23
  @test.#{name}_dir.path.should match /app\/\#{name}/
23
24
  end
@@ -38,6 +38,7 @@ describe RailsAssist::Directory::App do
38
38
 
39
39
  describe '#app_dir' do
40
40
  it "should the current Rails 3 ap dir when Rails root is set" do
41
+ AppDir.new.app_dirpath.should == File.join(rails_root, 'app')
41
42
  AppDir.new.app_dir.path.should == File.join(rails_root, 'app')
42
43
  end
43
44
  end
@@ -37,10 +37,15 @@ describe RailsAssist::Directory::Root do
37
37
  end
38
38
  end
39
39
 
40
+ describe '#self.root_dirpath' do
41
+ it "should the current Rails 3 ap dir when Rails root is set" do
42
+ CLASS.root_dirpath.should == rails_root
43
+ end
44
+ end
45
+
40
46
  describe '#root_dir' do
41
47
  it "should the current Rails 3 ap dir when Rails root is set" do
42
48
  RootDir.new.root_dir.path.should == rails_root
43
49
  end
44
50
  end
45
51
  end
46
-
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.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-03-04 00:00:00.000000000 +01:00
13
- default_executable:
12
+ date: 2011-05-06 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: require_all
17
- requirement: &2154099680 !ruby/object:Gem::Requirement
16
+ requirement: &2153391400 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,10 +21,10 @@ dependencies:
22
21
  version: 1.2.0
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2154099680
24
+ version_requirements: *2153391400
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: sugar-high
28
- requirement: &2154098260 !ruby/object:Gem::Requirement
27
+ requirement: &2153390360 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ~>
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: 0.4.0
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *2154098260
35
+ version_requirements: *2153390360
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: activesupport
39
- requirement: &2154096900 !ruby/object:Gem::Requirement
38
+ requirement: &2153389580 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ! '>='
@@ -44,21 +43,21 @@ dependencies:
44
43
  version: 3.0.4
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *2154096900
46
+ version_requirements: *2153389580
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: rspec
50
- requirement: &2154095440 !ruby/object:Gem::Requirement
49
+ requirement: &2153388700 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ! '>='
54
53
  - !ruby/object:Gem::Version
55
- version: 2.3.0
54
+ version: 2.4.1
56
55
  type: :development
57
56
  prerelease: false
58
- version_requirements: *2154095440
57
+ version_requirements: *2153388700
59
58
  - !ruby/object:Gem::Dependency
60
59
  name: bundler
61
- requirement: &2154093980 !ruby/object:Gem::Requirement
60
+ requirement: &2153387960 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ~>
@@ -66,10 +65,10 @@ dependencies:
66
65
  version: 1.0.0
67
66
  type: :development
68
67
  prerelease: false
69
- version_requirements: *2154093980
68
+ version_requirements: *2153387960
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: jeweler
72
- requirement: &2154092960 !ruby/object:Gem::Requirement
71
+ requirement: &2153387200 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ~>
@@ -77,10 +76,10 @@ dependencies:
77
76
  version: 1.5.2
78
77
  type: :development
79
78
  prerelease: false
80
- version_requirements: *2154092960
79
+ version_requirements: *2153387200
81
80
  - !ruby/object:Gem::Dependency
82
81
  name: rcov
83
- requirement: &2154091500 !ruby/object:Gem::Requirement
82
+ requirement: &2153386540 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ! '>='
@@ -88,10 +87,10 @@ dependencies:
88
87
  version: '0'
89
88
  type: :development
90
89
  prerelease: false
91
- version_requirements: *2154091500
90
+ version_requirements: *2153386540
92
91
  - !ruby/object:Gem::Dependency
93
92
  name: require_all
94
- requirement: &2154089240 !ruby/object:Gem::Requirement
93
+ requirement: &2153385800 !ruby/object:Gem::Requirement
95
94
  none: false
96
95
  requirements:
97
96
  - - ~>
@@ -99,10 +98,10 @@ dependencies:
99
98
  version: 1.2.0
100
99
  type: :runtime
101
100
  prerelease: false
102
- version_requirements: *2154089240
101
+ version_requirements: *2153385800
103
102
  - !ruby/object:Gem::Dependency
104
103
  name: sugar-high
105
- requirement: &2154082420 !ruby/object:Gem::Requirement
104
+ requirement: &2153385040 !ruby/object:Gem::Requirement
106
105
  none: false
107
106
  requirements:
108
107
  - - ~>
@@ -110,10 +109,10 @@ dependencies:
110
109
  version: 0.4.0
111
110
  type: :runtime
112
111
  prerelease: false
113
- version_requirements: *2154082420
112
+ version_requirements: *2153385040
114
113
  - !ruby/object:Gem::Dependency
115
114
  name: activesupport
116
- requirement: &2154081700 !ruby/object:Gem::Requirement
115
+ requirement: &2153384380 !ruby/object:Gem::Requirement
117
116
  none: false
118
117
  requirements:
119
118
  - - ! '>='
@@ -121,7 +120,7 @@ dependencies:
121
120
  version: 3.0.4
122
121
  type: :runtime
123
122
  prerelease: false
124
- version_requirements: *2154081700
123
+ version_requirements: *2153384380
125
124
  description: Basic file operation helpers for working with Rails 3 artifacts
126
125
  email: kmandrup@gmail.com
127
126
  executables: []
@@ -129,14 +128,13 @@ extensions: []
129
128
  extra_rdoc_files:
130
129
  - LICENSE.txt
131
130
  - README.markdown
132
- - README.rdoc
133
131
  files:
134
132
  - .document
135
133
  - .rspec
134
+ - Changelog.md
136
135
  - Gemfile
137
136
  - LICENSE.txt
138
137
  - README.markdown
139
- - README.rdoc
140
138
  - Rakefile
141
139
  - VERSION
142
140
  - lib/rails_assist.rb
@@ -245,8 +243,7 @@ files:
245
243
  - spec/rails_assist/rspec/have_app_config_spec.rb
246
244
  - spec/rails_assist_spec.rb
247
245
  - spec/spec_helper.rb
248
- has_rdoc: true
249
- homepage: http://github.com/kristianmandrup/rails3-assist
246
+ homepage: http://github.com/kristianmandrup/rails-assist
250
247
  licenses: []
251
248
  post_install_message:
252
249
  rdoc_options: []
@@ -260,7 +257,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
257
  version: '0'
261
258
  segments:
262
259
  - 0
263
- hash: -72940984132446014
260
+ hash: -4300273561210783684
264
261
  required_rubygems_version: !ruby/object:Gem::Requirement
265
262
  none: false
266
263
  requirements:
@@ -269,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
266
  version: '0'
270
267
  requirements: []
271
268
  rubyforge_project:
272
- rubygems_version: 1.6.1
269
+ rubygems_version: 1.8.0
273
270
  signing_key:
274
271
  specification_version: 3
275
272
  summary: File operation helpers for Rails 3 artifacts
data/README.rdoc DELETED
@@ -1,19 +0,0 @@
1
- = rails_assist
2
-
3
- Description goes here.
4
-
5
- == Contributing to rails_assist
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2011 Kristian Mandrup. See LICENSE.txt for
18
- further details.
19
-