contact_us 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe "Navigation" do
4
- include Capybara
5
4
 
6
5
  it "should be a valid app" do
7
6
  ::Rails.application.should be_a(Dummy::Application)
@@ -58,7 +57,7 @@ describe "Navigation" do
58
57
  end
59
58
 
60
59
  it "I should see two error messages" do
61
- page.should have_content 'is invalid'
60
+ page.should have_content "is invalid"
62
61
  page.should have_content "can't be blank"
63
62
  end
64
63
 
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Rake tasks" do
4
+
5
+ describe "contact_us:install" do
6
+
7
+ after(:each) do
8
+ @destination_root = File.expand_path("../../dummy", __FILE__)
9
+ FileUtils.rm_rf(@destination_root + "/config/initializers/contact_us.rb")
10
+ FileUtils.rm_rf(@destination_root + "/config/locales/contact_us.en.yml")
11
+ FileUtils.rm_rf(@destination_root + "/app/views/contact_us")
12
+ FileUtils.rm_rf(@destination_root + "/app/views/contact_us/contact_mailer")
13
+ FileUtils.rm_rf(@destination_root + "/app/views/contact_us/contacts")
14
+ end
15
+
16
+ before(:each) do
17
+ @destination_root = File.expand_path("../../dummy", __FILE__)
18
+ File.exists?(@destination_root + "/config/initializers/contact_us.rb").should eql(false)
19
+ File.exists?(@destination_root + "/config/locales/contact_us.en.yml").should eql(false)
20
+ Dir.exists?(@destination_root + "/app/views/contact_us").should eql(false)
21
+ Dir.exists?(@destination_root + "/app/views/contact_us/contact_mailer").should eql(false)
22
+ Dir.exists?(@destination_root + "/app/views/contact_us/contacts").should eql(false)
23
+
24
+ silence_stream(STDOUT) { ContactUs::Tasks::Install.run }
25
+ end
26
+
27
+ it "creates initializer file" do
28
+ File.exists?(File.join(@destination_root + "/config/initializers/contact_us.rb")).should eql(true)
29
+ end
30
+
31
+ it "creates locales files" do
32
+ File.exists?(File.join(@destination_root + "/config/locales/contact_us.en.yml")).should eql(true)
33
+ end
34
+
35
+ it "creates view files" do
36
+ File.directory?(@destination_root + "/app/views/contact_us").should eql(true)
37
+ File.directory?(@destination_root + "/app/views/contact_us/contact_mailer").should eql(true)
38
+ File.directory?(@destination_root + "/app/views/contact_us/contacts").should eql(true)
39
+ end
40
+
41
+ end
42
+
43
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require File.dirname(__FILE__) + '/../lib/contact_us/tasks/install'
2
+
1
3
  # Configure Rails Envinronment
2
4
  ENV["RAILS_ENV"] = "test"
3
5
 
@@ -5,9 +7,9 @@ require 'simplecov'
5
7
  SimpleCov.start do
6
8
  add_filter '/config/'
7
9
  add_group 'Controllers', 'app/controllers'
10
+ add_group 'Helpers', 'app/helpers'
8
11
  add_group 'Mailers', 'app/mailers'
9
12
  add_group 'Models', 'app/models'
10
- add_group 'Helpers', 'app/helpers'
11
13
  add_group 'Libraries', 'lib'
12
14
  add_group 'Specs', 'spec'
13
15
  end
@@ -30,12 +32,8 @@ Capybara.default_selector = :css
30
32
  # Run any available migration
31
33
  ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
32
34
 
33
- # Load support files
34
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
35
-
36
35
  RSpec.configure do |config|
37
- # Remove this line if you don't want RSpec's should and should_not
38
- # methods or matchers
36
+ # Remove this line if you don't want RSpec's should and should_not methods or matchers
39
37
  require 'rspec/expectations'
40
38
  config.include RSpec::Matchers
41
39
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: contact_us
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Dutil
@@ -10,23 +10,22 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-17 00:00:00 -04:00
13
+ date: 2011-08-01 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: capybara
18
- prerelease: false
19
18
  requirement: &id001 !ruby/object:Gem::Requirement
20
19
  none: false
21
20
  requirements:
22
- - - ">="
21
+ - - ~>
23
22
  - !ruby/object:Gem::Version
24
- version: 0.4.0
23
+ version: 0.4.1
25
24
  type: :development
25
+ prerelease: false
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-rails
29
- prerelease: false
30
29
  requirement: &id002 !ruby/object:Gem::Requirement
31
30
  none: false
32
31
  requirements:
@@ -34,10 +33,10 @@ dependencies:
34
33
  - !ruby/object:Gem::Version
35
34
  version: "2.6"
36
35
  type: :development
36
+ prerelease: false
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: simplecov
40
- prerelease: false
41
40
  requirement: &id003 !ruby/object:Gem::Requirement
42
41
  none: false
43
42
  requirements:
@@ -45,10 +44,10 @@ dependencies:
45
44
  - !ruby/object:Gem::Version
46
45
  version: 0.4.2
47
46
  type: :development
47
+ prerelease: false
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: sqlite3
51
- prerelease: false
52
51
  requirement: &id004 !ruby/object:Gem::Requirement
53
52
  none: false
54
53
  requirements:
@@ -56,10 +55,10 @@ dependencies:
56
55
  - !ruby/object:Gem::Version
57
56
  version: 1.3.3
58
57
  type: :development
58
+ prerelease: false
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: formtastic
62
- prerelease: false
63
62
  requirement: &id005 !ruby/object:Gem::Requirement
64
63
  none: false
65
64
  requirements:
@@ -67,10 +66,10 @@ dependencies:
67
66
  - !ruby/object:Gem::Version
68
67
  version: 1.2.0
69
68
  type: :runtime
69
+ prerelease: false
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rails
73
- prerelease: false
74
73
  requirement: &id006 !ruby/object:Gem::Requirement
75
74
  none: false
76
75
  requirements:
@@ -78,8 +77,9 @@ dependencies:
78
77
  - !ruby/object:Gem::Version
79
78
  version: 3.0.0
80
79
  type: :runtime
80
+ prerelease: false
81
81
  version_requirements: *id006
82
- description: A Rails 3 Engine providing a basic contact form. I used Formtastic to keep things simple, and to hook into your apps custom Formtastic stylesheets.
82
+ description: A Rails 3+ Engine providing a basic contact form. I used Formtastic to keep things simple, and to hook into your apps custom Formtastic stylesheets.
83
83
  email:
84
84
  - JDutil@BurlingtonWebApps.com
85
85
  executables: []
@@ -103,6 +103,7 @@ files:
103
103
  - config/locales/contact_us.en.yml
104
104
  - config/routes.rb
105
105
  - lib/contact_us/engine.rb
106
+ - lib/contact_us/tasks/install.rb
106
107
  - lib/contact_us/version.rb
107
108
  - lib/contact_us.rb
108
109
  - lib/tasks/install.rake
@@ -148,6 +149,7 @@ files:
148
149
  - spec/dummy/Rakefile
149
150
  - spec/dummy/script/rails
150
151
  - spec/integration/navigation_spec.rb
152
+ - spec/lib/install_spec.rb
151
153
  - spec/mailers/contact_us/contact_mailer_spec.rb
152
154
  - spec/models/contact_us/contact_spec.rb
153
155
  - spec/spec_helper.rb
@@ -165,20 +167,26 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
167
  requirements:
166
168
  - - ">="
167
169
  - !ruby/object:Gem::Version
170
+ hash: 2577202272888493590
171
+ segments:
172
+ - 0
168
173
  version: "0"
169
174
  required_rubygems_version: !ruby/object:Gem::Requirement
170
175
  none: false
171
176
  requirements:
172
177
  - - ">="
173
178
  - !ruby/object:Gem::Version
179
+ hash: 2577202272888493590
180
+ segments:
181
+ - 0
174
182
  version: "0"
175
183
  requirements: []
176
184
 
177
185
  rubyforge_project: contact_us
178
- rubygems_version: 1.5.2
186
+ rubygems_version: 1.6.2
179
187
  signing_key:
180
188
  specification_version: 3
181
- summary: Gem providing simple Contact Us functionality with a Rails 3 Engine.
189
+ summary: Gem providing simple Contact Us functionality with a Rails 3+ Engine.
182
190
  test_files:
183
191
  - spec/contact_us_spec.rb
184
192
  - spec/controllers/contact_us/contact_controller_spec.rb
@@ -221,6 +229,7 @@ test_files:
221
229
  - spec/dummy/Rakefile
222
230
  - spec/dummy/script/rails
223
231
  - spec/integration/navigation_spec.rb
232
+ - spec/lib/install_spec.rb
224
233
  - spec/mailers/contact_us/contact_mailer_spec.rb
225
234
  - spec/models/contact_us/contact_spec.rb
226
235
  - spec/spec_helper.rb